diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/MirLua | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r-- | plugins/MirLua/Modules/WinAPI/src/winapi.cpp | 50 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_popup/src/main.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_variables/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_clist.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/m_core.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_database.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_hotkeys.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/m_icolib.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_message.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_options.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_sounds.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_options.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_script.cpp | 10 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_script_loader.cpp | 4 |
17 files changed, 67 insertions, 67 deletions
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index 8bb7ec0d8b..40c80555bf 100644 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -23,9 +23,9 @@ static int lua_MessageBox(lua_State *L) static int lua_ShellExecute(lua_State *L)
{
- ptrT command(mir_utf8decodeT(lua_tostring(L, 1)));
- ptrT file(mir_utf8decodeT(lua_tostring(L, 2)));
- ptrT args(mir_utf8decodeT(lua_tostring(L, 3)));
+ ptrW command(mir_utf8decodeW(lua_tostring(L, 1)));
+ ptrW file(mir_utf8decodeW(lua_tostring(L, 2)));
+ ptrW args(mir_utf8decodeW(lua_tostring(L, 3)));
int flags = lua_tointeger(L, 4);
::ShellExecute(NULL, command, file, args, NULL, flags);
@@ -62,8 +62,8 @@ static int lua_FindIterator(lua_State *L) }
}
- if (!mir_tstrcmpi(ffd.cFileName, L".") ||
- !mir_tstrcmpi(ffd.cFileName, L"..") ||
+ if (!mir_wstrcmpi(ffd.cFileName, L".") ||
+ !mir_wstrcmpi(ffd.cFileName, L"..") ||
(ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT))
{
lua_pushlightuserdata(L, hFind);
@@ -98,7 +98,7 @@ static int lua_FindIterator(lua_State *L) static int lua_Find(lua_State *L)
{
- wchar_t *path = mir_utf8decodeT(luaL_checkstring(L, 1));
+ wchar_t *path = mir_utf8decodeW(luaL_checkstring(L, 1));
lua_pushlightuserdata(L, NULL);
lua_pushlightuserdata(L, path);
@@ -121,9 +121,9 @@ static int lua_GetKeyState(lua_State *L) static int lua_GetIniValue(lua_State *L)
{
- ptrT path(mir_utf8decodeT(luaL_checkstring(L, 1)));
- ptrT section(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT key(mir_utf8decodeT(luaL_checkstring(L, 3)));
+ ptrW path(mir_utf8decodeW(luaL_checkstring(L, 1)));
+ ptrW section(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW key(mir_utf8decodeW(luaL_checkstring(L, 3)));
if (lua_isinteger(L, 4))
{
@@ -135,7 +135,7 @@ static int lua_GetIniValue(lua_State *L) return 1;
}
- ptrT default(mir_utf8decodeT(lua_tostring(L, 4)));
+ ptrW default(mir_utf8decodeW(lua_tostring(L, 4)));
wchar_t value[MAX_PATH] = { 0 };
if (!::GetPrivateProfileString(section, key, default, value, _countof(value), path))
@@ -143,7 +143,7 @@ static int lua_GetIniValue(lua_State *L) lua_pushvalue(L, 4);
}
- ptrA res(mir_utf8encodeT(value));
+ ptrA res(mir_utf8encodeW(value));
lua_pushstring(L, res);
return 1;
@@ -151,10 +151,10 @@ static int lua_GetIniValue(lua_State *L) static int lua_SetIniValue(lua_State *L)
{
- ptrT path(mir_utf8decodeT(luaL_checkstring(L, 1)));
- ptrT section(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT key(mir_utf8decodeT(luaL_checkstring(L, 3)));
- ptrT value(mir_utf8decodeT(lua_tostring(L, 4)));
+ ptrW path(mir_utf8decodeW(luaL_checkstring(L, 1)));
+ ptrW section(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW key(mir_utf8decodeW(luaL_checkstring(L, 3)));
+ ptrW value(mir_utf8decodeW(lua_tostring(L, 4)));
bool res = ::WritePrivateProfileString(section, key, value, path) != 0;
lua_pushboolean(L, res);
@@ -164,9 +164,9 @@ static int lua_SetIniValue(lua_State *L) static int lua_DeleteIniValue(lua_State *L)
{
- ptrT path(mir_utf8decodeT(luaL_checkstring(L, 1)));
- ptrT section(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT key(mir_utf8decodeT(luaL_checkstring(L, 3)));
+ ptrW path(mir_utf8decodeW(luaL_checkstring(L, 1)));
+ ptrW section(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW key(mir_utf8decodeW(luaL_checkstring(L, 3)));
bool res = ::WritePrivateProfileString(section, key, NULL, path) != 0;
lua_pushboolean(L, res);
@@ -179,8 +179,8 @@ static int lua_DeleteIniValue(lua_State *L) static int lua_GetRegValue(lua_State *L)
{
HKEY hRootKey = (HKEY)luaL_checkinteger(L, 1);
- ptrT path(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT valueName(mir_utf8decodeT(luaL_checkstring(L, 3)));
+ ptrW path(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW valueName(mir_utf8decodeW(luaL_checkstring(L, 3)));
HKEY hKey = 0;
LSTATUS res = ::RegOpenKeyEx(hRootKey, path, NULL, KEY_READ, &hKey);
@@ -240,8 +240,8 @@ static int lua_GetRegValue(lua_State *L) static int lua_SetRegValue(lua_State *L)
{
HKEY hRootKey = (HKEY)luaL_checkinteger(L, 1);
- ptrT path(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT valueName(mir_utf8decodeT(luaL_checkstring(L, 3)));
+ ptrW path(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW valueName(mir_utf8decodeW(luaL_checkstring(L, 3)));
HKEY hKey = 0;
LSTATUS res = ::RegOpenKeyEx(hRootKey, path, NULL, KEY_WRITE, &hKey);
@@ -275,7 +275,7 @@ static int lua_SetRegValue(lua_State *L) case LUA_TSTRING:
type = REG_SZ;
length = mir_strlen(lua_tostring(L, 4)) * sizeof(wchar_t);
- value = (BYTE*)mir_utf8decodeT(lua_tostring(L, 4));
+ value = (BYTE*)mir_utf8decodeW(lua_tostring(L, 4));
break;
default:
@@ -296,8 +296,8 @@ static int lua_SetRegValue(lua_State *L) static int lua_DeleteRegValue(lua_State *L)
{
HKEY hRootKey = (HKEY)luaL_checkinteger(L, 1);
- ptrT path(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT valueName(mir_utf8decodeT(luaL_checkstring(L, 3)));
+ ptrW path(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW valueName(mir_utf8decodeW(luaL_checkstring(L, 3)));
HKEY hKey = 0;
LSTATUS res = ::RegOpenKeyEx(hRootKey, path, NULL, KEY_WRITE, &hKey);
diff --git a/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp b/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp index de2fbdc021..f8f7ce7b7f 100644 --- a/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp +++ b/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp @@ -22,7 +22,7 @@ static BBButton* MakeBBButton(lua_State *L) bbb->bbbFlags &= ~BBBF_ANSITOOLTIP;
lua_getfield(L, -1, "Tooltip");
- bbb->ptszTooltip = mir_utf8decodeT(lua_tostring(L, -1));
+ bbb->ptszTooltip = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Icon");
@@ -140,7 +140,7 @@ extern "C" LUAMOD_API int luaopen_m_msg_buttonsbar(lua_State *L) lua_register(L, MT_CUSTOMBUTTONCLICKDATA, bcd_new);
luaL_newmetatable(L, MT_CUSTOMBUTTONCLICKDATA);
- lua_pushcfunction(L, bcd__index); + lua_pushcfunction(L, bcd__index);
lua_setfield(L, -2, "__index");
lua_pop(L, 1);
diff --git a/plugins/MirLua/Modules/m_popup/src/main.cpp b/plugins/MirLua/Modules/m_popup/src/main.cpp index 288f03c1ca..c169ba72e6 100644 --- a/plugins/MirLua/Modules/m_popup/src/main.cpp +++ b/plugins/MirLua/Modules/m_popup/src/main.cpp @@ -5,11 +5,11 @@ static POPUPDATAT* MakePopupData(lua_State *L) POPUPDATAT *ppd = (POPUPDATAT*)mir_calloc(sizeof(POPUPDATAT));
lua_getfield(L, -1, "ContactName");
- mir_tstrcpy(ppd->lptzContactName, ptrT(mir_utf8decodeT(lua_tostring(L, -1))));
+ mir_wstrcpy(ppd->lptzContactName, ptrW(mir_utf8decodeW(lua_tostring(L, -1))));
lua_pop(L, 1);
lua_getfield(L, -1, "Text");
- mir_tstrcpy(ppd->lptzText, ptrT(mir_utf8decodeT(luaL_checkstring(L, -1))));
+ mir_wstrcpy(ppd->lptzText, ptrW(mir_utf8decodeW(luaL_checkstring(L, -1))));
lua_pop(L, 1);
lua_getfield(L, -1, "hContact");
@@ -60,11 +60,11 @@ static POPUPDATA2* MakePopupData2(lua_State *L) ppd->flags |= PU2_TCHAR;
lua_getfield(L, -1, "Title");
- ppd->lptzTitle = mir_utf8decodeT(lua_tostring(L, -1));
+ ppd->lptzTitle = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Text");
- ppd->lptzText = mir_utf8decodeT(luaL_checkstring(L, -1));
+ ppd->lptzText = mir_utf8decodeW(luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "hContact");
diff --git a/plugins/MirLua/Modules/m_variables/src/main.cpp b/plugins/MirLua/Modules/m_variables/src/main.cpp index 308325e202..a9c5204f96 100644 --- a/plugins/MirLua/Modules/m_variables/src/main.cpp +++ b/plugins/MirLua/Modules/m_variables/src/main.cpp @@ -8,7 +8,7 @@ static int lua_Parse(lua_State *L) return 1;
}
- ptrT format(mir_utf8decodeT(luaL_checkstring(L, 1)));
+ ptrW format(mir_utf8decodeW(luaL_checkstring(L, 1)));
MCONTACT hContact = lua_tointeger(L, 2);
wchar_t *res = variables_parse_ex(format, NULL, hContact, NULL, 0);
diff --git a/plugins/MirLua/src/m_clist.cpp b/plugins/MirLua/src/m_clist.cpp index 70ac7ebfe3..59a5415b32 100644 --- a/plugins/MirLua/src/m_clist.cpp +++ b/plugins/MirLua/src/m_clist.cpp @@ -6,7 +6,7 @@ static int clist_AddMainMenuRoot(lua_State *L) int position = lua_tointeger(L, 2);
HANDLE hIcon = (HANDLE)lua_touserdata(L, 3);
- HGENMENU res = Menu_CreateRoot(MO_MAIN, ptrT(Utf8DecodeT(name)), position, hIcon);
+ HGENMENU res = Menu_CreateRoot(MO_MAIN, ptrW(Utf8DecodeT(name)), position, hIcon);
lua_pushlightuserdata(L, res);
return 1;
@@ -29,7 +29,7 @@ static int clist_AddContactMenuRoot(lua_State *L) int position = lua_tointeger(L, 2);
HANDLE hIcon = (HANDLE)lua_touserdata(L, 3);
- HGENMENU res = Menu_CreateRoot(MO_MAIN, ptrT(Utf8DecodeT(name)), position, hIcon);
+ HGENMENU res = Menu_CreateRoot(MO_MAIN, ptrW(Utf8DecodeT(name)), position, hIcon);
lua_pushlightuserdata(L, res);
return 1;
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index 27d4cc7714..07f3c9329e 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -278,7 +278,7 @@ static int core_Translate(lua_State *L) {
char *what = (char*)luaL_checkstring(L, 1);
- ptrT value(mir_utf8decodeT(what));
+ ptrW value(mir_utf8decodeW(what));
lua_pushstring(L, T2Utf(TranslateW_LP(value, hLangpack)));
return 1;
@@ -288,7 +288,7 @@ static int core_Parse(lua_State *L) {
char *what = (char*)luaL_checkstring(L, 1);
- ptrT value(mir_utf8decodeT(what));
+ ptrW value(mir_utf8decodeW(what));
lua_pushstring(L, T2Utf(VARST(value)));
return 1;
@@ -299,7 +299,7 @@ static int core_GetFullPath(lua_State *L) wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
- lua_pushstring(L, ptrA(mir_utf8encodeT(path)));
+ lua_pushstring(L, ptrA(mir_utf8encodeW(path)));
return 1;
}
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index fab5f86d57..5f5ea774d0 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -103,9 +103,9 @@ static int db_GetContactInfo(lua_State *L) }
}
- ptrT value(Contact_GetInfo(type, hContact));
+ ptrW value(Contact_GetInfo(type, hContact));
if (value)
- lua_pushstring(L, ptrA(mir_utf8encodeT(value)));
+ lua_pushstring(L, ptrA(mir_utf8encodeW(value)));
else
{
lua_pushnil(L);
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index 78ed5343d6..e5b33d58a7 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -18,7 +18,7 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi) lua_pop(L, 1);
lua_getfield(L, -1, "Name");
- mi.name.w = mir_utf8decodeT(luaL_checkstring(L, -1));
+ mi.name.w = mir_utf8decodeW(luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Position");
@@ -47,7 +47,7 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi) int position = lua_tointeger(L, 3);
HANDLE hIcon = (HANDLE)lua_touserdata(L, 4);
- HGENMENU res = Menu_CreateRoot(hMenuObject, ptrT(Utf8DecodeT(name)), position, hIcon);
+ HGENMENU res = Menu_CreateRoot(hMenuObject, ptrW(Utf8DecodeT(name)), position, hIcon);
lua_pushlightuserdata(L, res);
return 1;
@@ -78,7 +78,7 @@ static int genmenu_ModifyMenuItem(lua_State *L) {
luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
- ptrT name(mir_utf8decodeT(lua_tostring(L, 2)));
+ ptrW name(mir_utf8decodeW(lua_tostring(L, 2)));
HANDLE hIcolibItem = luaL_opt(L, lua_touserdata, 3, INVALID_HANDLE_VALUE);
int flags = luaL_optinteger(L, 4, -1);
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp index 4023904fe4..c99ef4290b 100644 --- a/plugins/MirLua/src/m_hotkeys.cpp +++ b/plugins/MirLua/src/m_hotkeys.cpp @@ -16,11 +16,11 @@ void MakeHotkey(lua_State *L, HOTKEYDESC &hk) lua_pop(L, 1);
lua_getfield(L, -1, "Description");
- hk.ptszDescription = mir_utf8decodeT(lua_tostring(L, -1));
+ hk.ptszDescription = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Section");
- hk.ptszSection = mir_utf8decodeT(luaL_optstring(L, -1, MODULE));
+ hk.ptszSection = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
lua_pop(L, 1);
lua_getfield(L, -1, "Hotkey");
diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp index 8827cc749c..018931ffb7 100644 --- a/plugins/MirLua/src/m_icolib.cpp +++ b/plugins/MirLua/src/m_icolib.cpp @@ -3,9 +3,9 @@ static int icolib_AddIcon(lua_State *L)
{
const char *name = luaL_checkstring(L, 1);
- ptrT description(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT section(mir_utf8decodeT(luaL_optstring(L, 3, MODULE)));
- ptrT filePath(mir_utf8decodeT(lua_tostring(L, 4)));
+ ptrW description(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW section(mir_utf8decodeW(luaL_optstring(L, 3, MODULE)));
+ ptrW filePath(mir_utf8decodeW(lua_tostring(L, 4)));
if (filePath == NULL)
{
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index b907807929..0a56c791e3 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -3,7 +3,7 @@ static int message_Paste(lua_State *L)
{
MCONTACT hContact = luaL_checkinteger(L, 1);
- ptrT text(mir_utf8decodeT(luaL_checkstring(L, 2)));
+ ptrW text(mir_utf8decodeW(luaL_checkstring(L, 2)));
MessageWindowInputData mwid = { sizeof(MessageWindowInputData) };
mwid.hContact = hContact;
@@ -34,12 +34,12 @@ static int message_Send(lua_State *L) const char *szProto = GetContactProto(hContact);
if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE)
{
- ptrT tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
+ ptrW tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
GCDEST gcd = { szProto, tszChatRoom, GC_EVENT_SENDMESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.bIsMe = TRUE;
gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszText = mir_utf8decodeT(message);
+ gce.ptszText = mir_utf8decodeW(message);
gce.time = time(NULL);
res = CallServiceSync(MS_GC_EVENT, WINDOW_VISIBLE, (LPARAM)&gce);
diff --git a/plugins/MirLua/src/m_options.cpp b/plugins/MirLua/src/m_options.cpp index d67106d247..6bb25cbe26 100644 --- a/plugins/MirLua/src/m_options.cpp +++ b/plugins/MirLua/src/m_options.cpp @@ -54,15 +54,15 @@ void MakeOptionDialogPage(lua_State *L, OPTIONSDIALOGPAGE &odp) odp.flags |= ODPF_TCHAR;
lua_getfield(L, -1, "Group");
- odp.pwszGroup = mir_utf8decodeT(lua_tostring(L, -1));
+ odp.pwszGroup = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Title");
- odp.pwszTitle = mir_utf8decodeT(luaL_checkstring(L, -1));
+ odp.pwszTitle = mir_utf8decodeW(luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Tab");
- odp.pwszTab = mir_utf8decodeT(lua_tostring(L, -1));
+ odp.pwszTab = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
int onInitDialogRef = LUA_NOREF;
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index cd31adfe76..0291515ee7 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -3,9 +3,9 @@ static int sounds_AddSound(lua_State *L)
{
ptrA name(mir_utf8decodeA(luaL_checkstring(L, 1)));
- ptrT description(mir_utf8decodeT(luaL_checkstring(L, 2)));
- ptrT section(mir_utf8decodeT(luaL_optstring(L, 3, MODULE)));
- ptrT filePath(mir_utf8decodeT(lua_tostring(L, 4)));
+ ptrW description(mir_utf8decodeW(luaL_checkstring(L, 2)));
+ ptrW section(mir_utf8decodeW(luaL_optstring(L, 3, MODULE)));
+ ptrW filePath(mir_utf8decodeW(lua_tostring(L, 4)));
SKINSOUNDDESCEX ssd = { sizeof(SKINSOUNDDESCEX) };
ssd.pszName = name;
@@ -34,7 +34,7 @@ static int sounds_PlaySound(lua_State *L) static int sounds_PlayFile(lua_State *L)
{
- ptrT filePath(mir_utf8decodeT(luaL_checkstring(L, 1)));
+ ptrW filePath(mir_utf8decodeW(luaL_checkstring(L, 1)));
INT_PTR res = SkinPlaySoundFile(filePath);
lua_pushboolean(L, res == 0);
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index 5386f364d1..b6c62101a6 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -28,11 +28,11 @@ void CMLua::SetPaths() lua_getglobal(L, "package");
FoldersGetCustomPathT(g_hCLibsFolder, path, _countof(path), VARST(MIRLUA_PATHT));
- lua_pushfstring(L, "%s\\?.dll", ptrA(mir_utf8encodeT(path)));
+ lua_pushfstring(L, "%s\\?.dll", ptrA(mir_utf8encodeW(path)));
lua_setfield(L, -2, "cpath");
FoldersGetCustomPathT(g_hScriptsFolder, path, _countof(path), VARST(MIRLUA_PATHT));
- lua_pushfstring(L, "%s\\?.lua", ptrA(mir_utf8encodeT(path)));
+ lua_pushfstring(L, "%s\\?.lua", ptrA(mir_utf8encodeW(path)));
lua_setfield(L, -2, "path");
lua_pop(L, 1);
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index cc902165d6..524cd427bb 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -62,7 +62,7 @@ void CMLuaOptions::OnInitDialog() wchar_t scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
PathToRelativeT(scriptDir, relativeScriptDir, NULL);
- mir_sntprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
+ mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
m_scripts.AddColumn(0, L"Script", 380);
m_scripts.AddColumn(1, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));
diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp index b84c3d978e..f4cfef8c7c 100644 --- a/plugins/MirLua/src/mlua_script.cpp +++ b/plugins/MirLua/src/mlua_script.cpp @@ -5,17 +5,17 @@ CMLuaScript::CMLuaScript(lua_State *L, const wchar_t *path)
: L(L), status(None), unloadRef(LUA_NOREF)
{
- mir_tstrcpy(filePath, path);
+ mir_wstrcpy(filePath, path);
fileName = wcsrchr(filePath, '\\') + 1;
wchar_t *dot = wcsrchr(fileName, '.');
- size_t length = mir_tstrlen(fileName) - mir_tstrlen(dot) + 1;
+ size_t length = mir_wstrlen(fileName) - mir_wstrlen(dot) + 1;
- ptrT name((wchar_t*)mir_calloc(sizeof(wchar_t) * (length + 1)));
- mir_tstrncpy(name, fileName, length);
+ ptrW name((wchar_t*)mir_calloc(sizeof(wchar_t) * (length + 1)));
+ mir_wstrncpy(name, fileName, length);
- moduleName = mir_utf8encodeT(name);
+ moduleName = mir_utf8encodeW(name);
MUUID muidLast = MIID_LAST;
id = GetPluginLangId(muidLast, 0);
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index a8efa32320..3a3d88fbc7 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -7,7 +7,7 @@ CMLuaScriptLoader::CMLuaScriptLoader(lua_State *L) : L(L) void CMLuaScriptLoader::LoadScript(const wchar_t *scriptDir, const wchar_t *file)
{
wchar_t fullPath[MAX_PATH], path[MAX_PATH];
- mir_sntprintf(fullPath, L"%s\\%s", scriptDir, file);
+ mir_snwprintf(fullPath, L"%s\\%s", scriptDir, file);
PathToRelativeT(fullPath, path);
CMLuaScript *script = new CMLuaScript(L, path);
@@ -31,7 +31,7 @@ void CMLuaScriptLoader::LoadScripts() Log(L"Loading scripts from %s", scriptDir);
wchar_t searchMask[MAX_PATH];
- mir_sntprintf(searchMask, L"%s\\%s", scriptDir, L"*.lua");
+ mir_snwprintf(searchMask, L"%s\\%s", scriptDir, L"*.lua");
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(searchMask, &fd);
|