diff -r d575fd691cf9 -r afe194b6b1cd searchengine/util/cpixtools/src/cpixparsetools.cpp --- a/searchengine/util/cpixtools/src/cpixparsetools.cpp Wed Jun 23 19:26:19 2010 +0300 +++ b/searchengine/util/cpixtools/src/cpixparsetools.cpp Tue Jul 06 15:30:04 2010 +0300 @@ -27,11 +27,67 @@ #include #include #include +#include "wctype.h" + +namespace { + + std::wstring describeException(std::wstring what, const wchar_t* context, const wchar_t* where, const wchar_t* where2) { + std::wstring line; + int l = 0; + bool found = false; + + for (; ; context++) { + if (context == where) { + line += L"*here*"; + found = true; + if (!where2) break; + } + if (context == where2) { + line += L"*here*"; + break; + } + if (!*context) { + line += L"*here*"; + break; + } else if (*context == '\n' && !found) { + l++; + line = L""; + } else { + line += *context; + } + } + for (; *context && *context != '\n' && *context != '\r'; context++) { + line += *context; + } + + std::wostringstream tmp; + tmp<