now winix is using 'pikotools' (confparser, utf8, mainparser)

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@792 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-01-12 02:24:08 +00:00
parent cb33f20a24
commit b2d3ca9543
55 changed files with 1749 additions and 1884 deletions

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2011, Tomasz Sowa
* Copyright (c) 2008-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -13,7 +13,7 @@
#include "misc.h"
#include "log.h"
#include "templates/templates.h"
#include "utf8.h"
#include "utf8/utf8.h"
@@ -645,7 +645,7 @@ bool IsFile(const wchar_t * file)
struct stat sb;
static std::string afile;
Ezc::WideToUTF8(file, afile);
PT::WideToUTF8(file, afile);
return (stat(afile.c_str(), &sb) == 0);
}
@@ -663,7 +663,7 @@ static std::string adir;
if( !IsFile(dir) )
{
Ezc::WideToUTF8(dir, adir);
PT::WideToUTF8(dir, adir);
if( mkdir(adir.c_str(), priv) < 0 )
{
@@ -756,8 +756,8 @@ bool CopyFile(const wchar_t * src, const wchar_t * dst)
static std::string asrc, adst;
FILE * in, * out;
Ezc::WideToUTF8(src, asrc);
Ezc::WideToUTF8(dst, adst);
PT::WideToUTF8(src, asrc);
PT::WideToUTF8(dst, adst);
in = fopen(asrc.c_str(), "rb");
@@ -798,7 +798,7 @@ bool RemoveFile(const wchar_t * file)
{
static std::string afile;
Ezc::WideToUTF8(file, afile);
PT::WideToUTF8(file, afile);
return unlink(afile.c_str()) == 0;
}
@@ -815,8 +815,8 @@ bool RenameFile(const wchar_t * from, const wchar_t * to)
{
static std::string afrom, ato;
Ezc::WideToUTF8(from, afrom);
Ezc::WideToUTF8(to, ato);
PT::WideToUTF8(from, afrom);
PT::WideToUTF8(to, ato);
return rename(afrom.c_str(), ato.c_str()) == 0;
}
@@ -844,7 +844,7 @@ using namespace misc_private;
if( !get_file_content )
return false;
Ezc::UTF8ToWide(get_file_content, content);
PT::UTF8ToWide(get_file_content, content);
get_file_content.close();
return true;
@@ -855,7 +855,7 @@ bool GetUTF8File(const wchar_t * file_path, std::wstring & content, bool clear_c
{
using namespace misc_private;
Ezc::WideToUTF8(file_path, get_file_content_ansi);
PT::WideToUTF8(file_path, get_file_content_ansi);
return GetUTF8File(get_file_content_ansi.c_str(), content, clear_content);
}
@@ -1027,7 +1027,7 @@ void UrlEncode(const std::wstring & in, std::string & out, bool clear_out)
{
static std::string ain;
Ezc::WideToUTF8(in, ain);
PT::WideToUTF8(in, ain);
UrlEncode(ain, out, clear_out);
}
@@ -1049,7 +1049,7 @@ void QEncodeAddChar(wchar_t c, std::string & out)
size_t len1 = sizeof(buf1) / sizeof(char);
size_t len2 = sizeof(buf2) / sizeof(char);
size_t len = Ezc::IntToUTF8(int(c), buf1, len1);
size_t len = PT::IntToUTF8(int(c), buf1, len1);
for(size_t i=0 ; i<len ; ++i)
{