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

@@ -54,7 +54,6 @@ ExportThread * ExportThread::exp_thread;
ExportThread::ExportThread()
{
exp_thread = 0;
utf8 = false;
browser_name = "Winix Export";
conn_timeout = 5;
conn_max_errors = 3;
@@ -62,17 +61,12 @@ ExportThread::ExportThread()
void ExportThread::SetUTF8(bool use_utf8)
{
utf8 = use_utf8;
}
void ExportThread::SetBaseUrl(const std::wstring & url)
{
// SetBaseUrl() is called before the this thread
// SetBaseUrl() is called before this thread
// is started so we can use 'base_url' later without locking
// the same is for 'utf8'
base_url = url;
}
@@ -277,12 +271,7 @@ return len;
void ExportThread::Convert(const std::wstring & in, std::string & out, bool clear)
{
Lock();
if( utf8 )
PT::WideToUTF8(in, out, clear);
else
AssignString(in, out, clear);
PT::WideToUTF8(in, out, clear);
Unlock();
}