diff -r a5fbfefd615f -r 6547bf8ca13a searchengine/util/cpixtools/src/cpixparsetools.cpp --- a/searchengine/util/cpixtools/src/cpixparsetools.cpp Fri Jun 11 14:43:47 2010 +0300 +++ b/searchengine/util/cpixtools/src/cpixparsetools.cpp Mon Jun 28 10:34:53 2010 +0530 @@ -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<