diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:49:22 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:49:22 +0000 |
commit | b280d2eae93fb22b4fdb45218d8a06287a97030e (patch) | |
tree | f4e0d9921a57bafdb608a55a107bad3408b8f909 /plugins | |
parent | 159b565b390687258ee65a3b66596e118752063c (diff) |
replace _tcscmp to mir_tstrcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
75 files changed, 216 insertions, 216 deletions
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 1cb5702829..022754652f 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -119,7 +119,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) CONTACTAVATARCHANGEDNOTIFICATION* avatar = (CONTACTAVATARCHANGEDNOTIFICATION*)lParam;
if (avatar == NULL) {
- if (!ret || !_tcscmp(dbvOldHash.ptszVal, _T("-"))) {
+ if (!ret || !mir_tstrcmp(dbvOldHash.ptszVal, _T("-"))) {
//avoid duplicate "removed avatar" notifications
//do not notify on an empty profile
ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Removed avatar, no avatar before... skipping"));
@@ -135,7 +135,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) ShowPopup(hContact, NULL, opts.popup_removed);
}
else {
- if (ret && !_tcscmp(dbvOldHash.ptszVal, avatar->hash)) {
+ if (ret && !mir_tstrcmp(dbvOldHash.ptszVal, avatar->hash)) {
// same avatar hash, skipping
ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Hashes are the same... skipping"));
db_free(&dbvOldHash);
diff --git a/plugins/Boltun/src/Engine/Mind.cpp b/plugins/Boltun/src/Engine/Mind.cpp index ec6c58528b..91b2dc4a84 100644 --- a/plugins/Boltun/src/Engine/Mind.cpp +++ b/plugins/Boltun/src/Engine/Mind.cpp @@ -213,35 +213,35 @@ void Mind::Load(tstring filename) ++c;
count -= 2;
c[count] = '\0';
- if (_tcscmp(c, _T("QUESTION")) == 0)
+ if (mir_tstrcmp(c, _T("QUESTION")) == 0)
{
toLowerStr(c);
data->question.insert(s1);
}
else
- if (_tcscmp(c, _T("IGNORED")) == 0)
+ if (mir_tstrcmp(c, _T("IGNORED")) == 0)
{
toLowerStr(c);
data->special.insert(s1);
}
else
- if (_tcscmp(c, _T("ESCAPE")) == 0)
+ if (mir_tstrcmp(c, _T("ESCAPE")) == 0)
{
data->escape.push_back(s1);
}
else
- if (_tcscmp(c, _T("FAILURE")) == 0)
+ if (mir_tstrcmp(c, _T("FAILURE")) == 0)
{
data->failure.push_back(s1);
}
else
- if (_tcscmp(c, _T("REPEAT")) == 0)
+ if (mir_tstrcmp(c, _T("REPEAT")) == 0)
{
data->repeats.push_back(s1);
}
else
{
- if (_tcscmp(c, _T("INITIAL")) != 0)
+ if (mir_tstrcmp(c, _T("INITIAL")) != 0)
throw error;
data->initial.push_back(s1);
}
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index df0e873783..cf75e3e48d 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -102,7 +102,7 @@ INT_PTR CALLBACK StatusModesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l |(IsDlgButtonChecked(hwnd, IDC_CHECK9)<<8)
|(IsDlgButtonChecked(hwnd, IDC_CHECK10)<<9);
- if (!_tcscmp(type, _T("Any"))) {
+ if (!mir_tstrcmp(type, _T("Any"))) {
if (LOWORD(wParam) == IDOK)
db_set_w(wi->hContact, modname, "SendIfMyStatusIsFLAG", flag);
wi->SendIfMy = 0;
@@ -590,7 +590,7 @@ INT_PTR CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP {
TCHAR text[2048];
GetDlgItemText(hwnd, IDOK, text, SIZEOF(text));
- if (!_tcscmp(text, TranslateT("Retry"))) {
+ if (!mir_tstrcmp(text, TranslateT("Retry"))) {
GetDlgItemText(hwnd, IDC_MESSAGE, text, SIZEOF(text));
SendPounce(text, hContact);
}
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 5749270715..a9c123cfa2 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -104,11 +104,11 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) ptrT tszValue(db_get_tsa(NULL, ModuleName, ptszTemp));
if (tszValue == 0)
ptszLayStrings[i] = ptszCurrLayout;
- else if (!_tcscmp(tszValue, ptszEmptySting))
+ else if (!mir_tstrcmp(tszValue, ptszEmptySting))
ptszLayStrings[i] = ptszCurrLayout;
else {
ptszLayStrings[i] = tszValue.detouch();
- if (!_tcscmp(ptszCurrLayout, ptszLayStrings[i]))
+ if (!mir_tstrcmp(ptszCurrLayout, ptszLayStrings[i]))
db_unset(NULL, ModuleName, ptszTemp);
mir_free(ptszCurrLayout);
}
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index a12010eef2..281c973a55 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -205,12 +205,12 @@ INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LP GetDlgItemText(hWnd, IDC_EDIT_SET, ptszFormLay, MaxTextSize);
i = SendDlgItemMessage(hWnd, IDC_COMBO_LANG, CB_GETCURSEL, 0, 0);
ptszMemLay = ptszLayStrings[i];
- if (_tcscmp(ptszMemLay, ptszFormLay) != 0) {
+ if (mir_tstrcmp(ptszMemLay, ptszFormLay) != 0) {
_tcscpy(ptszMemLay, ptszFormLay);
ptszGenLay = GenerateLayoutString(hklLayouts[i]);
pszNameLay = GetNameOfLayout(hklLayouts[i]);
- if (_tcscmp(ptszMemLay, ptszGenLay) != 0)
+ if (mir_tstrcmp(ptszMemLay, ptszGenLay) != 0)
db_set_ts(NULL, ModuleName, pszNameLay, ptszMemLay);
else
db_unset(NULL, ModuleName, pszNameLay);
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 4e2a5c4648..09fb832fe5 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -233,7 +233,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) && !mir_tstrcmp(ptszClient, ptszOldClient))
return 0;
if (!PopupOptPage.GetValue(IDC_POPUPOPTDLG_SHOWVER)) {
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 88aa33eb3e..9177354ca3 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -1542,7 +1542,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L DBVARIANT dbv = {0};
if (!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
- if (_tcscmp(dbv.ptszVal, final_path))
+ if (mir_tstrcmp(dbv.ptszVal, final_path))
skinChanged = TRUE;
db_free(&dbv);
}
diff --git a/plugins/ConnectionNotify/src/netstat.cpp b/plugins/ConnectionNotify/src/netstat.cpp index 14536477f4..8f0eaa2155 100644 --- a/plugins/ConnectionNotify/src/netstat.cpp +++ b/plugins/ConnectionNotify/src/netstat.cpp @@ -126,8 +126,8 @@ void deleteConnectionsTable(struct CONNECTION *head) struct CONNECTION *searchConnection(struct CONNECTION *head, TCHAR *intIp, TCHAR *extIp, int intPort, int extPort, int state) { for (struct CONNECTION *cur = head; cur != NULL; cur = cur->next) { - if (_tcscmp(cur->strIntIp, intIp) == 0 && - _tcscmp(cur->strExtIp, extIp) == 0 && + if (mir_tstrcmp(cur->strIntIp, intIp) == 0 && + mir_tstrcmp(cur->strExtIp, extIp) == 0 && cur->intExtPort == extPort && cur->intIntPort == intPort && cur->state == state) diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index 09ea0ed003..81e6578bf6 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -307,13 +307,13 @@ void GetInternetExplorerVersion(CMString &buffer) if (ieVersion[0] == 0) {
if (iVer[0] == 0)
buffer.Append(TEXT("<not installed>"));
- else if (_tcscmp(iVer, TEXT("100")) == 0)
+ else if (mir_tstrcmp(iVer, TEXT("100")) == 0)
buffer.Append(TEXT("1.0"));
- else if (_tcscmp(iVer, TEXT("101")) == 0)
+ else if (mir_tstrcmp(iVer, TEXT("101")) == 0)
buffer.Append(TEXT("NT"));
- else if (_tcscmp(iVer, TEXT("102")) == 0)
+ else if (mir_tstrcmp(iVer, TEXT("102")) == 0)
buffer.Append(TEXT("2.0"));
- else if (_tcscmp(iVer, TEXT("103")) == 0)
+ else if (mir_tstrcmp(iVer, TEXT("103")) == 0)
buffer.Append(TEXT("3.0"));
}
else buffer.Append(ieVersion);
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index d168b99906..4a6cb3d543 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -208,7 +208,7 @@ static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam }
GetDlgItemText(hwndDlg, IDC_USERPASS2, buf, SIZEOF(buf));
- if (_tcscmp(buf2, buf)) {
+ if (mir_tstrcmp(buf2, buf)) {
SetDlgItemText(hwndDlg, IDC_HEADERBAR, TranslateT("Passwords do not match!"));
goto LBL_Error;
}
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index cc51a1a434..74417f1c12 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -146,7 +146,7 @@ void FindAdd(HWND hdlg, TCHAR *szProfileDir, TCHAR *szPrefix) hFind = FindFirstFile(szSearchPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !_tcscmp(fd.cFileName, _T(".")) || !_tcscmp(fd.cFileName, _T("..")))
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
continue;
mir_sntprintf(szFilename, SIZEOF(szFilename), _T("%s\\%s\\%s.dat"), szProfileDir, fd.cFileName, fd.cFileName);
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index 765a936daf..2af4bebcc1 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -241,7 +241,7 @@ int Backup(TCHAR *backup_filename) }
else {
_tcsncpy_s(dest_file, backup_filename, _TRUNCATE);
- if (!_tcscmp(_tcsrchr(backup_filename, _T('.')), _T(".zip")))
+ if (!mir_tstrcmp(_tcsrchr(backup_filename, _T('.')), _T(".zip")))
bZip = true;
}
if (!options.disable_popups)
diff --git a/plugins/ExternalAPI/m_variables.h b/plugins/ExternalAPI/m_variables.h index 5dbfdfc5d9..1557d84bb1 100644 --- a/plugins/ExternalAPI/m_variables.h +++ b/plugins/ExternalAPI/m_variables.h @@ -517,7 +517,7 @@ __inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) { hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, SIZEOF(tszClass));
- if (!_tcscmp(tszClass, _T("Button"))) {
+ if (!mir_tstrcmp(tszClass, _T("Button"))) {
if (hIcon != NULL) {
SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON);
SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
@@ -527,7 +527,7 @@ __inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) { SetDlgItemText(hwndDlg, uIDButton, _T("V"));
}
}
- else if (!_tcscmp(tszClass, MIRANDABUTTONCLASS)) {
+ else if (!mir_tstrcmp(tszClass, MIRANDABUTTONCLASS)) {
if (hIcon != NULL) {
char *szTipInfo = NULL;
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp index 02c75a13cb..cbd03b44c2 100644 --- a/plugins/Folders/src/dlg_handlers.cpp +++ b/plugins/Folders/src/dlg_handlers.cpp @@ -106,7 +106,7 @@ static int ChangesNotSaved(HWND hWnd, PFolderItem item) TCHAR buffer[MAX_FOLDER_SIZE];
GetEditText(hWnd, buffer, MAX_FOLDER_SIZE);
- return _tcscmp(item->GetFormat(), buffer) != 0;
+ return mir_tstrcmp(item->GetFormat(), buffer) != 0;
}
static void CheckForChanges(HWND hWnd, int bNeedConfirmation = 1)
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp index d28872742e..5647d03250 100644 --- a/plugins/Folders/src/folderItem.cpp +++ b/plugins/Folders/src/folderItem.cpp @@ -57,12 +57,12 @@ int CFolderItem::IsEqual(const CFolderItem *other) int CFolderItem::IsEqual(const char *section, const TCHAR *name)
{
- return !_tcscmp(m_tszUserName, name) && !mir_strcmp(m_szSection, section);
+ return !mir_tstrcmp(m_tszUserName, name) && !mir_strcmp(m_szSection, section);
}
int CFolderItem::IsEqualTranslated(const char *trSection, const TCHAR *trName)
{
- return !_tcscmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
+ return !mir_tstrcmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
}
int CFolderItem::operator ==(const CFolderItem *other)
@@ -101,7 +101,7 @@ int CFolderItem::FolderDeleteOldDirectory(int showFolder) if (!m_tszOldFormat)
return FOLDER_SUCCESS;
- if (!_tcscmp(m_tszFormat, m_tszOldFormat)) //format wasn't changed
+ if (!mir_tstrcmp(m_tszFormat, m_tszOldFormat)) //format wasn't changed
return FOLDER_SUCCESS;
TCHAR buffer[MAX_FOLDER_SIZE];
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index e745d627fc..fb095b5346 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -409,7 +409,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc {
LPCTSTR type;
- if ( _tcscmp(actualElement->date, lastDate) != 0 )
+ if ( mir_tstrcmp(actualElement->date, lastDate) != 0 )
{
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index c21858f8b3..0f016dfb93 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -168,7 +168,7 @@ void IEViewSink::PropertyChange(BSTR) {} void IEViewSink::BeforeNavigate2(IDispatch*, VARIANT* url, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT_BOOL* cancel)
{
#ifndef GECKO
- if (_tcscmp(url->bstrVal, _T("about:blank")))
+ if (mir_tstrcmp(url->bstrVal, _T("about:blank")))
{
CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)url->bstrVal);
*cancel = VARIANT_TRUE;
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 8a016603e6..519821b3be 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -411,7 +411,7 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto, if (pa->bOldProto || pa->bIsVirtual || pa->bDynDisabled)
return pa;
- if (ptszName && !_tcscmp(pa->tszAccountName, ptszName))
+ if (ptszName && !mir_tstrcmp(pa->tszAccountName, ptszName))
return pa;
char *pszUniqueSetting = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index 351422704c..29320fed7e 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -42,7 +42,7 @@ static void SearchForLists(HWND hwndDlg, const TCHAR *mirandaPath, const TCHAR * do {
// find all subfolders except "." and ".."
- if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !_tcscmp(fd.cFileName, _T(".")) || !_tcscmp(fd.cFileName, _T("..")))
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
continue;
// skip the current profile too
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index 17a3b589ae..93771cfa23 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -31,7 +31,7 @@ int StartOTR(MCONTACT hContact) { LCID langid = Langpack_GetDefaultLocale(); if(langid != 0x0409/*US*/ && langid != 0x1009/*CA*/ && langid != 0x0809/*GB*/){ // non english const TCHAR* translated=TranslateTS(MIROTR_PROTO_HELLO_MSG); - if(_tcscmp(MIROTR_PROTO_HELLO_MSG,translated)){ + if(mir_tstrcmp(MIROTR_PROTO_HELLO_MSG,translated)){ *msgoff++ = '\n'; for(const TCHAR* c=nick; *c && msgoff<msgend; *msgoff++=*c++); for(const TCHAR* c=translated; *c && msgoff<msgend; *msgoff++=*c++); diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index 31f629d350..93375922e8 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -372,13 +372,13 @@ const TCHAR *policy_to_string(OtrlPolicy policy) { } OtrlPolicy policy_from_string(const TCHAR *polstring) { - if (_tcscmp(polstring, TranslateT(LANG_POLICY_NEVER)) == 0) + if (mir_tstrcmp(polstring, TranslateT(LANG_POLICY_NEVER)) == 0) return OTRL_POLICY_NEVER; - else if (_tcscmp(polstring, TranslateT(LANG_POLICY_OPP)) == 0) + else if (mir_tstrcmp(polstring, TranslateT(LANG_POLICY_OPP)) == 0) return OTRL_POLICY_OPPORTUNISTIC; - else if (_tcscmp(polstring, TranslateT(LANG_POLICY_MANUAL)) == 0) + else if (mir_tstrcmp(polstring, TranslateT(LANG_POLICY_MANUAL)) == 0) return OTRL_POLICY_MANUAL_MOD; - else if (_tcscmp(polstring, TranslateT(LANG_POLICY_ALWAYS)) == 0) + else if (mir_tstrcmp(polstring, TranslateT(LANG_POLICY_ALWAYS)) == 0) return OTRL_POLICY_ALWAYS; else return CONTACT_DEFAULT_POLICY; diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index c6e0c8c08b..9f7be0ff22 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -33,7 +33,7 @@ void PreviewSound(HWND hList) int hlpStatus = lvi.lParam;
ListView_GetItemText(hList, lvi.iItem, 1, buff, SIZEOF(buff));
- if (!_tcscmp(buff, TranslateT(DEFAULT_SOUND))) {
+ if (!mir_tstrcmp(buff, TranslateT(DEFAULT_SOUND))) {
if (hlpStatus < ID_STATUS_MIN)
SkinPlaySound(StatusListEx[hlpStatus].lpzSkinSoundName);
else
@@ -239,7 +239,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ListView_GetItem(hList, &lvi);
ListView_GetItemText(hList, lvi.iItem, 1, buff, SIZEOF(buff));
- if (!_tcscmp(buff, TranslateT(DEFAULT_SOUND))) {
+ if (!mir_tstrcmp(buff, TranslateT(DEFAULT_SOUND))) {
if (lvi.lParam < ID_STATUS_MIN)
db_unset(hContact, MODULE, StatusListEx[lvi.lParam].lpzSkinSoundName);
else
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 7127d00345..d7e7e25505 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -202,7 +202,7 @@ TCHAR* GetStr(STATUSMSGINFO *n, const TCHAR *tmplt) break;
case 'o':
- if (n->oldstatusmsg == NULL || n->oldstatusmsg[0] == _T('\0') || _tcscmp(n->oldstatusmsg, TranslateT("<no status message>")) == 0)
+ if (n->oldstatusmsg == NULL || n->oldstatusmsg[0] == _T('\0') || mir_tstrcmp(n->oldstatusmsg, TranslateT("<no status message>")) == 0)
res.Append(TranslateT("<no status message>"));
else
AddCR(res, n->oldstatusmsg);
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 76b338c6a3..ddd170eece 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -2096,7 +2096,7 @@ static INT_PTR CALLBACK DlgProcChangePasswd(HWND hwndDlg, UINT msg, WPARAM wPara old_pass = toUTF8(buf); bool old_pass_match = false; TCHAR *pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); - if(!_tcscmp(pass,buf)) + if(!mir_tstrcmp(pass,buf)) old_pass_match = true; mir_free(pass); if(!old_pass_match) @@ -2107,7 +2107,7 @@ static INT_PTR CALLBACK DlgProcChangePasswd(HWND hwndDlg, UINT msg, WPARAM wPara dbsetting += toUTF8(key_id_global); dbsetting += "_Password"; pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T("")); - if(!_tcscmp(pass,buf)) + if(!mir_tstrcmp(pass,buf)) old_pass_match = true; mir_free(pass); } diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index baf56932b8..7795a52ee6 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -989,7 +989,7 @@ static int FindMenuItem(HMENU h, LPTSTR lpszName) { if ( GetMenuString(h, i, s, 128, MF_BYPOSITION) ) { - if ( !_tcscmp(s, lpszName) ) + if ( !mir_tstrcmp(s, lpszName) ) { return (int)i; } diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index b4b49f4ab9..1bf057c0cd 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -264,7 +264,7 @@ int lstreq(TCHAR *a, TCHAR *b, size_t len = -1) if (len > 0)
ret = _tcsncmp(a, b, len);
else
- ret = _tcscmp(a, b);
+ ret = mir_tstrcmp(a, b);
free(a);
free(b);
return ret;
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp index 103d0fe923..b8091558cb 100644 --- a/plugins/QuickMessages/src/options.cpp +++ b/plugins/QuickMessages/src/options.cpp @@ -775,7 +775,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) hwndEdit=NULL;
if (!mir_tstrlen(szLabel)) break;
if (bd = (ButtonData*)tvi.lParam){
- if (!_tcscmp(szLabel,_T("---"))) {
+ if (!mir_tstrcmp(szLabel,_T("---"))) {
if(TreeView_GetChild(hMenuTree,tvi.hItem))
break;
else{
@@ -1044,7 +1044,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) bd->dwOPPos=TreeView_GetCount(hMenuTree)-1;
bd->pszOpName=mir_tstrlen(namebuff)?mir_tstrdup(namebuff):mir_tstrdup(TranslateT("New Menu Entry"));
bd->pszOpValue=mir_tstrdup(bd->pszOpName);
- bd->fEntryOpType=!_tcscmp(namebuff,_T("---"))?QMF_EX_SEPARATOR:0;
+ bd->fEntryOpType=!mir_tstrcmp(namebuff,_T("---"))?QMF_EX_SEPARATOR:0;
bd->dwOPFlags=QMF_NEW;
bd->pszName=NULL;
bd->pszValue=NULL;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 7416a33df7..affb3812bd 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -99,7 +99,7 @@ TCHAR* GetNickname(MCONTACT hContact, const char *szProto) if (ci.type == CNFT_ASCIIZ) {
if (ci.pszVal) {
if (IsUnicodeMIM()) {
- if (!_tcscmp((TCHAR*)ci.pszVal, TranslateW(_T("'(Unknown Contact)'")))) {
+ if (!mir_tstrcmp((TCHAR*)ci.pszVal, TranslateW(_T("'(Unknown Contact)'")))) {
ci.dwFlag &= ~CNF_UNICODE;
if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci))
szName = mir_a2t((char*)ci.pszVal);
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 1e07d649d7..3e953f08c9 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -54,7 +54,7 @@ int BuildContactMenu(WPARAM wparam, LPARAM) }
else cmi.ptszName = ParseString(DEFAULT_MENUSTAMP, (MCONTACT)wparam, 0);
- if (!_tcscmp(cmi.ptszName, TranslateT("<unknown>"))) {
+ if (!mir_tstrcmp(cmi.ptszName, TranslateT("<unknown>"))) {
if (IsWatchedProtocol(szProto))
cmi.flags |= CMIF_GRAYED;
else
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 8f59add325..fb3ecbb303 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -150,24 +150,24 @@ public: TCHAR szClassName[32] = _T("");
GetClassName(hwnd, szClassName, SIZEOF(szClassName));
- if (_tcscmp(szClassName, _T("#32770")))
+ if (mir_tstrcmp(szClassName, _T("#32770")))
return false;
if ((REdit = GetDlgItem(hwnd, MI_IDC_LOG)) != NULL) {
GetClassName(REdit, szClassName, SIZEOF(szClassName));
- if (_tcscmp(szClassName, _T("RichEdit20A")) != 0 &&
- _tcscmp(szClassName, _T("RichEdit20W")) != 0 &&
- _tcscmp(szClassName, _T("RICHEDIT50W")) != 0)
+ if (mir_tstrcmp(szClassName, _T("RichEdit20A")) != 0 &&
+ mir_tstrcmp(szClassName, _T("RichEdit20W")) != 0 &&
+ mir_tstrcmp(szClassName, _T("RICHEDIT50W")) != 0)
return false;
}
else return false;
if ((MEdit = GetDlgItem(hwnd, MI_IDC_MESSAGE)) != NULL) {
GetClassName(MEdit, szClassName, SIZEOF(szClassName));
- if (_tcscmp(szClassName, _T("Edit")) != 0 &&
- _tcscmp(szClassName, _T("RichEdit20A")) != 0 &&
- _tcscmp(szClassName, _T("RichEdit20W")) != 0 &&
- _tcscmp(szClassName, _T("RICHEDIT50W")) != 0)
+ if (mir_tstrcmp(szClassName, _T("Edit")) != 0 &&
+ mir_tstrcmp(szClassName, _T("RichEdit20A")) != 0 &&
+ mir_tstrcmp(szClassName, _T("RichEdit20W")) != 0 &&
+ mir_tstrcmp(szClassName, _T("RICHEDIT50W")) != 0)
return false;
}
else return false;
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 47c231ab6f..d7ca019dc7 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -131,7 +131,7 @@ INT_PTR CALLBACK DlgProcOptionsMain(HWND optDlg, UINT msg, WPARAM wParam, LPARAM {
lvi.iItem = i;
_getMOptS(pName, 200*sizeof(TCHAR), pd[i]->szName, "AM_BaseProto", _T(""));
- if (_tcscmp(pName, _T("ICQ")) != 0)
+ if (mir_tstrcmp(pName, _T("ICQ")) != 0)
continue;
lvi.pszText = mir_a2u(pd[i]->szName);
ListView_InsertItem(hProtocolsList, &lvi);
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 0a0b6a77e0..2e5c9ed93b 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -305,7 +305,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // Completely reject if duplicate incoming message found
if (_getOptD("MaxSameMsgCountPerDay", defaultMaxSameMsgCountPerDay) > 0 &&
_getCOptD(hContact, "SameMsgCount", 0) >= _getOptD("MaxSameMsgCountPerDay", defaultMaxSameMsgCountPerDay) &&
- _tcscmp(message, _getCOptS(buf, buflen, hContact, "LastInMsg", _T(""))) == 0) {
+ mir_tstrcmp(message, _getCOptS(buf, buflen, hContact, "LastInMsg", _T(""))) == 0) {
_notify(hContact, POPUP_BLOCKED, TranslateT("Message from %s rejected because it reached a maximum for same responses per day."), message);
if (bayesEnabled)
queue_message(hContact, dbei->timestamp, message);
@@ -438,7 +438,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // Save Last Msg and update SameMsgCount
if (message != NULL) {
- if (_tcscmp(_getCOptS(buf, buflen, hContact, "LastInMsg", _T("")), message) == 0)
+ if (mir_tstrcmp(_getCOptS(buf, buflen, hContact, "LastInMsg", _T("")), message) == 0)
_setCOptD(hContact, "SameMsgCount", 1+_getCOptD(hContact, "SameMsgCount", 0));
else
_setCOptD(hContact, "SameMsgCount", 1);
diff --git a/plugins/SpellChecker/src/ardialog.cpp b/plugins/SpellChecker/src/ardialog.cpp index 720f64a27b..a3a5e3d24d 100644 --- a/plugins/SpellChecker/src/ardialog.cpp +++ b/plugins/SpellChecker/src/ardialog.cpp @@ -233,7 +233,7 @@ static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa else if (replace[0] == 0)
MessageBox(hwndDlg, TranslateT("The correction can't be empty!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
- else if (_tcscmp(find, replace) == 0)
+ else if (mir_tstrcmp(find, replace) == 0)
MessageBox(hwndDlg, TranslateT("The correction can't be equal to the wrong word!"), TranslateT("Wrong Correction"), MB_OK | MB_ICONERROR);
else {
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 557423bd0d..ba907461ab 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -1593,7 +1593,7 @@ BOOL lstreq(TCHAR *a, TCHAR *b, size_t len) if (len >= 0)
ret = !_tcsncmp(a, b, len);
else
- ret = !_tcscmp(a, b);
+ ret = !mir_tstrcmp(a, b);
free(a);
free(b);
return ret;
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index e83bcd6ea1..a719850cb1 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -156,7 +156,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) } } else if(!gbRegexMatch) - answered = gbCaseInsensitive?(!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))); + answered = gbCaseInsensitive?(!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !mir_tstrcmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))); else { if(gbCaseInsensitive) diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 894d156ad9..851e5e42ee 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -119,7 +119,7 @@ tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact){ return tstrFormat;
}
-// case-insensitive _tcscmp
+// case-insensitive mir_tstrcmp
//by nullbie as i remember...
#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : _tcscpy((TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(A)+1)),A)
const int Stricmp(const TCHAR *str, const TCHAR *substr)
@@ -132,7 +132,7 @@ const int Stricmp(const TCHAR *str, const TCHAR *substr) CharUpperBuff(str_up, mir_tstrlen(str_up));
CharUpperBuff(substr_up, mir_tstrlen(substr_up));
- i = _tcscmp(str_up, substr_up);
+ i = mir_tstrcmp(str_up, substr_up);
mir_free(str_up);
mir_free(substr_up);
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index e6c34b4eb1..901fbcb4c8 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -376,7 +376,7 @@ static int SaveTree(HWND hToolBarTree) while (tvi.hItem != NULL) { TreeView_GetItem(hToolBarTree, &tvi); - if (_tcscmp(tvi.pszText, MIDDLE_SEPARATOR) == 0) { + if (mir_tstrcmp(tvi.pszText, MIDDLE_SEPARATOR) == 0) { RSide = true; count = TreeView_GetCount(hToolBarTree) * 10 - count; tvi.hItem = TreeView_GetNextSibling(hToolBarTree, tvi.hItem); @@ -715,7 +715,7 @@ INT_PTR CALLBACK DlgProcToolBar(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l tvi.mask = TVIF_TEXT | TVIF_HANDLE | TVIF_PARAM; TreeView_GetItem(hToolBarTree, &tvi); - if (tvi.lParam == 0 || !TreeView_GetCheckState(hToolBarTree, tvi.hItem) || !_tcscmp(tvi.pszText, MIDDLE_SEPARATOR)) + if (tvi.lParam == 0 || !TreeView_GetCheckState(hToolBarTree, tvi.hItem) || !mir_tstrcmp(tvi.pszText, MIDDLE_SEPARATOR)) break; CustomButtonData *cbd = (CustomButtonData*)tvi.lParam; @@ -743,7 +743,7 @@ INT_PTR CALLBACK DlgProcToolBar(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l tvi.hItem = hti; TreeView_GetItem(hToolBarTree, &tvi); - if (!TreeView_GetCheckState(hToolBarTree, tvi.hItem) || !_tcscmp(tvi.pszText, MIDDLE_SEPARATOR)) { + if (!TreeView_GetCheckState(hToolBarTree, tvi.hItem) || !mir_tstrcmp(tvi.pszText, MIDDLE_SEPARATOR)) { Utils::enableDlgControl(hwndDlg, IDC_IMCHECK, false); Utils::enableDlgControl(hwndDlg, IDC_CHATCHECK, false); Utils::enableDlgControl(hwndDlg, IDC_CANBEHIDDEN, false); diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 9c5e1e72f8..46c67ba0a1 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -167,7 +167,7 @@ void ShowRoom(SESSION_INFO *si, WPARAM, BOOL) TContainerData *pContainer = si->pContainer;
if (pContainer == NULL) {
GetContainerNameForContact(si->hContact, szName, CONTAINER_NAMELEN);
- if (!g_Settings.bOpenInDefault && !_tcscmp(szName, _T("default")))
+ if (!g_Settings.bOpenInDefault && !mir_tstrcmp(szName, _T("default")))
_tcsncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN);
szName[CONTAINER_NAMELEN] = 0;
pContainer = FindContainerByName(szName);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index bcb1e6d30b..c6eb16c2ce 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -3214,7 +3214,7 @@ LABEL_SHOWWINDOW: case DM_CONTAINERSELECTED: { TCHAR *szNewName = (TCHAR*)lParam; - if (!_tcscmp(szNewName, TranslateT("Default container"))) + if (!mir_tstrcmp(szNewName, TranslateT("Default container"))) szNewName = CGlobals::m_default_container_name; int iOldItems = TabCtrl_GetItemCount(hwndTab); if (!_tcsncmp(dat->pContainer->szName, szNewName, CONTAINER_NAMELEN)) diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index de67b789b8..268826c11c 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -120,7 +120,7 @@ bool CContactCache::updateNick() if (m_Valid) { TCHAR *tszNick = pcli->pfnGetContactDisplayName(getActiveContact(), 0); if (tszNick) - fChanged = (_tcscmp(m_szNick, tszNick) ? true : false); + fChanged = (mir_tstrcmp(m_szNick, tszNick) ? true : false); _tcsncpy_s(m_szNick, (tszNick ? tszNick : _T("<undef>")), _TRUNCATE); } return fChanged; diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 96d552094b..61e9997c1c 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1791,7 +1791,7 @@ TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hCo _tcsncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
AppendToContainerList(pContainer);
- if (M.GetByte("limittabs", 0) && !_tcscmp(name, _T("default")))
+ if (M.GetByte("limittabs", 0) && !mir_tstrcmp(name, _T("default")))
iTemp |= CNT_CREATEFLAG_CLONED;
// save container name to the db
@@ -2143,7 +2143,7 @@ HMENU TSAPI BuildContainerMenu() break;
if (_tcsncmp(tszName, _T("**mir_free**"), CONTAINER_NAMELEN))
- AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !_tcscmp(tszName, _T("default")) ? TranslateT("Default container") : tszName);
+ AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_tstrcmp(tszName, _T("default")) ? TranslateT("Default container") : tszName);
i++;
}
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 014b0c29f8..bfea4acde1 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -151,7 +151,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg);
SetWindowText(hwndDlg, TranslateT("Container options"));
TCHAR szNewTitle[128];
- mir_sntprintf(szNewTitle, SIZEOF(szNewTitle), _T("%s"), !_tcscmp(pContainer->szName, _T("default")) ?
+ mir_sntprintf(szNewTitle, SIZEOF(szNewTitle), _T("%s"), !mir_tstrcmp(pContainer->szName, _T("default")) ?
TranslateT("Default container") : pContainer->szName);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, szNewTitle);
Utils::enableDlgControl(hwndDlg, IDC_O_HIDETITLE, !CSkin::m_frameSkins);
@@ -334,7 +334,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, szFilename[MAX_PATH - 1] = 0;
PathToAbsoluteT(szFilename, szFinalThemeFile, M.getDataPath());
- if (_tcscmp(szFilename, pContainer->szRelThemeFile))
+ if (mir_tstrcmp(szFilename, pContainer->szRelThemeFile))
pContainer->fPrivateThemeChanged = TRUE;
if (PathFileExists(szFinalThemeFile))
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 5db596c1c1..37ec46d0ab 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2910,7 +2910,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_CONTAINERSELECTED:
{
TCHAR *szNewName = (TCHAR*)lParam;
- if (!_tcscmp(szNewName, TranslateT("Default container")))
+ if (!mir_tstrcmp(szNewName, TranslateT("Default container")))
szNewName = CGlobals::m_default_container_name;
int iOldItems = TabCtrl_GetItemCount(hwndTab);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 5d68fc5ef5..0b7eca3e76 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1760,7 +1760,7 @@ void TSAPI GetMyNick(TWindowData *dat) switch (ci.type) {
case CNFT_ASCIIZ:
if (mir_tstrlen((TCHAR*)ci.pszVal) == 0 ||
- !_tcscmp((TCHAR*)ci.pszVal, TranslateT("'(Unknown contact)'"))) {
+ !mir_tstrcmp((TCHAR*)ci.pszVal, TranslateT("'(Unknown contact)'"))) {
_tcsncpy_s(dat->szMyNickname, (dat->myUin[0] ? dat->myUin : TranslateT("'(Unknown contact)'")), _TRUNCATE);
}
else {
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index a4d23187b8..2878bb767f 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -120,7 +120,7 @@ static int TSAPI ScanSkinDir(const TCHAR* tszFolder, HWND hwndCombobox) mir_sntprintf(tszFinalName, SIZEOF(tszFinalName), _T("%s%s"), tszFolder, fd.cFileName);
GetPrivateProfileString(_T("Global"), _T("Name"), _T("None"), szBuf, SIZEOF(szBuf), tszFinalName);
- if (!_tcscmp(szBuf, _T("None"))) {
+ if (!mir_tstrcmp(szBuf, _T("None"))) {
fd.cFileName[mir_tstrlen(fd.cFileName) - 4] = 0;
_tcsncpy_s(szBuf, fd.cFileName, _TRUNCATE);
}
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp index e90e10cc1d..41b7951151 100644 --- a/plugins/TabSRMM/src/selectcontainer.cpp +++ b/plugins/TabSRMM/src/selectcontainer.cpp @@ -183,7 +183,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L break; // end of list
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
if (_tcsncmp(dbv.ptszVal, _T("**mir_free**"), CONTAINER_NAMELEN)) {
- iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!_tcscmp(dbv.ptszVal, _T("default")) ?
+ iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_tstrcmp(dbv.ptszVal, _T("default")) ?
TranslateT("Default container") : dbv.ptszVal));
if (iItemNew != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, (WPARAM)iItemNew, (LPARAM)iCounter);
@@ -200,7 +200,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (pContainer) {
LRESULT iItem;
- iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!_tcscmp(pContainer->szName, _T("default")) ?
+ iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_tstrcmp(pContainer->szName, _T("default")) ?
TranslateT("Default container") : pContainer->szName));
if (iItem != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETCURSEL, (WPARAM)iItem, 0);
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 60af86107e..636fd00b8c 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -804,7 +804,7 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) TCHAR *szFinalName = 0;
GetPrivateProfileString(m_szName, _T("Glyph"), _T("None"), buffer, 500, szFilename);
- if (_tcscmp(buffer, _T("None"))) {
+ if (mir_tstrcmp(buffer, _T("None"))) {
_stscanf(buffer, _T("%d,%d,%d,%d"), &m_glyphMetrics[0], &m_glyphMetrics[1],
&m_glyphMetrics[2], &m_glyphMetrics[3]);
if (m_glyphMetrics[2] > m_glyphMetrics[0] && m_glyphMetrics[3] > m_glyphMetrics[1]) {
@@ -815,7 +815,7 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) }
GetPrivateProfileString(m_szName, _T("Image"), _T("None"), buffer, 500, szFilename);
- if (_tcscmp(buffer, _T("None")) || m_dwFlags & IMAGE_GLYPH) {
+ if (mir_tstrcmp(buffer, _T("None")) || m_dwFlags & IMAGE_GLYPH) {
szFinalName = new TCHAR[MAX_PATH];
//strncpy(m_szName, &m_szName[1], sizeof(m_szName));
//m_szName[sizeof(m_szName) - 1] = 0;
@@ -854,7 +854,7 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) }
}
GetPrivateProfileString(m_szName, _T("Fillcolor"), _T("None"), buffer, 500, szFilename);
- if (_tcscmp(buffer, _T("None"))) {
+ if (mir_tstrcmp(buffer, _T("None"))) {
COLORREF fillColor = CSkin::HexStringToLong(buffer);
m_fillBrush = CreateSolidBrush(fillColor);
m_dwFlags |= IMAGE_FILLSOLID;
@@ -862,7 +862,7 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) else
m_fillBrush = 0;
GetPrivateProfileString(m_szName, _T("Colorkey"), _T("None"), buffer, 500, szFilename);
- if (_tcscmp(buffer, _T("None"))) {
+ if (mir_tstrcmp(buffer, _T("None"))) {
CSkin::m_ContainerColorKey = CSkin::HexStringToLong(buffer);
if (CSkin::m_ContainerColorKeyBrush)
DeleteObject(CSkin::m_ContainerColorKeyBrush);
@@ -1318,7 +1318,7 @@ void CSkin::ReadImageItem(const TCHAR *itemname) for (int n = 0;; n++) {
mir_sntprintf(szItemNr, SIZEOF(szItemNr), _T("Item%d"), n);
GetPrivateProfileString(itemname, szItemNr, _T("None"), buffer, 500, m_tszFileName);
- if (!_tcscmp(buffer, _T("None")))
+ if (!mir_tstrcmp(buffer, _T("None")))
break;
for (int i = 0; i <= ID_EXTBK_LAST; i++) {
if (!_tcsicmp(SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName, buffer)) {
@@ -1434,7 +1434,7 @@ void CSkin::Load(void) m_avatarBorderClr = (COLORREF)HexStringToLong(buffer);
GetPrivateProfileString(_T("Global"), _T("SideBarBG"), _T("None"), buffer, 20, m_tszFileName);
- if (_tcscmp(buffer, _T("None")))
+ if (mir_tstrcmp(buffer, _T("None")))
m_sideBarContainerBG = (COLORREF)HexStringToLong(buffer);
else
m_sideBarContainerBG = SkinItems[ID_EXTBKSIDEBARBG].COLOR;
@@ -1494,7 +1494,7 @@ void CSkin::Load(void) DeleteObject(m_MenuBGBrush);
m_MenuBGBrush = 0;
}
- if (_tcscmp(buffer, _T("None")))
+ if (mir_tstrcmp(buffer, _T("None")))
m_MenuBGBrush = CreateSolidBrush(data);
GetPrivateProfileString(_T("Global"), _T("LightShadow"), _T("000000"), buffer, 20, m_tszFileName);
@@ -1507,7 +1507,7 @@ void CSkin::Load(void) SkinCalcFrameWidth();
GetPrivateProfileString(_T("Global"), _T("FontColor"), _T("None"), buffer, 20, m_tszFileName);
- if (_tcscmp(buffer, _T("None")))
+ if (mir_tstrcmp(buffer, _T("None")))
CSkin::m_DefaultFontColor = HexStringToLong(buffer);
else
CSkin::m_DefaultFontColor = GetSysColor(COLOR_BTNTEXT);
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 4c376925b9..55aeea166a 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -321,7 +321,7 @@ TCHAR* Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat) break;
}
case 'c': {
- TCHAR *c = (!_tcscmp(dat->pContainer->szName, _T("default")) ? TranslateT("Default container") : dat->pContainer->szName);
+ TCHAR *c = (!mir_tstrcmp(dat->pContainer->szName, _T("default")) ? TranslateT("Default container") : dat->pContainer->szName);
title.insert(tempmark + 2, c);
title.erase(tempmark, 2);
curpos = tempmark + mir_tstrlen(c);
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 69444dcb69..12bb62e657 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -587,7 +587,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR buff[256];
SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_GETLBTEXT, sel, (LPARAM)buff);
for (int i = 0; presetItems[i].szID; i++) {
- if (_tcscmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
+ if (mir_tstrcmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
if (presetItems[i].szNeededSubst[0])
EndDialog(hwndDlg, IDPRESETITEM + i);
else
@@ -623,7 +623,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR buff[256];
SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_GETLBTEXT, sel, (LPARAM)buff);
for (int i = 0; presetItems[i].szID; i++) {
- if (_tcscmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
+ if (mir_tstrcmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
SetDlgItemText(hwndDlg, IDC_ED_LABEL, TranslateTS(presetItems[i].swzLabel));
SetDlgItemText(hwndDlg, IDC_ED_VALUE, presetItems[i].swzValue);
break;
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index f20efb465b..cba55de9bf 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -1219,7 +1219,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) { if (!bStatusMsg && opt.bGetNewStatusMsg) { - if (!_tcscmp(pwd->rows[i].swzValue, _T("%sys:status_msg%"))) + if (!mir_tstrcmp(pwd->rows[i].swzValue, _T("%sys:status_msg%"))) bStatusMsg = true; } diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index a36d2fed36..5391e74001 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -34,7 +34,7 @@ int RefreshSkinList(HWND hwndDlg) HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
while (hFind != INVALID_HANDLE_VALUE)
{
- if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && _tcscmp(_T("."), ffd.cFileName) && _tcscmp(_T(".."), ffd.cFileName))
+ if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName))
{
SetCurrentDirectory(ffd.cFileName);
WIN32_FIND_DATA ffd2;
@@ -362,34 +362,34 @@ void ParseSkinFile(TCHAR *szSkinName, bool bStartup, bool bOnlyPreview) {
if (buff[0] == '[')
{
- if (!_tcscmp(_T("[about]"), buff))
+ if (!mir_tstrcmp(_T("[about]"), buff))
{
ParseAboutPart(fp, buff, szSkinName);
continue;
}
- else if (!_tcscmp(_T("[other]"), buff))
+ else if (!mir_tstrcmp(_T("[other]"), buff))
{
ParseOtherPart(fp, buff);
continue;
}
else if (!bOnlyPreview)
{
- if (!_tcscmp(_T("[background]"), buff))
+ if (!mir_tstrcmp(_T("[background]"), buff))
{
ParseImagePart(fp, buff, SKIN_ITEM_BG);
continue;
}
- else if (!_tcscmp(_T("[sidebar]"), buff))
+ else if (!mir_tstrcmp(_T("[sidebar]"), buff))
{
ParseImagePart(fp, buff, SKIN_ITEM_SIDEBAR);
continue;
}
- else if (!bStartup && opt.bLoadFonts && !_tcscmp(_T("[fonts]"), buff))
+ else if (!bStartup && opt.bLoadFonts && !mir_tstrcmp(_T("[fonts]"), buff))
{
ParseFontPart(fp, buff);
continue;
}
- else if (!bStartup && opt.bLoadProportions && !_tcscmp(_T("[appearance]"), buff))
+ else if (!bStartup && opt.bLoadProportions && !mir_tstrcmp(_T("[appearance]"), buff))
{
ParseAppearancePart(fp, buff);
continue;
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 7758845d27..4f3c68f376 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -254,17 +254,17 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff { bool recv = false; - if (!_tcscmp(swzRawSpec, _T("uid"))) + if (!mir_tstrcmp(swzRawSpec, _T("uid"))) return Uid(hContact, 0, buff, bufflen); - if (!_tcscmp(swzRawSpec, _T("proto"))) { + if (!mir_tstrcmp(swzRawSpec, _T("proto"))) { char *szProto = GetContactProto(hContact); if (szProto) { a2t(szProto, buff, bufflen); return true; } } - else if (!_tcscmp(swzRawSpec, _T("account"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("account"))) { char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0); if ((INT_PTR)szProto == CALLSERVICE_NOTFOUND) { return GetSysSubstText(hContact, _T("proto"), buff, bufflen); @@ -279,15 +279,15 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return GetSysSubstText(hContact, _T("proto"), buff, bufflen); } } - else if (!_tcscmp(swzRawSpec, _T("time"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("time"))) { if (tmi.printDateTime && !tmi.printDateTimeByContact(hContact, _T("t"), buff, bufflen, TZF_KNOWNONLY)) return true; } - else if (!_tcscmp(swzRawSpec, _T("uidname"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("uidname"))) { char *szProto = GetContactProto(hContact); return UidName(szProto, buff, bufflen); } - else if (!_tcscmp(swzRawSpec, _T("status_msg"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("status_msg"))) { TCHAR *swzMsg = GetStatusMessageText(hContact); if (swzMsg) { _tcsncpy(buff, swzMsg, bufflen); @@ -295,7 +295,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } } - else if ((recv = !_tcscmp(swzRawSpec, _T("last_msg"))) || !_tcscmp(swzRawSpec, _T("last_msg_out"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out"))) { TCHAR *swzMsg = GetLastMessageText(hContact, recv); if (swzMsg) { _tcsncpy(buff, swzMsg, bufflen); @@ -303,7 +303,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } } - else if (!_tcscmp(swzRawSpec, _T("meta_subname"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("meta_subname"))) { // get contact list name of active subcontact MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact) @@ -313,32 +313,32 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff if (swzNick) _tcsncpy(buff, swzNick, bufflen); return true; } - else if (!_tcscmp(swzRawSpec, _T("meta_subuid"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("meta_subuid"))) { MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false; return Uid(hSubContact, 0, buff, bufflen); } - else if (!_tcscmp(swzRawSpec, _T("meta_subproto"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("meta_subproto"))) { // get protocol of active subcontact MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false; return GetSysSubstText(hSubContact, _T("account"), buff, bufflen); } - else if ((recv = !_tcscmp(swzRawSpec, _T("last_msg_time"))) || !_tcscmp(swzRawSpec, _T("last_msg_out_time"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_time"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_time"))) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "t", buff, bufflen); return true; } - else if ((recv = !_tcscmp(swzRawSpec, _T("last_msg_date"))) || !_tcscmp(swzRawSpec, _T("last_msg_out_date"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_date"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_date"))) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "d", buff, bufflen); return true; } - else if ((recv = !_tcscmp(swzRawSpec, _T("last_msg_reltime"))) || !_tcscmp(swzRawSpec, _T("last_msg_out_reltime"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_reltime"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_reltime"))) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; DWORD t = (DWORD)time(0); @@ -351,7 +351,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff else mir_sntprintf(buff, bufflen, TranslateT("%dm"), m); return true; } - else if (!_tcscmp(swzRawSpec, _T("msg_count_all")) || !_tcscmp(swzRawSpec, _T("msg_count_out")) || !_tcscmp(swzRawSpec, _T("msg_count_in"))) { + else if (!mir_tstrcmp(swzRawSpec, _T("msg_count_all")) || !mir_tstrcmp(swzRawSpec, _T("msg_count_out")) || !mir_tstrcmp(swzRawSpec, _T("msg_count_in"))) { DWORD dwCountOut, dwCountIn; DWORD dwMetaCountOut = 0, dwMetaCountIn = 0; DWORD dwLastTs, dwNewTs, dwRecountTs; @@ -409,9 +409,9 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff dwMetaCountIn += dwCountIn; } - if (!_tcscmp(swzRawSpec, _T("msg_count_out"))) + if (!mir_tstrcmp(swzRawSpec, _T("msg_count_out"))) mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountOut); - else if (!_tcscmp(swzRawSpec, _T("msg_count_in"))) + else if (!mir_tstrcmp(swzRawSpec, _T("msg_count_in"))) mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountIn); else mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountOut + dwMetaCountIn); @@ -572,7 +572,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF // see if we can find the bSubst DSListNode *ds_node = opt.dsList; while (ds_node) { - if (_tcscmp(ds_node->ds.swzName, p) == 0) + if (mir_tstrcmp(ds_node->ds.swzName, p) == 0) break; ds_node = ds_node->next; @@ -605,7 +605,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF // see if we can find the bSubst DSListNode *ds_node = opt.dsList; while (ds_node) { - if (_tcscmp(ds_node->ds.swzName, swzVName) == 0) + if (mir_tstrcmp(ds_node->ds.swzName, swzVName) == 0) break; ds_node = ds_node->next; diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 87397c2678..12ac692831 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -39,7 +39,7 @@ void AddTranslation(DBVTranslation *newTrans) char szSetting[256];
mir_snprintf(szSetting, sizeof(szSetting),"Trans_%s",szName);
- if (_tcscmp(newTrans->swzName, _T("[No translation]")) == 0)
+ if (mir_tstrcmp(newTrans->swzName, _T("[No translation]")) == 0)
{
translations[iTransFuncsCount - 1].id = 0;
}
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index 72bb146280..1217d1568a 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -207,49 +207,49 @@ size_t GetDurationFormatM(DWORD Duration, TCHAR *Format, TCHAR *Buffer, WORD Siz Token[TokenIndex] = 0;
// Что получили в аккумуляторе?
- if (!_tcscmp(Token, _T("d")))
+ if (!mir_tstrcmp(Token, _T("d")))
{
q = Duration / (60 * 60 * 24);
mir_sntprintf(Token, SIZEOF(Token), _T("%d"), q);
Duration -= q * 60 * 60 * 24;
}
else
- if (!_tcscmp(Token, _T("h")))
+ if (!mir_tstrcmp(Token, _T("h")))
{
q = Duration / (60 * 60);
mir_sntprintf(Token, SIZEOF(Token), _T("%d"), q);
Duration -= q * 60 * 60;
}
else
- if (!_tcscmp(Token, _T("hh")))
+ if (!mir_tstrcmp(Token, _T("hh")))
{
q = Duration / (60 * 60);
mir_sntprintf(Token, SIZEOF(Token), _T("%02d"), q);
Duration -= q * 60 * 60;
}
else
- if (!_tcscmp(Token, _T("m")))
+ if (!mir_tstrcmp(Token, _T("m")))
{
q = Duration / 60;
mir_sntprintf(Token, SIZEOF(Token), _T("%d"), q);
Duration -= q * 60;
}
else
- if (!_tcscmp(Token, _T("mm")))
+ if (!mir_tstrcmp(Token, _T("mm")))
{
q = Duration / 60;
mir_sntprintf(Token, SIZEOF(Token), _T("%02d"), q);
Duration -= q * 60;
}
else
- if (!_tcscmp(Token, _T("s")))
+ if (!mir_tstrcmp(Token, _T("s")))
{
q = Duration;
mir_sntprintf(Token, SIZEOF(Token), _T("%d"), q);
Duration -= q;
}
else
- if (!_tcscmp(Token, _T("ss")))
+ if (!mir_tstrcmp(Token, _T("ss")))
{
q = Duration;
mir_sntprintf(Token, SIZEOF(Token), _T("%02d"), q);
diff --git a/plugins/TrafficCounter/src/vars.cpp b/plugins/TrafficCounter/src/vars.cpp index 1e0635c71f..769685f1fc 100644 --- a/plugins/TrafficCounter/src/vars.cpp +++ b/plugins/TrafficCounter/src/vars.cpp @@ -30,7 +30,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) if (ai->argc != 5) return NULL;
- if (!_tcscmp(ai->targv[1], _T("overall")))
+ if (!mir_tstrcmp(ai->targv[1], _T("overall")))
{
tmpsn = OverallInfo.CurrentSentTraffic;
tmprn = OverallInfo.CurrentRecvTraffic;
@@ -38,7 +38,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) tmprt = OverallInfo.TotalRecvTraffic;
}
else
- if (!_tcscmp(ai->targv[1], _T("summary")))
+ if (!mir_tstrcmp(ai->targv[1], _T("summary")))
{
for (ed = 0; ed < NumberOfAccounts; ed++)
if (ProtoList[ed].Visible)
@@ -55,7 +55,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) {
if (!ProtoList[ed].name) continue;
TCHAR *buf = mir_a2t(ProtoList[ed].name);
- if (!_tcscmp(buf, ai->targv[1]))
+ if (!mir_tstrcmp(buf, ai->targv[1]))
{
tmpsn = ProtoList[ed].CurrentSentTraffic;
tmprn = ProtoList[ed].CurrentRecvTraffic;
@@ -68,34 +68,34 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) if (tmp != 0xAA) return NULL;
}
- if (!_tcscmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], _T("now")))
{
- if (!_tcscmp(ai->targv[3], _T("sent"))) tmp = tmpsn;
+ if (!mir_tstrcmp(ai->targv[3], _T("sent"))) tmp = tmpsn;
else
- if (!_tcscmp(ai->targv[3], _T("received"))) tmp = tmprn;
+ if (!mir_tstrcmp(ai->targv[3], _T("received"))) tmp = tmprn;
else
- if (!_tcscmp(ai->targv[3], _T("both"))) tmp = tmprn + tmpsn;
+ if (!mir_tstrcmp(ai->targv[3], _T("both"))) tmp = tmprn + tmpsn;
else return NULL;
}
else
- if (!_tcscmp(ai->targv[2], _T("total")))
+ if (!mir_tstrcmp(ai->targv[2], _T("total")))
{
- if (!_tcscmp(ai->targv[3], _T("sent"))) tmp = tmpst;
+ if (!mir_tstrcmp(ai->targv[3], _T("sent"))) tmp = tmpst;
else
- if (!_tcscmp(ai->targv[3], _T("received"))) tmp = tmprt;
+ if (!mir_tstrcmp(ai->targv[3], _T("received"))) tmp = tmprt;
else
- if (!_tcscmp(ai->targv[3], _T("both"))) tmp = tmprt + tmpst;
+ if (!mir_tstrcmp(ai->targv[3], _T("both"))) tmp = tmprt + tmpst;
else return NULL;
}
else return NULL;
- if (!_tcscmp(ai->targv[4], _T("b"))) ed = 0;
+ if (!mir_tstrcmp(ai->targv[4], _T("b"))) ed = 0;
else
- if (!_tcscmp(ai->targv[4], _T("k"))) ed = 1;
+ if (!mir_tstrcmp(ai->targv[4], _T("k"))) ed = 1;
else
- if (!_tcscmp(ai->targv[4], _T("m"))) ed = 2;
+ if (!mir_tstrcmp(ai->targv[4], _T("m"))) ed = 2;
else
- if (!_tcscmp(ai->targv[4], _T("d"))) ed = 3;
+ if (!mir_tstrcmp(ai->targv[4], _T("d"))) ed = 3;
else return NULL;
// Получаем форматированную строку и возвращаем указатель на неё.
@@ -123,24 +123,24 @@ static TCHAR* GetTime(ARGUMENTSINFO *ai) TCHAR *buf;
if (!ProtoList[ed].name) continue;
buf = mir_a2t(ProtoList[ed].name);
- if (!_tcscmp(buf, ai->targv[1]))
+ if (!mir_tstrcmp(buf, ai->targv[1]))
{
flag = 0xAA;
- if (!_tcscmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], _T("now")))
Duration = ProtoList[ed].Session.Timer;
- else if (!_tcscmp(ai->targv[2], _T("total")))
+ else if (!mir_tstrcmp(ai->targv[2], _T("total")))
Duration = ProtoList[ed].Total.Timer;
else flag = 0;
break;
}
mir_free(buf);
}
- if ( (flag != 0xAA) && !_tcscmp(ai->targv[1], _T("summary")) )
+ if ( (flag != 0xAA) && !mir_tstrcmp(ai->targv[1], _T("summary")) )
{
flag = 0xAA;
- if (!_tcscmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], _T("now")))
Duration = OverallInfo.Session.Timer;
- else if (!_tcscmp(ai->targv[2], _T("total")))
+ else if (!mir_tstrcmp(ai->targv[2], _T("total")))
Duration = OverallInfo.Total.Timer;
else flag = 0;
}
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index ca1b05925a..658b4e9238 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -33,7 +33,7 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM) }
else
{
- if(!_tcscmp(ptszHelpFile, _T("")))
+ if(!mir_tstrcmp(ptszHelpFile, _T("")))
{
_tcscpy(pszDirName, _T("%miranda_path%\\Plugins"));
_tcscpy(pszFileName, _T("UserGuide.chm"));
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index a3d22c6061..c414a001a7 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -65,7 +65,7 @@ typedef struct TComboEx static int compareProc(LPCVOID cbi1, LPCVOID cbi2)
{
- return _tcscmp(((LPCBEXITEMINTERN)cbi1)->szCat, ((LPCBEXITEMINTERN)cbi2)->szCat);
+ return mir_tstrcmp(((LPCBEXITEMINTERN)cbi1)->szCat, ((LPCBEXITEMINTERN)cbi2)->szCat);
}
static int CheckPhoneSyntax(LPTSTR pszSrc, LPTSTR szNumber, WORD cchNumber, int& errorPos)
@@ -209,7 +209,7 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM *(pszAdd + 1) != '.' &&
(pszDot = _tcschr(pszAdd, '.')) &&
*(pszDot + 1) &&
- _tcscmp(szText, cbi->pszVal)));
+ mir_tstrcmp(szText, cbi->pszVal)));
}
}
break;
@@ -863,7 +863,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L SendMessage(hDlgDetails, PSM_GETCONTACT, NULL, (LPARAM)&hContact);
if ((cbex->pItems[cbex->iSelectedItem].wFlags & CTRLF_CHANGED) && !(hContact && (cbex->pItems[cbex->iSelectedItem].wFlags & CTRLF_HASCUSTOM))) return 0;
- if (*szVal == 0 || !cbex->pItems[cbex->iSelectedItem].pszVal || _tcscmp(szVal, cbex->pItems[cbex->iSelectedItem].pszVal)) {
+ if (*szVal == 0 || !cbex->pItems[cbex->iSelectedItem].pszVal || mir_tstrcmp(szVal, cbex->pItems[cbex->iSelectedItem].pszVal)) {
cbex->pItems[cbex->iSelectedItem].wFlags |= CTRLF_CHANGED;
cbex->pItems[cbex->iSelectedItem].wFlags |= (hContact ? CTRLF_HASCUSTOM : CTRLF_HASPROTO);
cbex->bIsChanged = TRUE;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 2561a13cd1..64f35dcfe6 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -65,7 +65,7 @@ static HANDLE ghDetailsInitEvent = NULL; static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
CPsHdr::CPsHdr() :
-_ignore(10, (LIST<TCHAR>::FTSortFunc)_tcscmp)
+_ignore(10, (LIST<TCHAR>::FTSortFunc)mir_tstrcmp)
{
_dwSize = sizeof(*this);
_hContact = NULL;
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index 741ceb6fd7..52210dfc7f 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -231,7 +231,7 @@ static int ProfileList_EndLabelEdit(LPLISTCTRL pList, BYTE bSave) pList->labelEdit.pItem->pszText[pList->labelEdit.iSubItem] = szEdit;
bChanged = TRUE;
}
- else if (_tcscmp(pList->labelEdit.pItem->pszText[pList->labelEdit.iSubItem], szEdit)) {
+ else if (mir_tstrcmp(pList->labelEdit.pItem->pszText[pList->labelEdit.iSubItem], szEdit)) {
mir_free(pList->labelEdit.pItem->pszText[pList->labelEdit.iSubItem]);
pList->labelEdit.pItem->pszText[pList->labelEdit.iSubItem] = szEdit;
bChanged = TRUE;
@@ -950,7 +950,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa for (i = 0; i < pList->labelEdit.pItem->idstrListCount; i++) {
add = ListBox_AddString(pList->labelEdit.dropDown.hDrop, pList->labelEdit.pItem->idstrList[i].ptszTranslated);
ListBox_SetItemData(pList->labelEdit.dropDown.hDrop, add, pList->labelEdit.pItem->idstrList + i);
- if (!_tcscmp(szEdit, pList->labelEdit.pItem->idstrList[i].ptszTranslated))
+ if (!mir_tstrcmp(szEdit, pList->labelEdit.pItem->idstrList[i].ptszTranslated))
ListBox_SetCurSel(pList->labelEdit.dropDown.hDrop, add);
}
}
@@ -959,7 +959,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa i = 0;
while (PtrIsValid(lpidList = (LPIDSTRLIST)ListBox_GetItemData(pList->labelEdit.dropDown.hDrop, i))) {
- if (!_tcscmp(szEdit, lpidList->ptszTranslated)) {
+ if (!mir_tstrcmp(szEdit, lpidList->ptszTranslated)) {
ListBox_SetCurSel(pList->labelEdit.dropDown.hDrop, i);
break;
}
@@ -1204,7 +1204,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR }
// find information about the group
for (iFmt = 0; iFmt < SIZEOF(pFmt); iFmt++) {
- if (!_tcscmp(szGroup, pFmt[iFmt].szGroup))
+ if (!mir_tstrcmp(szGroup, pFmt[iFmt].szGroup))
break;
}
// indicate, no group was found. should not happen!!
diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 240d6ae1b8..3f76ed0d40 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -249,7 +249,7 @@ static UINT MyCountriesCount = 0; * @param p1 - (LPIDSTRLIST) first item to compare
* @param p2 - (LPIDSTRLIST) second item to compare
*
-* returns -1, 0, 1 according to the comparison result of _tcscmp.
+* returns -1, 0, 1 according to the comparison result of mir_tstrcmp.
**/
static int __cdecl ListSortProc(const LPIDSTRLIST p1, const LPIDSTRLIST p2)
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 40b0bf6f3c..38b9a6296b 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -95,7 +95,7 @@ BYTE getContactInfoType(TCHAR* type) return 0;
for (int i=0; i < SIZEOF(builtinCnfs); i++ )
- if (!_tcscmp( builtinCnfs[i].str, type ))
+ if (!mir_tstrcmp( builtinCnfs[i].str, type ))
return builtinCnfs[i].cnfCode;
return 0;
@@ -215,7 +215,7 @@ int getContactFromString(CONTACTSINFO *ci) {
mir_cslock lck(csContactCache);
for (int i=0; i < cacheSize; i++) {
- if ((!_tcscmp(cce[i].tszContact, tszContact)) && (ci->flags == cce[i].flags)) {
+ if ((!mir_tstrcmp(cce[i].tszContact, tszContact)) && (ci->flags == cce[i].flags)) {
/* found in cache */
ci->hContacts = (MCONTACT*)mir_alloc(sizeof(MCONTACT));
if (ci->hContacts == NULL)
@@ -270,7 +270,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_UNIQUEID) && (!bMatch)) {
szFind = getContactInfoT(CNF_UNIQUEID, hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
@@ -279,7 +279,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_NICK) && (!bMatch)) {
szFind = getContactInfoT(CNF_NICK, hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
@@ -288,7 +288,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_LISTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_DISPLAY, hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
@@ -297,7 +297,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_FIRSTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_FIRSTNAME, hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
@@ -306,7 +306,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_LASTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_LASTNAME, hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
@@ -315,7 +315,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_EMAIL) && (!bMatch)) {
szFind = getContactInfoT(CNF_EMAIL, hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
@@ -324,7 +324,7 @@ int getContactFromString(CONTACTSINFO *ci) if ((ci->flags & CI_CNFINFO) && (!bMatch)) {
szFind = getContactInfoT((BYTE)(ci->flags&~(CI_CNFINFO|CI_TCHAR)), hContact);
if (szFind != NULL) {
- if (!_tcscmp(tszContact, szFind))
+ if (!mir_tstrcmp(tszContact, szFind))
bMatch = TRUE;
mir_free(szFind);
}
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 49f3de4fa7..100b599a1d 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -347,14 +347,14 @@ static int CALLBACK compareTokenHelp(LPARAM lParam1, LPARAM lParam2, LPARAM lPar if (cat1 == NULL || cat2 == NULL) return 0; - int res = _tcscmp(cat1, cat2); + int res = mir_tstrcmp(cat1, cat2); if (res != 0) return res; if (tr1->tszTokenString == NULL || tr2->tszTokenString == NULL) return 0; - return _tcscmp(tr1->tszTokenString, tr2->tszTokenString); + return mir_tstrcmp(tr1->tszTokenString, tr2->tszTokenString); } static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -387,14 +387,14 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM wPar continue; else if (hdd != NULL) { - if (!_tcscmp(tr->tszTokenString, SUBJECT)) { + if (!mir_tstrcmp(tr->tszTokenString, SUBJECT)) { if (hdd->vhs->flags&VHF_HIDESUBJECTTOKEN) continue; if (hdd->vhs->szSubjectDesc != NULL) tszHelpDesc = mir_a2t(hdd->vhs->szSubjectDesc); } - if (!_tcscmp(tr->tszTokenString, MIR_EXTRATEXT)) { + if (!mir_tstrcmp(tr->tszTokenString, MIR_EXTRATEXT)) { if (hdd->vhs->flags & VHF_HIDEEXTRATEXTTOKEN) continue; @@ -719,7 +719,7 @@ static INT_PTR CALLBACK inputDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM TCHAR *newString = variables_parsedup(string, extraText, (MCONTACT)SendMessage(GetParent(hwndDlg), VARM_GETSUBJECT, 0, 0)); if (newString != NULL) { TCHAR *oldString = Hlp_GetDlgItemText(hwndDlg, IDC_RESULT); - if (oldString == NULL || _tcscmp(oldString, newString)) + if (oldString == NULL || mir_tstrcmp(oldString, newString)) SetDlgItemText(hwndDlg, IDC_RESULT, newString); mir_free(newString); diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index 87256051f5..057ac88d5a 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -37,7 +37,7 @@ static ALIASREGISTER *searchAliasRegister(TCHAR *szAlias) mir_cslock lck(csAliasRegister);
for (int i = 0; i < arAliases.getCount(); i++)
- if (!_tcscmp(arAliases[i]->szAlias, szAlias))
+ if (!mir_tstrcmp(arAliases[i]->szAlias, szAlias))
return arAliases[i];
return NULL;
@@ -95,7 +95,7 @@ static int addToAliasRegister(TCHAR *szAlias, unsigned int argc, TCHAR** argv, T mir_cslock lck(csAliasRegister);
for (int i = 0; i < arAliases.getCount(); i++) {
ALIASREGISTER *p = arAliases[i];
- if (_tcscmp(p->szAlias, szAlias))
+ if (mir_tstrcmp(p->szAlias, szAlias))
continue;
mir_free(p->szTranslation);
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index e0efa6e192..5a682f1fa2 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -420,21 +420,21 @@ static TCHAR* parseProtoInfo(ARGUMENTSINFO *ai) TCHAR *tszRes = NULL;
ptrA szProto(mir_t2a(ai->targv[1]));
- if (!_tcscmp(ai->targv[2], _T(STR_PINAME)))
+ if (!mir_tstrcmp(ai->targv[2], _T(STR_PINAME)))
tszRes = Hlp_GetProtocolName(szProto);
- else if (!_tcscmp(ai->targv[2], _T(STR_PIUIDTEXT))) {
+ else if (!mir_tstrcmp(ai->targv[2], _T(STR_PIUIDTEXT))) {
if (!ProtoServiceExists(szProto, PS_GETCAPS))
return NULL;
szRes = (char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDTEXT, 0);
}
- else if (!_tcscmp(ai->targv[2], _T(STR_PIUIDSETTING))) {
+ else if (!mir_tstrcmp(ai->targv[2], _T(STR_PIUIDSETTING))) {
if (!ProtoServiceExists(szProto, PS_GETCAPS))
return NULL;
szRes = (char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0);
}
- else if (!_tcscmp(ai->targv[2], _T(STR_PINICK))) {
+ else if (!mir_tstrcmp(ai->targv[2], _T(STR_PINICK))) {
CONTACTINFO ci;
ci.cbSize = sizeof(CONTACTINFO);
ci.dwFlag = CNF_DISPLAY | CNF_UNICODE;
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index cd61ae483d..225ed37751 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -106,7 +106,7 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai) return NULL;
TCHAR *cur = ai->targv[1];
- while (_tcscmp(cur, _T("\r\n")) && *cur != '\n' && *cur != 0)
+ while (mir_tstrcmp(cur, _T("\r\n")) && *cur != '\n' && *cur != 0)
cur++;
if (*cur == '\0')
@@ -500,7 +500,7 @@ static TCHAR *parseStrcmp(ARGUMENTSINFO *ai) if (ai->argc != 3)
return NULL;
- if (_tcscmp(ai->targv[1], ai->targv[2]))
+ if (mir_tstrcmp(ai->targv[1], ai->targv[2]))
ai->flags |= AIF_FALSE;
return mir_tstrdup(_T(""));
@@ -513,7 +513,7 @@ static TCHAR *parseStrmcmp(ARGUMENTSINFO *ai) ai->flags |= AIF_FALSE;
for (unsigned i = 2; i < ai->argc; i++) {
- if (!_tcscmp(ai->targv[1], ai->targv[i])) {
+ if (!mir_tstrcmp(ai->targv[1], ai->targv[i])) {
ai->flags &= ~AIF_FALSE;
break;
}
@@ -625,7 +625,7 @@ static TCHAR *parseSwitch(ARGUMENTSINFO *ai) return NULL;
for (unsigned i = 2; i < ai->argc; i += 2)
- if (!_tcscmp(ai->targv[1], ai->targv[i]))
+ if (!mir_tstrcmp(ai->targv[1], ai->targv[i]))
return mir_tstrdup(ai->targv[i + 1]);
return NULL;
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 35ba4e21df..1298f73464 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -466,13 +466,13 @@ static TCHAR *parseRegistryValue(ARGUMENTSINFO *ai) *cur = 0;
HKEY hKey;
- if (!_tcscmp(key, _T("HKEY_CLASSES_ROOT")))
+ if (!mir_tstrcmp(key, _T("HKEY_CLASSES_ROOT")))
hKey = HKEY_CLASSES_ROOT;
- else if (!_tcscmp(key, _T("HKEY_CURRENT_USER")))
+ else if (!mir_tstrcmp(key, _T("HKEY_CURRENT_USER")))
hKey = HKEY_CURRENT_USER;
- else if (!_tcscmp(key, _T("HKEY_LOCAL_MACHINE")))
+ else if (!mir_tstrcmp(key, _T("HKEY_LOCAL_MACHINE")))
hKey = HKEY_LOCAL_MACHINE;
- else if (!_tcscmp(key, _T("HKEY_USERS")))
+ else if (!mir_tstrcmp(key, _T("HKEY_USERS")))
hKey = HKEY_USERS;
else {
mir_free(key);
diff --git a/plugins/Variables/src/parse_variables.cpp b/plugins/Variables/src/parse_variables.cpp index ea5a833786..82460fbb70 100644 --- a/plugins/Variables/src/parse_variables.cpp +++ b/plugins/Variables/src/parse_variables.cpp @@ -31,7 +31,7 @@ static int addToVariablesRegister(TCHAR *szName, TCHAR *szText) mir_cslock lck(csVarRegister);
for (int i = 0; i < vrCount; i++) {
- if ((!_tcscmp(vr[i].szName, szName))) {
+ if ((!mir_tstrcmp(vr[i].szName, szName))) {
mir_free(vr[i].szText);
vr[i].szText = mir_tstrdup(szText);
return 0;
@@ -55,7 +55,7 @@ static TCHAR *searchVariableRegister(TCHAR *szName) mir_cslock lck(csVarRegister);
for (int i = 0; i < vrCount; i++)
- if ((!_tcscmp(vr[i].szName, szName)))
+ if ((!mir_tstrcmp(vr[i].szName, szName)))
return mir_tstrdup(vr[i].szText);
return NULL;
diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp index 6bfb84ad4a..7998c6dbb2 100644 --- a/plugins/Variables/src/tokenregister.cpp +++ b/plugins/Variables/src/tokenregister.cpp @@ -122,7 +122,7 @@ INT_PTR registerToken(WPARAM wParam, LPARAM lParam) memcpy(&tre->tr, newVr, newVr->cbSize);
tre->nameHash = hash;
- if (!_tcscmp(newVr->tszTokenString, _T("alias")))
+ if (!mir_tstrcmp(newVr->tszTokenString, _T("alias")))
log_debugA("alias");
if (!(newVr->flags & TRF_PARSEFUNC) && newVr->szService != NULL)
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index b864ff840c..7c70cd4f8a 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -272,7 +272,7 @@ int IDSearchProc(TCHAR *sID, const int searchId, WIIDSEARCH *sData, TCHAR *svc, int IDSearch(TCHAR *sID, const int searchId)
{
// for a normal ID search (ID != #)
- if ( _tcscmp(sID, _T("#"))) {
+ if ( mir_tstrcmp(sID, _T("#"))) {
WIDATALIST *Item = WIHead;
// search every weather service using the search station ID
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index abe63173db..a00ce32d04 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -184,7 +184,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
SetDlgItemText(hwndDlg, IDC_ID, dbv.ptszVal);
// check if the station is a default station
- CheckDlgButton(hwndDlg, IDC_DEFA, _tcscmp(dbv.ptszVal, opt.Default) != 0 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DEFA, mir_tstrcmp(dbv.ptszVal, opt.Default) != 0 ? BST_CHECKED : BST_UNCHECKED);
db_free(&dbv);
}
if ( !db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
@@ -437,7 +437,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) // exit this function if it is not default station
DBVARIANT dbv;
if (!db_get_ts(wParam, WEATHERPROTONAME, "ID", &dbv)) {
- if ( _tcscmp(dbv.ptszVal, opt.Default)) {
+ if ( mir_tstrcmp(dbv.ptszVal, opt.Default)) {
db_free(&dbv);
return 0;
}
@@ -451,7 +451,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
// if the station is not a default station, set it as the new default station
// this is the first weather station encountered from the search
- if ( _tcscmp(opt.Default, dbv.ptszVal)) {
+ if ( mir_tstrcmp(opt.Default, dbv.ptszVal)) {
_tcsncpy(opt.Default, dbv.ptszVal, SIZEOF(opt.Default) - 1);
opt.DefStn = hContact;
db_free(&dbv);
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 15288b052a..b8cbb97f95 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -87,7 +87,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) memmove(&tempchar[1], &tempchar[2], sizeof(TCHAR)*(mir_tstrlen(&tempchar[2])+1));
// quit if the value obtained is N/A or not a number
- if ( !_tcscmp(tempchar, NODATA) || !_tcscmp(tempchar, _T("N/A"))) {
+ if ( !mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, _T("N/A"))) {
_tcscpy(str, tempchar);
return;
}
@@ -400,7 +400,7 @@ WORD GetIcon(const TCHAR* cond, WIDATA *Data) return statusValue[i];
// loop until the translation string exists (ie, the translated string is differ from original)
}
- while (_tcscmp(TranslateTS(LangPackStr), LangPackStr));
+ while (mir_tstrcmp(TranslateTS(LangPackStr), LangPackStr));
}
return NA;
@@ -536,7 +536,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) case 's': _tcscat(str, w->id); break;
case 't': _tcscat(str, w->temp); break;
case 'u':
- if (_tcscmp(w->update, NODATA)) _tcscat(str, w->update);
+ if (mir_tstrcmp(w->update, NODATA)) _tcscat(str, w->update);
else _tcscat(str, TranslateT("<unknown time>"));
break;
case 'v': _tcscat(str, w->vis); break;
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index 1908fe3115..02ee823423 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -162,7 +162,7 @@ void EraseAllInfo() // get the handle of the default station
if (opt.DefStn == NULL) {
if ( !db_get_ts(hContact,WEATHERPROTONAME, "ID",&dbv)) {
- if ( !_tcscmp(dbv.ptszVal, opt.Default))
+ if ( !mir_tstrcmp(dbv.ptszVal, opt.Default))
opt.DefStn = hContact;
db_free(&dbv);
}
@@ -195,11 +195,11 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) TCHAR str[MAX_DATA_LEN];
// convert the unit
- if ( _tcscmp(Data, TranslateT("<Error>")) && _tcscmp(Data, NODATA) && _tcscmp(Data, TranslateTS(NODATA))) {
+ if ( mir_tstrcmp(Data, TranslateT("<Error>")) && mir_tstrcmp(Data, NODATA) && mir_tstrcmp(Data, TranslateTS(NODATA))) {
// temperature
- if ( !_tcscmp(UpdateData->Name, _T("Temperature")) || !_tcscmp(UpdateData->Name, _T("High")) ||
- !_tcscmp(UpdateData->Name, _T("Low")) || !_tcscmp(UpdateData->Name, _T("Feel")) ||
- !_tcscmp(UpdateData->Name, _T("Dewpoint")) ||
+ if ( !mir_tstrcmp(UpdateData->Name, _T("Temperature")) || !mir_tstrcmp(UpdateData->Name, _T("High")) ||
+ !mir_tstrcmp(UpdateData->Name, _T("Low")) || !mir_tstrcmp(UpdateData->Name, _T("Feel")) ||
+ !mir_tstrcmp(UpdateData->Name, _T("Dewpoint")) ||
!_tcsicmp(UpdateData->Unit, _T("C")) || !_tcsicmp(UpdateData->Unit, _T("F")) ||
!_tcsicmp(UpdateData->Unit, _T("K")))
{
@@ -207,7 +207,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) _tcscpy(Data, str);
}
// pressure
- else if ( !_tcscmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) ||
!_tcsicmp(UpdateData->Unit, _T("KPA")) || !_tcsicmp(UpdateData->Unit, _T("MB")) ||
!_tcsicmp(UpdateData->Unit, _T("TORR")) || !_tcsicmp(UpdateData->Unit, _T("IN")) ||
!_tcsicmp(UpdateData->Unit, _T("MM")))
@@ -216,7 +216,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) _tcscpy(Data, str);
}
// speed
- else if ( !_tcscmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) ||
!_tcsicmp(UpdateData->Unit, _T("M/S")) || !_tcsicmp(UpdateData->Unit, _T("MPH")) ||
!_tcsicmp(UpdateData->Unit, _T("KNOTS")))
{
@@ -224,14 +224,14 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) _tcscpy(Data, str);
}
// visibility
- else if ( !_tcscmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) ||
!_tcsicmp(UpdateData->Unit, _T("MILES")))
{
GetDist(Data, UpdateData->Unit, str);
_tcscpy(Data, str);
}
// elevation
- else if ( !_tcscmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) ||
+ else if ( !mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) ||
!_tcsicmp(UpdateData->Unit, _T("M")))
{
GetElev(Data, UpdateData->Unit, str);
@@ -336,7 +336,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData) ++startloc;
// prevent crashes if the string go over maximun length -> generate an error
if (respos >= MAX_DATA_LEN) {
- if (opt.ShowWarnings && UpdateData->Name[0] != 0 && _tcscmp(UpdateData->Name, _T("Ignore"))) {
+ if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, _T("Ignore"))) {
mir_sntprintf(Data, MAX_DATA_LEN, TranslateT("Error when obtaining data: %s"), UpdateData->Name);
WPShowMessage(Data, SM_WARNING);
}
diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp index 21eb577854..055308f903 100644 --- a/plugins/Weather/src/weather_info.cpp +++ b/plugins/Weather/src/weather_info.cpp @@ -226,7 +226,7 @@ void MoreVarList(void) {
// the custom variable is defined as "%[<variable name>]"
// ignore the "hi" item and hidden items
- if ( _tcscmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') {
+ if ( mir_tstrcmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') {
mir_sntprintf(tempstr, SIZEOF(tempstr), _T("%c[%s]"), '%', WItem->Item.Name);
TCHAR* find = _tcsstr(str, tempstr);
// if the custom variable does not exist in the list, add it to the list
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 0d0678fd15..e563353491 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -53,7 +53,7 @@ WIDATA* GetWIData(TCHAR *pszServ) // loop through the list to find matching internal name
for (WIDATALIST *Item = WIHead;Item != NULL;Item = Item->next)
// if internal name found, return the data
- if ( _tcscmp(Item->Data.InternalName, pszServ) == 0)
+ if ( mir_tstrcmp(Item->Data.InternalName, pszServ) == 0)
return &Item->Data;
// return NULL when no match found
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index 8e74b14a38..7b757961cc 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -152,7 +152,7 @@ int UpdateWeather(MCONTACT hContact) db_set_b(hContact, WEATHERPROTONAME, "IsUpdated", TRUE);
// save info for default weather condition
- if ( !_tcscmp(winfo.id, opt.Default) && !opt.NoProtoCondition) {
+ if ( !mir_tstrcmp(winfo.id, opt.Default) && !opt.NoProtoCondition) {
// save current condition for default station to be displayed after the update
old_status = status;
status = winfo.status;
@@ -457,7 +457,7 @@ int GetWeatherData(MCONTACT hContact) // if it is a normal item with start= and end=, then parse through the downloaded string
// to get a data value.
GetDataValue(&Item->Item, DataValue, &szInfo);
- if ( _tcscmp(Item->Item.Name, _T("Condition")) && _tcsicmp(Item->Item.Unit, _T("Cond")))
+ if ( mir_tstrcmp(Item->Item.Name, _T("Condition")) && _tcsicmp(Item->Item.Unit, _T("Cond")))
_tcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1);
break;
@@ -540,17 +540,17 @@ int GetWeatherData(MCONTACT hContact) } }
// don't store data if it is not available
- if ((DataValue[0] != 0 && _tcscmp(DataValue, NODATA) &&
- _tcscmp(DataValue, TranslateTS(NODATA)) && _tcscmp(Item->Item.Name, _T("Ignore"))) ||
- ( !_tcscmp(Item->Item.Name, _T("Alert")) && i == 0))
+ if ((DataValue[0] != 0 && mir_tstrcmp(DataValue, NODATA) &&
+ mir_tstrcmp(DataValue, TranslateTS(NODATA)) && mir_tstrcmp(Item->Item.Name, _T("Ignore"))) ||
+ ( !mir_tstrcmp(Item->Item.Name, _T("Alert")) && i == 0))
{
// temporary workaround for mToolTip to show feel-like temperature
- if ( !_tcscmp(Item->Item.Name, _T("Feel")))
+ if ( !mir_tstrcmp(Item->Item.Name, _T("Feel")))
db_set_ts(hContact, WEATHERCONDITION, "Heat Index", DataValue);
GetStationID(hContact, Svc, SIZEOF(Svc));
- if ( !_tcscmp(Svc, opt.Default))
+ if ( !mir_tstrcmp(Svc, opt.Default))
db_set_ts(NULL, DEFCURRENTWEATHER, _T2A(Item->Item.Name), DataValue);
- if ( !_tcscmp(Item->Item.Name, _T("Condition"))) {
+ if ( !mir_tstrcmp(Item->Item.Name, _T("Condition"))) {
TCHAR buf[128], *cbuf;
mir_sntprintf(buf, SIZEOF(buf), _T("#%s Weather"), DataValue);
cbuf = TranslateTS(buf);
|