diff options
97 files changed, 291 insertions, 297 deletions
diff --git a/include/m_core.h b/include/m_core.h index dfbea3077f..8b7e4d80fa 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -98,11 +98,11 @@ MIR_CORE_DLL(int) CallPluginEventHook(HINSTANCE hInst, HANDLE hEvent, WPARAM MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam = 0, LPARAM lParam = 0);
MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam = 0, LPARAM lParam = 0);
-MIR_CORE_DLL(HANDLE) HookEvent(const char* name, MIRANDAHOOK hookProc);
-MIR_CORE_DLL(HANDLE) HookEventParam(const char* name, MIRANDAHOOKPARAM hookProc, LPARAM lParam = 0);
-MIR_CORE_DLL(HANDLE) HookEventObj(const char* name, MIRANDAHOOKOBJ hookProc, void* object);
-MIR_CORE_DLL(HANDLE) HookEventObjParam(const char* name, MIRANDAHOOKOBJPARAM hookProc, void* object, LPARAM lParam);
-MIR_CORE_DLL(HANDLE) HookEventMessage(const char* name, HWND hwnd, UINT message);
+MIR_CORE_DLL(HANDLE) HookEvent(const char *name, MIRANDAHOOK hookProc);
+MIR_CORE_DLL(HANDLE) HookEventParam(const char *name, MIRANDAHOOKPARAM hookProc, LPARAM lParam = 0);
+MIR_CORE_DLL(HANDLE) HookEventObj(const char *name, MIRANDAHOOKOBJ hookProc, void* object);
+MIR_CORE_DLL(HANDLE) HookEventObjParam(const char *name, MIRANDAHOOKOBJPARAM hookProc, void* object, LPARAM lParam);
+MIR_CORE_DLL(HANDLE) HookEventMessage(const char *name, HWND hwnd, UINT message);
MIR_CORE_DLL(int) UnhookEvent(HANDLE hHook);
MIR_CORE_DLL(void) KillObjectEventHooks(void* pObject);
MIR_CORE_DLL(void) KillModuleEventHooks(HINSTANCE pModule);
diff --git a/include/m_langpack.h b/include/m_langpack.h index c158bc89ea..56f8c5b9ce 100644 --- a/include/m_langpack.h +++ b/include/m_langpack.h @@ -45,8 +45,8 @@ EXTERN_C MIR_CORE_DLL(int) LoadLangPackModule(void); EXTERN_C MIR_CORE_DLL(int) LoadLangPack(const TCHAR *szLangPack);
EXTERN_C MIR_CORE_DLL(void) ReloadLangpack(TCHAR *pszStr);
-EXTERN_C MIR_CORE_DLL(char*) TranslateA_LP(const char* str, int hLang);
-EXTERN_C MIR_CORE_DLL(wchar_t*) TranslateW_LP(const wchar_t* str, int hLang);
+EXTERN_C MIR_CORE_DLL(char*) TranslateA_LP(const char *str, int hLang);
+EXTERN_C MIR_CORE_DLL(wchar_t*) TranslateW_LP(const wchar_t *str, int hLang);
EXTERN_C MIR_CORE_DLL(void) TranslateDialog_LP(HWND hDlg, int hLang);
#define Translate(s) TranslateA_LP(s, hLangpack)
@@ -97,7 +97,7 @@ EXTERN_C MIR_CORE_DLL(int) Langpack_GetDefaultLocale(void); // returns a string converted from char* to TCHAR* using the langpack codepage.
// This string should be freed using mir_free() then
-EXTERN_C MIR_CORE_DLL(TCHAR*) Langpack_PcharToTchar(const char* pszStr);
+EXTERN_C MIR_CORE_DLL(TCHAR*) Langpack_PcharToTchar(const char *pszStr);
/////////////////////////////////////////////////////////////////////////////////////////
// initializes the plugin-specific translation context v0.10.0+
diff --git a/include/m_system.h b/include/m_system.h index da061c8c13..ef0191ce48 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_SYSTEM_H__
#define M_SYSTEM_H__ 1
-#include <tchar.h>
-
#ifndef MIRANDANAME
#define MIRANDANAME "Miranda NG"
#endif
diff --git a/libs/libcurl/src/curl_schannel.c b/libs/libcurl/src/curl_schannel.c index e137e05c5a..d39cb8371e 100644 --- a/libs/libcurl/src/curl_schannel.c +++ b/libs/libcurl/src/curl_schannel.c @@ -1275,11 +1275,11 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex) /* this is a wildcard cert. try matching the last len - 1 chars */ int hostname_len = strlen(conn->host.name); cert_hostname.tchar_ptr++; - if(_tcsicmp(cert_hostname.const_tchar_ptr, + if(wcsicmp(cert_hostname.const_tchar_ptr, hostname.const_tchar_ptr + hostname_len - len + 2) != 0) result = CURLE_PEER_FAILED_VERIFICATION; } - else if(len == 0 || _tcsicmp(hostname.const_tchar_ptr, + else if(len == 0 || wcsicmp(hostname.const_tchar_ptr, cert_hostname.const_tchar_ptr) != 0) { result = CURLE_PEER_FAILED_VERIFICATION; } diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index a010c5b19d..15f0fd185f 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -227,7 +227,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (options.auto_size_vert && IsWindowVisible(hwnd)) {
if (FrameIsFloating()) {
int height = height_client_to_frame(itemheight * count, GetWindowLongPtr(GetParent(hwnd), GWL_STYLE), GetWindowLongPtr(GetParent(hwnd), GWL_EXSTYLE));
- HWND titleBarHwnd = FindWindowEx(GetParent(hwnd), 0, _T(CLUIFrameTitleBarClassName), 0);
+ HWND titleBarHwnd = FindWindowEx(GetParent(hwnd), 0, _A2W(CLUIFrameTitleBarClassName), 0);
if (titleBarHwnd) {
RECT tbr;
GetWindowRect(titleBarHwnd, &tbr);
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 7713166680..495cb4f125 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -316,7 +316,7 @@ static BOOL EnsureAssocRegistered(const ASSOCDATA *assoc) // register class
if (fUseMainCmdLine) pszDdeCmd = NULL;
else pszDdeCmd = fIsUrl ? DDEURLCMD : DDEFILECMD;
- fSuccess = AddRegClass(assoc->pszClassName, assoc->pszDescription, pszIconLoc, _T(MIRANDANAME), pszRunCmd, pszDdeCmd, DDEAPP, DDETOPIC, assoc->pszVerbDesc, assoc->flags&FTDF_BROWSERAUTOOPEN, fIsUrl, assoc->flags&FTDF_ISSHORTCUT);
+ fSuccess = AddRegClass(assoc->pszClassName, assoc->pszDescription, pszIconLoc, _A2W(MIRANDANAME), pszRunCmd, pszDdeCmd, DDEAPP, DDETOPIC, assoc->pszVerbDesc, assoc->flags&FTDF_BROWSERAUTOOPEN, fIsUrl, assoc->flags&FTDF_ISSHORTCUT);
mir_free(pszIconLoc); // does NULL check
// file type
if (fSuccess && !fIsUrl) {
@@ -960,14 +960,14 @@ void InitAssocList(void) pszAppFileName = MakeAppFileName(TRUE);
pszRunCmd = MakeRunCommand(TRUE, FALSE);
if (pszAppFileName != NULL && pszRunCmd != NULL)
- AddRegOpenWith(pszAppFileName, FALSE, _T(MIRANDANAME), pszIconLoc, pszRunCmd, NULL, NULL, NULL);
+ AddRegOpenWith(pszAppFileName, FALSE, _A2W(MIRANDANAME), pszIconLoc, pszRunCmd, NULL, NULL, NULL);
mir_free(pszRunCmd); // does NULL check
mir_free(pszAppFileName); // does NULL check
// assocmgr.dll
pszAppFileName = MakeAppFileName(FALSE);
pszRunCmd = MakeRunCommand(FALSE, TRUE);
if (pszAppFileName != NULL && pszRunCmd != NULL)
- AddRegOpenWith(pszAppFileName, TRUE, _T(MIRANDANAME), pszIconLoc, pszRunCmd, DDEFILECMD, DDEAPP, DDETOPIC);
+ AddRegOpenWith(pszAppFileName, TRUE, _A2W(MIRANDANAME), pszIconLoc, pszRunCmd, DDEFILECMD, DDEAPP, DDETOPIC);
mir_free(pszRunCmd); // does NULL check
mir_free(pszAppFileName); // does NULL check
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index d5cfa13b05..1bdd09efaa 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -94,7 +94,7 @@ static void WinNT_PollThread(void *vparam) dwObjectId = 238; /*'Processor' object */
dwCounterId = 6; /* '% processor time' counter */
pwszInstanceName = L"_Total"; /* '_Total' instance */
- _itot_s(dwObjectId, wszValueName, 10);
+ _itow_s(dwObjectId, wszValueName, 10);
fSwitched = WinNT_PerfStatsSwitch(L"PerfOS", FALSE);
/* poll */
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index 2c7bbeef11..f936953b4b 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -41,7 +41,7 @@ static LRESULT CALLBACK DumbPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, void InitPopups()
{
// window needed for popup commands
- hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MODULE_NAME) L"_PopupWindow",
+ hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _A2W(MODULE_NAME) L"_PopupWindow",
0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP,
NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
@@ -57,7 +57,7 @@ void DeInitPopups() // Show an error popup
void ShowErrPopup(const wchar_t *description, const wchar_t *title)
{
- ShowPopupEx(NULL, title == NULL ? _T(MODULE_NAME) L" Error" : title, description,
+ ShowPopupEx(NULL, title == NULL ? _A2W(MODULE_NAME) L" Error" : title, description,
NULL, POPUP_TYPE_ERROR, NULL);
}
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index acef282daf..ea4c0c93fc 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -424,7 +424,7 @@ int ReloadColors(WPARAM, LPARAM) {
ColourIDT colourid = { 0 };
colourid.cbSize = sizeof(colourid);
- mir_tstrcpy(colourid.group, _T(ModuleName));
+ mir_tstrcpy(colourid.group, _A2W(ModuleName));
mir_tstrcpy(colourid.name, LPGENW("Frame background"));
clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, 0);
@@ -469,7 +469,7 @@ void CreateFrame() strcpy_s(colourid.dbSettingsGroup, ModuleName);
strcpy_s(colourid.setting, "ColorFrame");
wcscpy_s(colourid.name, LPGENW("Frame background"));
- wcscpy_s(colourid.group, _T(ModuleName));
+ wcscpy_s(colourid.group, _A2W(ModuleName));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 01176f8b8e..7ad20eb6b9 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -570,7 +570,7 @@ std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, wchar_t buf[32];
std::map<std::wstring, bool>::iterator it = existingContacts.find(name);
while(it != existingContacts.end()) {
- _itot_s(++i, buf, 10);
+ _itow_s(++i, buf, 10);
name = baseName1 + buf;
it = existingContacts.find(name);
}
diff --git a/plugins/ClientChangeNotify/src/CString.cpp b/plugins/ClientChangeNotify/src/CString.cpp index 21449ee8e6..2427c06aea 100644 --- a/plugins/ClientChangeNotify/src/CString.cpp +++ b/plugins/ClientChangeNotify/src/CString.cpp @@ -297,7 +297,7 @@ TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, co else if (dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD)
{
long value = (dbv.type == DBVT_DWORD) ? dbv.dVal : (dbv.type == DBVT_WORD ? dbv.wVal : dbv.bVal);
- _ultot(value, Result.GetBuffer(64), 10);
+ _ultow(value, Result.GetBuffer(64), 10);
Result.ReleaseBuffer();
}
else Result = szDefaultValue;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 86cc7fdee5..33e4e1f5d5 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -70,7 +70,7 @@ static VOID NTAPI ShowContactMenu(ULONG_PTR wParam) // wParam = hContact
{
POINT pt;
- HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MOD_NAME)L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
+ HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _A2W(MOD_NAME) L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc);
HMENU hMenu = Menu_BuildContactMenu(wParam);
GetCursorPos(&pt);
@@ -234,7 +234,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) LPCTSTR ptszOldClient = Finger_GetClientDescr(sd.OldMirVer);
LPCTSTR ptszClient = Finger_GetClientDescr(sd.MirVer);
if (ptszOldClient && ptszClient) {
- if (PerContactSetting != NOTIFY_ALMOST_ALWAYS && PerContactSetting != NOTIFY_ALWAYS && !PopupOptPage.GetValue(IDC_POPUPOPTDLG_VERCHGNOTIFY) && !_tcscmp(ptszClient, ptszOldClient))
+ if (PerContactSetting != NOTIFY_ALMOST_ALWAYS && PerContactSetting != NOTIFY_ALWAYS && !PopupOptPage.GetValue(IDC_POPUPOPTDLG_VERCHGNOTIFY) && !wcscmp(ptszClient, ptszOldClient))
return 0;
if (!PopupOptPage.GetValue(IDC_POPUPOPTDLG_SHOWVER)) {
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 91d9be08c1..b2c4001665 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -48,7 +48,7 @@ wchar_t SkinsFolder[MAX_PATH]; int ReloadSkinFolder(WPARAM, LPARAM)
{
- FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _T(DEFAULT_SKIN_FOLDER));
+ FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _A2W(DEFAULT_SKIN_FOLDER));
return 0;
}
@@ -1558,8 +1558,8 @@ static int clcHookModulesLoaded(WPARAM, LPARAM) HookEvent(ME_MODERNOPT_INITIALIZE, ModernSkinOptInit);
HookEvent(ME_FOLDERS_PATH_CHANGED, ReloadSkinFolder);
- hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Modern contact list"), MIRANDA_PATHT L"\\" _T(DEFAULT_SKIN_FOLDER));
- FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _T(DEFAULT_SKIN_FOLDER));
+ hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Modern contact list"), MIRANDA_PATHT L"\\" _A2W(DEFAULT_SKIN_FOLDER));
+ FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _A2W(DEFAULT_SKIN_FOLDER));
// Get icons
wchar_t szMyPath[MAX_PATH];
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 605112c0fc..4abc781b90 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -1006,7 +1006,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP if (!db_get_ts(NULL, "CList", "TitleText", &dbv))
s = dbv.ptszVal;
else
- s = _T(MIRANDANAME);
+ s = _A2W(MIRANDANAME);
SetDlgItemText(hwndDlg, IDC_TITLETEXT, s);
db_free(&dbv);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index c0b4e9c106..9256ecf893 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -667,7 +667,7 @@ void CLUI_ChangeWindowMode() wchar_t titleText[255] = { 0 };
DBVARIANT dbv;
if (db_get_ts(NULL, "CList", "TitleText", &dbv))
- mir_tstrncpy(titleText, _T(MIRANDANAME), _countof(titleText));
+ mir_tstrncpy(titleText, _A2W(MIRANDANAME), _countof(titleText));
else {
mir_tstrncpy(titleText, dbv.ptszVal, _countof(titleText));
db_free(&dbv);
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index 55341cd073..f37a2a4715 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -71,7 +71,7 @@ int ModernSkinButtonLoadModule() WNDCLASSEX wc; memset(&wc, 0, sizeof(wc)); wc.cbSize = sizeof(wc); - wc.lpszClassName = _T(MODERNSKINBUTTONCLASS); + wc.lpszClassName = _A2W(MODERNSKINBUTTONCLASS); wc.lpfnWndProc = ModernSkinButtonWndProc; wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.cbWndExtra = sizeof(ModernSkinButtonCtrl*); @@ -608,7 +608,7 @@ static HWND ModernSkinButtonCreateWindow(ModernSkinButtonCtrl * bct, HWND parent if (bct == NULL) return FALSE; { wchar_t *UnicodeID = mir_a2u(bct->ID); - hwnd = CreateWindow(_T(MODERNSKINBUTTONCLASS), UnicodeID, WS_VISIBLE | WS_CHILD, bct->Left, bct->Top, bct->Right - bct->Left, bct->Bottom - bct->Top, parent, NULL, g_hInst, NULL); + hwnd = CreateWindow(_A2W(MODERNSKINBUTTONCLASS), UnicodeID, WS_VISIBLE | WS_CHILD, bct->Left, bct->Top, bct->Right - bct->Left, bct->Bottom - bct->Top, parent, NULL, g_hInst, NULL); mir_free(UnicodeID); } diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 6927134b57..1b2514e0f7 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -327,30 +327,30 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara int SearchSkinFiles(HWND hwndDlg, wchar_t * Folder) { - struct _tfinddata_t fd = { 0 }; + struct _wfinddata_t fd = { 0 }; wchar_t mask[MAX_PATH]; long hFile; mir_sntprintf(mask, L"%s\\*.msf", Folder); //fd.attrib = _A_SUBDIR; - hFile = _tfindfirst(mask, &fd); + hFile = _wfindfirst(mask, &fd); if (hFile != -1) { do { AddSkinToList(hwndDlg, Folder, fd.name); - } while (!_tfindnext(hFile, &fd)); + } while (!_wfindnext(hFile, &fd)); _findclose(hFile); } mir_sntprintf(mask, L"%s\\*", Folder); - hFile = _tfindfirst(mask, &fd); - { - do { - if (fd.attrib&_A_SUBDIR && !(mir_tstrcmpi(fd.name, L".") == 0 || mir_tstrcmpi(fd.name, L"..") == 0)) {//Next level of subfolders - wchar_t path[MAX_PATH]; - mir_sntprintf(path, L"%s\\%s", Folder, fd.name); - SearchSkinFiles(hwndDlg, path); - } - } while (!_tfindnext(hFile, &fd)); - _findclose(hFile); - } + hFile = _wfindfirst(mask, &fd); + + do { + if (fd.attrib&_A_SUBDIR && !(mir_tstrcmpi(fd.name, L".") == 0 || mir_tstrcmpi(fd.name, L"..") == 0)) {//Next level of subfolders + wchar_t path[MAX_PATH]; + mir_sntprintf(path, L"%s\\%s", Folder, fd.name); + SearchSkinFiles(hwndDlg, path); + } + } while (!_wfindnext(hFile, &fd)); + _findclose(hFile); + return 0; } diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 6ce7bd2965..8c4a49db88 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -1204,7 +1204,7 @@ void CreateViewModeFrame() frame.TBtname = TranslateT("View modes");
frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
frame.align = alBottom;
- frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", _T(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
+ frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", _A2W(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&frame, 0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hCLVMFrame, FU_FMPOS);
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index 275133cd1f..51371d27fc 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -588,7 +588,7 @@ int ConnectionNotifyOptInit(WPARAM wParam, LPARAM) OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_DIALOG);
- odp.pwszTitle = _T(PLUGINNAME);
+ odp.pwszTitle = _A2W(PLUGINNAME);
odp.pwszGroup = LPGENW("Plugins");
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pfnDlgProc = DlgProcConnectionNotifyOpts;//callback function name
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index 3b4cebdc58..72ac4e9824 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -81,8 +81,8 @@ void GetProfileDirectory(wchar_t* szMirandaDir, wchar_t* szPath, int cbPath) mir_tstrcat(szMirandaBootIni, L"\\mirandaboot.ini");
GetPrivateProfileString(L"Database", L"ProfileDir", L"./Profiles", szProfileDir, _countof(szProfileDir), szMirandaBootIni);
ExpandEnvironmentStrings(szProfileDir, szExpandedProfileDir, _countof(szExpandedProfileDir));
- _tchdir(szMirandaDir);
- if (!_tfullpath(szPath, szExpandedProfileDir, cbPath))
+ _wchdir(szMirandaDir);
+ if (!_wfullpath(szPath, szExpandedProfileDir, cbPath))
mir_tstrncpy(szPath, szMirandaDir, cbPath);
if (szPath[mir_tstrlen(szPath) - 1] == '\\')
szPath[mir_tstrlen(szPath) - 1] = 0;
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index 329b363edc..5b0f8371a9 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -58,7 +58,7 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i case DBVT_WORD:
case DBVT_DWORD:
val = getNumericValue(&dbv);
- value = mir_tstrdup(_ultot(val, tmp, 10));
+ value = mir_tstrdup(_ultow(val, tmp, 10));
break;
case DBVT_WCHAR:
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index 3c8ce19c50..6407bd5b35 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -131,16 +131,16 @@ void addwatchtolist(HWND hwnd, struct DBsetting *lParam) break;
}
case DBVT_BYTE:
- mir_sntprintf(data, L"0x%02X (%s)", dbv->bVal, _ultot(dbv->bVal, tmp, 10));
+ mir_sntprintf(data, L"0x%02X (%s)", dbv->bVal, _ultow(dbv->bVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
case DBVT_WORD:
- mir_sntprintf(data, L"0x%04X (%s)", dbv->wVal, _ultot(dbv->wVal, tmp, 10));
+ mir_sntprintf(data, L"0x%04X (%s)", dbv->wVal, _ultow(dbv->wVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
case DBVT_DWORD:
- mir_sntprintf(data, L"0x%08X (%s)", dbv->dVal, _ultot(dbv->dVal, tmp, 10));
+ mir_sntprintf(data, L"0x%08X (%s)", dbv->dVal, _ultow(dbv->dVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index ebca794f89..346ca7471b 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -431,10 +431,10 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass }
if ( SUCCEEDED(hr)) {
- wchar_t szPIDandName[128];
- wchar_t szPID[20];
+ wchar_t szPIDandName[128];
+ wchar_t szPID[20];
- _tstrtime(szPID);
+ _wstrtime(szPID);
wcsncpy(szPIDandName, m_szUsername, _countof(szPIDandName)-1);
mir_tstrncat(szPIDandName, szPID, _countof(szPIDandName) - mir_tstrlen(szPIDandName));
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_color.cpp b/plugins/HistoryStats/src/optionsctrlimpl_color.cpp index e0b330d147..3439d87832 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_color.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_color.cpp @@ -54,7 +54,7 @@ void OptionsCtrlImpl::Color::onSelect() DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
if (hTempWnd = CreateWindowEx(
- 0, _T(WNDCLASS_COLOURPICKER), NULL, dwStyle,
+ 0, _A2W(WNDCLASS_COLOURPICKER), NULL, dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccColor), g_hInst, NULL))
{
diff --git a/plugins/HwHotKeys/src/stdafx.h b/plugins/HwHotKeys/src/stdafx.h index e6c43de533..dfce5e714e 100644 --- a/plugins/HwHotKeys/src/stdafx.h +++ b/plugins/HwHotKeys/src/stdafx.h @@ -73,15 +73,15 @@ extern const CHAR *t_SR; extern const CHAR *t_SS;
// çíà÷åíèÿ ñâÿçàíû ñ áèòàìè â HwHotKeys_CompareCurrentScancode
-enum : DWORD { key_flag_sr = 0x01000000 };
-enum : DWORD { key_flag_cr = 0x02000000 };
-enum : DWORD { key_flag_ar = 0x04000000 };
-enum : DWORD { key_flag_wr = 0x08000000 };
-enum : DWORD { key_flag_sl = 0x10000000 };
-enum : DWORD { key_flag_cl = 0x20000000 };
-enum : DWORD { key_flag_al = 0x40000000 };
-enum : DWORD { key_flag_wl = 0x80000000 };
-enum : DWORD { key_flag_ss = 0x00100000 };
-enum : DWORD { key_flag_cc = 0x00200000 };
-enum : DWORD { key_flag_aa = 0x00400000 };
-enum : DWORD { key_flag_ww = 0x00800000 };
+#define key_flag_sr 0x01000000
+#define key_flag_cr 0x02000000
+#define key_flag_ar 0x04000000
+#define key_flag_wr 0x08000000
+#define key_flag_sl 0x10000000
+#define key_flag_cl 0x20000000
+#define key_flag_al 0x40000000
+#define key_flag_wl 0x80000000
+#define key_flag_ss 0x00100000
+#define key_flag_cc 0x00200000
+#define key_flag_aa 0x00400000
+#define key_flag_ww 0x00800000
diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp index a56e975015..f88f3f09d9 100644 --- a/plugins/IEHistory/src/dlgHandlers.cpp +++ b/plugins/IEHistory/src/dlgHandlers.cpp @@ -502,7 +502,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara CheckDlgButton(hWnd, IDC_LOAD_BACKGROUND, db_get_b(NULL, ModuleName, "UseWorkerThread", 0) ? BST_CHECKED : BST_UNCHECKED);
wchar_t buffer[40];
- _itot_s(count, buffer, 10);
+ _itow_s(count, buffer, 10);
SetDlgItemText(hWnd, IDC_EVENTS_COUNT, buffer);
}
break;
@@ -541,7 +541,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara else {
wchar_t buffer[1024];
GetDlgItemText(hWnd, IDC_EVENTS_COUNT, buffer, _countof(buffer));
- count = _tstol(buffer);
+ count = _wtol(buffer);
count = (count < 0) ? 0 : count;
}
db_set_b(NULL, ModuleName, "ShowLastPageFirst", IsDlgButtonChecked(hWnd, IDC_SHOW_LAST_FIRST));
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 062961e373..96aa582cf6 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1558,7 +1558,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam) // the status has been changed to unknown (maybe run some more code)
}
//broadcast the message
- if (currentStatus != wParam)
+ if (currentStatus != (int)wParam)
ProtoBroadcastAck(PLUGINNAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)currentStatus, wParam);
currentStatus = wParam;
@@ -1571,14 +1571,14 @@ void checkEnvPath(wchar_t *path) log_p(L"checkEnvPath: [%s]", path);
wcslwr(path);
- wchar_t *cur = _tgetenv(L"PATH");
+ wchar_t *cur = _wgetenv(L"PATH");
wcslwr(cur);
wchar_t *found = wcsstr(cur, path);
size_t len = mir_tstrlen(path);
if (found != NULL && (found[len] == ';' || found[len] == 0 || (found[len] == '\\' && (found[len + 1] == ';' || found[len + 1] == 0))))
return;
- _tputenv(CMString(FORMAT, L"PATH=%s;%s;", cur, path));
+ _wputenv(CMString(FORMAT, L"PATH=%s;%s;", cur, path));
}
//GetStatus
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index 246dbf71e9..a3a4d04ec0 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -8,7 +8,7 @@ wchar_t g_fingerprint_store_filename[MAX_PATH]; wchar_t g_instag_filename[MAX_PATH]; HANDLE hPATH_MIROTR; Options options; -#define DATA_DIRECTORY MIRANDA_USERDATAT L"\\" _T(MODULENAME) +#define DATA_DIRECTORY MIRANDA_USERDATAT L"\\" _A2W(MODULENAME) struct PROTOREGENKEYOPTIONS { HWND refresh; @@ -21,16 +21,16 @@ void SetFilenames(const wchar_t *path) return; CreateDirectoryTreeT(path); - mir_sntprintf(g_private_key_filename, L"%s\\" _T(PRIVATE_KEY_FILENAME), path); - mir_sntprintf(g_fingerprint_store_filename, L"%s\\" _T(FINGERPRINT_STORE_FILENAME), path); - mir_sntprintf(g_instag_filename, L"%s\\" _T(INSTAG_FILENAME), path); + mir_sntprintf(g_private_key_filename, L"%s\\" _A2W(PRIVATE_KEY_FILENAME), path); + mir_sntprintf(g_fingerprint_store_filename, L"%s\\" _A2W(FINGERPRINT_STORE_FILENAME), path); + mir_sntprintf(g_instag_filename, L"%s\\" _A2W(INSTAG_FILENAME), path); } int FoldersChanged(WPARAM, LPARAM) { wchar_t path[MAX_PATH]; if ( FoldersGetCustomPathT(hPATH_MIROTR, path, _countof(path), L"")) - SetFilenames( VARST(DATA_DIRECTORY)); + SetFilenames(VARST(DATA_DIRECTORY)); else SetFilenames(path); diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index e21c05c762..8bd87e7dd0 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -163,13 +163,13 @@ void InitMenu() mi.position = -400000; SET_UID(mi, 0xAB574FAD, 0x15D8, 0x49FF, 0xB7, 0x03, 0xDA, 0x2B, 0x45, 0x46, 0xC3, 0x56); - mi.name.w = _T(LANG_STOP_OTR); + mi.name.w = _A2W(LANG_STOP_OTR); mi.pszService = MS_OTR_MENUSTOP; mi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE); hStopItem = Menu_AddContactMenuItem(&mi); mi.uid.d[7]++; - mi.name.w = _T(LANG_START_OTR); + mi.name.w = _A2W(LANG_START_OTR); mi.pszService = MS_OTR_MENUSTART; mi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE); hStartItem = Menu_AddContactMenuItem(&mi); diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index f7471b9c98..e4fbc217ec 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -115,7 +115,7 @@ void ShowPopup(const wchar_t* line1, const wchar_t* line2, int timeout, const MC if ( !options.bHavePopups) { wchar_t title[256]; - mir_sntprintf(title, L"%s Message", _T(MODULENAME)); + mir_sntprintf(title, L"%s Message", _A2W(MODULENAME)); if(line1 && line2) { int size = int(mir_tstrlen(line1) + mir_tstrlen(line2) + 3); @@ -165,7 +165,7 @@ void ShowWarning(wchar_t *msg) { if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL; if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB; - mir_sntprintf(buffer, L"%s Warning", _T(MODULENAME)); + mir_sntprintf(buffer, L"%s Warning", _A2W(MODULENAME)); switch(disp) { @@ -211,7 +211,7 @@ void ShowError(wchar_t *msg) { if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL; if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB; - mir_sntprintf(buffer, L"%s Error", _T(MODULENAME)); + mir_sntprintf(buffer, L"%s Error", _A2W(MODULENAME)); wchar_t *message; @@ -269,7 +269,7 @@ void ShowErrorUtf(char* msg) { void ShowMessageInline(const MCONTACT hContact, const wchar_t *msg) { wchar_t buff[1024]; - mir_sntprintf(buff, L"%s%s", _T(LANG_INLINE_PREFIX), msg); + mir_sntprintf(buff, L"%s%s", _A2W(LANG_INLINE_PREFIX), msg); T2Utf utf(buff); PROTORECVEVENT pre = {0}; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index ddaaeef100..b914945698 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -206,7 +206,7 @@ tstring CAppletManager::TranslateString(wchar_t *szString, ...) va_list body; va_start(body, szString); - _vstprintf_s(out, _countof(out), szTranslatedString, body); + vswprintf_s(out, _countof(out), szTranslatedString, body); va_end(body); return out; } diff --git a/plugins/MirandaG15/src/LCDFramework/misc.cpp b/plugins/MirandaG15/src/LCDFramework/misc.cpp index 339b88e393..d71597c745 100644 --- a/plugins/MirandaG15/src/LCDFramework/misc.cpp +++ b/plugins/MirandaG15/src/LCDFramework/misc.cpp @@ -8,7 +8,7 @@ tstring tstringprintf(tstring strFormat,...) { int mlen = (int)strFormat.length()+128;
wchar_t *text = (wchar_t*)malloc(mlen*sizeof(wchar_t));
- _vsntprintf(text,mlen,strFormat.c_str(),vlist);
+ _vsnwprintf(text,mlen,strFormat.c_str(),vlist);
va_end(vlist);
strFormat = text;
@@ -92,10 +92,7 @@ tstring toLower(const tstring &i_str) tstring str(i_str);
for (size_t i = 0; i < str.size(); ++ i)
{
- if (_istlead(str[i]))
- ++ i;
- else
- str[i] = tolower(str[i]);
+ str[i] = tolower(str[i]);
}
return str;
}
diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp index 03d98766bf..39a13343fd 100644 --- a/plugins/MirandaG15/src/Miranda.cpp +++ b/plugins/MirandaG15/src/Miranda.cpp @@ -162,7 +162,7 @@ int Init(WPARAM, LPARAM) {
if(CConfig::GetBoolSetting(SKIP_DRIVER_ERROR)) {
tstring text = L"Failed to initialize the LCD connection\n Make sure you have the newest Logitech drivers installed (>=1.03).\n";
- tstring title = _T(APP_SHORTNAME);
+ tstring title = _A2W(APP_SHORTNAME);
MessageBox(NULL, text.c_str(), title.c_str(), MB_OK | MB_ICONEXCLAMATION);
}
diff --git a/plugins/MsgPopup/src/options.cpp b/plugins/MsgPopup/src/options.cpp index b6222a7d75..20ba22d8b5 100644 --- a/plugins/MsgPopup/src/options.cpp +++ b/plugins/MsgPopup/src/options.cpp @@ -54,10 +54,10 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l case WM_COMMAND:
if (LOWORD(wParam) == IDC_PREVIEW) {
- MessageBox(0, TranslateT("Message with question"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONQUESTION);
- MessageBox(0, TranslateT("Message with exclamation"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
- MessageBox(0, TranslateT("Message with error"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONSTOP);
- MessageBox(0, TranslateT("Message with asterisk"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONASTERISK);
+ MessageBox(0, TranslateT("Message with question"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONQUESTION);
+ MessageBox(0, TranslateT("Message with exclamation"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
+ MessageBox(0, TranslateT("Message with error"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONSTOP);
+ MessageBox(0, TranslateT("Message with asterisk"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONASTERISK);
return FALSE;
}
diff --git a/plugins/NewAwaySysMod/src/CString.cpp b/plugins/NewAwaySysMod/src/CString.cpp index c35e6bbeef..58a8826ed9 100644 --- a/plugins/NewAwaySysMod/src/CString.cpp +++ b/plugins/NewAwaySysMod/src/CString.cpp @@ -296,7 +296,7 @@ TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, co else if (dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD)
{
long value = (dbv.type == DBVT_DWORD) ? dbv.dVal : (dbv.type == DBVT_WORD ? dbv.wVal : dbv.bVal);
- _ultot(value, Result.GetBuffer(64), 10);
+ _ultow(value, Result.GetBuffer(64), 10);
Result.ReleaseBuffer();
}
else Result = szDefaultValue;
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp index 8f32bb2949..63be89ce14 100644 --- a/plugins/NewEventNotify/src/menuitem.cpp +++ b/plugins/NewEventNotify/src/menuitem.cpp @@ -40,9 +40,9 @@ static INT_PTR MenuitemNotifyCmd(WPARAM, LPARAM) int MenuitemUpdate(BOOL bStatus)
{
if (bStatus)
- Menu_ModifyItem(hMenuitemNotify, _T(MENUITEM_DISABLE), LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED)));
+ Menu_ModifyItem(hMenuitemNotify, MENUITEM_DISABLE, LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED)));
else
- Menu_ModifyItem(hMenuitemNotify, _T(MENUITEM_ENABLE), LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED)));
+ Menu_ModifyItem(hMenuitemNotify, MENUITEM_ENABLE, LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED)));
return 0;
}
diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h index 8ac36e9263..dba661ad99 100644 --- a/plugins/NewEventNotify/src/stdafx.h +++ b/plugins/NewEventNotify/src/stdafx.h @@ -140,8 +140,8 @@ #define MENUITEM_NAME LPGEN("Notify of new events")
-#define MENUITEM_ENABLE LPGEN("Enable new event notification")
-#define MENUITEM_DISABLE LPGEN("Disable new event notification")
+#define MENUITEM_ENABLE LPGENW("Enable new event notification")
+#define MENUITEM_DISABLE LPGENW("Disable new event notification")
//---------------------------
//---Structures
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp index d1596e2c50..bbc4788ae4 100644 --- a/plugins/Non-IM Contact/src/files.cpp +++ b/plugins/Non-IM Contact/src/files.cpp @@ -7,7 +7,7 @@ INT_PTR exportContacts(WPARAM, LPARAM) return 0;
FILE* file;
- if (MessageBox(0, TranslateT("Do you want to overwrite the contents of the file?\r\n\r\nPressing No will append these contacts to the end of the file."), _T(modFullname), MB_YESNO) == IDYES)
+ if (MessageBox(0, TranslateT("Do you want to overwrite the contents of the file?\r\n\r\nPressing No will append these contacts to the end of the file."), _A2W(modFullname), MB_YESNO) == IDYES)
file = fopen(fn, "w");
else
file = fopen(fn, "a");
@@ -116,7 +116,7 @@ void readFile(HWND hwnd) FILE *filen = fopen(szFileName, "r");
if (!filen) {
- MessageBox(0, TranslateT("File couldn't be opened,2"), _T(modFullname), MB_OK);
+ MessageBox(0, TranslateT("File couldn't be opened,2"), _A2W(modFullname), MB_OK);
return;
}
lineNumber = 0;
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp index a4e498823b..5095c216f2 100644 --- a/plugins/NotesAndReminders/src/options.cpp +++ b/plugins/NotesAndReminders/src/options.cpp @@ -230,8 +230,8 @@ void RegisterFontServiceFonts() FontID fontid = { 0 };
fontid.cbSize = sizeof(FontIDT);
- strncpy(fontid.group, _T(SECTIONNAME), _countof(fontid.group));
- strncpy(fontid.backgroundGroup, _T(SECTIONNAME), _countof(fontid.backgroundGroup));
+ strncpy(fontid.group, SECTIONNAME, _countof(fontid.group));
+ strncpy(fontid.backgroundGroup, SECTIONNAME, _countof(fontid.backgroundGroup));
strncpy(fontid.dbSettingsGroup, MODULENAME, _countof(fontid.dbSettingsGroup));
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID | FIDF_SAVEPOINTSIZE;
@@ -260,7 +260,7 @@ void RegisterFontServiceFonts() ColourIDT colorid = { 0 };
colorid.cbSize = sizeof(ColourIDT);
- strncpy(colorid.group, _T(SECTIONNAME), _countof(colorid.group));
+ strncpy(colorid.group, SECTIONNAME, _countof(colorid.group));
strncpy(colorid.dbSettingsGroup, MODULENAME, _countof(fontid.dbSettingsGroup));
colorid.flags = 0;
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index cf4e43f807..f3baa1e43a 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -1786,7 +1786,7 @@ INT_PTR CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LP m += h * 60;
if (!m)
{
- MessageBox(Dialog, Translate("The specified time offset is invalid."), _T(SECTIONNAME), MB_OK | MB_ICONWARNING);
+ MessageBox(Dialog, Translate("The specified time offset is invalid."), SECTIONNAME, MB_OK | MB_ICONWARNING);
return TRUE;
}
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 78bdfb9411..616d95f8e9 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -323,7 +323,7 @@ void processSingleAction(const std::wstring &what, bool &closeflag) std::wstring argstr(what, 7);
- if (_tsystem(argstr.c_str()) == -1)
+ if (_wsystem(argstr.c_str()) == -1)
dbg_msg(L"Failed to execute: " + argstr, SM_WARNING);
}
else if (!what.compare(0, 4, L"cmd:")) {
@@ -345,7 +345,7 @@ void processSingleAction(const std::wstring &what, bool &closeflag) cargs.push_back(i->c_str());
cargs.push_back(0);
- if (_tspawnvp(_P_DETACH, cargs[0], &cargs[0]) == -1)
+ if (_wspawnvp(_P_DETACH, cargs[0], &cargs[0]) == -1)
dbg_msg(L"Failed to execute: " + what.substr(4), SM_WARNING);
}
@@ -560,7 +560,7 @@ inline int dehex(int c) { COLORREF parseColor(const std::wstring &buf, bool &ok)
{
ok = false;
- for (int i = 0; i != buf.size(); ++i)
+ for (size_t i = 0; i != buf.size(); ++i)
if (!isxdigit(buf[i]))
return RGB(0, 0, 0);
if (buf.size() == 6) {
@@ -983,7 +983,7 @@ extern "C" int __declspec(dllexport) Load() wchar_t buf[MAX_PATH + 1];
mir_tstrcpy(buf, L".");
- g_mirandaDir = _tgetcwd(buf, MAX_PATH);
+ g_mirandaDir = _wgetcwd(buf, MAX_PATH);
registerSound(L"Notice");
registerSound(L"Message");
diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 42ca149146..0abd9cf948 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -166,7 +166,7 @@ void load_settings() db_free(&dbv);
}
else
- g_settings.log_filename = g_mirandaDir + L"\\" + _T(LOG_ID) + L".log";
+ g_settings.log_filename = g_mirandaDir + L"\\NotifyAnything.log";
}
int OptionsInitialize(WPARAM wParam, LPARAM)
diff --git a/plugins/NotifyAnything/src/stdafx.h b/plugins/NotifyAnything/src/stdafx.h index 497a5666f0..02d6b1dfec 100644 --- a/plugins/NotifyAnything/src/stdafx.h +++ b/plugins/NotifyAnything/src/stdafx.h @@ -47,4 +47,3 @@ void load_settings(); int OptionsInitialize(WPARAM wParam, LPARAM lParam);
extern std::wstring g_mirandaDir;
-#define LOG_ID LPGEN("NotifyAnything")
diff --git a/plugins/Ping/src/pinggraph.cpp b/plugins/Ping/src/pinggraph.cpp index a303aae062..f8a5fef2c5 100644 --- a/plugins/Ping/src/pinggraph.cpp +++ b/plugins/Ping/src/pinggraph.cpp @@ -272,7 +272,7 @@ INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) { wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T(PLUG) L"GraphWindow";
+ wndclass.lpszClassName = _A2W(PLUG) L"GraphWindow";
RegisterClass(&wndclass);
wchar_t title[256];
@@ -283,7 +283,7 @@ INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) { }
HWND parent = 0;
- hGraphWnd = CreateWindowEx(0, _T(PLUG) L"GraphWindow", title,
+ hGraphWnd = CreateWindowEx(0, _A2W(PLUG) L"GraphWindow", title,
(WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN) & ~CS_VREDRAW & ~CS_HREDRAW,
0, 0, 800, 600, parent, NULL, hInst, NULL);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 76fab1eb0e..0381c05b35 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -875,11 +875,11 @@ void InitList() wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T(PLUG) L"WindowClass";
+ wndclass.lpszClassName = _A2W(PLUG) L"WindowClass";
RegisterClass(&wndclass);
if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
- hpwnd = CreateWindow(_T(PLUG) L"WindowClass", L"Ping", (WS_BORDER | WS_CHILD | WS_CLIPCHILDREN), 0, 0, 0, 0, hwnd_clist, NULL, hInst, NULL);
+ hpwnd = CreateWindow(_A2W(PLUG) L"WindowClass", L"Ping", (WS_BORDER | WS_CHILD | WS_CLIPCHILDREN), 0, 0, 0, 0, hwnd_clist, NULL, hInst, NULL);
CLISTFrame frame = { 0 };
frame.name = PLUG;
@@ -893,7 +893,7 @@ void InitList() frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&frame, 0);
}
else {
- hpwnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T(PLUG) L"WindowClass", L"Ping",
+ hpwnd = CreateWindowEx(WS_EX_TOOLWINDOW, _A2W(PLUG) L"WindowClass", L"Ping",
(WS_POPUPWINDOW | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPCHILDREN),
0, 0, 400, 300, hwnd_clist, NULL, hInst, NULL);
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index c5f99d431d..db10527710 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -51,7 +51,7 @@ void __stdcall ShowPopup(wchar_t *line1, wchar_t *line2, int flags) QueueUserAPC(sttMainThreadCallback, mainThread, (ULONG_PTR)ppd);
}
else{
- MessageBox(NULL, line2, _T(PLUG) L" Message", MB_OK | MB_ICONINFORMATION);
+ MessageBox(NULL, line2, _A2W(PLUG) L" Message", MB_OK | MB_ICONINFORMATION);
return;
}
}
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index f09070bd43..27f8377952 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -109,7 +109,7 @@ static void ApplyUpdates(void *param) else {
// if file name differs, we also need to backup the old file here
// otherwise it would be replaced by unzip
- if ( _tcsicmp(p.tszOldName, p.tszNewName)) {
+ if ( wcsicmp(p.tszOldName, p.tszNewName)) {
wchar_t tszSrcPath[MAX_PATH], tszBackFile[MAX_PATH];
mir_sntprintf(tszSrcPath, L"%s\\%s", tszMirandaPath, p.tszOldName);
mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, p.tszOldName);
@@ -459,7 +459,7 @@ static void DlgUpdateSilent(void *param) else {
// if file name differs, we also need to backup the old file here
// otherwise it would be replaced by unzip
- if (_tcsicmp(p.tszOldName, p.tszNewName)) {
+ if (wcsicmp(p.tszOldName, p.tszNewName)) {
wchar_t tszSrcPath[MAX_PATH], tszBackFile[MAX_PATH];
mir_sntprintf(tszSrcPath, L"%s\\%s", tszMirandaPath, p.tszOldName);
mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, p.tszOldName);
@@ -478,7 +478,7 @@ static void DlgUpdateSilent(void *param) #if MIRANDA_VER < 0x0A00
// 4) Change title of clist
ptrT title = db_get_tsa(NULL, "CList", "TitleText");
- if (!_tcsicmp(title, L"Miranda IM"))
+ if (!wcsicmp(title, L"Miranda IM"))
db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
#endif
@@ -629,13 +629,13 @@ static bool isValidExtension(const wchar_t *ptszFileName) {
const wchar_t *pExt = wcsrchr(ptszFileName, '.');
- return (pExt != NULL) && (!_tcsicmp(pExt, L".dll") || !_tcsicmp(pExt, L".exe") || !_tcsicmp(pExt, L".txt"));
+ return (pExt != NULL) && (!wcsicmp(pExt, L".dll") || !wcsicmp(pExt, L".exe") || !wcsicmp(pExt, L".txt"));
}
// We only scan subfolders "Plugins", "Icons", "Languages", "Libs", "Core"
static bool isValidDirectory(const wchar_t *ptszDirName)
{
- return !_tcsicmp(ptszDirName, L"Plugins") || !_tcsicmp(ptszDirName, L"Icons") || !_tcsicmp(ptszDirName, L"Languages") || !_tcsicmp(ptszDirName, L"Libs") || !_tcsicmp(ptszDirName, L"Core");
+ return !wcsicmp(ptszDirName, L"Plugins") || !wcsicmp(ptszDirName, L"Icons") || !wcsicmp(ptszDirName, L"Languages") || !wcsicmp(ptszDirName, L"Libs") || !wcsicmp(ptszDirName, L"Core");
}
// Scans folders recursively
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index 1e379e7264..5d54e559fe 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -56,13 +56,13 @@ wchar_t* GetDefaultUrl() wchar_t url[MAX_PATH];
switch (GetUpdateMode()) {
case UPDATE_MODE_STABLE:
- mir_sntprintf(url, _T(DEFAULT_UPDATE_URL), opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
+ mir_sntprintf(url, DEFAULT_UPDATE_URL, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
return mir_tstrdup(url);
case UPDATE_MODE_TRUNK:
- mir_sntprintf(url, _T(DEFAULT_UPDATE_URL_TRUNK), opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
+ mir_sntprintf(url, DEFAULT_UPDATE_URL_TRUNK, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
return mir_tstrdup(url);
case UPDATE_MODE_TRUNK_SYMBOLS:
- mir_sntprintf(url, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS), opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
+ mir_sntprintf(url, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
return mir_tstrdup(url);
default:
return db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL);
@@ -121,17 +121,17 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar switch (GetUpdateMode()) {
case UPDATE_MODE_STABLE:
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_STABLE, BST_CHECKED);
break;
case UPDATE_MODE_TRUNK:
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_TRUNK, BST_CHECKED);
break;
case UPDATE_MODE_TRUNK_SYMBOLS:
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
CheckDlgButton(hwndDlg, IDC_TRUNK_SYMBOLS, BST_CHECKED);
break;
@@ -181,7 +181,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar case IDC_TRUNK_SYMBOLS:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -189,7 +189,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar case IDC_TRUNK:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -197,7 +197,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar case IDC_STABLE:
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE);
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -227,15 +227,15 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar case IDC_CHANGE_PLATFORM:
if (IsDlgButtonChecked(hwndDlg, IDC_STABLE)) {
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK)) {
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
else if (IsDlgButtonChecked(hwndDlg, IDC_TRUNK_SYMBOLS)) {
- mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS), GetBits(hwndDlg));
+ mir_sntprintf(defurl, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, GetBits(hwndDlg));
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl);
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index a10066806b..d5b1b23564 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -134,15 +134,15 @@ extern "C" __declspec(dllexport) int Load(void) if (-1 == db_get_b(0, MODNAME, DB_SETTING_UPDATE_MODE, -1)) {
ptrT dbvUpdateURL(db_get_tsa(0, MODNAME, DB_SETTING_UPDATE_URL));
if (dbvUpdateURL) {
- if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_OLD))) {
+ if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_OLD))) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
- else if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_TRUNK_OLD))) {
+ else if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_TRUNK_OLD))) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
- else if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD)L"/")) {
+ else if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD) L"/")) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK_SYMBOLS);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index b298f38345..00009c75d1 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -125,7 +125,7 @@ int Get_CRC(unsigned char* buffer, ULONG bufsize) int CompareHashes(const ServListEntry *p1, const ServListEntry *p2)
{
- return _tcsicmp(p1->m_name, p2->m_name);
+ return wcsicmp(p1->m_name, p2->m_name);
}
bool ParseHashes(const wchar_t *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index 179f0c4879..2fa09762b7 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -104,9 +104,9 @@ extern struct PlugOptions #define DEFAULT_ONLYONCEADAY 1
#endif
-#define DEFAULT_UPDATE_URL "http://miranda-ng.org/distr/stable/x%d"
-#define DEFAULT_UPDATE_URL_TRUNK "http://miranda-ng.org/distr/x%d"
-#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS "http://miranda-ng.org/distr/pdb_x%d"
+#define DEFAULT_UPDATE_URL L"http://miranda-ng.org/distr/stable/x%d"
+#define DEFAULT_UPDATE_URL_TRUNK L"http://miranda-ng.org/distr/x%d"
+#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS L"http://miranda-ng.org/distr/pdb_x%d"
#define FILENAME_X64 L"miranda64.exe"
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 91443d4d5c..b13610c08b 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -73,7 +73,7 @@ static int onModulesLoaded(WPARAM, LPARAM) {
InitNetlib();
- g_hFolders = FoldersRegisterCustomPathT(LPGEN("SecureIM"), LPGEN("Icons"), _T(MIRANDA_PATH"\\icons"));
+ g_hFolders = FoldersRegisterCustomPathT(LPGEN("SecureIM"), LPGEN("Icons"), MIRANDA_PATH "\\icons");
InitIcons();
GetFlags();
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index 1a9f0de514..cfbbb32b07 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -399,7 +399,7 @@ void CSend::Error(LPCTSTR pszFormat, ...) { wchar_t tszMsg[MAX_SECONDLINE]; - mir_sntprintf(tszMsg, L"%s - %s", _T(SZ_SENDSS), TranslateT("Error")); + mir_sntprintf(tszMsg, L"%s - %s", _A2W(SZ_SENDSS), TranslateT("Error")); mir_free(m_ErrorTitle), m_ErrorTitle = mir_tstrdup(tszMsg); va_list vl; diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp index 7a468f99c4..ae216cbbcd 100644 --- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp +++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp @@ -94,7 +94,7 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM) //License { wchar_t* pszText = NULL; - mir_tstradd(pszText, _T(__COPYRIGHT)); + mir_tstradd(pszText, _A2W(__COPYRIGHT)); mir_tstradd(pszText, L"\r\n\r\n"); HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_LICENSE), L"TEXT"); diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index bf8edb1658..765cbfc410 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -940,9 +940,9 @@ void TfrmMain::edtSizeUpdate(HWND hWnd, BOOL ClientArea, HWND hTarget, UINT Ctrl pt.y = pt.y - rect.top; //offset y for client area rect = cliRect; } - // _itot_s(rect.right - rect.left, B, 33, 10); + // _itow_s(rect.right - rect.left, B, 33, 10); _itow(rect.right - rect.left, B, 10); - // _itot_s(rect.bottom - rect.top, H, 16, 10); + // _itow_s(rect.bottom - rect.top, H, 16, 10); _itow(rect.bottom - rect.top, H, 10); mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B)); mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B)); @@ -952,9 +952,9 @@ void TfrmMain::edtSizeUpdate(HWND hWnd, BOOL ClientArea, HWND hTarget, UINT Ctrl void TfrmMain::edtSizeUpdate(RECT rect, HWND hTarget, UINT Ctrl) { wchar_t B[33], H[16]; - // _itot_s(ABS(rect.right - rect.left), B, 33, 10); + // _itow_s(ABS(rect.right - rect.left), B, 33, 10); _itow(ABS(rect.right - rect.left), B, 10); - // _itot_s(ABS(rect.bottom - rect.top), H, 16, 10); + // _itow_s(ABS(rect.bottom - rect.top), H, 16, 10); _itow(ABS(rect.bottom - rect.top), H, 10); mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B)); mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B)); diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index 5562180bbb..975be30b92 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -700,7 +700,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...) { wchar_t tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE]; - mir_sntprintf(tszTitle, L"%s - %s", _T(MODNAME), TranslateT("Error")); + mir_sntprintf(tszTitle, L"%s - %s", _A2W(MODNAME), TranslateT("Error")); va_list vl; va_start(vl, pszFormat); diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 7f20587abc..550c9143e6 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -5,7 +5,7 @@ wchar_t currentResponse[256] = {0}; wchar_t* _getCOptS(wchar_t *buf, unsigned int buflen, MCONTACT hContact, const char* option, const wchar_t *def)
{
DBVARIANT dbv = {0};
- _tcsnset(buf, 0, buflen);
+ wcsnset(buf, 0, buflen);
if (db_get_ts(hContact, PLUGIN_NAME, option, &dbv) != 0)
wcsncpy(buf, def, min(buflen, mir_tstrlen(def)+1));
else if (dbv.type == DBVT_TCHAR) {
@@ -18,7 +18,7 @@ wchar_t* _getMOptS(wchar_t *buf, unsigned int buflen, const char* module, const {
wchar_t* tmp;
DBVARIANT dbv = {0};
- _tcsnset(buf, 0, buflen);
+ wcsnset(buf, 0, buflen);
if (db_get_s(NULL, module, option, &dbv) != 0)
wcsncpy(buf, def, min(buflen, mir_tstrlen(def)+1));
else if (dbv.type == DBVT_TCHAR) {
@@ -83,7 +83,7 @@ BOOL _saveDlgItemScore(HWND hDialog, int controlID, char* option) len = GetWindowTextLength(GetDlgItem(hDialog, controlID));
tmp = (wchar_t *)malloc((len + 1)*sizeof(wchar_t));
GetDlgItemText(hDialog, controlID, tmp, len + 1);
- _setOptD(option, _tcstod(tmp, NULL)/SCORE_C);
+ _setOptD(option, wcstod(tmp, NULL)/SCORE_C);
return TRUE;
}
@@ -556,21 +556,21 @@ int OnOptInitialize(WPARAM wParam, LPARAM) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
- odp.pwszGroup = LPGENW("Message sessions");
- odp.pwszTitle = _T(PLUGIN_NAME);
- odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS;
+ odp.pszGroup = LPGEN("Message sessions");
+ odp.pszTitle = PLUGIN_NAME;
+ odp.flags = ODPF_BOLDGROUPS;
- odp.pwszTab = LPGENW("Settings");
+ odp.pszTab = LPGEN("Settings");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPAMOTRON_MAIN);
odp.pfnDlgProc = DlgProcOptionsMain;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Messages");
+ odp.pszTab = LPGEN("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPAMOTRON_Q);
odp.pfnDlgProc = DlgProcOptionsQuestion;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Bayes");
+ odp.pszTab = LPGEN("Bayes");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPAMOTRON_BAYES);
odp.pfnDlgProc = DlgProcOptionsBayes;
Options_AddPage(wParam, &odp);
@@ -578,8 +578,8 @@ int OnOptInitialize(WPARAM wParam, LPARAM) if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPAMOTRON_POPUPS);
odp.pfnDlgProc = DlgProcOptionsPopups;
- odp.pwszGroup = LPGENW("Popups");
- odp.pwszTab = NULL;
+ odp.pszGroup = LPGEN("Popups");
+ odp.pszTab = NULL;
Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp index 0d81268d04..27bc8f392b 100644 --- a/plugins/Spamotron/src/popups.cpp +++ b/plugins/Spamotron/src/popups.cpp @@ -185,7 +185,7 @@ int ShowPopupPreview(HWND optDlg, BYTE popupType, wchar_t *line1, wchar_t *line2 ppdp.iSeconds = 0;
ppdp.lchContact = NULL;
- wcsncpy_s(ppdp.lptzContactName, (line1 ? line1 : _T(PLUGIN_NAME)), _TRUNCATE);
+ wcsncpy_s(ppdp.lptzContactName, (line1 ? line1 : _A2W(PLUGIN_NAME)), _TRUNCATE);
if (line2)
wcsncpy_s(ppdp.lptzText, line2, _TRUNCATE);
return PUAddPopupT(&ppdp);
@@ -234,7 +234,7 @@ int ShowPopup(MCONTACT hContact, BYTE popupType, wchar_t *line1, wchar_t *line2) ppdp.iSeconds = 0;
ppdp.lchContact = hContact;
- wcsncpy_s(ppdp.lptzContactName, (line1 ? line1 : _T(PLUGIN_NAME)), _TRUNCATE);
+ wcsncpy_s(ppdp.lptzContactName, (line1 ? line1 : _A2W(PLUGIN_NAME)), _TRUNCATE);
if (line2)
wcsncpy_s(ppdp.lptzText, line2, _TRUNCATE);
return PUAddPopupT(&ppdp);
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index efad448000..ee491e541c 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -679,7 +679,7 @@ public: if (loaded != LANGUAGE_LOADED) return TRUE; - return wcschr(wordChars, (_TINT)c) != NULL; + return wcschr(wordChars, c) != NULL; } // Assert that all needed data is loaded diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index b6e0a330f9..fa478010c4 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -302,9 +302,9 @@ static INT_PTR InitMenu() void UpdateMenu()
{
if (Enabled == 1)
- Menu_ModifyItem(hSSMenuToggleOnOff, _T(DISABLE_SILENCE), GetIconHandle(DISABLE_SILENCE));
+ Menu_ModifyItem(hSSMenuToggleOnOff, _A2W(DISABLE_SILENCE), GetIconHandle(DISABLE_SILENCE));
else
- Menu_ModifyItem(hSSMenuToggleOnOff, _T(ENABLE_SILENCE), GetIconHandle(ENABLE_SILENCE));
+ Menu_ModifyItem(hSSMenuToggleOnOff, _A2W(ENABLE_SILENCE), GetIconHandle(ENABLE_SILENCE));
UpdateTTB();
}
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 9619347bc3..d54155159e 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -35,14 +35,14 @@ int hLangpack = 0; // Ïîääåðæêà ïëàãèíîçàâèñèìîãî ïåðåâîäà. BOOL bPopupExists = FALSE, bVariablesExists = FALSE, bTooltipExists = FALSE;
static wchar_t tszFormat[] =
-_T("{I4}\x0D\x0A\x0A\
+_A2W("{I4}\x0D\x0A\x0A\
{R65}?tc_GetTraffic(%extratext%,now,sent,d)\x0D\x0A\x0A\
{R115}?tc_GetTraffic(%extratext%,now,received,d)\x0D\x0A\x0A\
{R165}?tc_GetTraffic(%extratext%,total,both,d)\x0D\x0A\x0A\
{L180}?if3(?tc_GetTime(%extratext%,now,hh:mm:ss),)\x0D\x0A\x0A\
{L230}?if3(?tc_GetTime(%extratext%,total,d hh:mm),)");
-wchar_t* TRAFFIC_COUNTER_WINDOW_CLASS = L"TrafficCounterWnd";
+wchar_t *TRAFFIC_COUNTER_WINDOW_CLASS = L"TrafficCounterWnd";
/*-------------------------------------------------------------------------------------------------------------------*/
//TRAFFIC COUNTER
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index 04bfdbe2b8..cc08d5f408 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -119,19 +119,19 @@ BOOL CEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto) MIR_FREE(_pszValue); switch (dbv.type) { case DBVT_BYTE: - _itot_s(dbv.bVal, szText, _countof(szText), 10); + _itow_s(dbv.bVal, szText, _countof(szText), 10); SetWindowText(_hwnd, szText); _pszValue = mir_tstrdup(szText); break; case DBVT_WORD: - _itot_s(dbv.wVal, szText, _countof(szText), 10); + _itow_s(dbv.wVal, szText, _countof(szText), 10); SetWindowText(_hwnd, szText); _pszValue = mir_tstrdup(szText); break; case DBVT_DWORD: - _itot_s(dbv.dVal, szText, _countof(szText), 10); + _itow_s(dbv.dVal, szText, _countof(szText), 10); SetWindowText(_hwnd, szText); _pszValue = mir_tstrdup(szText); break; diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index b70724c993..c4c9cc2d17 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -65,7 +65,7 @@ static HANDLE g_hDetailsInitEvent = NULL; static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
CPsHdr::CPsHdr()
- : _ignore(10, _tcscmp)
+ : _ignore(10, wcscmp)
{
_dwSize = sizeof(*this);
_hContact = NULL;
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 416cc360c8..160b78a1ad 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -86,7 +86,7 @@ static int SortContactCache(const CONTACTCE *p1, const CONTACTCE *p2) if (p1->flags != p2->flags)
return (p1->flags > p2->flags) ? 1 : -1;
- return _tcscmp(p1->tszContact, p2->tszContact);
+ return wcscmp(p1->tszContact, p2->tszContact);
}
/* cache for 'getcontactfromstring' service */
@@ -199,7 +199,7 @@ MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMat for (hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// <_HANDLE_:hContact>
- tmp.Format(L"<%s:%d>", _T(PROTOID_HANDLE), hContact);
+ tmp.Format(L"<%s:%d>", _A2W(PROTOID_HANDLE), hContact);
bool bMatch = (tmp == tszContact);
char *szProto = GetContactProto(hContact);
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index a25e303247..71722f7e45 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -349,19 +349,19 @@ static wchar_t* parseProtoInfo(ARGUMENTSINFO *ai) wchar_t *tszRes = NULL;
ptrA szProto(mir_t2a(ai->targv[1]));
- if (!mir_tstrcmp(ai->targv[2], _T(STR_PINAME)))
+ if (!mir_tstrcmp(ai->targv[2], _A2W(STR_PINAME)))
tszRes = Hlp_GetProtocolName(szProto);
- else if (!mir_tstrcmp(ai->targv[2], _T(STR_PIUIDTEXT))) {
+ else if (!mir_tstrcmp(ai->targv[2], _A2W(STR_PIUIDTEXT))) {
szRes = (char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDTEXT, 0);
if (INT_PTR(szRes) == CALLSERVICE_NOTFOUND)
return NULL;
}
- else if (!mir_tstrcmp(ai->targv[2], _T(STR_PIUIDSETTING))) {
+ else if (!mir_tstrcmp(ai->targv[2], _A2W(STR_PIUIDSETTING))) {
szRes = (char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0);
if (INT_PTR(szRes) == CALLSERVICE_NOTFOUND)
return NULL;
}
- else if (!mir_tstrcmp(ai->targv[2], _T(STR_PINICK)))
+ else if (!mir_tstrcmp(ai->targv[2], _A2W(STR_PINICK)))
tszRes = Contact_GetInfo(CNF_DISPLAY, NULL, szProto);
if (szRes == NULL && tszRes == NULL)
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 44920139f4..2b2e13af0f 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -156,7 +156,7 @@ static wchar_t* replaceDynVars(FORMATINFO *fi) continue; } // remove comments - else if (!wcsncmp(cur, _T(COMMENT_STRING), mir_tstrlen(_T(COMMENT_STRING)))) { + else if (!wcsncmp(cur, _A2W(COMMENT_STRING), _countof(COMMENT_STRING))) { wchar_t *scur = cur; while (wcsncmp(cur, L"\r\n", 2) && *cur != '\n' && *cur != 0) cur++; diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index 188bd35fe3..bb0e86e011 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -226,12 +226,12 @@ extern "C" int __declspec(dllexport) Load(void) InitServices();
// add sound event
- SkinAddNewSoundExT("weatherupdated", _T(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
- SkinAddNewSoundExT("weatheralert", _T(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
+ SkinAddNewSoundExT("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
+ SkinAddNewSoundExT("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
// window needed for popup commands
wchar_t SvcFunc[100];
- mir_sntprintf(SvcFunc, L"%s__PopupWindow", _T(WEATHERPROTONAME));
+ mir_sntprintf(SvcFunc, L"%s__PopupWindow", _A2W(WEATHERPROTONAME));
hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 31b0e1b93a..44805cc451 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -96,7 +96,7 @@ void GetTemp(wchar_t *tempchar, wchar_t *unit, wchar_t* str) }
// convert the string to an integer
- temp = _ttof(tempchar);
+ temp = _wtof(tempchar);
// convert all to F first
if (!mir_tstrcmpi(unit, L"C")) temp = (temp * 9 / 5) + 32;
@@ -135,7 +135,7 @@ void GetPressure(wchar_t *tempchar, wchar_t *unit, wchar_t* str) // convert the string to a floating point number (always positive)
// if it end up with 0, then it's not a number, return the original string and quit
- output = _ttof(tempchar);
+ output = _wtof(tempchar);
if (output == 0) {
mir_tstrcpy(str, tempchar);
return;
@@ -194,7 +194,7 @@ void GetSpeed(wchar_t *tempchar, wchar_t *unit, wchar_t *str) // convert the string into an integer (always positive)
// if the result is 0, then the string is not a number, return _T(""
- tempunit = _ttof(tempchar);
+ tempunit = _wtof(tempchar);
if (tempunit == 0 && tempchar[0] != '0')
return;
@@ -241,7 +241,7 @@ void GetDist(wchar_t *tempchar, wchar_t *unit, wchar_t *str) // convert the string to a floating point number (always positive)
// if it end up with 0, then it's not a number, return the original string and quit
- output = _ttof(tempchar);
+ output = _wtof(tempchar);
if (output == 0) {
mir_tstrcpy(str, tempchar);
return;
@@ -281,7 +281,7 @@ void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str) // convert the string to a floating point number (always positive)
// if it end up with 0, then it's not a number, return the original string and quit
- output = _ttof(tempchar);
+ output = _wtof(tempchar);
if (output == 0) {
mir_tstrcpy(str, tempchar);
return;
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index f3af9cb3f6..efa3fb7af2 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -247,7 +247,7 @@ static void LoadStationData(wchar_t *pszFile, wchar_t *pszShortFile, WIDATA *Dat Data->Enabled = FALSE;
// open the ini file
- FILE *pfile = _tfsopen(pszFile, L"rt", _SH_DENYWR);
+ FILE *pfile = _wfsopen(pszFile, L"rt", _SH_DENYWR);
if (pfile != NULL) {
char Line[4096];
fgets(Line, _countof(Line), pfile);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index fdd83c3d94..1dd09bf864 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -158,7 +158,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara {
FontIDT fntid = { 0 };
- mir_tstrcpy(fntid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fntid.group, _A2W(WEATHERPROTONAME));
mir_tstrcpy(fntid.name, LPGENW("Frame Font"));
fntc = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt);
@@ -329,7 +329,7 @@ void InitMwin(void) mir_strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
mir_strcpy(colourid.setting, "ColorMwinFrame");
mir_tstrcpy(colourid.name, LPGENW("Frame Background"));
- mir_tstrcpy(colourid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(colourid.group, _A2W(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
@@ -337,7 +337,7 @@ void InitMwin(void) fontid.cbSize = sizeof(FontIDT);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
mir_strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
- mir_tstrcpy(fontid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.group, _A2W(WEATHERPROTONAME));
mir_tstrcpy(fontid.name, LPGENW("Frame Font"));
mir_strcpy(fontid.prefix, "fnt0");
@@ -347,7 +347,7 @@ void InitMwin(void) fontid.deffontsettings.charset = DEFAULT_CHARSET;
mir_tstrcpy(fontid.deffontsettings.szFace, L"Verdana");
- mir_tstrcpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.backgroundGroup, _A2W(WEATHERPROTONAME));
mir_tstrcpy(fontid.backgroundName, LPGENW("Frame Background"));
FontRegisterT(&fontid);
diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp index ea567ff901..6f866cd99a 100644 --- a/plugins/Weather/src/weather_opt.cpp +++ b/plugins/Weather/src/weather_opt.cpp @@ -577,25 +577,25 @@ int OptInit(WPARAM wParam, LPARAM) odp.position = 95600;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = OptionsProc;
- odp.pwszGroup = LPGENW("Network");
- odp.pwszTitle = _T(WEATHERPROTOTEXT);
- odp.pwszTab = LPGENW("General");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.pszGroup = LPGEN("Network");
+ odp.pszTitle = WEATHERPROTOTEXT;
+ odp.pszTab = LPGEN("General");
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
// text options
odp.pszTemplate = MAKEINTRESOURCEA(IDD_TEXTOPT);
odp.pfnDlgProc = DlgProcText;
- odp.pwszTab = LPGENW("Display");
+ odp.pszTab = LPGEN("Display");
Options_AddPage(wParam, &odp);
// if popup service exists, load the weather popup options
if ((ServiceExists(MS_POPUP_ADDPOPUPT))) {
odp.position = 100000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP);
- odp.pwszGroup = LPGENW("Popups");
+ odp.pszGroup = LPGEN("Popups");
odp.groupPosition = 910000000;
- odp.pwszTab = NULL;
+ odp.pszTab = NULL;
odp.pfnDlgProc = DlgPopupOpts;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index b4adc2bf28..6eb376998d 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -316,12 +316,11 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam) OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.position = 100000000;
- odp.pwszTitle = _T(WEATHERPROTONAME);
+ odp.pszTitle = WEATHERPROTONAME;
if (lParam == 0) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO);
odp.pfnDlgProc = DlgProcINIPage;
- odp.flags = ODPF_TCHAR;
UserInfo_AddPage(wParam, &odp);
}
else {
@@ -330,7 +329,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam) // register the contact info page
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
odp.pfnDlgProc = DlgProcUIPage;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
UserInfo_AddPage(wParam, &odp);
}
}
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 802227954d..7bc2acf7a3 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -164,7 +164,7 @@ extern "C" int __declspec(dllexport) Load() InitServices();
//add sound event to options
- SkinAddNewSoundExT("webviewalert", _T(MODULENAME), LPGENW("Alert event"));
+ SkinAddNewSoundExT("webviewalert", MODULENAMEW, LPGENW("Alert event"));
//value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
@@ -175,7 +175,7 @@ extern "C" int __declspec(dllexport) Load() //value is 0 if menu is enabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 0);
- mi.root = Menu_CreateRoot(MO_MAIN, _T(MODULENAME), 20200001);
+ mi.root = Menu_CreateRoot(MO_MAIN, MODULENAMEW, 20200001);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "403BE07B-7954-4F3E-B318-4301571776B8");
/*DISABLE WEBVIEW*/
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 78721ee7e5..3abb94ffb6 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -295,10 +295,10 @@ static int OptInitialise(WPARAM wParam, LPARAM) OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
- odp.pwszGroup = LPGENW("Network");
- odp.pwszTitle = _T(MODULENAME);
+ odp.pszGroup = LPGEN("Network");
+ odp.pszTitle = MODULENAME;
odp.pfnDlgProc = DlgProcOpt;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
// if popup service exists
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index 8c909b50d0..65987f66f9 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -119,7 +119,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam) mir_tstrncpy(ppd.lptzContactName, dbv.ptszVal, _countof(ppd.lptzContactName));
db_free(&dbv);
}
- else mir_tstrcpy(ppd.lptzContactName, _T(MODULENAME));
+ else mir_tstrcpy(ppd.lptzContactName, MODULENAMEW);
ppd.lchContact = wParam;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
@@ -340,7 +340,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Start/end strings not found or strings not set."));
}
- else MessageBox(NULL, TranslateT("Start/end strings not found or strings not set."), _T(MODULENAME), MB_OK);
+ else MessageBox(NULL, TranslateT("Start/end strings not found or strings not set."), MODULENAMEW, MB_OK);
}
if (eventIndex == 0) { // string present
@@ -413,7 +413,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn HWND hwndDlg = WindowList_Find(hWindowList, hContact);
SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Download successful; about to process data..."));
}
- else MessageBox(NULL, TranslateT("Unknown alert type."), _T(MODULENAME), MB_OK);
+ else MessageBox(NULL, TranslateT("Unknown alert type."), MODULENAMEW, MB_OK);
}
}
}
@@ -508,7 +508,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn if ( db_get_b(hContact, MODULENAME, APND_DATE_NAME_KEY, 0))
db_set_s(hContact, "CList", "MyHandle", tstr);
}
- else MessageBox(NULL, TranslateT("Unknown alert type."), _T(MODULENAME), MB_OK);
+ else MessageBox(NULL, TranslateT("Unknown alert type."), MODULENAMEW, MB_OK);
}
}
}
@@ -624,7 +624,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Alert start/end strings not found or strings not set."));
}
- else MessageBox(NULL, TranslateT("Alert start/end strings not found or strings not set."), _T(MODULENAME), MB_OK);
+ else MessageBox(NULL, TranslateT("Alert start/end strings not found or strings not set."), MODULENAMEW, MB_OK);
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_AWAY);
}
@@ -718,7 +718,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn if ( db_get_b(hContact, MODULENAME, APND_DATE_NAME_KEY, 0))
db_set_s(hContact, "CList", "MyHandle", tstr);
}
- else MessageBox(NULL, TranslateT("Unknown alert type."), _T(MODULENAME), MB_OK);
+ else MessageBox(NULL, TranslateT("Unknown alert type."), MODULENAMEW, MB_OK);
}
}
}
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 57d59b4bba..acd228eb6d 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -78,7 +78,7 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara mir_strcpy(Searchstr, NewSearchstr);
- if (!(startposition > mir_strlen(buff)))
+ if (!(startposition > (int)mir_strlen(buff)))
location = (strstr(buff + startposition, NewSearchstr)) - buff;
oldloc = loc;
@@ -135,7 +135,7 @@ static MCONTACT FindContactByUrl(HWND hwndDlg) if (!mir_tstrcmp(urltext, db1) && !mir_tstrcmp(titlebartxt, db2)) {
contactcount++;
if (contactcount > 1) {
- MessageBox(NULL, TranslateT("ERROR: You have two or more Webview contacts with the same URL and contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("ERROR: You have two or more Webview contacts with the same URL and contact name."), MODULENAMEW, MB_OK);
return NULL;
}
res = hContact;
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index 206334e5e1..a833fed559 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -206,7 +206,7 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) TextColour = TextClr;
}
ppd.lchContact = NULL;
- mir_tstrcpy(ppd.lptzContactName, _T(MODULENAME));
+ mir_tstrcpy(ppd.lptzContactName, MODULENAMEW);
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
mir_tstrcpy(ppd.lptzText, TranslateT("This is a preview popup."));
ppd.colorBack = BGColour;
@@ -715,18 +715,18 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (eventIndex == 0) // string present
if (!(GetWindowTextLength(GetDlgItem(hwndDlg, IDC_ALERT_STRING))))
if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ALERTS)) {
- MessageBox(NULL, TranslateT("You need to supply a search string."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a search string."), MODULENAMEW, MB_OK);
break;
}
if (eventIndex == 2) // part of web page changed
if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ALERTS)) {
if (!(GetWindowTextLength(GetDlgItem(hwndDlg, IDC_START2)))) {
- MessageBox(NULL, TranslateT("You need to supply a start string."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a start string."), MODULENAMEW, MB_OK);
break;
}
if (!(GetWindowTextLength(GetDlgItem(hwndDlg, IDC_END2)))) {
- MessageBox(NULL, TranslateT("You need to supply an end string."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply an end string."), MODULENAMEW, MB_OK);
break;
}
}
@@ -734,14 +734,14 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (alertIndex == 1) // log to file
if (!(GetWindowTextLength(GetDlgItem(hwndDlg, IDC_FILENAME))))
if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ALERTS)) {
- MessageBox(NULL, TranslateT("You need to supply a file name and path."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a file name and path."), MODULENAMEW, MB_OK);
break;
}
if (IsDlgButtonChecked(hwndDlg, IDC_ALWAYS_LOG))
if (!(GetWindowTextLength(GetDlgItem(hwndDlg, IDC_FILENAME))))
if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ALERTS)) {
- MessageBox(NULL, TranslateT("You need to supply a file name and path."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a file name and path."), MODULENAMEW, MB_OK);
break;
}
@@ -952,61 +952,61 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
wchar_t str[128], contactname[128];
if (!GetWindowTextLength(GetDlgItem(hwndDlg, IDC_URL))) {
- MessageBox(NULL, TranslateT("You need to supply a URL."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a URL."), MODULENAMEW, MB_OK);
break;
}
if (!GetWindowTextLength(GetDlgItem(hwndDlg, IDC_START))) {
if (IsDlgButtonChecked(hwndDlg, IDC_U_SE_STRINGS)) {
- MessageBox(NULL, TranslateT("You need to supply a start string."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a start string."), MODULENAMEW, MB_OK);
break;
}
}
if (!GetWindowTextLength(GetDlgItem(hwndDlg, IDC_END))) {
if (IsDlgButtonChecked(hwndDlg, IDC_U_SE_STRINGS)) {
- MessageBox(NULL, TranslateT("You need to supply an end string."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply an end string."), MODULENAMEW, MB_OK);
break;
}
}
if (!GetWindowTextLength(GetDlgItem(hwndDlg, IDC_SITE_NAME))) {
- MessageBox(NULL, TranslateT("You need to supply a name for the contact."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("You need to supply a name for the contact."), MODULENAMEW, MB_OK);
break;
}
GetDlgItemText(hwndDlg, IDC_SITE_NAME, contactname, _countof(contactname));
if (wcschr(contactname, '\\') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '/') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, ':') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '*') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '?') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '\"') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '<') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '>') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
if (wcschr(contactname, '|') != NULL) {
- MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), _T(MODULENAME), MB_OK);
+ MessageBox(NULL, TranslateT("Invalid symbol present in contact name."), MODULENAMEW, MB_OK);
break;
}
diff --git a/plugins/YAPP/src/message_pump.cpp b/plugins/YAPP/src/message_pump.cpp index 000144acc3..ea3e0b3197 100644 --- a/plugins/YAPP/src/message_pump.cpp +++ b/plugins/YAPP/src/message_pump.cpp @@ -30,7 +30,6 @@ unsigned __stdcall MessagePumpThread(void* param) PopupData *pd = (PopupData*)hwndMsg.lParam;
if (enabled && num_popups < MAX_POPUPS) {
- //HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, L"Popup", WS_POPUP, 0, 0, 0, 0, GetDesktopWindow(), 0, hInst, (LPVOID)hwndMsg.lParam);
HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, L"Popup", WS_POPUP, 0, 0, 0, 0, 0, 0, hInst, (LPVOID)hwndMsg.lParam);
num_popups++;
if (hwndMsg.wParam) // set notifyer handle
diff --git a/plugins/YAPP/src/popwin.h b/plugins/YAPP/src/popwin.h index 4087ffb322..8248592814 100644 --- a/plugins/YAPP/src/popwin.h +++ b/plugins/YAPP/src/popwin.h @@ -1,7 +1,7 @@ #ifndef _POPWIN_INC
#define _POPWIN_INC
-#define POP_WIN_CLASS _T(MODULE) L"YAPPWindowClass"
+#define POP_WIN_CLASS _A2W(MODULE) L"YAPPWindowClass"
#define PUM_SETTEXT (WM_USER + 0x020)
#define PUM_GETCONTACT (WM_USER + 0x021)
diff --git a/plugins/YAPP/src/stdafx.h b/plugins/YAPP/src/stdafx.h index f702b2b0e1..704cb11db0 100644 --- a/plugins/YAPP/src/stdafx.h +++ b/plugins/YAPP/src/stdafx.h @@ -40,7 +40,7 @@ #include "yapp_history.h"
#include "icons.h"
-#define MODULE "YAPP"
+#define MODULE "YAPP"
extern HMODULE hInst;
extern bool bShutdown;
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 9901e6896e..c3a02a8a22 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -72,7 +72,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) return 0; // Ignore for special chatrooms - if (!mir_tstrcmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM))) + if (!mir_tstrcmp(hook->pDest->ptszID, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))) return 0; switch (hook->pDest->iType) @@ -435,13 +435,13 @@ void FacebookProto::PrepareNotificationsChatRoom() { // Create the group chat session GCSESSION gcw = { sizeof(gcw) }; gcw.iType = GCW_PRIVMESS; - gcw.ptszID = _T(FACEBOOK_NOTIFICATIONS_CHATROOM); + gcw.ptszID = _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM); gcw.pszModule = m_szModuleName; gcw.ptszName = nameT; CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw); // Send setting events - GCDEST gcd = { m_szModuleName, _T(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_CONTROL }; + GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; gce.time = ::time(NULL); @@ -460,10 +460,10 @@ void FacebookProto::UpdateNotificationsChatRoom(facebook_notification *notificat std::string message = text.str(); utils::text::replace_all(&message, "%", "%%"); - ptrT idT(mir_tstrdup(_T(FACEBOOK_NOTIFICATIONS_CHATROOM))); + ptrT idT(mir_tstrdup(_A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))); ptrT messageT(mir_a2t_cp(message.c_str(), CP_UTF8)); - GCDEST gcd = { m_szModuleName, _T(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE }; + GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; gce.ptszText = messageT; gce.time = notification->time ? notification->time : ::time(NULL); diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index c3dfbc9cc3..b28e096f4f 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -35,25 +35,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define FACEBOOK_URL_STICKER "http://www.facebook.com/stickers/asset/?sticker_id=%s&image_type=BestEffortImage"
// Connection
-#define FACEBOOK_SERVER_REGULAR "www.facebook.com"
-#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com"
-#define FACEBOOK_SERVER_MOBILE "m.facebook.com"
-#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com"
-#define FACEBOOK_SERVER_LOGIN "www.facebook.com"
-#define FACEBOOK_SERVER_APPS "apps.facebook.com"
-#define FACEBOOK_SERVER_DOMAIN "facebook.com"
+#define FACEBOOK_SERVER_REGULAR "www.facebook.com"
+#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com"
+#define FACEBOOK_SERVER_MOBILE "m.facebook.com"
+#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com"
+#define FACEBOOK_SERVER_LOGIN "www.facebook.com"
+#define FACEBOOK_SERVER_APPS "apps.facebook.com"
+#define FACEBOOK_SERVER_DOMAIN "facebook.com"
// Facebook clients
-#define FACEBOOK_CLIENT_WEB "Facebook (website)"
-#define FACEBOOK_CLIENT_MOBILE "Facebook (mobile)"
-#define FACEBOOK_CLIENT_OTHER "Facebook (other)"
-#define FACEBOOK_CLIENT_APP "Facebook App"
-#define FACEBOOK_CLIENT_MESSENGER "Facebook Messenger"
+#define FACEBOOK_CLIENT_WEB L"Facebook (website)"
+#define FACEBOOK_CLIENT_MOBILE L"Facebook (mobile)"
+#define FACEBOOK_CLIENT_OTHER L"Facebook (other)"
+#define FACEBOOK_CLIENT_APP L"Facebook App"
+#define FACEBOOK_CLIENT_MESSENGER L"Facebook Messenger"
// Various constants
-#define FACEBOOK_NOTIFICATIONS_CHATROOM "_notifications"
-#define FACEBOOK_CHATROOM_NAMES_COUNT 3 // number of participant names to use for chatrooms without specific name (on website it's 2)
-#define FACEBOOK_NOTIFICATIONS_LOAD_COUNT 20 // number of last notifications to load on login to notify
+#define FACEBOOK_NOTIFICATIONS_CHATROOM "_notifications"
+#define FACEBOOK_CHATROOM_NAMES_COUNT 3 // number of participant names to use for chatrooms without specific name (on website it's 2)
+#define FACEBOOK_NOTIFICATIONS_LOAD_COUNT 20 // number of last notifications to load on login to notify
// Limits
#define FACEBOOK_MESSAGE_LIMIT 200000 // this is guessed limit, in reality it is bigger
diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h index 43c8f18f86..6644f26e90 100644 --- a/protocols/FacebookRM/src/entities.h +++ b/protocols/FacebookRM/src/entities.h @@ -59,16 +59,16 @@ struct facebook_user { switch (this->client) { case CLIENT_APP: - return _T(FACEBOOK_CLIENT_APP); + return FACEBOOK_CLIENT_APP; case CLIENT_MESSENGER: - return _T(FACEBOOK_CLIENT_MESSENGER); + return FACEBOOK_CLIENT_MESSENGER; case CLIENT_OTHER: - return _T(FACEBOOK_CLIENT_OTHER); + return FACEBOOK_CLIENT_OTHER; case CLIENT_MOBILE: - return _T(FACEBOOK_CLIENT_MOBILE); + return FACEBOOK_CLIENT_MOBILE; case CLIENT_WEB: default: - return _T(FACEBOOK_CLIENT_WEB); + return FACEBOOK_CLIENT_WEB; } } }; diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 68d3934e0f..2ab26361da 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -763,16 +763,16 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo wchar_t *client; if (vc == 0) { - client = _T(FACEBOOK_CLIENT_WEB); + client = FACEBOOK_CLIENT_WEB; } else if (vc == 8) { - client = _T(FACEBOOK_CLIENT_MESSENGER); // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger. + client = FACEBOOK_CLIENT_MESSENGER; // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger. } else if (vc == 10) { - client = _T(FACEBOOK_CLIENT_MOBILE); + client = FACEBOOK_CLIENT_MOBILE; } else { - client = _T(FACEBOOK_CLIENT_OTHER); + client = FACEBOOK_CLIENT_OTHER; } ptrT oldClient(proto->getTStringA(hContact, "MirVer")); @@ -877,21 +877,21 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo } // Probably means client: guess 0 = web, 8 = messenger, 10 = something else? if (vc_) { - wchar_t *client = _T(FACEBOOK_CLIENT_WEB); + wchar_t *client = FACEBOOK_CLIENT_WEB; /*if (vc == 0) { // means active some time ago? (on messenger or also on web) - client = _T(FACEBOOK_CLIENT_WEB); + client = FACEBOOK_CLIENT_WEB; } else if (vc == 8) { - client = _T(FACEBOOK_CLIENT_MESSENGER); // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger. + client = FACEBOOK_CLIENT_MESSENGER; // I was online on Miranda, but when looked at myself at messenger.com I had icon of Messenger. } else if (vc == 10) { // means actually active on messenger - client = _T(FACEBOOK_CLIENT_MOBILE); + client = FACEBOOK_CLIENT_MOBILE; } else { - client = _T(FACEBOOK_CLIENT_OTHER); + client = FACEBOOK_CLIENT_OTHER; }*/ ptrT oldClient(proto->getTStringA(hContact, "MirVer")); diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 05e746cf8f..692b36aef5 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -659,7 +659,7 @@ retry: psr.firstName.w = __firstname;
psr.lastName.w = __lastname;
psr.email.w = strFmt2;
- psr.id.w = _ultot(uin, strFmt1, 10);
+ psr.id.w = _ultow(uin, strFmt1, 10);
psr.uin = uin;
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM)&psr);
}
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 3c2aa50911..58fd94594c 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -480,7 +480,7 @@ private: void PopulateTags(HTREEITEM htiRoot, wchar_t *szActiveTag)
{
- LIST<wchar_t> tagSet(5, _tcscmp);
+ LIST<wchar_t> tagSet(5, wcscmp);
for (int i = 0; i < m_proto->m_notes.getCount(); i++) {
wchar_t *tags = m_proto->m_notes[i].GetTags();
for (wchar_t *tag = tags; tag && *tag; tag = tag + mir_tstrlen(tag) + 1)
diff --git a/protocols/MinecraftDynmap/src/main.cpp b/protocols/MinecraftDynmap/src/main.cpp index 02cd9c4603..09f6905e8e 100644 --- a/protocols/MinecraftDynmap/src/main.cpp +++ b/protocols/MinecraftDynmap/src/main.cpp @@ -47,7 +47,7 @@ PLUGININFOEX pluginInfo = { // Protocol instances static int compare_protos(const MinecraftDynmapProto *p1, const MinecraftDynmapProto *p2) { - return _tcscmp(p1->m_tszUserName, p2->m_tszUserName); + return wcscmp(p1->m_tszUserName, p2->m_tszUserName); } OBJLIST<MinecraftDynmapProto> g_Instances(1, compare_protos); diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 47645f8bb8..78024a40d4 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -41,7 +41,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, wchar_t* p else { proto->debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno)); wchar_t buffer[512]; - mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest); + mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _wcserror(errno), ptszDest); PUShowMessageT(buffer, SM_WARNING); } } @@ -114,7 +114,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it } else { wchar_t buffer[128]; - mir_sntprintf(buffer, TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _tcserror(errno), errno); + mir_sntprintf(buffer, TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _wcserror(errno), errno); PUShowMessageT(buffer, SM_WARNING); proto->debugLog(buffer); return; diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp index c7212e780b..2f5b3dcddb 100644 --- a/protocols/Tox/src/tox_network.cpp +++ b/protocols/Tox/src/tox_network.cpp @@ -66,7 +66,7 @@ void CToxProto::BootstrapNodesFromJson(CToxThread *toxThread, bool isUdp, bool i {
ptrA json;
- VARST path(_T(TOX_JSON_PATH));
+ VARST path(_A2W(TOX_JSON_PATH));
if (!IsFileExists(path))
UpdateNodes();
@@ -157,7 +157,7 @@ void CToxProto::UpdateNodes() if (lastUpdate <= getDword("NodesUpdate", 0))
return;
- ptrT path(mir_tstrdup((wchar_t*)VARST(_T(TOX_JSON_PATH))));
+ ptrT path(mir_tstrdup((wchar_t*)VARST(_A2W(TOX_JSON_PATH))));
if (!IsFileExists(path))
{
HANDLE hProfile = CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 8d65a7b0a8..4b31e1cf61 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -537,7 +537,7 @@ void CToxOptionsNodeList::ReloadNodeList() int iItem = -1;
- VARST path(_T(TOX_JSON_PATH));
+ VARST path(_A2W(TOX_JSON_PATH));
if (CToxProto::IsFileExists(path))
{
ptrA json;
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index f09f7ca8c1..a8e89ac51b 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -127,7 +127,7 @@ void CToxProto::ShowNotification(const wchar_t *caption, const wchar_t *message, void CToxProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact)
{
- ShowNotification(_T(MODULE), message, flags, hContact);
+ ShowNotification(_A2W(MODULE), message, flags, hContact);
}
bool CToxProto::IsFileExists(const wchar_t* path)
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 8ac554321c..340a27c78e 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -679,7 +679,7 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact) wchar_t ttime[64];
_locale_t locale = _create_locale(LC_ALL, "");
- _tcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale);
+ _wcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale);
_free_locale(locale);
StatusTextData st = { 0 };
@@ -1254,7 +1254,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn time_t datetime = (time_t)jnMsg["date"].as_int();
wchar_t ttime[64];
_locale_t locale = _create_locale(LC_ALL, "");
- _tcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale);
+ _wcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale);
_free_locale(locale);
CMString tszBody(jnMsg["body"].as_mstring());
diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp index 2dc0860a35..c7dd2d468d 100644 --- a/src/mir_app/src/path.cpp +++ b/src/mir_app/src/path.cpp @@ -133,7 +133,7 @@ static __forceinline char* GetPathVarX(const char*, int code) return makeFileName(szFullPath);
}
-static __forceinline int _xcscmp(const wchar_t *s1, const wchar_t *s2) { return _tcscmp(s1, s2); }
+static __forceinline int _xcscmp(const wchar_t *s1, const wchar_t *s2) { return wcscmp(s1, s2); }
static __forceinline int _xcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) { return wcsncmp(s1, s2, n); }
static __forceinline size_t _xcslen(const wchar_t *s1) { return wcslen(s1); }
static __forceinline wchar_t* _xcscpy(wchar_t *s1, const wchar_t *s2) { return wcscpy(s1, s2); }
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 24af3b02c1..e91ece4c7e 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -181,25 +181,25 @@ MIR_APP_DLL(int) ProtoGetAvatarFormat(const wchar_t *ptszFileName) if (ptszExt == NULL)
return PA_FORMAT_UNKNOWN;
- if (!_tcsicmp(ptszExt, L".png"))
+ if (!wcsicmp(ptszExt, L".png"))
return PA_FORMAT_PNG;
- if (!_tcsicmp(ptszExt, L".jpg") || !_tcsicmp(ptszExt, L".jpeg"))
+ if (!wcsicmp(ptszExt, L".jpg") || !wcsicmp(ptszExt, L".jpeg"))
return PA_FORMAT_JPEG;
- if (!_tcsicmp(ptszExt, L".ico"))
+ if (!wcsicmp(ptszExt, L".ico"))
return PA_FORMAT_ICON;
- if (!_tcsicmp(ptszExt, L".bmp") || !_tcsicmp(ptszExt, L".rle"))
+ if (!wcsicmp(ptszExt, L".bmp") || !wcsicmp(ptszExt, L".rle"))
return PA_FORMAT_BMP;
- if (!_tcsicmp(ptszExt, L".gif"))
+ if (!wcsicmp(ptszExt, L".gif"))
return PA_FORMAT_GIF;
- if (!_tcsicmp(ptszExt, L".swf"))
+ if (!wcsicmp(ptszExt, L".swf"))
return PA_FORMAT_SWF;
- if (!_tcsicmp(ptszExt, L".xml"))
+ if (!wcsicmp(ptszExt, L".xml"))
return PA_FORMAT_XML;
return PA_FORMAT_UNKNOWN;
diff --git a/src/mir_core/src/cmdline.cpp b/src/mir_core/src/cmdline.cpp index c90eb11767..6489bde9d7 100644 --- a/src/mir_core/src/cmdline.cpp +++ b/src/mir_core/src/cmdline.cpp @@ -36,7 +36,7 @@ struct CmdLineParam static int CompareParams(const CmdLineParam *p1, const CmdLineParam *p2)
{
- return _tcscmp(p1->name, p2->name);
+ return wcscmp(p1->name, p2->name);
}
static OBJLIST<CmdLineParam> arParams(5, CompareParams);
diff --git a/src/mir_core/src/winver.cpp b/src/mir_core/src/winver.cpp index 8484f8ef71..cfbe338b81 100644 --- a/src/mir_core/src/winver.cpp +++ b/src/mir_core/src/winver.cpp @@ -71,7 +71,7 @@ MIR_CORE_DLL(BOOL) IsFullScreen() if (hWnd && hWnd != hWndDesktop && hWnd != hWndShell) {
wchar_t tszClassName[128] = L"";
GetClassName(hWnd, tszClassName, _countof(tszClassName));
- if (_tcscmp(tszClassName, L"WorkerW")) {
+ if (wcscmp(tszClassName, L"WorkerW")) {
RECT rect, rectw, recti;
GetWindowRect(hWnd, &rectw);
diff --git a/utils/mir_smileys.cpp b/utils/mir_smileys.cpp index f3d5168a81..0bce208d26 100644 --- a/utils/mir_smileys.cpp +++ b/utils/mir_smileys.cpp @@ -28,6 +28,8 @@ Boston, MA 02111-1307, USA. #include <commctrl.h> #include <m_skin_eng.h> +#include <tchar.h> + // Prototypes #define TEXT_PIECE_TYPE_TEXT 0 @@ -408,11 +410,11 @@ SortedList * ReplaceSmileys(const wchar_t *text, int text_size, const char *prot SortedList *plText = List_Create(0, 10); const wchar_t *next_text_pos = text; - const wchar_t *last_text_pos = _tcsninc(text, text_size); + const wchar_t *last_text_pos = _wcsninc(text, text_size); for (unsigned int i = 0; i < sp.numSmileys; i++) { - wchar_t* start = _tcsninc(text, spres[i].startChar); - wchar_t* end = _tcsninc(start, spres[i].size); + wchar_t *start = _wcsninc(text, spres[i].startChar); + wchar_t *end = _wcsninc(start, spres[i].size); if (spres[i].hIcon != NULL) { // For defective smileypacks // Add text |