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 | |
parent | 159b565b390687258ee65a3b66596e118752063c (diff) |
replace _tcscmp to mir_tstrcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
142 files changed, 455 insertions, 455 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);
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp index 3809b86ae6..d6904e1d21 100644 --- a/protocols/AimOscar/src/aim.cpp +++ b/protocols/AimOscar/src/aim.cpp @@ -28,7 +28,7 @@ HINSTANCE hInstance; // Protocol instances
static int sttCompareProtocols(const CAimProto *p1, const CAimProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<CAimProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index f19990da10..c1e2f6d71a 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -71,7 +71,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) return 0; // Ignore for special chatrooms - if (!_tcscmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM))) + if (!mir_tstrcmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM))) return 0; switch (hook->pDest->iType) @@ -397,7 +397,7 @@ bool FacebookProto::IsSpecialChatRoom(MCONTACT hContact) { return false; ptrT idT(getTStringA(hContact, "ChatRoomID")); - return idT && !_tcscmp(idT, _T(FACEBOOK_NOTIFICATIONS_CHATROOM)); + return idT && !mir_tstrcmp(idT, _T(FACEBOOK_NOTIFICATIONS_CHATROOM)); } void FacebookProto::PrepareNotificationsChatRoom() { diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index e4cd53e091..71f9b5b36e 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -98,7 +98,7 @@ MCONTACT FacebookProto::ChatIDToHContact(const std::tstring &chat_id) continue; ptrT id(getTStringA(hContact, "ChatRoomID")); - if (id && !_tcscmp(id, chat_id.c_str())) { + if (id && !mir_tstrcmp(id, chat_id.c_str())) { facy.chat_id_to_hcontact.insert(std::make_pair(chat_id, hContact)); return hContact; } diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index b2bd15f4b9..e55450b78c 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -49,7 +49,7 @@ PLUGININFOEX pluginInfo = { // Protocol instances
static int compare_protos(const FacebookProto *p1, const FacebookProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<FacebookProto> g_Instances(1, compare_protos);
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c5687cc899..af61679db4 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -84,7 +84,7 @@ void FacebookProto::ProcessBuddyList(void*) fbu->handle = AddToContactList(fbu, CONTACT_FRIEND); ptrT client(getTStringA(fbu->handle, "MirVer")); - if (!client || _tcscmp(client, fbu->getMirVer())) + if (!client || mir_tstrcmp(client, fbu->getMirVer())) setTString(fbu->handle, "MirVer", fbu->getMirVer()); if (getDword(fbu->handle, "IdleTS", 0) != fbu->last_active) { diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index e6fcdaa74c..a0dbc4101c 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -88,7 +88,7 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) if (hXml != NULL) {
HXML node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar"), 0);
const TCHAR *blank = (node != NULL) ? xi.getAttrValue(node, _T("blank")) : NULL;
- if (blank != NULL && _tcscmp(blank, _T("1"))) {
+ if (blank != NULL && mir_tstrcmp(blank, _T("1"))) {
node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/timestamp"), 0);
*avatarts = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/bigavatar"), 0); //new gg convention
@@ -112,7 +112,7 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) ptrT respJSON_blank(json_as_string(json_get(respJSONavatar, "_blank")));
ptrT respJSONoriginBigAvatar(json_as_string(json_get(respJSONavatar, "originBigAvatar")));
ptrT respJSONtimestamp(json_as_string(json_get(respJSONavatar, "timestamp")));
- if (respJSON_blank && _tcscmp(respJSON_blank, TEXT("1")) && respJSONoriginBigAvatar && respJSONtimestamp){
+ if (respJSON_blank && mir_tstrcmp(respJSON_blank, TEXT("1")) && respJSONoriginBigAvatar && respJSONtimestamp){
*avatarurl = mir_t2a(respJSONoriginBigAvatar);
*avatarts = mir_t2a(respJSONtimestamp);
}
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 9f93b0c6f7..6c532d195b 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -692,7 +692,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const PROTOCHAR *newMsg) }
// Check if we change status here somehow
- if (*msgPtr && newMsg && !_tcscmp(*msgPtr, newMsg)
+ if (*msgPtr && newMsg && !mir_tstrcmp(*msgPtr, newMsg)
|| !*msgPtr && (!newMsg || !*newMsg))
{
if (status == m_iDesiredStatus && m_iDesiredStatus == m_iStatus)
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 5386d62273..4735a055e9 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -106,7 +106,7 @@ GGGC* GGPROTO::gc_lookup(const TCHAR *id) for(l = chats; l; l = l->next)
{
chat = (GGGC *)l->data;
- if (chat && !_tcscmp(chat->id, id))
+ if (chat && !mir_tstrcmp(chat->id, id))
return chat;
}
@@ -142,7 +142,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam) MCONTACT hNext = db_find_next(hContact);
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
- if (dbv.ptszVal && !_tcscmp(gch->pDest->ptszID, dbv.ptszVal))
+ if (dbv.ptszVal && !mir_tstrcmp(gch->pDest->ptszID, dbv.ptszVal))
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
db_free(&dbv);
}
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index d9f06b06aa..26c0d62734 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -339,7 +339,7 @@ INT_PTR GGPROTO::setmyavatar(WPARAM wParam, LPARAM lParam) TCHAR szMyFilename[MAX_PATH];
getAvatarFilename(NULL, szMyFilename, SIZEOF(szMyFilename));
- if ( _tcscmp(szFilename, szMyFilename) && !CopyFile(szFilename, szMyFilename, FALSE)) {
+ if ( mir_tstrcmp(szFilename, szMyFilename) && !CopyFile(szFilename, szMyFilename, FALSE)) {
debugLogA("setmyavatar(): Failed to set user avatar. File with type %d could not be created/overwritten.", iAvType);
return -1;
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 9d73f4b92c..4c2e783f9e 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -495,7 +495,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) if (strchr(sUserModes.c_str(), (char)*p1)) {
CMString sStatus = ModeToStatus(*p1);
if ((int)pmsg->parameters.getCount() > iParametercount) {
- if (!_tcscmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str())) {
+ if (!mir_tstrcmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str())) {
char cModeBit = -1;
CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, false, false, 0);
switch (*p1) {
@@ -1810,7 +1810,7 @@ static void __stdcall sttShowNickWnd(void* param) bool CIrcProto::OnIrc_NICK_ERR(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming) {
- if (nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
+ if (nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && mir_tstrcmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
TCHAR m[200];
mir_sntprintf(m, SIZEOF(m), _T("NICK %s"), m_alternativeNick);
if (IsConnected())
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp index fed066f96a..5193f9049e 100644 --- a/protocols/IcqOscarJ/src/icq_servlist.cpp +++ b/protocols/IcqOscarJ/src/icq_servlist.cpp @@ -1385,7 +1385,7 @@ int CIcqProto::getCListGroupExists(const char *szGroup) break;
// we have found the group
- if (!_tcscmp(tszGroup, tszGroupName))
+ if (!mir_tstrcmp(tszGroup, tszGroupName))
return i;
}
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 27e864336d..fedcb897c3 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -143,7 +143,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe {
int nodeIdx = 0;
const TCHAR * type = xmlGetAttrValue(iqNode, _T("type"));
- if (!type || !_tcscmp(type, _T("error"))) {
+ if (!type || !mir_tstrcmp(type, _T("error"))) {
// error occurred here
TCHAR buff[255];
const TCHAR *code = NULL;
@@ -157,7 +157,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe mir_sntprintf(buff, SIZEOF(buff), TranslateT("Error %s %s"), (code) ? code : _T(""), (description) ? description : _T(""));
JabberFormSetInstruction(hwndDlg, buff);
}
- else if (!_tcscmp(type, _T("result"))) {
+ else if (!mir_tstrcmp(type, _T("result"))) {
BOOL validResponse = FALSE;
EnumChildWindows(GetDlgItem(hwndDlg, IDC_FRAME), sttDeleteChildWindowsProc, 0);
dat->CurrentHeight = 0;
@@ -167,7 +167,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe if (queryNode) {
const TCHAR *xmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
const TCHAR *node = xmlGetAttrValue(queryNode, _T("node"));
- if (xmlns && node && !_tcscmp(xmlns, JABBER_FEAT_DISCO_ITEMS) && !_tcscmp(node, JABBER_FEAT_COMMANDS))
+ if (xmlns && node && !mir_tstrcmp(xmlns, JABBER_FEAT_DISCO_ITEMS) && !mir_tstrcmp(node, JABBER_FEAT_COMMANDS))
validResponse = TRUE;
}
if (queryNode && xmlGetChild(queryNode, 0) && validResponse) {
@@ -264,7 +264,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA EnableDlgItem(hwndDlg, IDC_SUBMIT, TRUE);
}
- if (!status || _tcscmp(status, _T("executing"))) {
+ if (!status || mir_tstrcmp(status, _T("executing"))) {
ShowDlgItem(hwndDlg, IDC_SUBMIT, SW_HIDE);
SetDlgItemText(hwndDlg, IDCANCEL, TranslateT("Done"));
}
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index b271da6373..b9910d9b5d 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -61,7 +61,7 @@ void CJabberProto::IqResultProxyDiscovery(HXML iqNode, CJabberIqInfo *pInfo) HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode) {
const TCHAR *queryXmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (queryXmlns && !_tcscmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
+ if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
HXML streamHostNode = xmlGetChild(queryNode , "streamhost");
if (streamHostNode) {
const TCHAR *streamJid = xmlGetAttrValue(streamHostNode, _T("jid"));
@@ -257,7 +257,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) return;
}
- if (jbt->bProxyDiscovered && !_tcscmp(jbt->szProxyJid, jbt->szStreamhostUsed)) {
+ if (jbt->bProxyDiscovered && !mir_tstrcmp(jbt->szProxyJid, jbt->szStreamhostUsed)) {
// jabber proxy used
if (bDirect) {
SetEvent(jbt->hSendEvent);
@@ -299,7 +299,7 @@ void CJabberProto::ByteInitiateResult(HXML iqNode, CJabberIqInfo *pInfo) HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode) {
const TCHAR *queryXmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (queryXmlns && !_tcscmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
+ if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
HXML streamHostNode = xmlGetChild(queryNode , "streamhost-used");
if (streamHostNode) {
const TCHAR *streamJid = xmlGetAttrValue(streamHostNode, _T("jid"));
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 7b1cfe11ff..a68814d7cf 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -111,7 +111,7 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI(HXML, CJabberIqInfo *pInfo) HXML xform;
for (int i = 1; (xform = xmlGetNthChild(query, _T("x"), i)) != NULL; i++) {
TCHAR *szFormTypeValue = XPath(xform, _T("field[@var='FORM_TYPE']/value"));
- if (szFormTypeValue && !_tcscmp(szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
+ if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
TCHAR *szTmp = XPath(xform, _T("field[@var='os']/value"));
if (szTmp)
r->m_tszOs = mir_tstrdup(szTmp);
@@ -148,7 +148,7 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo *pInfo) continue;
for (int j = 0; g_JabberFeatCapPairs[j].szFeature; j++) {
- if (!_tcscmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
+ if (!mir_tstrcmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
jcbCaps |= g_JabberFeatCapPairs[j].jcbCap;
break;
}
@@ -349,17 +349,17 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen JabberCapsBits jcbMainCaps = m_clientCapsManager.GetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion);
if (jcbMainCaps == JABBER_RESOURCE_CAPS_ERROR) {
// Bombus hack:
- if (!_tcscmp(r->m_tszSoftware, _T("Bombus")) || !_tcscmp(r->m_tszSoftware, _T("BombusMod"))) {
+ if (!mir_tstrcmp(r->m_tszSoftware, _T("Bombus")) || !mir_tstrcmp(r->m_tszSoftware, _T("BombusMod"))) {
jcbMainCaps = JABBER_CAPS_SI | JABBER_CAPS_SI_FT | JABBER_CAPS_IBB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_DATA_FORMS | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION | JABBER_CAPS_COMMANDS | JABBER_CAPS_VCARD_TEMP;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
// Neos hack:
- else if (!_tcscmp(r->m_tszSoftware, _T("neos"))) {
+ else if (!mir_tstrcmp(r->m_tszSoftware, _T("neos"))) {
jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
// sim hack:
- else if (!_tcscmp(r->m_tszSoftware, _T("sim"))) {
+ else if (!mir_tstrcmp(r->m_tszSoftware, _T("sim"))) {
jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_VERSION | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
@@ -437,7 +437,7 @@ CJabberClientPartialCaps* CJabberClientCaps::FindByVersion(const TCHAR *szVer) CJabberClientPartialCaps *pCaps = m_pCaps;
while (pCaps) {
- if (!_tcscmp(szVer, pCaps->GetVersion()))
+ if (!mir_tstrcmp(szVer, pCaps->GetVersion()))
break;
pCaps = pCaps->GetNext();
}
@@ -536,7 +536,7 @@ CJabberClientCaps * CJabberClientCapsManager::FindClient(const TCHAR *szNode) CJabberClientCaps *pClient = m_pClients;
while (pClient) {
- if (!_tcscmp(szNode, pClient->GetNode()))
+ if (!mir_tstrcmp(szNode, pClient->GetNode()))
break;
pClient = pClient->GetNext();
}
@@ -616,7 +616,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con TCHAR szExtCap[ 512 ];
mir_sntprintf(szExtCap, SIZEOF(szExtCap), _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature);
- if (!_tcscmp(szNode, szExtCap)) {
+ if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = g_JabberFeatCapPairsExt[i].jcbCap;
break;
}
@@ -626,7 +626,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++) {
TCHAR szExtCap[ 512 ];
mir_sntprintf(szExtCap, SIZEOF(szExtCap), _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt);
- if (!_tcscmp(szNode, szExtCap)) {
+ if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap;
break;
}
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 0da167336d..2ec926fa4d 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -205,19 +205,19 @@ void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text) static TJabberFormControlType JabberFormTypeNameToId(const TCHAR *type)
{
- if (!_tcscmp(type, _T("text-private")))
+ if (!mir_tstrcmp(type, _T("text-private")))
return JFORM_CTYPE_TEXT_PRIVATE;
- if (!_tcscmp(type, _T("text-multi")) || !_tcscmp(type, _T("jid-multi")))
+ if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi")))
return JFORM_CTYPE_TEXT_MULTI;
- if (!_tcscmp(type, _T("boolean")))
+ if (!mir_tstrcmp(type, _T("boolean")))
return JFORM_CTYPE_BOOLEAN;
- if (!_tcscmp(type, _T("list-single")))
+ if (!mir_tstrcmp(type, _T("list-single")))
return JFORM_CTYPE_LIST_SINGLE;
- if (!_tcscmp(type, _T("list-multi")))
+ if (!mir_tstrcmp(type, _T("list-multi")))
return JFORM_CTYPE_LIST_MULTI;
- if (!_tcscmp(type, _T("fixed")))
+ if (!mir_tstrcmp(type, _T("fixed")))
return JFORM_CTYPE_FIXED;
- if (!_tcscmp(type, _T("hidden")))
+ if (!mir_tstrcmp(type, _T("hidden")))
return JFORM_CTYPE_HIDDEN;
return JFORM_CTYPE_TEXT_SINGLE;
@@ -323,7 +323,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX | BS_MULTILINE,
0, 0, 0, 0,
hwndStatic, (HMENU)layout_info->id, hInst, NULL);
- if (valueStr && !_tcscmp(valueStr, _T("1")))
+ if (valueStr && !mir_tstrcmp(valueStr, _T("1")))
SendMessage(item->hCtrl, BM_SETCHECK, 1, 0);
++layout_info->id;
break;
@@ -602,7 +602,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) hCtrl = GetDlgItem(hFrame, id);
HXML field = x << XCHILD(_T("field")) << XATTR(_T("var"), varName);
- if (!_tcscmp(type, _T("text-multi")) || !_tcscmp(type, _T("jid-multi"))) {
+ if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi"))) {
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
@@ -616,13 +616,13 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) mir_free(str);
id++;
}
- else if (!_tcscmp(type, _T("boolean"))) {
+ else if (!mir_tstrcmp(type, _T("boolean"))) {
TCHAR buf[10];
_itot(IsDlgButtonChecked(hFrame, id) == BST_CHECKED ? 1 : 0, buf, 10);
field << XCHILD(_T("value"), buf);
id++;
}
- else if (!_tcscmp(type, _T("list-single"))) {
+ else if (!mir_tstrcmp(type, _T("list-single"))) {
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
@@ -648,7 +648,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) mir_free(str);
id++;
}
- else if (!_tcscmp(type, _T("list-multi"))) {
+ else if (!mir_tstrcmp(type, _T("list-multi"))) {
int count = SendMessage(hCtrl, LB_GETCOUNT, 0, 0);
for (j = 0; j < count; j++) {
if (SendMessage(hCtrl, LB_GETSEL, j, 0) > 0) {
@@ -677,7 +677,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) }
id++;
}
- else if (!_tcscmp(type, _T("fixed")) || !_tcscmp(type, _T("hidden"))) {
+ else if (!mir_tstrcmp(type, _T("fixed")) || !mir_tstrcmp(type, _T("hidden"))) {
v = xmlGetChild(n, "value");
if (v != NULL && xmlGetText(v) != NULL)
field << XCHILD(_T("value"), xmlGetText(v));
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index 33c2407aa7..34688fc5eb 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -140,7 +140,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo) if ((xNode = xmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != NULL) {
if ((fieldNode = xmlGetChildByTag(xNode, "field", "var", _T("stream-method"))) != NULL) {
if ((valueNode = xmlGetChild(fieldNode , "value")) != NULL && xmlGetText(valueNode) != NULL) {
- if ((bDirect || bProxy) && !_tcscmp(xmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) {
+ if ((bDirect || bProxy) && !mir_tstrcmp(xmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) {
// Start Bytestream session
JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER;
memset(jbt, 0, sizeof(JABBER_BYTE_TRANSFER));
@@ -154,7 +154,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo) ft->jbt = jbt;
ForkThread((MyThreadFunc)&CJabberProto::ByteSendThread, jbt);
}
- else if (!_tcscmp(xmlGetText(valueNode), JABBER_FEAT_IBB)) {
+ else if (!mir_tstrcmp(xmlGetText(valueNode), JABBER_FEAT_IBB)) {
JABBER_IBB_TRANSFER *jibb = (JABBER_IBB_TRANSFER *) mir_alloc(sizeof (JABBER_IBB_TRANSFER));
memset(jibb, 0, sizeof(JABBER_IBB_TRANSFER));
jibb->srcJID = mir_tstrdup(pInfo->m_szTo);
@@ -301,7 +301,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!iqNode ||
(from = xmlGetAttrValue(iqNode, _T("from"))) == NULL ||
- (str = xmlGetAttrValue(iqNode, _T("type"))) == NULL || _tcscmp(str, _T("set")) ||
+ (str = xmlGetAttrValue(iqNode, _T("type"))) == NULL || mir_tstrcmp(str, _T("set")) ||
(siNode = xmlGetChildByTag(iqNode, "si", "xmlns", JABBER_FEAT_SI)) == NULL)
return;
@@ -328,7 +328,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!mir_tstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
- if (!_tcscmp(xmlGetText(n), JABBER_FEAT_BYTESTREAMS)) {
+ if (!mir_tstrcmp(xmlGetText(n), JABBER_FEAT_BYTESTREAMS)) {
ftType = FT_BYTESTREAM;
break;
} } } } }
@@ -342,7 +342,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!mir_tstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
- if (!_tcscmp(xmlGetText(n), JABBER_FEAT_IBB)) {
+ if (!mir_tstrcmp(xmlGetText(n), JABBER_FEAT_IBB)) {
ftType = FT_IBB;
break;
} } } } }
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 65fbced241..3712a1e14c 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -837,7 +837,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) const TCHAR *nick = cnick ? cnick : (r && r->m_tszNick ? r->m_tszNick : resource);
// process custom nick change
- if (cnick && r && r->m_tszNick && _tcscmp(cnick, r->m_tszNick))
+ if (cnick && r && r->m_tszNick && mir_tstrcmp(cnick, r->m_tszNick))
r->m_tszNick = mir_tstrdup(cnick);
HXML xNode = xmlGetChildByTag(node, "x", "xmlns", JABBER_FEAT_MUC_USER);
@@ -846,7 +846,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) const TCHAR *type = xmlGetAttrValue(node, _T("type"));
// entering room or a usual room presence
- if (type == NULL || !_tcscmp(type, _T("available"))) {
+ if (type == NULL || !mir_tstrcmp(type, _T("available"))) {
if (ptrT(JabberNickFromJID(from)) == NULL)
return;
@@ -857,10 +857,10 @@ void CJabberProto::GroupchatProcessPresence(HXML node) int status = ID_STATUS_ONLINE;
LPCTSTR ptszShow = xmlGetText(xmlGetChild(node, "show"));
if (ptszShow) {
- if (!_tcscmp(ptszShow, _T("away"))) status = ID_STATUS_AWAY;
- else if (!_tcscmp(ptszShow, _T("xa"))) status = ID_STATUS_NA;
- else if (!_tcscmp(ptszShow, _T("dnd"))) status = ID_STATUS_DND;
- else if (!_tcscmp(ptszShow, _T("chat"))) status = ID_STATUS_FREECHAT;
+ if (!mir_tstrcmp(ptszShow, _T("away"))) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(ptszShow, _T("xa"))) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(ptszShow, _T("dnd"))) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(ptszShow, _T("chat"))) status = ID_STATUS_FREECHAT;
}
LPCTSTR str = xmlGetText(xmlGetChild(node, "status"));
@@ -885,16 +885,16 @@ void CJabberProto::GroupchatProcessPresence(HXML node) JABBER_GC_ROLE role = r->m_role;
if ((str = xmlGetAttrValue(itemNode, _T("affiliation"))) != NULL) {
- if (!_tcscmp(str, _T("owner"))) affiliation = AFFILIATION_OWNER;
- else if (!_tcscmp(str, _T("admin"))) affiliation = AFFILIATION_ADMIN;
- else if (!_tcscmp(str, _T("member"))) affiliation = AFFILIATION_MEMBER;
- else if (!_tcscmp(str, _T("none"))) affiliation = AFFILIATION_NONE;
- else if (!_tcscmp(str, _T("outcast"))) affiliation = AFFILIATION_OUTCAST;
+ if (!mir_tstrcmp(str, _T("owner"))) affiliation = AFFILIATION_OWNER;
+ else if (!mir_tstrcmp(str, _T("admin"))) affiliation = AFFILIATION_ADMIN;
+ else if (!mir_tstrcmp(str, _T("member"))) affiliation = AFFILIATION_MEMBER;
+ else if (!mir_tstrcmp(str, _T("none"))) affiliation = AFFILIATION_NONE;
+ else if (!mir_tstrcmp(str, _T("outcast"))) affiliation = AFFILIATION_OUTCAST;
}
if ((str = xmlGetAttrValue(itemNode, _T("role"))) != NULL) {
- if (!_tcscmp(str, _T("moderator"))) role = ROLE_MODERATOR;
- else if (!_tcscmp(str, _T("participant"))) role = ROLE_PARTICIPANT;
- else if (!_tcscmp(str, _T("visitor"))) role = ROLE_VISITOR;
+ if (!mir_tstrcmp(str, _T("moderator"))) role = ROLE_MODERATOR;
+ else if (!mir_tstrcmp(str, _T("participant"))) role = ROLE_PARTICIPANT;
+ else if (!mir_tstrcmp(str, _T("visitor"))) role = ROLE_VISITOR;
else role = ROLE_NONE;
}
@@ -940,7 +940,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) // Check <created/>
if (bRoomCreated) {
HXML n = xmlGetChild(node, "created");
- if (n != NULL && (str = xmlGetAttrValue(n, _T("xmlns"))) != NULL && !_tcscmp(str, JABBER_FEAT_MUC_OWNER))
+ if (n != NULL && (str = xmlGetAttrValue(n, _T("xmlns"))) != NULL && !mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER))
// A new room just created by me
// Request room config
m_ThreadInfo->send(
@@ -950,7 +950,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) }
// leaving room
- else if (!_tcscmp(type, _T("unavailable"))) {
+ else if (!mir_tstrcmp(type, _T("unavailable"))) {
const TCHAR *str = 0;
if (xNode != NULL && item->nick != NULL) {
HXML reasonNode = xmlGetChild(itemNode, "reason");
@@ -998,7 +998,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) }
// processing room errors
- else if (!_tcscmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
int errorCode = 0;
HXML errorNode = xmlGetChild(node, "error");
ptrT str(JabberErrorMsg(errorNode, &errorCode));
diff --git a/protocols/JabberG/src/jabber_ibb.cpp b/protocols/JabberG/src/jabber_ibb.cpp index 78d952daf7..61094fb023 100644 --- a/protocols/JabberG/src/jabber_ibb.cpp +++ b/protocols/JabberG/src/jabber_ibb.cpp @@ -46,11 +46,11 @@ void JabberIbbFreeJibb(JABBER_IBB_TRANSFER *jibb) BOOL CJabberProto::OnFtHandleIbbIq(HXML iqNode, CJabberIqInfo *pInfo)
{
- if (!_tcscmp(pInfo->GetChildNodeName(), _T("open")))
+ if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("open")))
FtHandleIbbRequest(iqNode, TRUE);
- else if (!_tcscmp(pInfo->GetChildNodeName(), _T("close")))
+ else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("close")))
FtHandleIbbRequest(iqNode, FALSE);
- else if (!_tcscmp(pInfo->GetChildNodeName(), _T("data"))) {
+ else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("data"))) {
BOOL bOk = FALSE;
const TCHAR *sid = xmlGetAttrValue(pInfo->GetChildNode(), _T("sid"));
const TCHAR *seq = xmlGetAttrValue(pInfo->GetChildNode(), _T("seq"));
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index 9217a01871..d0084b7125 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -314,8 +314,8 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) const TCHAR *szTagName = xmlGetName(pFirstChild);
const TCHAR *szXmlns = xmlGetAttrValue(pFirstChild, _T("xmlns"));
- if ((!pInfo.m_szXmlns || (szXmlns && !_tcscmp(pInfo.m_szXmlns, szXmlns))) &&
- (!pInfo.m_szTag || !_tcscmp(pInfo.m_szTag, szTagName)))
+ if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) &&
+ (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName)))
{
// node suits handler criteria, call the handler
iqInfo.m_pChildNode = pFirstChild;
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index c8222b05d7..9e6c191168 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -478,7 +478,7 @@ BOOL CJabberProto::OnSiRequest(HXML node, CJabberIqInfo *pInfo) {
const TCHAR *szProfile = xmlGetAttrValue(pInfo->GetChildNode(), _T("profile"));
- if (szProfile && !_tcscmp(szProfile, JABBER_FEAT_SI_FT))
+ if (szProfile && !mir_tstrcmp(szProfile, JABBER_FEAT_SI_FT))
FtHandleSiRequest(node);
else {
XmlNodeIq iq(_T("error"), pInfo);
@@ -512,7 +512,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) pDelimiter = _tcschr(szTo, _T('/'));
if (pDelimiter) *pDelimiter = 0;
- BOOL bRetVal = _tcscmp(szFrom, szTo) == 0;
+ BOOL bRetVal = mir_tstrcmp(szFrom, szTo) == 0;
mir_free(szFrom);
mir_free(szTo);
@@ -534,7 +534,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) if (!itemNode)
break;
- if (_tcscmp(xmlGetName(itemNode), _T("item")) != 0)
+ if (mir_tstrcmp(xmlGetName(itemNode), _T("item")) != 0)
continue;
if ((jid = xmlGetAttrValue(itemNode, _T("jid"))) == NULL)
continue;
@@ -542,7 +542,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) continue;
// we will not add new account when subscription=remove
- if (!_tcscmp(str, _T("to")) || !_tcscmp(str, _T("both")) || !_tcscmp(str, _T("from")) || !_tcscmp(str, _T("none"))) {
+ if (!mir_tstrcmp(str, _T("to")) || !mir_tstrcmp(str, _T("both")) || !mir_tstrcmp(str, _T("from")) || !mir_tstrcmp(str, _T("none"))) {
const TCHAR *name = xmlGetAttrValue(itemNode, _T("name"));
ptrT nick((name != NULL) ? mir_tstrdup(name) : JabberNickFromJID(jid));
if (nick != NULL) {
@@ -562,7 +562,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) if (name != NULL) {
ptrT tszNick(getTStringA(hContact, "Nick"));
if (tszNick != NULL) {
- if (_tcscmp(nick, tszNick) != 0)
+ if (mir_tstrcmp(nick, tszNick) != 0)
db_set_ts(hContact, "CList", "MyHandle", nick);
else
db_unset(hContact, "CList", "MyHandle");
@@ -583,15 +583,15 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) }
if ((item = ListGetItemPtr(LIST_ROSTER, jid)) != NULL) {
- if (!_tcscmp(str, _T("both"))) item->subscription = SUB_BOTH;
- else if (!_tcscmp(str, _T("to"))) item->subscription = SUB_TO;
- else if (!_tcscmp(str, _T("from"))) item->subscription = SUB_FROM;
+ if (!mir_tstrcmp(str, _T("both"))) item->subscription = SUB_BOTH;
+ else if (!mir_tstrcmp(str, _T("to"))) item->subscription = SUB_TO;
+ else if (!mir_tstrcmp(str, _T("from"))) item->subscription = SUB_FROM;
else item->subscription = SUB_NONE;
debugLog(_T("Roster push for jid=%s, set subscription to %s"), jid, str);
// subscription = remove is to remove from roster list
// but we will just set the contact to offline and not actually
// remove, so that history will be retained.
- if (!_tcscmp(str, _T("remove"))) {
+ if (!mir_tstrcmp(str, _T("remove"))) {
if ((hContact = HContactFromJID(jid)) != NULL) {
SetContactOfflineStatus(hContact);
ListRemove(LIST_ROSTER, jid);
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 041f665e58..a109b3bea3 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -35,7 +35,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) return;
const TCHAR *type = xmlGetAttrValue(iqNode, _T("type"));
- if ( _tcscmp(type, _T("result")))
+ if ( mir_tstrcmp(type, _T("result")))
return;
HXML query = xmlGetChildByTag(iqNode, "query", "xmlns", JABBER_FEAT_DISCO_INFO);
@@ -68,7 +68,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) continue;
for (int j = 0; g_JabberFeatCapPairs[j].szFeature; j++) {
- if (!_tcscmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
+ if (!mir_tstrcmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
m_ThreadInfo->jabberServerCaps |= g_JabberFeatCapPairs[j].jcbCap;
break;
}
@@ -96,7 +96,7 @@ void CJabberProto::OnIqResultNestedRosterGroups(HXML iqNode, CJabberIqInfo *pInf return;
// is our default delimiter?
- if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && _tcscmp(szGroupDelimeter, _T("\\"))))
+ if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && mir_tstrcmp(szGroupDelimeter, _T("\\"))))
m_ThreadInfo->send(
XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE)
<< XCHILD(_T("roster"), _T("\\")) << XATTR(_T("xmlns"), JABBER_FEAT_NESTED_ROSTER_GROUPS));
@@ -352,7 +352,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) return;
}
- if (!_tcscmp(szGroupDelimeter, _T("\\"))) {
+ if (!mir_tstrcmp(szGroupDelimeter, _T("\\"))) {
mir_free(szGroupDelimeter);
szGroupDelimeter = NULL;
}
@@ -367,16 +367,16 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) if (!itemNode)
break;
- if (_tcscmp(xmlGetName(itemNode), _T("item")))
+ if (mir_tstrcmp(xmlGetName(itemNode), _T("item")))
continue;
const TCHAR *str = xmlGetAttrValue(itemNode, _T("subscription"));
JABBER_SUBSCRIPTION sub;
if (str == NULL) sub = SUB_NONE;
- else if (!_tcscmp(str, _T("both"))) sub = SUB_BOTH;
- else if (!_tcscmp(str, _T("to"))) sub = SUB_TO;
- else if (!_tcscmp(str, _T("from"))) sub = SUB_FROM;
+ else if (!mir_tstrcmp(str, _T("both"))) sub = SUB_BOTH;
+ else if (!mir_tstrcmp(str, _T("to"))) sub = SUB_TO;
+ else if (!mir_tstrcmp(str, _T("from"))) sub = SUB_FROM;
else sub = SUB_NONE;
const TCHAR *jid = xmlGetAttrValue(itemNode, _T("jid"));
@@ -621,7 +621,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP }
if (item != NULL) {
hasPhoto = TRUE;
- if (item->photoFileName && _tcscmp(item->photoFileName, szAvatarFileName))
+ if (item->photoFileName && mir_tstrcmp(item->photoFileName, szAvatarFileName))
DeleteFile(item->photoFileName);
replaceStrT(item->photoFileName, szAvatarFileName);
debugLog(_T("Contact's picture saved to %s"), szAvatarFileName);
@@ -715,7 +715,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) if (!n)
break;
if (xmlGetName(n) == NULL) continue;
- if (!_tcscmp(xmlGetName(n), _T("FN"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("FN"))) {
if (xmlGetText(n) != NULL) {
hasFn = true;
setTString(hContact, "FullName", xmlGetText(n));
@@ -1277,7 +1277,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) const TCHAR *type;
if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if (_tcscmp(type, _T("result"))) return;
+ if (mir_tstrcmp(type, _T("result"))) return;
HXML vCard = xmlGetChild(iqNode , "vCard");
if (vCard == NULL) return;
@@ -1316,7 +1316,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) return;
HXML n = NULL;
- if ((type = xmlGetAttrValue(iqNode, _T("type"))) != NULL && !_tcscmp(type, _T("result"))) {
+ if ((type = xmlGetAttrValue(iqNode, _T("type"))) != NULL && !mir_tstrcmp(type, _T("result"))) {
HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode != NULL) {
const TCHAR *xmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
@@ -1465,7 +1465,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) HXML itemNode;
for (int i = 0; itemNode = xmlGetChild(storageNode, i); i++) {
if (LPCTSTR name = xmlGetName(itemNode)) {
- if (!_tcscmp(name, _T("conference")) && (jid = xmlGetAttrValue(itemNode, _T("jid")))) {
+ if (!mir_tstrcmp(name, _T("conference")) && (jid = xmlGetAttrValue(itemNode, _T("jid")))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
item->name = mir_tstrdup(xmlGetAttrValue(itemNode, _T("name")));
item->type = mir_tstrdup(_T("conference"));
@@ -1477,7 +1477,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) if (autoJ != NULL)
item->bAutoJoin = (!mir_tstrcmp(autoJ, _T("true")) || !mir_tstrcmp(autoJ, _T("1"))) ? true : false;
}
- else if (!_tcscmp(name, _T("url")) && (jid = xmlGetAttrValue(itemNode, _T("url")))) {
+ else if (!mir_tstrcmp(name, _T("url")) && (jid = xmlGetAttrValue(itemNode, _T("url")))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
item->bUseResource = TRUE;
item->name = mir_tstrdup(xmlGetAttrValue(itemNode, _T("name")));
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 24f77738ca..8beb71694a 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -49,7 +49,7 @@ void CJabberProto::OnIqResultGetMuc(HXML iqNode, CJabberIqInfo*) if (from == NULL)
return;
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
HXML queryNode = xmlGetChild(iqNode , _T("query"));
if (queryNode != NULL) {
LPCTSTR str = xmlGetAttrValue(queryNode, _T("xmlns"));
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index ff447fb832..ebb67d0626 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -221,7 +221,7 @@ pResourceStatus JABBER_LIST_ITEM::findResource(const TCHAR *resourceName) const for (int i=0; i < arResources.getCount(); i++) {
JABBER_RESOURCE_STATUS *r = arResources[i];
- if (!_tcscmp(r->m_tszResourceName, resourceName))
+ if (!mir_tstrcmp(r->m_tszResourceName, resourceName))
return r;
}
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index a1411bcac0..f8d067080d 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -82,7 +82,7 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea LPCTSTR szTagName = xmlGetName(child);
LPCTSTR szXmlns = xmlGetAttrValue(child, _T("xmlns"));
- if ((!pInfo.m_szXmlns || (szXmlns && !_tcscmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !_tcscmp(pInfo.m_szTag, szTagName))) {
+ if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName))) {
// node suits handler criteria, call the handler
messageInfo.m_hChildNode = child;
messageInfo.m_szChildTagName = szTagName;
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 6b08ffc451..5afc459a87 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -456,7 +456,7 @@ protected: for (int i=0; g_LanguageCodes[i].szCode; i++) {
int iItem = m_cbLocale.AddString(TranslateTS(g_LanguageCodes[i].szDescription), (LPARAM)g_LanguageCodes[i].szCode);
- if (!_tcscmp(m_proto->m_tszSelectedLang, g_LanguageCodes[i].szCode))
+ if (!mir_tstrcmp(m_proto->m_tszSelectedLang, g_LanguageCodes[i].szCode))
m_cbLocale.SetCurSel(iItem);
}
diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp index 08248147a0..494b685230 100644 --- a/protocols/JabberG/src/jabber_password.cpp +++ b/protocols/JabberG/src/jabber_password.cpp @@ -61,12 +61,12 @@ static INT_PTR CALLBACK JabberChangePasswordDlgProc(HWND hwndDlg, UINT msg, WPAR TCHAR newPasswd[512], text[512];
GetDlgItemText(hwndDlg, IDC_NEWPASSWD, newPasswd, SIZEOF(newPasswd));
GetDlgItemText(hwndDlg, IDC_NEWPASSWD2, text, SIZEOF(text));
- if (_tcscmp(newPasswd, text)) {
+ if (mir_tstrcmp(newPasswd, text)) {
MessageBox(hwndDlg, TranslateT("New password does not match."), TranslateT("Change Password"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
break;
}
GetDlgItemText(hwndDlg, IDC_OLDPASSWD, text, SIZEOF(text));
- if (_tcscmp(text, ppro->m_ThreadInfo->conn.password)) {
+ if (mir_tstrcmp(text, ppro->m_ThreadInfo->conn.password)) {
MessageBox(hwndDlg, TranslateT("Current password is incorrect."), TranslateT("Change Password"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
break;
}
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index dbaea138f8..ac18e525cd 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -77,7 +77,7 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) if (type == NULL)
return;
- if ( _tcscmp(type, _T("result")))
+ if ( mir_tstrcmp(type, _T("result")))
return;
HXML query = xmlGetChild(iqNode , "query");
@@ -185,7 +185,7 @@ void CJabberProto::OnIqResultPrivacyListActive(HXML iqNode, CJabberIqInfo *pInfo CMString szText;
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
mir_cslock lck(m_privacyListManager.m_cs);
if (pList) {
m_privacyListManager.SetActiveListName(pList->GetListName());
@@ -222,7 +222,7 @@ void CJabberProto::OnIqResultPrivacyListDefault(HXML iqNode, CJabberIqInfo *pInf szText[0] = 0;
{
mir_cslock lck(m_privacyListManager.m_cs);
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
CPrivacyList *pList = (CPrivacyList *)pInfo->GetUserData();
if (pList) {
m_privacyListManager.SetDefaultListName(pList->GetListName());
@@ -1870,8 +1870,8 @@ void CJabberDlgPrivacyLists::btnRemoveList_OnClick(CCtrlButton *) CPrivacyList *pList = GetSelectedList(m_hwnd);
if (pList) {
TCHAR *szListName = pList->GetListName();
- if ((m_proto->m_privacyListManager.GetActiveListName() && !_tcscmp(szListName, m_proto->m_privacyListManager.GetActiveListName())) ||
- (m_proto->m_privacyListManager.GetDefaultListName() && !_tcscmp(szListName, m_proto->m_privacyListManager.GetDefaultListName())))
+ if ((m_proto->m_privacyListManager.GetActiveListName() && !mir_tstrcmp(szListName, m_proto->m_privacyListManager.GetActiveListName())) ||
+ (m_proto->m_privacyListManager.GetDefaultListName() && !mir_tstrcmp(szListName, m_proto->m_privacyListManager.GetDefaultListName())))
{
lck.unlock();
MessageBox(m_hwnd, TranslateT("Can't remove active or default list"), TranslateT("Sorry"), MB_OK | MB_ICONSTOP);
diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h index 697f0efa7b..97c34839ab 100644 --- a/protocols/JabberG/src/jabber_privacy.h +++ b/protocols/JabberG/src/jabber_privacy.h @@ -369,7 +369,7 @@ public: {
CPrivacyList *pList = m_pLists;
while (pList) {
- if (!_tcscmp(pList->GetListName(), szListName))
+ if (!mir_tstrcmp(pList->GetListName(), szListName))
return pList;
pList = pList->GetNext();
}
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 79ce43efeb..ac27168eb1 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -620,7 +620,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) item = ListGetItemPtr(LIST_ROSTER, jid);
if (item == NULL) {
- bool bHasResource = _tcscmp(jid, szBareJid) != 0;
+ bool bHasResource = mir_tstrcmp(jid, szBareJid) != 0;
JABBER_LIST_ITEM *tmpItem = NULL;
if (bHasResource && (tmpItem = ListGetItemPtr(LIST_CHATROOM, szBareJid))) {
pResourceStatus him(tmpItem->findResource(szBareJid+mir_tstrlen(szBareJid)+1));
@@ -651,7 +651,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) m_ThreadInfo->send(iq4);
}
- if (!_tcscmp(tmp, jid)) {
+ if (!mir_tstrcmp(tmp, jid)) {
XmlNodeIq iq3(AddIQ(&CJabberProto::OnIqResultLastActivity, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM));
iq3 << XQUERY(JABBER_FEAT_LAST_ACTIVITY);
m_ThreadInfo->send(iq3);
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index b83d3ef89c..a2ac93a80d 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -71,7 +71,7 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo *pInfo, const T if (!szNode || !m_pProto->m_options.EnableRemoteControl || !m_pProto->IsRcRequestAllowedByACL(pInfo))
return FALSE;
- if (!_tcscmp(szNode, JABBER_FEAT_COMMANDS)) {
+ if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) {
XmlNodeIq iq(_T("result"), pInfo);
HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(_T("node"), JABBER_FEAT_COMMANDS);
{
@@ -102,7 +102,7 @@ BOOL CJabberAdhocManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TC return FALSE;
// FIXME: same code twice
- if (!_tcscmp(szNode, JABBER_FEAT_COMMANDS)) {
+ if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) {
XmlNodeIq iq(_T("result"), pInfo);
HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), JABBER_FEAT_COMMANDS);
resultQuery << XCHILD(_T("identity")) << XATTR(_T("name"), _T("Ad-hoc commands"))
@@ -346,13 +346,13 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
int status;
- if (!_tcscmp(ptszValue, _T("away"))) status = ID_STATUS_AWAY;
- else if (!_tcscmp(ptszValue, _T("xa"))) status = ID_STATUS_NA;
- else if (!_tcscmp(ptszValue, _T("dnd"))) status = ID_STATUS_DND;
- else if (!_tcscmp(ptszValue, _T("chat"))) status = ID_STATUS_FREECHAT;
- else if (!_tcscmp(ptszValue, _T("online"))) status = ID_STATUS_ONLINE;
- else if (!_tcscmp(ptszValue, _T("invisible"))) status = ID_STATUS_INVISIBLE;
- else if (!_tcscmp(ptszValue, _T("offline"))) status = ID_STATUS_OFFLINE;
+ if (!mir_tstrcmp(ptszValue, _T("away"))) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(ptszValue, _T("xa"))) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(ptszValue, _T("dnd"))) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(ptszValue, _T("chat"))) status = ID_STATUS_FREECHAT;
+ else if (!mir_tstrcmp(ptszValue, _T("online"))) status = ID_STATUS_ONLINE;
+ else if (!mir_tstrcmp(ptszValue, _T("invisible"))) status = ID_STATUS_INVISIBLE;
+ else if (!mir_tstrcmp(ptszValue, _T("offline"))) status = ID_STATUS_OFFLINE;
else
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
@@ -763,7 +763,7 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo *pInfo, CJabbe if (fieldNode) {
for (i=0; i < xmlGetChildCount(fieldNode); i++) {
HXML valueNode = xmlGetChild(fieldNode, i);
- if (valueNode && xmlGetName(valueNode) && xmlGetText(valueNode) && !_tcscmp(xmlGetName(valueNode), _T("value"))) {
+ if (valueNode && xmlGetName(valueNode) && xmlGetText(valueNode) && !mir_tstrcmp(xmlGetName(valueNode), _T("value"))) {
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, xmlGetText(valueNode));
if (item)
GcQuit(item, 0, NULL);
diff --git a/protocols/JabberG/src/jabber_rc.h b/protocols/JabberG/src/jabber_rc.h index 125bd796d2..a1c1eeb992 100644 --- a/protocols/JabberG/src/jabber_rc.h +++ b/protocols/JabberG/src/jabber_rc.h @@ -169,7 +169,7 @@ protected: {
CJabberAdhocSession* pSession = m_pSessions;
while (pSession) {
- if (!_tcscmp(pSession->GetSessionId(), szSession))
+ if (!mir_tstrcmp(pSession->GetSessionId(), szSession))
return pSession;
pSession = pSession->GetNext();
}
@@ -192,7 +192,7 @@ protected: {
CJabberAdhocNode* pNode = m_pNodes;
while (pNode) {
- if (!_tcscmp(pNode->GetNode(), szNode))
+ if (!mir_tstrcmp(pNode->GetNode(), szNode))
return pNode;
pNode = pNode->GetNext();
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 7e55a4e57b..917a0af363 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -680,29 +680,29 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (!n)
break;
- if (!_tcscmp(xmlGetName(n), _T("starttls"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("starttls"))) {
if (!info->conn.useSSL && m_options.UseTLS) {
debugLogA("Requesting TLS");
info->send(XmlNode(xmlGetName(n)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-tls")));
return;
} }
- if (!_tcscmp(xmlGetName(n), _T("compression")) && m_options.EnableZlib == TRUE) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("compression")) && m_options.EnableZlib == TRUE) {
debugLogA("Server compression available");
for (int k = 0;; k++) {
HXML c = xmlGetChild(n, k);
if (!c)
break;
- if (!_tcscmp(xmlGetName(c), _T("method"))) {
- if (!_tcscmp(xmlGetText(c), _T("zlib")) && info->zlibInit() == TRUE) {
+ if (!mir_tstrcmp(xmlGetName(c), _T("method"))) {
+ if (!mir_tstrcmp(xmlGetText(c), _T("zlib")) && info->zlibInit() == TRUE) {
debugLogA("Requesting Zlib compression");
info->send(XmlNode(_T("compress")) << XATTR(_T("xmlns"), _T("http://jabber.org/protocol/compress"))
<< XCHILD(_T("method"), _T("zlib")));
return;
} } } }
- if (!_tcscmp(xmlGetName(n), _T("mechanisms"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("mechanisms"))) {
m_AuthMechs.isPlainAvailable = false;
m_AuthMechs.isPlainOldAvailable = false;
m_AuthMechs.isMd5Available = false;
@@ -719,16 +719,16 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (!c)
break;
- if (!_tcscmp(xmlGetName(c), _T("mechanism"))) {
+ if (!mir_tstrcmp(xmlGetName(c), _T("mechanism"))) {
LPCTSTR ptszMechanism = xmlGetText(c);
- if (!_tcscmp(ptszMechanism, _T("PLAIN"))) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("DIGEST-MD5"))) m_AuthMechs.isMd5Available = true;
- else if (!_tcscmp(ptszMechanism, _T("SCRAM-SHA-1"))) m_AuthMechs.isScramAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("NTLM"))) m_AuthMechs.isNtlmAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("GSS-SPNEGO"))) m_AuthMechs.isSpnegoAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("GSSAPI"))) m_AuthMechs.isKerberosAvailable = true;
+ if (!mir_tstrcmp(ptszMechanism, _T("PLAIN"))) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("DIGEST-MD5"))) m_AuthMechs.isMd5Available = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("SCRAM-SHA-1"))) m_AuthMechs.isScramAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("NTLM"))) m_AuthMechs.isNtlmAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("GSS-SPNEGO"))) m_AuthMechs.isSpnegoAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("GSSAPI"))) m_AuthMechs.isKerberosAvailable = true;
}
- else if (!_tcscmp(xmlGetName(c), _T("hostname"))) {
+ else if (!mir_tstrcmp(xmlGetName(c), _T("hostname"))) {
const TCHAR *mech = xmlGetAttrValue(c, _T("mechanism"));
if (mech && _tcsicmp(mech, _T("GSSAPI")) == 0) {
m_AuthMechs.m_gssapiHostName = mir_tstrdup(xmlGetText(c));
@@ -736,9 +736,9 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) }
}
}
- else if (!_tcscmp(xmlGetName(n), _T("register"))) isRegisterAvailable = true;
- else if (!_tcscmp(xmlGetName(n), _T("auth"))) m_AuthMechs.isAuthAvailable = true;
- else if (!_tcscmp(xmlGetName(n), _T("session"))) m_AuthMechs.isSessionAvailable = true;
+ else if (!mir_tstrcmp(xmlGetName(n), _T("register"))) isRegisterAvailable = true;
+ else if (!mir_tstrcmp(xmlGetName(n), _T("auth"))) m_AuthMechs.isAuthAvailable = true;
+ else if (!mir_tstrcmp(xmlGetName(n), _T("session"))) m_AuthMechs.isSessionAvailable = true;
}
if (areMechanismsDefined) {
@@ -771,7 +771,7 @@ void CJabberProto::OnProcessFailure(HXML node, ThreadData *info) const TCHAR *type;
//failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"
if ((type = xmlGetAttrValue(node, _T("xmlns"))) == NULL) return;
- if (!_tcscmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
+ if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
PerformAuthentication(info);
}
}
@@ -801,9 +801,9 @@ void CJabberProto::OnProcessError(HXML node, ThreadData *info) else
pos += mir_sntprintf(buff + pos, 1024 - pos, _T("%s\r\n"), name);
- if (!_tcscmp(name, _T("conflict")))
+ if (!mir_tstrcmp(name, _T("conflict")))
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
- else if (!_tcscmp(name, _T("see-other-host"))) {
+ else if (!mir_tstrcmp(name, _T("see-other-host"))) {
skipMsg = true;
}
}
@@ -821,7 +821,7 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData *info) if ((type = xmlGetAttrValue(node, _T("xmlns"))) == NULL)
return;
- if (!_tcscmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
+ if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
if (!info->auth->validateLogin(xmlGetText(node))) {
info->send("</stream:stream>");
return;
@@ -1025,7 +1025,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) {
HXML xNode, n;
- if (!xmlGetName(node) || _tcscmp(xmlGetName(node), _T("message")))
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("message")))
return;
LPCTSTR from, type = xmlGetAttrValue(node, _T("type"));
@@ -1193,11 +1193,11 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) if (ptszXmlns == NULL)
continue;
- if (!_tcscmp(ptszXmlns, JABBER_FEAT_MIRANDA_NOTES)) {
+ if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MIRANDA_NOTES)) {
if (OnIncomingNote(from, xmlGetChild(xNode, "note")))
return;
}
- else if (!_tcscmp(ptszXmlns, _T("jabber:x:encrypted"))) {
+ else if (!mir_tstrcmp(ptszXmlns, _T("jabber:x:encrypted"))) {
LPCTSTR ptszText = xmlGetText(xNode);
if (ptszText == NULL)
return;
@@ -1209,12 +1209,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) mir_sntprintf(tempstring, len, _T("%s%s%s"), prolog, ptszText, epilog);
szMessage = tempstring;
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_DELAY) && msgTime == 0) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_DELAY) && msgTime == 0) {
const TCHAR *ptszTimeStamp = xmlGetAttrValue(xNode, _T("stamp"));
if (ptszTimeStamp != NULL)
msgTime = JabberIsoToUnixTime(ptszTimeStamp);
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_MESSAGE_EVENTS)) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MESSAGE_EVENTS)) {
// set events support only if we discovered caps and if events not already set
JabberCapsBits jcbCaps = GetResourceCapabilites(from, TRUE);
@@ -1262,7 +1262,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) }
}
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_OOB2)) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_OOB2)) {
LPCTSTR ptszUrl = xmlGetText(xmlGetChild(xNode, "url"));
if (ptszUrl != NULL && *ptszUrl) {
size_t cbLen = (szMessage ? mir_tstrlen(szMessage) : 0) + mir_tstrlen(ptszUrl) + 32;
@@ -1275,7 +1275,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) szMessage = szTmp;
}
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_MUC_USER)) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MUC_USER)) {
HXML inviteNode = xmlGetChild(xNode, _T("invite"));
if (inviteNode != NULL) {
inviteFromJid = xmlGetAttrValue(inviteNode, _T("from"));
@@ -1287,7 +1287,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) isChatRoomInvitation = true;
invitePassword = xmlGetText(xmlGetChild(xNode, "password"));
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_ROSTER_EXCHANGE) &&
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_ROSTER_EXCHANGE) &&
item != NULL && (item->subscription == SUB_BOTH || item->subscription == SUB_TO)) {
TCHAR chkJID[JABBER_MAX_JID_LEN] = _T("@");
JabberStripJid(from, chkJID + 1, SIZEOF(chkJID) - 1);
@@ -1301,12 +1301,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) const TCHAR *nick = xmlGetAttrValue(iNode, _T("name"));
const TCHAR *group = xmlGetText(xmlGetChild(iNode, _T("group")));
if (action && jid && _tcsstr(jid, chkJID)) {
- if (!_tcscmp(action, _T("add"))) {
+ if (!mir_tstrcmp(action, _T("add"))) {
MCONTACT hContact = DBCreateContact(jid, nick, FALSE, FALSE);
if (group)
db_set_ts(hContact, "CList", "Group", group);
}
- else if (!_tcscmp(action, _T("delete"))) {
+ else if (!mir_tstrcmp(action, _T("delete"))) {
MCONTACT hContact = HContactFromJID(jid);
if (hContact)
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
@@ -1314,7 +1314,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) }
}
}
- else if (!isChatRoomInvitation && !_tcscmp(ptszXmlns, JABBER_FEAT_DIRECT_MUC_INVITE)) {
+ else if (!isChatRoomInvitation && !mir_tstrcmp(ptszXmlns, JABBER_FEAT_DIRECT_MUC_INVITE)) {
inviteRoomJid = xmlGetAttrValue(xNode, _T("jid"));
inviteFromJid = from;
if (inviteReason == NULL)
@@ -1479,7 +1479,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
{
- if (!node || !xmlGetName(node) || _tcscmp(xmlGetName(node), _T("presence")))
+ if (!node || !xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("presence")))
return;
LPCTSTR from = xmlGetAttrValue(node, _T("from"));
@@ -1504,7 +1504,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) bSelfPresence = TRUE;
LPCTSTR type = xmlGetAttrValue(node, _T("type"));
- if (type == NULL || !_tcscmp(type, _T("available"))) {
+ if (type == NULL || !mir_tstrcmp(type, _T("available"))) {
ptrT nick(JabberNickFromJID(from));
if (nick == NULL)
return;
@@ -1524,10 +1524,10 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) int status = ID_STATUS_ONLINE;
if (HXML showNode = xmlGetChild(node, "show")) {
if (LPCTSTR show = xmlGetText(showNode)) {
- if (!_tcscmp(show, _T("away"))) status = ID_STATUS_AWAY;
- else if (!_tcscmp(show, _T("xa"))) status = ID_STATUS_NA;
- else if (!_tcscmp(show, _T("dnd"))) status = ID_STATUS_DND;
- else if (!_tcscmp(show, _T("chat"))) status = ID_STATUS_FREECHAT;
+ if (!mir_tstrcmp(show, _T("away"))) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(show, _T("xa"))) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(show, _T("dnd"))) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(show, _T("chat"))) status = ID_STATUS_FREECHAT;
}
}
@@ -1600,7 +1600,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return;
}
- if (!_tcscmp(type, _T("unavailable"))) {
+ if (!mir_tstrcmp(type, _T("unavailable"))) {
hContact = HContactFromJID(from);
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from);
if (item != NULL) {
@@ -1631,7 +1631,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return;
}
- if (!_tcscmp(type, _T("subscribe"))) {
+ if (!mir_tstrcmp(type, _T("subscribe"))) {
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBE);
@@ -1669,19 +1669,19 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return;
}
- if (!_tcscmp(type, _T("unsubscribe")))
+ if (!mir_tstrcmp(type, _T("unsubscribe")))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBE);
- if (!_tcscmp(type, _T("unsubscribed")))
+ if (!mir_tstrcmp(type, _T("unsubscribed")))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBED);
- if (!_tcscmp(type, _T("error")))
+ if (!mir_tstrcmp(type, _T("error")))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_ERROR);
- if (!_tcscmp(type, _T("subscribed"))) {
+ if (!mir_tstrcmp(type, _T("subscribed"))) {
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBED);
@@ -1736,11 +1736,11 @@ BOOL CJabberProto::OnProcessJingle(HXML node) if (child) {
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return FALSE;
- if ((!_tcscmp(type, _T("get")) || !_tcscmp(type, _T("set")))) {
+ if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) {
LPCTSTR szAction = xmlGetAttrValue(child, _T("action"));
LPCTSTR idStr = xmlGetAttrValue(node, _T("id"));
LPCTSTR from = xmlGetAttrValue(node, _T("from"));
- if (szAction && !_tcscmp(szAction, _T("session-initiate"))) {
+ if (szAction && !mir_tstrcmp(szAction, _T("session-initiate"))) {
// if this is a Jingle 'session-initiate' and noone processed it yet, reply with "unsupported-applications"
m_ThreadInfo->send(XmlNodeIq(_T("result"), idStr, from));
@@ -1780,7 +1780,7 @@ void CJabberProto::OnProcessIq(HXML node) HXML queryNode;
const TCHAR *type, *xmlns;
- if (!xmlGetName(node) || _tcscmp(xmlGetName(node), _T("iq"))) return;
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("iq"))) return;
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return;
int id = JabberGetPacketID(node);
@@ -1801,7 +1801,7 @@ void CJabberProto::OnProcessIq(HXML node) return;
// RECVED: <iq type='error'> ...
- if (!_tcscmp(type, _T("error"))) {
+ if (!mir_tstrcmp(type, _T("error"))) {
TCHAR tszBuf[20];
_itot(id, tszBuf, 10);
@@ -1818,7 +1818,7 @@ void CJabberProto::OnProcessIq(HXML node) }
}
}
- else if ((!_tcscmp(type, _T("get")) || !_tcscmp(type, _T("set")))) {
+ else if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) {
XmlNodeIq iq(_T("error"), id, xmlGetAttrValue(node, _T("from")));
HXML pFirstChild = xmlGetChild(node, 0);
@@ -1835,12 +1835,12 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) {
const TCHAR *type;
- if (!xmlGetName(node) || _tcscmp(xmlGetName(node), _T("iq"))) return;
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("iq"))) return;
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return;
int id = JabberGetPacketID(node);
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
// RECVED: result of the request for registration mechanism
// ACTION: send account registration information
if (id == iqIdRegGetReg) {
@@ -1863,7 +1863,7 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) }
}
- else if (!_tcscmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
TCHAR *str = JabberErrorMsg(xmlGetChild(node, "error"));
SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)str);
mir_free(str);
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 73bc6a6cc8..8017aa59ec 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -310,7 +310,7 @@ TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int* pErrorCode) HXML c = xmlGetChild(errorNode, i);
if (c == NULL) break;
const TCHAR *attr = xmlGetAttrValue(c, _T("xmlns"));
- if (attr && !_tcscmp(attr, _T("urn:ietf:params:xml:ns:xmpp-stanzas"))) {
+ if (attr && !mir_tstrcmp(attr, _T("urn:ietf:params:xml:ns:xmpp-stanzas"))) {
str = xmlGetName(c);
break;
}
@@ -617,10 +617,10 @@ TCHAR* __stdcall JabberStripJid(const TCHAR *jid, TCHAR *dest, size_t destLen) LPCTSTR __stdcall JabberGetPictureType(HXML node, const char *picBuf)
{
if (LPCTSTR ptszType = xmlGetText(xmlGetChild(node, "TYPE")))
- if (!_tcscmp(ptszType, _T("image/jpeg")) ||
- !_tcscmp(ptszType, _T("image/png")) ||
- !_tcscmp(ptszType, _T("image/gif")) ||
- !_tcscmp(ptszType, _T("image/bmp")))
+ if (!mir_tstrcmp(ptszType, _T("image/jpeg")) ||
+ !mir_tstrcmp(ptszType, _T("image/png")) ||
+ !mir_tstrcmp(ptszType, _T("image/gif")) ||
+ !mir_tstrcmp(ptszType, _T("image/bmp")))
return ptszType;
switch (ProtoGetBufferFormat(picBuf)) {
@@ -914,7 +914,7 @@ bool CJabberProto::IsMyOwnJID(LPCTSTR szJID) if (pDelimiter)
*pDelimiter = 0;
- return _tcscmp(szFrom, szTo) == 0;
+ return mir_tstrcmp(szFrom, szTo) == 0;
}
void __cdecl CJabberProto::LoadHttpAvatars(void* param)
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 9aded8f3e3..0bbcf35434 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -638,7 +638,7 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode) LPCTSTR moodType = NULL, moodText = NULL;
for (int i=0; n = xmlGetChild(moodNode, i); i++) {
- if (!_tcscmp(xmlGetName(n), _T("text")))
+ if (!mir_tstrcmp(xmlGetName(n), _T("text")))
moodText = xmlGetText(n);
else
moodType = xmlGetName(n);
diff --git a/protocols/JabberG/src/obsoleted/jabber_form2.cpp b/protocols/JabberG/src/obsoleted/jabber_form2.cpp index 02400de029..6881d08db3 100644 --- a/protocols/JabberG/src/obsoleted/jabber_form2.cpp +++ b/protocols/JabberG/src/obsoleted/jabber_form2.cpp @@ -580,7 +580,7 @@ public: WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX|BS_MULTILINE,
0, 0, 0, 0,
m_parent->GetHwnd(), (HMENU)m_id, hInst, NULL);
- if (m_field->GetValue() && !_tcscmp(m_field->GetValue(), _T("1")))
+ if (m_field->GetValue() && !mir_tstrcmp(m_field->GetValue(), _T("1")))
SendMessage(m_hwnd, BM_SETCHECK, 1, 0);
}
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 044df17ff4..3d0ca4267f 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -644,7 +644,7 @@ int CMraProto::OnGroupChanged(WPARAM hContact, LPARAM lParam) MraGroupItem *pGrp = NULL;
for (int i = 0; i < m_groups.getCount(); i++) {
MraGroupItem &p = m_groups[i];
- if (!_tcscmp(p.m_name, cgc->pszOldName)) {
+ if (!mir_tstrcmp(p.m_name, cgc->pszOldName)) {
pGrp = &p;
break;
}
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index d12430d914..de2f5bfb3c 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -62,7 +62,7 @@ int MSN_GCMenuHook(WPARAM wParam, LPARAM lParam); // Protocol instances
static int sttCompareProtocols(const CMsnProto *p1, const CMsnProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<CMsnProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 0e8926f27d..b7d5bf52ab 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -581,7 +581,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) case 40:
{
const TCHAR *pszRole = MSN_GCGetRole(MSN_GetThreadByChatId(gch->pDest->ptszID), _T2A(gch->ptszUID));
- MSN_Promoteuser(gch, (pszRole && !_tcscmp(pszRole, _T("admin")))?"user":"admin");
+ MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, _T("admin")))?"user":"admin");
break;
}
case 110:
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index b073dadd40..4a92c04457 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -249,7 +249,7 @@ LBL_Continue: GetDlgItemText(hwndDlg, IDC_HANDLE2, screenStr, SIZEOF(screenStr));
if (!proto->getTString("Nick", &dbv)) {
- if (_tcscmp(dbv.ptszVal, screenStr))
+ if (mir_tstrcmp(dbv.ptszVal, screenStr))
proto->MSN_SendNickname(screenStr);
db_free(&dbv);
}
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp index bc4ce92aaf..603b1ff1f3 100644 --- a/protocols/Omegle/src/main.cpp +++ b/protocols/Omegle/src/main.cpp @@ -49,7 +49,7 @@ PLUGININFOEX pluginInfo = { // Protocol instances
static int compare_protos(const OmegleProto *p1, const OmegleProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<OmegleProto> g_Instances(1, compare_protos);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index b4b242be44..a34be253cf 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -354,7 +354,7 @@ int CSametimeProto::GcEventHook(WPARAM wParam, LPARAM lParam) { conferences = conf = mwServiceConference_getConferences(service_conference);
for (;conf;conf = conf->next) {
TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName((mwConference*)conf->data));
- if (_tcscmp(gch->pDest->ptszID, tszConfId) == 0) {
+ if (mir_tstrcmp(gch->pDest->ptszID, tszConfId) == 0) {
switch(gch->pDest->iType) {
case GC_USER_MESSAGE:
diff --git a/protocols/SkypeClassic/src/alogon.cpp b/protocols/SkypeClassic/src/alogon.cpp index 9ea57b5db6..3eedadc637 100644 --- a/protocols/SkypeClassic/src/alogon.cpp +++ b/protocols/SkypeClassic/src/alogon.cpp @@ -30,7 +30,7 @@ static HWND findWindow(HWND parent, const TCHAR* childClassName) // Get child window
// This window is not combo box or edit box
HWND wnd = GetWindow(parent, GW_CHILD);
- while (wnd != NULL && _tcscmp(getClassName(wnd), childClassName) != 0)
+ while (wnd != NULL && mir_tstrcmp(getClassName(wnd), childClassName) != 0)
wnd = GetWindow(wnd, GW_HWNDNEXT);
return wnd;
@@ -42,8 +42,8 @@ static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) GetWindowThreadProcessId(hWnd, &dwPID);
if (lParam != 0 && dwPID != (DWORD)lParam) return TRUE;
const TCHAR *lpszClassName = getClassName(hWnd);
- if (_tcscmp(lpszClassName, _T("tSkMainForm.UnicodeClass")) == 0 ||
- _tcscmp(lpszClassName, _T("TLoginForm.UnicodeClass")) == 0)
+ if (mir_tstrcmp(lpszClassName, _T("tSkMainForm.UnicodeClass")) == 0 ||
+ mir_tstrcmp(lpszClassName, _T("TLoginForm.UnicodeClass")) == 0)
{
HWND loginControl = GetWindow(hWnd, GW_CHILD);
@@ -55,7 +55,7 @@ static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) LOG(("TLoginControl = %S", getClassName(loginControl)));
// Check for login control
- if (_tcscmp(getClassName(loginControl), _T("TLoginControl")) == 0)
+ if (mir_tstrcmp(getClassName(loginControl), _T("TLoginControl")) == 0)
{
// Find user name window
HWND userName = findWindow(loginControl, _T("TNavigableTntComboBox.UnicodeClass"));
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp index ed10c5d43a..2e00d5750a 100644 --- a/protocols/SkypeClassic/src/contacts.cpp +++ b/protocols/SkypeClassic/src/contacts.cpp @@ -346,7 +346,7 @@ MCONTACT find_contactT(TCHAR *name) if (db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0)
{
if (db_get_ts(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) continue;
- tCompareResult = _tcscmp(dbv.ptszVal, name);
+ tCompareResult = mir_tstrcmp(dbv.ptszVal, name);
db_free(&dbv);
if (tCompareResult) continue;
return hContact; // already there, return handle
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp index e59785a5e3..2d29dd6b86 100644 --- a/protocols/SkypeClassic/src/gchat.cpp +++ b/protocols/SkypeClassic/src/gchat.cpp @@ -42,7 +42,7 @@ static CRITICAL_SECTION m_GCMutex; */ gchat_contacts *GetChat(const TCHAR *szChatId) { for (int i=0;i<chatcount;i++) - if (!_tcscmp(chats[i].szChatName, szChatId)) + if (!mir_tstrcmp(chats[i].szChatName, szChatId)) return &chats[i]; gchat_contacts *pchats = (gchat_contacts *)realloc(chats, sizeof(gchat_contacts)*(++chatcount)); @@ -62,7 +62,7 @@ gchat_contacts *GetChat(const TCHAR *szChatId) { */ void RemChat(TCHAR *szChatId) { for (int i=0;i<chatcount;i++) - if (!_tcscmp(chats[i].szChatName, szChatId)) { + if (!mir_tstrcmp(chats[i].szChatName, szChatId)) { if (chats[i].szChatName) free(chats[i].szChatName); if (chats[i].mJoinedContacts) free(chats[i].mJoinedContacts); if (i<--chatcount) memmove(&chats[i], &chats[i+1], (chatcount-i)*sizeof(gchat_contacts)); @@ -83,7 +83,7 @@ void RemChat(TCHAR *szChatId) { */ static int ExistsChatContact(gchat_contacts *gc, const TCHAR *who) { for (int i=0;i<gc->mJoinedCount;i++) - if (_tcscmp(gc->mJoinedContacts[i].who, who)==0) + if (mir_tstrcmp(gc->mJoinedContacts[i].who, who)==0) return i; return -1; } @@ -153,7 +153,7 @@ void RemChatContact(gchat_contacts *gc, const TCHAR *who) { if (!gc) return; for (int i=0;i<gc->mJoinedCount;i++) - if (_tcscmp(gc->mJoinedContacts[i].who, who)==0) { + if (mir_tstrcmp(gc->mJoinedContacts[i].who, who)==0) { if (i<--gc->mJoinedCount) memmove(&gc->mJoinedContacts[i], &gc->mJoinedContacts[i+1], (gc->mJoinedCount-i)*sizeof(gchat_contact)); if (gc->mJoinedCount) gc->mJoinedContacts = (gchat_contact*)realloc(gc->mJoinedContacts, sizeof(gchat_contact)*gc->mJoinedCount); @@ -168,7 +168,7 @@ MCONTACT find_chat(LPCTSTR chatname) { { DBVARIANT dbv; if (!db_get_ts(hContact, SKYPE_PROTONAME, "ChatRoomID", &dbv)) { - int tCompareResult = _tcscmp(dbv.ptszVal, chatname); + int tCompareResult = mir_tstrcmp(dbv.ptszVal, chatname); db_free(&dbv); if (!tCompareResult) return hContact; // already there, return handle @@ -768,7 +768,7 @@ int __cdecl GCMenuHook(WPARAM,LPARAM lParam) { else { TCHAR *szChatRole; if (szChatRole = SkypeGetT ("CHAT", gcmi->pszID, "MYROLE")) { - if (_tcscmp(szChatRole, _T("MASTER")) && _tcscmp(szChatRole, _T("CREATOR"))) + if (mir_tstrcmp(szChatRole, _T("MASTER")) && mir_tstrcmp(szChatRole, _T("CREATOR"))) Item_nicklist[2].bDisabled = TRUE; free (szChatRole); } diff --git a/protocols/SkypeWeb/src/skype_accounts.cpp b/protocols/SkypeWeb/src/skype_accounts.cpp index 41eda172b0..afb741ac6a 100644 --- a/protocols/SkypeWeb/src/skype_accounts.cpp +++ b/protocols/SkypeWeb/src/skype_accounts.cpp @@ -21,7 +21,7 @@ LIST<CSkypeProto> Accounts(1, CSkypeProto::CompareAccounts); int CSkypeProto::CompareAccounts(const CSkypeProto *p1, const CSkypeProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
CSkypeProto* CSkypeProto::InitAccount(const char *protoName, const wchar_t *userName)
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp index a35ee2916e..2238b60f10 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -46,7 +46,7 @@ PLUGININFOEX pluginInfo = { static int compare_protos(const TwitterProto *p1, const TwitterProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<TwitterProto> g_Instances(1, compare_protos);
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index c38dbcd839..78f417c487 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -174,7 +174,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L ppro->setTString("Login", str);
GetDlgItemText(hwndDlg, IDC_GROUPNAME, str, SIZEOF(str));
- if (_tcscmp(ppro->getGroup(), str)) {
+ if (mir_tstrcmp(ppro->getGroup(), str)) {
ppro->setGroup(str);
ppro->setTString("ProtoGroup", str);
}
diff --git a/protocols/WhatsApp/src/main.cpp b/protocols/WhatsApp/src/main.cpp index 99b3fb1811..f199a94d3e 100644 --- a/protocols/WhatsApp/src/main.cpp +++ b/protocols/WhatsApp/src/main.cpp @@ -26,7 +26,7 @@ PLUGININFOEX pluginInfo = { static int compare_protos(const WhatsAppProto *p1, const WhatsAppProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<WhatsAppProto> g_Instances(1, compare_protos);
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index 2af724720a..507c63ca19 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -55,15 +55,15 @@ int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS *ft, const PROTOCHAR *s, TCHAR { if (ft->flags & PFTS_UTF) { TCHAR *ts = Utf8DecodeW((char*)s); - int res = _tcscmp(ts, r); + int res = mir_tstrcmp(ts, r); mir_free(ts); return res; } if (ft->flags & PFTS_UNICODE) - return _tcscmp(s, r); + return mir_tstrcmp(s, r); TCHAR *ts = mir_a2t((char*)s); - int res = _tcscmp(ts, r); + int res = mir_tstrcmp(ts, r); mir_free(ts); return res; } @@ -606,7 +606,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR mir_sntprintf(str, SIZEOF(str), _T("%s/%s"), szSizeDone, szSizeTotal); str2[0] = 0; GetDlgItemText(hwndDlg, IDC_ALLTRANSFERRED, str2, SIZEOF(str2)); - if (_tcscmp(str, str2)) + if (mir_tstrcmp(str, str2)) SetDlgItemText(hwndDlg, IDC_ALLTRANSFERRED, str); } break; diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 755b805275..1d9ec43d28 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -105,7 +105,7 @@ static void AddToFileList(TCHAR ***pppFiles, int *totalCount, const TCHAR* szFil HANDLE hFind = FindFirstFile(szPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- if (!_tcscmp(fd.cFileName, _T(".")) || !_tcscmp(fd.cFileName, _T(".."))) continue;
+ if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T(".."))) continue;
mir_sntprintf(szPath, SIZEOF(szPath), _T("%s\\%s"), szFilename, fd.cFileName);
AddToFileList(pppFiles, totalCount, szPath);
}
@@ -1095,7 +1095,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR oldtitle[256];
GetWindowText(hwndDlg, oldtitle, SIZEOF(oldtitle));
- if (_tcscmp(newtitle, oldtitle)) { //swt() flickers even if the title hasn't actually changed
+ if (mir_tstrcmp(newtitle, oldtitle)) { //swt() flickers even if the title hasn't actually changed
SetWindowText(hwndDlg, newtitle);
SendMessage(hwndDlg, WM_SIZE, 0, 0);
}
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index 061555ccc4..e20b59111f 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -698,7 +698,7 @@ TCHAR* GetChatLogsFilename(SESSION_INFO *si, time_t tTime) // check whether relevant parts of the timestamp have changed and
// we have to reparse the filename
TCHAR *tszNow = ci.MakeTimeStamp(_T("%a%d%m%Y"), tTime); // once a day
- if (_tcscmp(tszOldTimeStamp, tszNow)) {
+ if (mir_tstrcmp(tszOldTimeStamp, tszNow)) {
_tcsncpy_s(tszOldTimeStamp, tszNow, _TRUNCATE);
*si->pszLogFileName = 0;
}
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index 0193777539..c085c0d201 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -697,7 +697,7 @@ PMO_IntMenuItem MO_AddNewMenuItem(HANDLE menuobjecthandle, PMO_MenuItem pmi) int FindRoot(PMO_IntMenuItem pimi, void* param)
{
if (pimi->mi.pszName != NULL)
- if (pimi->submenu.first && !_tcscmp(pimi->mi.ptszName, (TCHAR*)param))
+ if (pimi->submenu.first && !mir_tstrcmp(pimi->mi.ptszName, (TCHAR*)param))
return TRUE;
return FALSE;
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 31f80cc40c..dd5d537c8c 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -110,7 +110,7 @@ class CGenMenuOptionsPage : public CDlgBase runtimepos += 100; } - if (iod->name && !_tcscmp(iod->name, STR_SEPARATOR) && tvi.iImage) + if (iod->name && !mir_tstrcmp(iod->name, STR_SEPARATOR) && tvi.iImage) runtimepos += SEPARATORPOSITIONINTERVAL; tvi.hItem = m_menuItems.GetNextSibling(tvi.hItem); diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp index 4df22391ec..53dfd6a659 100644 --- a/src/modules/clist/groups.cpp +++ b/src/modules/clist/groups.cpp @@ -53,7 +53,7 @@ static int GroupNameExists(const TCHAR *name, int skipGroup) if (grpName == NULL)
break;
- if (!_tcscmp((TCHAR*)grpName+1, name))
+ if (!mir_tstrcmp((TCHAR*)grpName+1, name))
return i+1;
}
return 0;
@@ -210,7 +210,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) if (db_get_ts(hContact, "CList", "Group", &dbv))
continue;
- if (_tcscmp(dbv.ptszVal, name))
+ if (mir_tstrcmp(dbv.ptszVal, name))
{
db_free(&dbv);
continue;
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp index 5b9ca54af2..c01474d7bd 100644 --- a/src/modules/clist/movetogroup.cpp +++ b/src/modules/clist/movetogroup.cpp @@ -124,7 +124,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) }
for (i=0; i < groups.getCount(); i++) {
- bool checked = szContactGroup && !_tcscmp(szContactGroup, groups[i].name);
+ bool checked = szContactGroup && !mir_tstrcmp(szContactGroup, groups[i].name);
AddGroupItem(hMoveToGroupItem, groups[i].name, ++pos, groups[i].position, checked);
}
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index 292f0000ab..b0d201f551 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -248,7 +248,7 @@ static int getProfile1(TCHAR *szProfile, size_t cch, TCHAR *profiledir, BOOL * n if (hFind != INVALID_HANDLE_VALUE) {
do {
// make sure the first hit is actually a *.dat file
- if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !_tcscmp(ffd.cFileName, _T(".")) || !_tcscmp(ffd.cFileName, _T("..")))
+ if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(ffd.cFileName, _T(".")) || !mir_tstrcmp(ffd.cFileName, _T("..")))
continue;
TCHAR newProfile[MAX_PATH];
@@ -342,7 +342,7 @@ char* makeFileName(const TCHAR* tszOriginalName) char *szResult = NULL;
char *szFileName = mir_t2a(tszOriginalName);
TCHAR *tszFileName = mir_a2t(szFileName);
- if (_tcscmp(tszOriginalName, tszFileName)) {
+ if (mir_tstrcmp(tszOriginalName, tszFileName)) {
TCHAR tszProfile[MAX_PATH];
if (GetShortPathName(tszOriginalName, tszProfile, MAX_PATH) != 0)
szResult = mir_t2a(tszProfile);
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 4228af9aa3..95b62b756e 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -53,7 +53,7 @@ static int findProfiles(TCHAR *szProfileDir, ENUMPROFILECALLBACK callback, LPARA do { // find all subfolders except "." and ".." - if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && _tcscmp(ffd.cFileName, _T(".")) && _tcscmp(ffd.cFileName, _T(".."))) { + if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(ffd.cFileName, _T(".")) && mir_tstrcmp(ffd.cFileName, _T(".."))) { TCHAR buf[MAX_PATH], profile[MAX_PATH]; mir_sntprintf(buf, SIZEOF(buf), _T("%s\\%s\\%s.dat"), szProfileDir, ffd.cFileName, ffd.cFileName); if (_taccess(buf, 0) == 0) { diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index 1029abade3..6efdc67f7d 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int sttCompareFont(const FontInternal* p1, const FontInternal* p2)
{
- int result = _tcscmp(p1->group, p2->group);
+ int result = mir_tstrcmp(p1->group, p2->group);
if (result != 0)
return result;
@@ -38,14 +38,14 @@ static int sttCompareFont(const FontInternal* p1, const FontInternal* p2) if (result != 0)
return result;
- return _tcscmp(p1->getName(), p2->getName());
+ return mir_tstrcmp(p1->getName(), p2->getName());
}
OBJLIST<FontInternal> font_id_list(20, sttCompareFont), font_id_list_w2(20, sttCompareFont), font_id_list_w3(20, sttCompareFont);
static int sttCompareColour(const ColourInternal* p1, const ColourInternal* p2)
{
- int result = _tcscmp(p1->group, p2->group);
+ int result = mir_tstrcmp(p1->group, p2->group);
if (result != 0)
return result;
@@ -53,14 +53,14 @@ static int sttCompareColour(const ColourInternal* p1, const ColourInternal* p2) if (result != 0)
return result;
- return _tcscmp(p1->getName(), p2->getName());
+ return mir_tstrcmp(p1->getName(), p2->getName());
}
OBJLIST<ColourInternal> colour_id_list(10, sttCompareColour), colour_id_list_w2(10, sttCompareColour), colour_id_list_w3(10, sttCompareColour);
static int sttCompareEffect(const EffectInternal* p1, const EffectInternal* p2)
{
- int result = _tcscmp(p1->group, p2->group);
+ int result = mir_tstrcmp(p1->group, p2->group);
if (result != 0)
return result;
@@ -68,7 +68,7 @@ static int sttCompareEffect(const EffectInternal* p1, const EffectInternal* p2) if (result != 0)
return result;
- return _tcscmp(p1->getName(), p2->getName());
+ return mir_tstrcmp(p1->getName(), p2->getName());
}
OBJLIST<EffectInternal> effect_id_list(10, sttCompareEffect), effect_id_list_w2(10, sttCompareEffect), effect_id_list_w3(10, sttCompareEffect);
@@ -264,12 +264,12 @@ static BOOL sttFsuiBindColourIdToFonts(HWND hwndList, const TCHAR *name, const T if (itemData && itemData->font_id >= 0) {
FontInternal& F = font_id_list_w2[itemData->font_id];
- if (name && !_tcscmp(F.name, name)) {
+ if (name && !mir_tstrcmp(F.name, name)) {
itemData->colour_id = colourId;
res = TRUE;
}
- if (backgroundGroup && backgroundName && !_tcscmp(F.backgroundGroup, backgroundGroup) && !_tcscmp(F.backgroundName, backgroundName)) {
+ if (backgroundGroup && backgroundName && !mir_tstrcmp(F.backgroundGroup, backgroundGroup) && !mir_tstrcmp(F.backgroundName, backgroundName)) {
itemData->colour_id = colourId;
res = TRUE;
}
@@ -286,7 +286,7 @@ static bool sttFsuiBindEffectIdToFonts(HWND hwndList, const TCHAR *name, int eff if (itemData && itemData->font_id >= 0) {
FontInternal& F = font_id_list_w2[itemData->font_id];
- if (name && !_tcscmp(F.name, name)) {
+ if (name && !mir_tstrcmp(F.name, name)) {
itemData->effect_id = effectId;
return true;
}
@@ -642,7 +642,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_ADDSTRING, (WPARAM)-1, (LPARAM)itemData);
}
- if (_tcscmp(C.name, _T("Background")) == 0)
+ if (mir_tstrcmp(C.name, _T("Background")) == 0)
hBkgColourBrush = CreateSolidBrush(C.value);
}
}
@@ -1031,7 +1031,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (itemData->colour_id < 0) continue;
colour_id_list_w2[itemData->colour_id].value = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
- if (_tcscmp(colour_id_list_w2[itemData->colour_id].name, _T("Background")) == 0) {
+ if (mir_tstrcmp(colour_id_list_w2[itemData->colour_id].name, _T("Background")) == 0) {
if (hBkgColourBrush) DeleteObject(hBkgColourBrush);
hBkgColourBrush = CreateSolidBrush(colour_id_list_w2[itemData->colour_id].value);
}
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp index 5462b2a5b3..b02a4f7c82 100644 --- a/src/modules/fonts/services.cpp +++ b/src/modules/fonts/services.cpp @@ -347,7 +347,7 @@ static INT_PTR sttRegisterColourWorker(ColourIDW *colour_id, int hLangpack) for (int i = 0; i < colour_id_list.getCount(); i++) {
ColourInternal& C = colour_id_list[i];
- if (!_tcscmp(C.group, colour_id->group) && !_tcscmp(C.name, colour_id->name))
+ if (!mir_tstrcmp(C.group, colour_id->group) && !mir_tstrcmp(C.name, colour_id->name))
return 1;
}
@@ -379,7 +379,7 @@ static INT_PTR sttGetColourWorker(ColourIDW *colour_id) {
for (int i = 0; i < colour_id_list.getCount(); i++) {
ColourInternal& C = colour_id_list[i];
- if (!_tcscmp(C.group, colour_id->group) && !_tcscmp(C.name, colour_id->name))
+ if (!mir_tstrcmp(C.group, colour_id->group) && !mir_tstrcmp(C.name, colour_id->name))
return db_get_dw(NULL, C.dbSettingsGroup, C.setting, C.defcolour);
}
@@ -433,7 +433,7 @@ static INT_PTR sttRegisterEffectWorker(EffectIDW *effect_id, int hLangpack) for (int i = 0; i < effect_id_list.getCount(); i++) {
EffectInternal& E = effect_id_list[i];
- if (!_tcscmp(E.group, effect_id->group) && !_tcscmp(E.name, effect_id->name))
+ if (!mir_tstrcmp(E.group, effect_id->group) && !mir_tstrcmp(E.name, effect_id->name))
return 1;
}
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp index 02f0de025a..62b9a21461 100644 --- a/src/modules/icolib/skin2icons.cpp +++ b/src/modules/icolib/skin2icons.cpp @@ -43,7 +43,7 @@ mir_cs csIconList; static int sttCompareSections(const SectionItem* p1, const SectionItem* p2)
{
- return _tcscmp(p1->name, p2->name);
+ return mir_tstrcmp(p1->name, p2->name);
}
LIST<SectionItem> sectionList(20, sttCompareSections);
diff --git a/src/modules/metacontacts/meta_addto.cpp b/src/modules/metacontacts/meta_addto.cpp index f974b2b3f8..4369b3265c 100644 --- a/src/modules/metacontacts/meta_addto.cpp +++ b/src/modules/metacontacts/meta_addto.cpp @@ -60,7 +60,7 @@ static int FillList(HWND list, BOOL sort) for (pos = 0; pos < i; pos++) {
TCHAR buff[1024];
SendMessage(list, LB_GETTEXT, pos, (LPARAM)buff);
- if (_tcscmp(buff, swzContactDisplayName) > 0)
+ if (mir_tstrcmp(buff, swzContactDisplayName) > 0)
break;
}
}
diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index fa0d33caa3..eef6561c16 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -464,7 +464,7 @@ int Meta_CopyContactNick(DBCachedContact *ccMeta, MCONTACT hContact) }
else if (options.clist_contact_name == CNNT_DISPLAYNAME) {
TCHAR *name = cli.pfnGetContactDisplayName(hContact, 0);
- if (name && _tcscmp(name, TranslateT("(Unknown contact)")) != 0) {
+ if (name && mir_tstrcmp(name, TranslateT("(Unknown contact)")) != 0) {
db_set_ts(ccMeta->contactID, META_PROTO, "Nick", name);
return 0;
}
diff --git a/src/modules/options/filter.h b/src/modules/options/filter.h index 590f74a76f..9317547726 100644 --- a/src/modules/options/filter.h +++ b/src/modules/options/filter.h @@ -45,7 +45,7 @@ class CPageKeywords {
PageHash _pageHashKey;
KeywordList _pageKeyWords;
- static int _KeyWordsSortFunc(const TCHAR* p1, const TCHAR* p2) { return _tcscmp(p1, p2); };
+ static int _KeyWordsSortFunc(const TCHAR* p1, const TCHAR* p2) { return mir_tstrcmp(p1, p2); };
public:
CPageKeywords(PageHash pageHashKey) : _pageHashKey(pageHashKey), _pageKeyWords(1, _KeyWordsSortFunc) {};
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index f56d396fec..c0aa2c7a86 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -530,12 +530,12 @@ static void RebuildPageTree(HWND hdlg, OptionsDlgData *dat) // if filter string is set to all modules then make the filter string empty (this will return all modules)
BOOL bRemoveFocusFromFilter = FALSE;
- if (_tcscmp(dat->szFilterString, TranslateT(ALL_MODULES_FILTER)) == 0) {
+ if (mir_tstrcmp(dat->szFilterString, TranslateT(ALL_MODULES_FILTER)) == 0) {
dat->szFilterString[0] = 0;
bRemoveFocusFromFilter = TRUE;
}
// if filter string is set to core modules replace it with the name of the executable (this will return all core modules)
- else if (_tcscmp(dat->szFilterString, TranslateT(CORE_MODULES_FILTER)) == 0) {
+ else if (mir_tstrcmp(dat->szFilterString, TranslateT(CORE_MODULES_FILTER)) == 0) {
// replace string with process name - that will show core settings
TCHAR szFileName[300];
GetModuleFileName(NULL, szFileName, SIZEOF(szFileName));
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index d6fba2df05..1775aad6ac 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -53,7 +53,7 @@ struct PluginListItemData static int sttSortPlugins(const PluginListItemData *p1, const PluginListItemData *p2)
{
- return _tcscmp(p1->fileName, p2->fileName);
+ return mir_tstrcmp(p1->fileName, p2->fileName);
}
static LIST<PluginListItemData> arPluginList(10, sttSortPlugins);
@@ -299,7 +299,7 @@ static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP static int CALLBACK SortPlugins(WPARAM i1, LPARAM i2, LPARAM)
{
PluginListItemData *p1 = (PluginListItemData*)i1, *p2 = (PluginListItemData*)i2;
- return _tcscmp(p1->fileName, p2->fileName);
+ return mir_tstrcmp(p1->fileName, p2->fileName);
}
static TCHAR *latin2t(const char *p)
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index 54e75810e5..8fb4ed3e98 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -192,7 +192,7 @@ static __forceinline char *GetPathVarX(char *, int code) return makeFileName(szFullPath);
}
-static __forceinline int _xcscmp(const TCHAR *s1, const TCHAR *s2) { return _tcscmp(s1, s2); }
+static __forceinline int _xcscmp(const TCHAR *s1, const TCHAR *s2) { return mir_tstrcmp(s1, s2); }
static __forceinline int _xcsncmp(const TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncmp(s1, s2, n); }
static __forceinline size_t _xcslen(const TCHAR *s1) { return mir_tstrlen(s1); }
static __forceinline TCHAR *_xcscpy(TCHAR *s1, const TCHAR *s2) { return _tcscpy(s1, s2); }
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index 9c7d3804ab..aa993d73cd 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -150,7 +150,7 @@ static HANDLE timeapiGetInfoByName(LPCTSTR tszName, DWORD dwFlags) if (tszName == NULL)
return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? NULL : &myInfo.myTZ;
- if (_tcscmp(myInfo.myTZ.tszName, tszName) == 0)
+ if (mir_tstrcmp(myInfo.myTZ.tszName, tszName) == 0)
return (dwFlags & TZF_DIFONLY) ? NULL : &myInfo.myTZ;
MIM_TIMEZONE tzsearch;
|