updated to the new pikotools api: changed utf8 functions PascalCase to snake_case

This commit is contained in:
Tomasz Sowa 2021-05-21 00:32:05 +02:00
parent cd1c24d0a5
commit 6f6df9524c
4 changed files with 21 additions and 21 deletions

View File

@ -88,7 +88,7 @@ private:
template<class StreamType> template<class StreamType>
void Functions<StreamType>::Insert(const char * key, UserFunction ufunction) void Functions<StreamType>::Insert(const char * key, UserFunction ufunction)
{ {
pt::UTF8ToWide(key, temp_key); pt::utf8_to_wide(key, temp_key);
functions_tab[temp_key] = ufunction; functions_tab[temp_key] = ufunction;
temp_key.clear(); temp_key.clear();
} }

View File

@ -429,8 +429,8 @@ Generator<StreamType>::~Generator()
template<class StreamType> template<class StreamType>
void Generator<StreamType>::SetCommentary(const char * com_start, const char * com_stop) void Generator<StreamType>::SetCommentary(const char * com_start, const char * com_stop)
{ {
pt::UTF8ToWide(com_start, commentary_start); pt::utf8_to_wide(com_start, commentary_start);
pt::UTF8ToWide(com_stop, commentary_stop); pt::utf8_to_wide(com_stop, commentary_stop);
} }
@ -438,8 +438,8 @@ void Generator<StreamType>::SetCommentary(const char * com_start, const char * c
template<class StreamType> template<class StreamType>
void Generator<StreamType>::SetCommentary(const std::string & com_start, const std::string & com_stop) void Generator<StreamType>::SetCommentary(const std::string & com_start, const std::string & com_stop)
{ {
pt::UTF8ToWide(com_start, commentary_start); pt::utf8_to_wide(com_start, commentary_start);
pt::UTF8ToWide(com_stop, commentary_stop); pt::utf8_to_wide(com_stop, commentary_stop);
} }

View File

@ -155,7 +155,7 @@ protected: \
{ \ { \
EzcTemplateMethod item; \ EzcTemplateMethod item; \
\ \
PT::UTF8ToWide(name, item.fun_name); \ pt::utf8_to_wide(name, item.fun_name); \
item.fun = fun; \ item.fun = fun; \
\ \
ezc_template_method_tab.push_back(item); \ ezc_template_method_tab.push_back(item); \
@ -165,7 +165,7 @@ protected: \
{ \ { \
EzcTemplateMethod item; \ EzcTemplateMethod item; \
\ \
PT::UTF8ToWide(name, item.fun_name); \ pt::utf8_to_wide(name, item.fun_name); \
item.fun = fun; \ item.fun = fun; \
\ \
ezc_template_method_tab.push_back(item); \ ezc_template_method_tab.push_back(item); \
@ -294,7 +294,7 @@ size_t Objects<StreamType>::Size() const
template<class StreamType> template<class StreamType>
void Objects<StreamType>::Clear() void Objects<StreamType>::Clear()
{ {
return obj_tab.clear(); obj_tab.clear();
} }

View File

@ -64,17 +64,17 @@ void PatternParser::Directory(const char * dir, const char * dir2)
directory2.clear(); directory2.clear();
if( dir ) if( dir )
pt::UTF8ToWide(dir, directory); pt::utf8_to_wide(dir, directory);
if( dir2 ) if( dir2 )
pt::UTF8ToWide(dir2, directory2); pt::utf8_to_wide(dir2, directory2);
} }
void PatternParser::Directory(const std::string & dir) void PatternParser::Directory(const std::string & dir)
{ {
pt::UTF8ToWide(dir, directory); pt::utf8_to_wide(dir, directory);
directory2.clear(); directory2.clear();
} }
@ -82,8 +82,8 @@ void PatternParser::Directory(const std::string & dir)
void PatternParser::Directory(const std::string & dir, const std::string & dir2) void PatternParser::Directory(const std::string & dir, const std::string & dir2)
{ {
pt::UTF8ToWide(dir, directory); pt::utf8_to_wide(dir, directory);
pt::UTF8ToWide(dir2, directory2); pt::utf8_to_wide(dir2, directory2);
} }
@ -126,16 +126,16 @@ void PatternParser::SetBlocks(Blocks & blocks)
void PatternParser::SetCommentary(const char * com_start, const char * com_stop) void PatternParser::SetCommentary(const char * com_start, const char * com_stop)
{ {
pt::UTF8ToWide(com_start, commentary_start); pt::utf8_to_wide(com_start, commentary_start);
pt::UTF8ToWide(com_stop, commentary_stop); pt::utf8_to_wide(com_stop, commentary_stop);
} }
void PatternParser::SetCommentary(const std::string & com_start, const std::string & com_stop) void PatternParser::SetCommentary(const std::string & com_start, const std::string & com_stop)
{ {
pt::UTF8ToWide(com_start, commentary_start); pt::utf8_to_wide(com_start, commentary_start);
pt::UTF8ToWide(com_stop, commentary_stop); pt::utf8_to_wide(com_stop, commentary_stop);
} }
@ -195,7 +195,7 @@ void PatternParser::ParseFile(const std::string & file_name, Pattern & pattern)
void PatternParser::ParseFile(const char * file_name, Pattern & pattern) void PatternParser::ParseFile(const char * file_name, Pattern & pattern)
{ {
pat = &pattern; pat = &pattern;
pt::UTF8ToWide(file_name, pat->item_root.file_name); pt::utf8_to_wide(file_name, pat->item_root.file_name);
include_level = 0; include_level = 0;
CreateTreeReadIncludeSkipAllowFlag(pat->item_root); CreateTreeReadIncludeSkipAllowFlag(pat->item_root);
@ -225,7 +225,7 @@ void PatternParser::ParseFile(const wchar_t * file_name, Pattern & pattern)
void PatternParser::ParseString(const char * str, Pattern & pattern) void PatternParser::ParseString(const char * str, Pattern & pattern)
{ {
pt::UTF8ToWide(str, string_content); pt::utf8_to_wide(str, string_content);
ParseString(string_content.c_str(), pattern); ParseString(string_content.c_str(), pattern);
string_content.clear(); string_content.clear();
} }
@ -372,7 +372,7 @@ bool PatternParser::ReadFileFromDir(const std::wstring & dir, const wchar_t * na
file_name = dir; file_name = dir;
file_name += '/'; file_name += '/';
file_name += name; file_name += name;
pt::WideToUTF8(file_name, afile_name); pt::wide_to_utf8(file_name, afile_name);
std::ifstream file(afile_name.c_str()); std::ifstream file(afile_name.c_str());
@ -403,7 +403,7 @@ return true;
void PatternParser::ReadFile(std::ifstream & file, std::wstring & result) void PatternParser::ReadFile(std::ifstream & file, std::wstring & result)
{ {
pt::UTF8ToWide(file, result); pt::utf8_to_wide(file, result);
} }