diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/MirLua/Modules | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/Modules')
-rw-r--r-- | plugins/MirLua/Modules/WinAPI/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/MirLua/Modules/WinAPI/src/winapi.cpp | 12 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_variables/src/main.cpp | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/plugins/MirLua/Modules/WinAPI/src/stdafx.h b/plugins/MirLua/Modules/WinAPI/src/stdafx.h index 1e67e7c313..4885e14c2f 100644 --- a/plugins/MirLua/Modules/WinAPI/src/stdafx.h +++ b/plugins/MirLua/Modules/WinAPI/src/stdafx.h @@ -52,7 +52,6 @@ #include <stddef.h>
#include <process.h>
#include <direct.h>
-#include <tchar.h>
#include <shlwapi.h>
#include <shlobj.h>
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index b6d77a2973..8bb7ec0d8b 100644 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -38,7 +38,7 @@ static int lua_ShellExecute(lua_State *L) static int lua_FindIterator(lua_State *L)
{
HANDLE hFind = lua_touserdata(L, lua_upvalueindex(1));
- TCHAR* path = (TCHAR*)lua_touserdata(L, lua_upvalueindex(2));
+ wchar_t* path = (wchar_t*)lua_touserdata(L, lua_upvalueindex(2));
WIN32_FIND_DATA ffd = { 0 };
if (hFind == NULL)
@@ -98,7 +98,7 @@ static int lua_FindIterator(lua_State *L) static int lua_Find(lua_State *L)
{
- TCHAR *path = mir_utf8decodeT(luaL_checkstring(L, 1));
+ wchar_t *path = mir_utf8decodeT(luaL_checkstring(L, 1));
lua_pushlightuserdata(L, NULL);
lua_pushlightuserdata(L, path);
@@ -137,7 +137,7 @@ static int lua_GetIniValue(lua_State *L) ptrT default(mir_utf8decodeT(lua_tostring(L, 4)));
- TCHAR value[MAX_PATH] = { 0 };
+ wchar_t value[MAX_PATH] = { 0 };
if (!::GetPrivateProfileString(section, key, default, value, _countof(value), path))
{
lua_pushvalue(L, 4);
@@ -218,7 +218,7 @@ static int lua_GetRegValue(lua_State *L) case REG_LINK:
case REG_EXPAND_SZ:
{
- ptrA str(Utf8EncodeT((TCHAR*)value));
+ ptrA str(Utf8EncodeT((wchar_t*)value));
lua_pushlstring(L, str, mir_strlen(str));
}
break;
@@ -274,7 +274,7 @@ static int lua_SetRegValue(lua_State *L) case LUA_TSTRING:
type = REG_SZ;
- length = mir_strlen(lua_tostring(L, 4)) * sizeof(TCHAR);
+ length = mir_strlen(lua_tostring(L, 4)) * sizeof(wchar_t);
value = (BYTE*)mir_utf8decodeT(lua_tostring(L, 4));
break;
@@ -1708,7 +1708,7 @@ static int global_GetOpenFileName(lua_State *L) {
_A2T tszExt(lua_tostring(L, 1));
- TCHAR buff[MAX_PATH] = L"";
+ wchar_t buff[MAX_PATH] = L"";
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
diff --git a/plugins/MirLua/Modules/m_variables/src/main.cpp b/plugins/MirLua/Modules/m_variables/src/main.cpp index 8eac605407..308325e202 100644 --- a/plugins/MirLua/Modules/m_variables/src/main.cpp +++ b/plugins/MirLua/Modules/m_variables/src/main.cpp @@ -11,7 +11,7 @@ static int lua_Parse(lua_State *L) ptrT format(mir_utf8decodeT(luaL_checkstring(L, 1)));
MCONTACT hContact = lua_tointeger(L, 2);
- TCHAR *res = variables_parse_ex(format, NULL, hContact, NULL, 0);
+ wchar_t *res = variables_parse_ex(format, NULL, hContact, NULL, 0);
lua_pushstring(L, T2Utf(res));
return 1;
|