changed: now we do not use std::string and char* in the Winix API

everywhere we are using std::wstring and wchar_t*
         (std::string and char* is used only locally in some places
         especially when creating a path to OS file system etc.)
added:   to the special thread when winix closes:
         a write function for curl: FetchPageOnExitCurlCallback()
         without this function the curl library will print
         the page's content to the standart output
changed: TextStream<> class from core can make
         UTF8<->wide strings conversions
removed: from config: utf8 option
         now winix expects UTF8 from the user's input (html forms, url-es)
         and outputs strings in the UTF8 format




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@965 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2014-10-09 20:44:56 +00:00
parent 4abf6642f7
commit 8196fb77d1
74 changed files with 1911 additions and 1612 deletions

View File

@@ -388,10 +388,7 @@ void PostMultiParser::ReadContent()
void PostMultiParser::ConvStr(const std::string & src, std::wstring & dst)
{
if( config->utf8 )
PT::UTF8ToWide(src, dst);
else
AssignString(src, dst);
PT::UTF8ToWide(src, dst);
}
@@ -484,7 +481,7 @@ void PostMultiParser::CheckBoundaryEnd()
void PostMultiParser::CreateTmpFile()
{
wchar_t buf[1024];
wchar_t buf[WINIX_OS_PATH_SIZE];
size_t buf_len = sizeof(buf)/sizeof(wchar_t);
if( config->upload_dir.empty() )
@@ -501,7 +498,7 @@ size_t buf_len = sizeof(buf)/sizeof(wchar_t);
PT::WideToUTF8(tmp_filename, atmp_filename);
tmp_file.open(atmp_filename.c_str(), std::ios_base::binary | std::ios_base::out);
// !! dodac ustawienie chmod config.upload_files_chmod dla tymczasowego pliku
// !! IMPROVE ME dodac ustawienie chmod config.upload_files_chmod dla tymczasowego pliku
if( !tmp_file )
{