From 509fbd91ed545d05cc266a80ec19fe7b9c9d28db Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 20 Jul 2018 13:25:21 +0300 Subject: we don't need two name sets for the same array of functions --- plugins/CmdLine/src/mimcmd_handlers.cpp | 2 +- plugins/MirLua/Modules/WinAPI/src/winapi.cpp | 2 +- plugins/MirLua/src/Modules/m_clist.cpp | 4 ++-- plugins/SpellChecker/src/autoreplace.cpp | 8 ++++---- plugins/Variables/src/parse_miranda.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 8a0a2eaa9f..78bd0710e2 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -720,7 +720,7 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re if (hContact) { bShouldProcessAcks = TRUE; - ptrA szMessage(Utf8EncodeW(message)); + ptrA szMessage(mir_utf8encodeW(message)); HANDLE hProcess = (HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, szMessage); const int MAX_COUNT = 60; int counter = 0; diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index 11b7daebd7..b5184af254 100644 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -218,7 +218,7 @@ static int lua_GetRegValue(lua_State *L) case REG_LINK: case REG_EXPAND_SZ: { - ptrA str(Utf8EncodeW((wchar_t*)value)); + ptrA str(mir_utf8encodeW((wchar_t*)value)); lua_pushlstring(L, str, mir_strlen(str)); } break; diff --git a/plugins/MirLua/src/Modules/m_clist.cpp b/plugins/MirLua/src/Modules/m_clist.cpp index 0b6d390004..6de506cfd0 100644 --- a/plugins/MirLua/src/Modules/m_clist.cpp +++ b/plugins/MirLua/src/Modules/m_clist.cpp @@ -44,7 +44,7 @@ static int clist_AddMainMenuRoot(lua_State *L) int position = lua_tointeger(L, 2); HANDLE hIcon = (HANDLE)lua_touserdata(L, 3); - HGENMENU res = g_plugin.addRootMenu(MO_MAIN, ptrW(Utf8DecodeW(name)), position, hIcon); + HGENMENU res = g_plugin.addRootMenu(MO_MAIN, ptrW(mir_utf8decodeW(name)), position, hIcon); if (res != nullptr) lua_pushlightuserdata(L, res); else @@ -75,7 +75,7 @@ static int clist_AddContactMenuRoot(lua_State *L) int position = lua_tointeger(L, 2); HANDLE hIcon = (HANDLE)lua_touserdata(L, 3); - HGENMENU res = g_plugin.addRootMenu(MO_MAIN, ptrW(Utf8DecodeW(name)), position, hIcon); + HGENMENU res = g_plugin.addRootMenu(MO_MAIN, ptrW(mir_utf8decodeW(name)), position, hIcon); if (res != nullptr) lua_pushlightuserdata(L, res); else diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp index 2dfe7787df..bec1572b85 100644 --- a/plugins/SpellChecker/src/autoreplace.cpp +++ b/plugins/SpellChecker/src/autoreplace.cpp @@ -64,8 +64,8 @@ void AutoReplaceMap::loadAutoReplaceMap() } if (p != nullptr) { - ptrW find(Utf8DecodeW(tmp)); - ptrW replace(Utf8DecodeW(p)); + ptrW find(mir_utf8decodeW(tmp)); + ptrW replace(mir_utf8decodeW(p)); lstrtrim(find); lstrtrim(replace); @@ -102,8 +102,8 @@ void AutoReplaceMap::writeAutoReplaceMap() for (; it != m_replacements.end(); it++) { AutoReplacement &ar = it->second; - ptrA find(Utf8EncodeW(it->first.c_str())); - ptrA replace(Utf8EncodeW(ar.replace.c_str())); + ptrA find(mir_utf8encodeW(it->first.c_str())); + ptrA replace(mir_utf8encodeW(ar.replace.c_str())); if (ar.useVariables) fprintf(file, "%s-V>%s\n", (const char *)find, (const char *)replace); diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 3488fd8d28..e3e042cad5 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -166,7 +166,7 @@ static wchar_t* getDBSetting(MCONTACT hContact, char* module, char* setting, wch var = mir_wstrdup(dbv.pwszVal); break; case DBVT_UTF8: - Utf8Decode(dbv.pszVal, &var); + mir_utf8decode(dbv.pszVal, &var); break; } -- cgit v1.2.3