diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 |
commit | d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch) | |
tree | a6f925c63bc31e4b4dba301183cc3b429d52d816 /plugins | |
parent | ce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff) |
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
145 files changed, 463 insertions, 463 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index c122e1f410..31daebfb79 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -45,11 +45,11 @@ void InitServices(); static int ComparePicture( const protoPicCacheEntry* p1, const protoPicCacheEntry* p2 )
{
- if ((lstrcmpA(p1->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar"))
+ if ((mir_strcmp(p1->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar"))
return -1;
- if ((lstrcmpA(p2->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar"))
+ if ((mir_strcmp(p2->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar"))
return 1;
- return lstrcmpA( p1->szProtoname, p2->szProtoname );
+ return mir_strcmp( p1->szProtoname, p2->szProtoname );
}
OBJLIST<protoPicCacheEntry>
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 0c2b87803c..6a10d7c842 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -53,7 +53,7 @@ static void RemoveProtoPic(const char *szProto) if (szProto == NULL) return; - if (!lstrcmpA(AVS_DEFAULT, szProto)) { + if (!mir_strcmp(AVS_DEFAULT, szProto)) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry &p = g_ProtoPictures[i]; if (p.szProtoname == NULL) @@ -76,10 +76,10 @@ static void RemoveProtoPic(const char *szProto) if (p.szProtoname == NULL) continue; PROTOACCOUNT *pdescr = ProtoGetAccount(p.szProtoname); - if (pdescr == NULL && lstrcmpA(p.szProtoname, szProto)) + if (pdescr == NULL && mir_strcmp(p.szProtoname, szProto)) continue; - if (!lstrcmpA(p.szProtoname, szProto) || !lstrcmpA(pdescr->szProtoName, szProtoname)) { + if (!mir_strcmp(p.szProtoname, szProto) || !mir_strcmp(pdescr->szProtoName, szProtoname)) { p.clear(); CreateAvatarInCache(0, &p, (char*)p.szProtoname); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); @@ -90,7 +90,7 @@ static void RemoveProtoPic(const char *szProto) for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (!lstrcmpA(p.szProtoname, szProto)) { + if (!mir_strcmp(p.szProtoname, szProto)) { p.clear(); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); } @@ -126,13 +126,13 @@ static void SetProtoPic(char *szProto) PathToRelativeT(FileName, szNewPath, g_szDataPath); db_set_ts(NULL, PPICT_MODULE, szProto, szNewPath); - if (!lstrcmpA(AVS_DEFAULT, szProto)) { + if (!mir_strcmp(AVS_DEFAULT, szProto)) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; if (mir_strlen(p.szProtoname) == 0) continue; - if (p.hbmPic == 0 || !lstrcmpA(p.szProtoname, AVS_DEFAULT)) { + if (p.hbmPic == 0 || !mir_strcmp(p.szProtoname, AVS_DEFAULT)) { CreateAvatarInCache(0, &p, szProto); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); } @@ -144,10 +144,10 @@ static void SetProtoPic(char *szProto) mir_strcpy(szProtoname, strrchr(szProtoname, ' ') + 1); for (int i = 0; i < g_ProtoPictures.getCount(); i++) { PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)g_ProtoPictures[i].szProtoname); - if (pdescr == NULL && lstrcmpA(g_ProtoPictures[i].szProtoname, szProto)) + if (pdescr == NULL && mir_strcmp(g_ProtoPictures[i].szProtoname, szProto)) continue; - if (!lstrcmpA(g_ProtoPictures[i].szProtoname, szProto) || !lstrcmpA(pdescr->szProtoName, szProtoname)) { + if (!mir_strcmp(g_ProtoPictures[i].szProtoname, szProto) || !mir_strcmp(pdescr->szProtoName, szProtoname)) { protoPicCacheEntry& p = g_ProtoPictures[i]; if (mir_strlen(p.szProtoname) != 0) { if (p.hbmPic == 0) { diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 7334939f40..fe15a2b332 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -750,7 +750,7 @@ INT_PTR DrawAvatarPicture(WPARAM wParam, LPARAM lParam) for (int i = 0; i < g_ProtoPictures.getCount(); i++) {
protoPicCacheEntry& p = g_ProtoPictures[i];
- if (!lstrcmpA(p.szProtoname, r->szProto) && mir_strlen(r->szProto) == mir_strlen(p.szProtoname) && p.hbmPic != 0) {
+ if (!mir_strcmp(p.szProtoname, r->szProto) && mir_strlen(r->szProto) == mir_strlen(p.szProtoname) && p.hbmPic != 0) {
ace = (AVATARCACHEENTRY *)&g_ProtoPictures[i];
break;
}
@@ -792,7 +792,7 @@ INT_PTR GetMyAvatar(WPARAM wParam, LPARAM lParam) return 0;
for (int i = 0; i < g_MyAvatars.getCount(); i++)
- if (!lstrcmpA(szProto, g_MyAvatars[i].szProtoname) && g_MyAvatars[i].hbmPic != 0)
+ if (!mir_strcmp(szProto, g_MyAvatars[i].szProtoname) && g_MyAvatars[i].hbmPic != 0)
return (INT_PTR)&g_MyAvatars[i];
return 0;
@@ -810,7 +810,7 @@ static void ReloadMyAvatar(LPVOID lpParam) if (szProto[0] == 0) {
// Notify to all possibles
- if (lstrcmpA(myAvatarProto, szProto)) {
+ if (mir_strcmp(myAvatarProto, szProto)) {
if (!ProtoServiceExists(myAvatarProto, PS_SETMYAVATAR))
continue;
if (!Proto_IsAvatarsEnabled(myAvatarProto))
@@ -818,7 +818,7 @@ static void ReloadMyAvatar(LPVOID lpParam) }
}
- else if (lstrcmpA(myAvatarProto, szProto))
+ else if (mir_strcmp(myAvatarProto, szProto))
continue;
if (g_MyAvatars[i].hbmPic)
@@ -843,7 +843,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam) if (g_MyAvatars[i].dwFlags & AVS_IGNORENOTIFY)
continue;
- if (!lstrcmpA(g_MyAvatars[i].szProtoname, proto)) {
+ if (!mir_strcmp(g_MyAvatars[i].szProtoname, proto)) {
LPVOID lpParam = (void *)malloc(mir_strlen(g_MyAvatars[i].szProtoname) + 2);
strcpy((char *)lpParam, g_MyAvatars[i].szProtoname);
mir_forkthread(ReloadMyAvatar, lpParam);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index fdc16d4338..bceae41a3e 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -98,7 +98,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) if (hContact == 0) { // create a protocol picture in the proto picture cache
if (tszValue = db_get_tsa(NULL, PPICT_MODULE, szProto))
MyPathToAbsolute(tszValue, tszFilename);
- else if (lstrcmpA(szProto, AVS_DEFAULT)) {
+ else if (mir_strcmp(szProto, AVS_DEFAULT)) {
if (tszValue = db_get_tsa(NULL, PPICT_MODULE, AVS_DEFAULT))
MyPathToAbsolute(tszValue, tszFilename);
@@ -388,7 +388,7 @@ protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact) if (szProto) {
for (int i = 0; i < g_ProtoPictures.getCount(); i++) {
protoPicCacheEntry& p = g_ProtoPictures[i];
- if (!lstrcmpA(p.szProtoname, szProto) && p.hbmPic != NULL)
+ if (!mir_strcmp(p.szProtoname, szProto) && p.hbmPic != NULL)
return &g_ProtoPictures[i];
}
}
@@ -448,7 +448,7 @@ void DeleteGlobalUserAvatar() void SetIgnoreNotify(char *protocol, BOOL ignore)
{
for (int i = 0; i < g_MyAvatars.getCount(); i++) {
- if (protocol == NULL || !lstrcmpA(g_MyAvatars[i].szProtoname, protocol)) {
+ if (protocol == NULL || !mir_strcmp(g_MyAvatars[i].szProtoname, protocol)) {
if (ignore)
g_MyAvatars[i].dwFlags |= AVS_IGNORENOTIFY;
else
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 7d12f4686f..9380ebfd69 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -147,7 +147,7 @@ void CleanupMimeTypeAddedSettings(void) for(i = 0;i<nSettingsCount;++i) {
pszSuffix = &ppszSettings[i][5];
for(j = 0;j<nAssocListCount;++j)
- if (!lstrcmpA(pszSuffix, pAssocList[j].pszMimeType))
+ if (!mir_strcmp(pszSuffix, pAssocList[j].pszMimeType))
break; /* mime type in current list */
if(j == nAssocListCount) { /* mime type not in current list */
if (!db_get(NULL, "AssocMgr", ppszSettings[i], &dbv)) {
@@ -199,7 +199,7 @@ static int FindAssocItem(const char *pszClassName) {
int i;
for(i = 0;i<nAssocListCount;++i)
- if (!lstrcmpA(pszClassName, pAssocList[i].pszClassName))
+ if (!mir_strcmp(pszClassName, pAssocList[i].pszClassName))
return i;
return -1;
}
diff --git a/plugins/AssocMgr/src/dde.cpp b/plugins/AssocMgr/src/dde.cpp index 641e193359..e66cfe8892 100644 --- a/plugins/AssocMgr/src/dde.cpp +++ b/plugins/AssocMgr/src/dde.cpp @@ -120,9 +120,9 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM if(pszArg!=NULL) {
/* we are inside miranda here, we make it async so the shell does
* not timeout regardless what the plugins try to do. */
- if (!lstrcmpi(pszAction,_T("file")))
+ if (!mir_tstrcmpi(pszAction,_T("file")))
CallFunctionAsync(FileActionAsync,pszArg);
- else if (!lstrcmpi(pszAction,_T("url")))
+ else if (!mir_tstrcmpi(pszAction,_T("url")))
CallFunctionAsync(UrlActionAsync,pszArg);
}
GlobalUnlock(hCommand);
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp index ded3aca55b..865349301c 100644 --- a/plugins/AssocMgr/src/reg.cpp +++ b/plugins/AssocMgr/src/reg.cpp @@ -178,7 +178,7 @@ static BOOL IsValidRunCommand(const TCHAR *pszRunCmd) }
if (SearchPath(NULL,pexe,_T(".exe"),SIZEOF(szFullExe),szFullExe,&pszFilePart)) {
if (pszFilePart!=NULL)
- if (!lstrcmpi(pszFilePart,_T("rundll32.exe")) || !lstrcmpi(pszFilePart,_T("rundll.exe"))) {
+ if (!mir_tstrcmpi(pszFilePart,_T("rundll32.exe")) || !mir_tstrcmpi(pszFilePart,_T("rundll.exe"))) {
/* split into dll path and arguments */
if (pargs[0]==_T('\"')) {
++pargs;
@@ -306,7 +306,7 @@ static BOOL IsRegStrValue(HKEY hKey,const TCHAR *pszValName,const TCHAR *pszCmpV BOOL fSame=FALSE;
TCHAR *pszVal=GetRegStrValue(hKey,pszValName);
if (pszVal!=NULL) {
- fSame=!lstrcmp(pszVal,pszCmpVal);
+ fSame=!mir_tstrcmp(pszVal,pszCmpVal);
mir_free(pszVal);
}
return fSame;
@@ -321,7 +321,7 @@ static BOOL IsRegStrValueA(HKEY hKey,const TCHAR *pszValName,const char *pszCmpV if (pszVal!=NULL) {
pszValA=t2a(pszVal);
if (pszValA!=NULL)
- fSame=!lstrcmpA(pszValA,pszCmpVal);
+ fSame=!mir_strcmp(pszValA,pszCmpVal);
mir_free(pszValA); /* does NULL check */
mir_free(pszVal);
}
@@ -546,7 +546,7 @@ void CleanupRegTreeBackupSettings(void) for(int j=i+1; j < nSettingsCount; ++j) {
pszBuf = strchr(&ppszSettings[j][4],'\\');
if (pszBuf != NULL) *pszBuf='\0';
- if (lstrcmpA(pszClassName, &ppszSettings[j][4])){
+ if (mir_strcmp(pszClassName, &ppszSettings[j][4])){
if (pszBuf != NULL) *pszBuf='\\';
continue;
}
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp index 41cb0548de..29a9f5d8d0 100644 --- a/plugins/AssocMgr/src/test.cpp +++ b/plugins/AssocMgr/src/test.cpp @@ -338,9 +338,9 @@ static int IcqOpenFile(WPARAM wParam,LPARAM lParam) if(IsEmpty(line)) continue;
if(line[0]=='[') {
ZeroMemory(&info,sizeof(info));
- if (!lstrcmpiA(line,"[ICQ Message User]"))
+ if (!mir_strcmpi(line,"[ICQ Message User]"))
info.type=ICQFILE_MESSAGEUSER;
- else if (!lstrcmpiA(line,"[ICQ User]"))
+ else if (!mir_strcmpi(line,"[ICQ User]"))
info.type=ICQFILE_ADDUSER;
continue;
}
@@ -348,11 +348,11 @@ static int IcqOpenFile(WPARAM wParam,LPARAM lParam) sep=strchr(line,'=');
if(sep==NULL) { info.type=0; break; } /* format error */
*(sep++)='\0';
- if (!lstrcmpA("UIN",line)) mir_strncpy(info.uin,sep,sizeof(info.uin)); /* buffer safe */
- else if (!lstrcmpA("Email",line)) mir_strncpy(info.email,sep,sizeof(info.email)); /* buffer safe */
- else if (!lstrcmpA("NickName",line)) mir_strncpy(info.nick,sep,sizeof(info.nick)); /* buffer safe */
- else if (!lstrcmpA("FirstName",line)) mir_strncpy(info.firstName,sep,sizeof(info.firstName)); /* buffer safe */
- else if (!lstrcmpA("LastName",line)) mir_strncpy(info.lastName,sep,sizeof(info.lastName)); /* buffer safe */
+ if (!mir_strcmp("UIN",line)) mir_strncpy(info.uin,sep,sizeof(info.uin)); /* buffer safe */
+ else if (!mir_strcmp("Email",line)) mir_strncpy(info.email,sep,sizeof(info.email)); /* buffer safe */
+ else if (!mir_strcmp("NickName",line)) mir_strncpy(info.nick,sep,sizeof(info.nick)); /* buffer safe */
+ else if (!mir_strcmp("FirstName",line)) mir_strncpy(info.firstName,sep,sizeof(info.firstName)); /* buffer safe */
+ else if (!mir_strcmp("LastName",line)) mir_strncpy(info.lastName,sep,sizeof(info.lastName)); /* buffer safe */
}
fclose(fp);
switch(info.type) {
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index b6b88d0579..9e351b5058 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -113,8 +113,8 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam) char *proto = GetContactProto((MCONTACT)hContact);
if (!proto) return 0;
- if (!lstrcmpA(cws->szModule, proto))
- if (!lstrcmpA(cws->szSetting, "Auth") || !lstrcmpA(cws->szSetting, "Grant") || !lstrcmpA(cws->szSetting, "ServerId") || !lstrcmpA(cws->szSetting, "ContactType"))
+ if (!mir_strcmp(cws->szModule, proto))
+ if (!mir_strcmp(cws->szSetting, "Auth") || !mir_strcmp(cws->szSetting, "Grant") || !mir_strcmp(cws->szSetting, "ServerId") || !mir_strcmp(cws->szSetting, "ContactType"))
onExtraImageApplying(hContact, 1);
return 0;
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index eeddd928e3..e3b4da8e32 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -70,7 +70,7 @@ static BOOL CmpCurrentAndRegistry() return FALSE;
GetProfilePath(result, SIZEOF(result));
- return lstrcmpi(result, dbpath) == 0;
+ return mir_tstrcmpi(result, dbpath) == 0;
}
static INT_PTR CALLBACK DlgProcAutorunOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index 5009f0b998..481e2ad2cc 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -130,7 +130,7 @@ static void WinNT_PollThread(void *vparam) pPerfInstance=(PERF_INSTANCE_DEFINITION*)((BYTE*)pPerfObj+pPerfObj->DefinitionLength);
for(lCount=0;lCount<(pPerfObj->NumInstances);++lCount) {
pPerfCounterBlock=(PERF_COUNTER_BLOCK*)((BYTE*)pPerfInstance+pPerfInstance->ByteLength);
- if (!lstrcmpiW(pwszInstanceName,(WCHAR*)((BYTE*)pPerfInstance+pPerfInstance->NameOffset))) {
+ if (!mir_wstrcmpi(pwszInstanceName,(WCHAR*)((BYTE*)pPerfInstance+pPerfInstance->NameOffset))) {
liCurrentCounterValue=*(LARGE_INTEGER*)((BYTE*)pPerfCounterBlock+pPerfCounter->CounterOffset);
fFound=TRUE;
break;
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index e95b97f145..41f52be000 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -200,9 +200,9 @@ static int StatusSettingChanged(WPARAM wParam,LPARAM lParam) {
if (currentWatcherType&SDWTF_STATUS) {
DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
- if ((HANDLE)wParam != NULL && dbcws->value.wVal==ID_STATUS_OFFLINE && !lstrcmpA(dbcws->szSetting,"Status")) {
+ if ((HANDLE)wParam != NULL && dbcws->value.wVal==ID_STATUS_OFFLINE && !mir_strcmp(dbcws->szSetting,"Status")) {
char *pszProto = GetContactProto(wParam);
- if (pszProto != NULL && !lstrcmpA(dbcws->szModule,pszProto))
+ if (pszProto != NULL && !mir_strcmp(dbcws->szModule,pszProto))
if (CheckAllContactsOffline())
ShutdownAndStopWatcher();
}
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 2c18e2edea..69b5efb990 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -219,11 +219,11 @@ TCHAR * GetCachedAvatar(char *proto, TCHAR *hash) {
size_t len = mir_tstrlen(finddata.cFileName);
if (len > 4
- && (!lstrcmpi(&finddata.cFileName[len-4], _T(".png"))
- || !lstrcmpi(&finddata.cFileName[len-4], _T(".bmp"))
- || !lstrcmpi(&finddata.cFileName[len-4], _T(".gif"))
- || !lstrcmpi(&finddata.cFileName[len-4], _T(".jpg"))
- || !lstrcmpi(&finddata.cFileName[len-5], _T(".jpeg"))))
+ && (!mir_tstrcmpi(&finddata.cFileName[len-4], _T(".png"))
+ || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".bmp"))
+ || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".gif"))
+ || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".jpg"))
+ || !mir_tstrcmpi(&finddata.cFileName[len-5], _T(".jpeg"))))
{
mir_sntprintf(file, SIZEOF(file), _T("%s\\%s"), file, finddata.cFileName);
ret = mir_tstrdup(file);
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 6d94afb260..351a48b868 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -180,7 +180,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv);
for (int i = 1; BASS_GetDeviceInfo(i + newBass, &info); i++) {
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, (LPARAM)(TCHAR*)_A2T(info.name));
- if ( !lstrcmp(dbv.ptszVal, _A2T(info.name)))
+ if ( !mir_tstrcmp(dbv.ptszVal, _A2T(info.name)))
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, i, 0);
}
db_free(&dbv);
@@ -494,7 +494,7 @@ void LoadBassLibrary(TCHAR CurrBassPath[MAX_PATH]) if ( !db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv))
for (int i = 1; BASS_GetDeviceInfo(i, &info); i++)
- if ( !lstrcmp(dbv.ptszVal, _A2T(info.name)))
+ if ( !mir_tstrcmp(dbv.ptszVal, _A2T(info.name)))
device = i;
db_free(&dbv);
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index c2ca03957e..309713140c 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -127,7 +127,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
break;
}
- else if (lstrcmpA(password, g_password))
+ else if (mir_strcmp(password, g_password))
{
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Password is not correct!\nPlease, enter correct password."));
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
@@ -179,12 +179,12 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM) TCHAR szTemp[32];
GetClassName(hWnd,szTemp,32);
- if (lstrcmp(szTemp,_T("MirandaThumbsWnd")) == 0) // hide floating contacts
+ if (mir_tstrcmp(szTemp,_T("MirandaThumbsWnd")) == 0) // hide floating contacts
{
CallService("FloatingContacts/MainHideAllThumbs",0,0);
g_bOldSetting |= OLD_FLTCONT;
}
- else if (lstrcmp(szTemp,_T("PopupWnd2")) == 0 || lstrcmp(szTemp,_T("YAPPWinClass")) == 0) // destroy opened popups
+ else if (mir_tstrcmp(szTemp,_T("PopupWnd2")) == 0 || mir_tstrcmp(szTemp,_T("YAPPWinClass")) == 0) // destroy opened popups
PUDeletePopup(hWnd);
else
{
@@ -410,7 +410,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) TCHAR szTemp[32];
GetClassName(pCurWnd->hWnd,szTemp,32);
- if (IsWindow(pCurWnd->hWnd) && lstrcmp(szTemp,_T("SysShadow")) != 0) // precaution
+ if (IsWindow(pCurWnd->hWnd) && mir_tstrcmp(szTemp,_T("SysShadow")) != 0) // precaution
ShowWindow(pCurWnd->hWnd, SW_SHOW);
delete pCurWnd; // bye-bye
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 7926bf6af7..beb71a82d5 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -72,7 +72,7 @@ static int OnDbChanged(WPARAM hContact, LPARAM lparam) // if user changes his UIN or JID on any account if (hContact == NULL) { INT_PTR szUniqueID = CallProtoService(cws->szModule, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); - if (szUniqueID != CALLSERVICE_NOTFOUND && !lstrcmpA(cws->szSetting, (char*)szUniqueID)) + if (szUniqueID != CALLSERVICE_NOTFOUND && !mir_strcmp(cws->szSetting, (char*)szUniqueID)) pcli->pfnReloadProtoMenus(); } return 0; @@ -582,7 +582,7 @@ void CSAMWindow::checkItemValidity() if ( CallProtoService(pdescr->szModuleName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) == 0) mir_tstrncpy(m_item->m_tszTitle, TranslateTS(tszTitle), SIZEOF(m_item->m_tszTitle)); - if ( lstrcmp(m_item->m_tszMessage, tszInputMessage)) + if ( mir_tstrcmp(m_item->m_tszMessage, tszInputMessage)) mir_tstrcpy( m_item->m_tszMessage, tszInputMessage), m_bChanged = true; } @@ -719,10 +719,10 @@ int CSItemsList::compareItems( const StatusItem* p1, const StatusItem* p2 ) else if ( p1->m_iIcon < p2->m_iIcon ) icoRes = -1; - result = lstrcmp(p1->m_tszTitle, p2->m_tszTitle); + result = mir_tstrcmp(p1->m_tszTitle, p2->m_tszTitle); ttlRes = result; - result = lstrcmp(p1->m_tszMessage, p2->m_tszMessage); + result = mir_tstrcmp(p1->m_tszMessage, p2->m_tszMessage); msgRes = result; if ( !icoRes && !ttlRes && !msgRes) diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 9d6457a735..46111ef053 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -182,7 +182,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd) int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (lstrcmpA(cws->szSetting, DB_MIRVER))
+ if (mir_strcmp(cws->szSetting, DB_MIRVER))
return 0;
SHOWPOPUP_DATA sd = {0};
diff --git a/plugins/ClientChangeNotify/src/CommonLibs/CString.h b/plugins/ClientChangeNotify/src/CommonLibs/CString.h index 161977cf28..b2a1c4accf 100644 --- a/plugins/ClientChangeNotify/src/CommonLibs/CString.h +++ b/plugins/ClientChangeNotify/src/CommonLibs/CString.h @@ -31,8 +31,8 @@ __inline int My_lstrlen(LPCSTR lpString) {return mir_strlen(lpString);}
__inline int My_lstrlen(LPCWSTR lpString) {return mir_wstrlen(lpString);}
-__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return lstrcmpA(lpString1, lpString2);}
-__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return lstrcmpW(lpString1, lpString2);}
+__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return mir_strcmp(lpString1, lpString2);}
+__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return mir_wstrcmp(lpString1, lpString2);}
__inline LPCSTR My_strstr(LPCSTR lpString1, LPCSTR lpString2) {return strstr(lpString1, lpString2);}
__inline LPWSTR My_strstr(LPCWSTR lpString1, LPCWSTR lpString2) {return (LPWSTR)wcsstr(lpString1, lpString2);}
__inline LPSTR My_lstrcpy(LPSTR lpString1, LPCSTR lpString2) {return mir_strcpy(lpString1, lpString2);}
diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index e4a6a1408d..5dc248081c 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -131,7 +131,7 @@ static int GetRealStatus(struct ClcContact *contact, int status) if (!szProto)
return status;
for (int i = 0; i < pcli->hClcProtoCount; i++) {
- if (!lstrcmpA(pcli->clcProto[i].szProto, szProto)) {
+ if (!mir_strcmp(pcli->clcProto[i].szProto, szProto)) {
return pcli->clcProto[i].dwStatus;
}
}
diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp index aa50de4fe8..350f33568b 100644 --- a/plugins/Clist_blind/src/clistopts.cpp +++ b/plugins/Clist_blind/src/clistopts.cpp @@ -31,7 +31,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MCONTACT hContact = (MCONTACT) wParam;
DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL
- && lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) {
+ && mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) {
CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0);
}
break;
@@ -125,7 +125,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CallProtoService(accs[i]->szModuleName, PS_GETNAME, SIZEOF(szName), (LPARAM) szName);
item = SendDlgItemMessageA(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM) szName);
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM) accs[i]);
- if (dbv.type == DBVT_ASCIIZ && !lstrcmpA(dbv.pszVal, accs[i]->szModuleName))
+ if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName))
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0);
}
db_free(&dbv);
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index c2e6c53512..dd5a2c6cbe 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -425,7 +425,7 @@ static int GetRealStatus(struct ClcContact *contact, int status) if (!szProto)
return status;
for (i = 0; i < pcli->hClcProtoCount; i++) {
- if (!lstrcmpA(pcli->clcProto[i].szProto, szProto)) {
+ if (!mir_strcmp(pcli->clcProto[i].szProto, szProto)) {
return pcli->clcProto[i].dwStatus;
}
}
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 3821131aa1..eae9c3044f 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -734,7 +734,7 @@ static int LocateStorePosition(int Frameid,int maxstored) if ( db_get_ts( NULL, CLUIFrameModule, settingname, &dbv ))
continue;
- if ( lstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) {
+ if ( mir_tstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) {
db_free( &dbv );
return i;
}
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index e579ffe7dd..c234b7d400 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -322,7 +322,7 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const TCHAR found = _tcsstr(lowered_szText, lowered_search) != NULL; } else { - found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, group->cl.items[group->scanIndex]->szText, testlen)) || (!prefixOk && !lstrcmpi(text, group->cl.items[group->scanIndex]->szText))); + found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, group->cl.items[group->scanIndex]->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, group->cl.items[group->scanIndex]->szText))); } if (found) { ClcGroup *contactGroup = group; @@ -1732,7 +1732,7 @@ int ClcDoProtoAck(MCONTACT wParam, ACKDATA * ack) if (ack->type == ACKTYPE_STATUS) { if (ack->result == ACKRESULT_SUCCESS) { for (int i = 0; i < pcli->hClcProtoCount; i++) { - if (!lstrcmpA(pcli->clcProto[i].szProto, ack->szModule)) { + if (!mir_strcmp(pcli->clcProto[i].szProto, ack->szModule)) { pcli->clcProto[i].dwStatus = (WORD)ack->lParam; if (pcli->clcProto[i].dwStatus >= ID_STATUS_OFFLINE) pcli->pfnTrayIconUpdateBase(pcli->clcProto[i].szProto); diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 96eb839186..3823497854 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -105,7 +105,7 @@ ClcGroup* cli_AddGroup(HWND hwnd, ClcData *dat, const TCHAR *szName, DWORD flags { ClearRowByIndexCache(); if (!dat->force_in_dialog && !(GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN)) - if (!lstrcmp(_T("-@-HIDDEN-GROUP-@-"), szName)) { //group is hidden + if (!mir_tstrcmp(_T("-@-HIDDEN-GROUP-@-"), szName)) { //group is hidden ClearRowByIndexCache(); return NULL; } diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 42d4cfe939..441afca9d5 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -369,7 +369,7 @@ int CLCPaint::_GetRealStatus( ClcContact *pContact, int nStatus ) for ( int i=0; i < pcli->hClcProtoCount; i++ )
{
- if (!lstrcmpA( pcli->clcProto[i].szProto, pContact->proto ))
+ if (!mir_strcmp( pcli->clcProto[i].szProto, pContact->proto ))
return pcli->clcProto[i].dwStatus;
}
return nStatus;
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index f23dc89266..865edfe98d 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -745,7 +745,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
found = _tcsstr(lowered_szText, lowered_text) != NULL;
}
- else found = (prefixOk && !_tcsnicmp(text, contact->szText, testlen)) || (!prefixOk && !lstrcmpi(text, contact->szText));
+ else found = (prefixOk && !_tcsnicmp(text, contact->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, contact->szText));
if (found) {
ClcGroup *contactGroup = group;
@@ -775,7 +775,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
found = _tcsstr(lowered_szText, lowered_text) != NULL;
}
- else found = (prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) || (!prefixOk && !lstrcmpi(text, subcontact->szText));
+ else found = (prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, subcontact->szText));
if (found) {
ClcGroup *contactGroup = group;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 7b9b62d0bf..0960825202 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -305,7 +305,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) if (hAuxOld == hAux) {
TCHAR buf[255];
GetClassName(hAux, buf, SIZEOF(buf));
- if (!lstrcmp(buf, CLUIFrameSubContainerClassName)) {
+ if (!mir_tstrcmp(buf, CLUIFrameSubContainerClassName)) {
hWndFound = TRUE;
break;
}
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index c9491636b9..b881e2b57c 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -349,7 +349,7 @@ LBL_Unknown: }
tszName = pcli->pfnGetContactDisplayName(hContact, GCDNF_NOCACHE);
- if (!lstrcmp(tszName, UnknownConctactTranslatedName)) {
+ if (!mir_tstrcmp(tszName, UnknownConctactTranslatedName)) {
mir_free(tszName);
goto LBL_Unknown;
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index dc5f07d995..bb64d2635b 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -199,7 +199,7 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam) HWND hwndClist = GetFocus();
TCHAR cls[128];
GetClassName(hwndClist, cls, SIZEOF(cls));
- if (lstrcmp(_T(CLISTCONTROL_CLASS), cls))
+ if (mir_tstrcmp(_T(CLISTCONTROL_CLASS), cls))
hwndClist = pcli->hwndContactList;
MCONTACT hItem = (MCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 7f5728783f..39108c1c96 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -3685,7 +3685,7 @@ static TCHAR *ske_ReAppend(TCHAR *lfirst, TCHAR * lsecond, int len) TCHAR* ske_ReplaceVar(TCHAR *var) { if (!var) return mir_tstrdup(_T("")); - if (!lstrcmpi(var,_T("Profile"))) { + if (!mir_tstrcmpi(var,_T("Profile"))) { char buf[MAX_PATH] = {0}; CallService(MS_DB_GETPROFILENAME,(WPARAM)MAX_PATH,(LPARAM)buf); diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index af499ceab3..bc80f1ea3c 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -480,7 +480,7 @@ int LocateStorePosition(int Frameid, int maxstored) mir_snprintf(settingname, sizeof(settingname), "Name%d", i); ptrT frmname(db_get_tsa(0, CLUIFrameModule, settingname)); if (frmname == NULL) continue; - if (lstrcmpi(frmname, Frames[Frameid].name) == 0) + if (mir_tstrcmpi(frmname, Frames[Frameid].name) == 0) return i; } return -1; @@ -1149,7 +1149,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam, LPARAM lParam) { mir_cslock lck(csFrameHook); pos = id2pos((INT_PTR)wParam); - if (pos >= 0 && !lstrcmp(Frames[pos].name, _T("My contacts"))) + if (pos >= 0 && !mir_tstrcmp(Frames[pos].name, _T("My contacts"))) Frames[pos].visible = 1; else { if (pos >= 0 && (int)pos < nFramescount) diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index ab0134290a..304629c432 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -165,7 +165,7 @@ static int __fastcall GetRealStatus(ClcContact *contact, int status) return status;
for (int i = 0; i < pcli->hClcProtoCount; i++)
- if ( !lstrcmpA(pcli->clcProto[i].szProto, szProto))
+ if ( !mir_strcmp(pcli->clcProto[i].szProto, szProto))
return pcli->clcProto[i].dwStatus;
return status;
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 7448b83792..25334d1839 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -41,7 +41,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP {
MCONTACT hContact = wParam;
DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *)lParam;
- if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg))
+ if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg))
CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0);
}
break;
@@ -113,7 +113,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM)accs[i]);
- if (dbv.type == DBVT_ASCIIZ && !lstrcmpA(dbv.pszVal, accs[i]->szModuleName))
+ if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName))
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0);
}
}
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index 99ff33c595..7cc55f8eaa 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -143,7 +143,7 @@ static MCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *w wndData->rhSearch = (HANDLE)CallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
replaceStrT(wndData->haUin, caUIN);
for (int j = 0; j < wndData->cbReceived; j++)
- if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
+ if (!mir_tstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
return (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
return NULL;
}
@@ -315,7 +315,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara // found checked contact item, add it
TCHAR *caUIN = ListView_GetItemTextEx(hLV, i, 0);
for (int j = 0; j < wndData->cbReceived; j++) // determine item index in packet
- if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) {
+ if (!mir_tstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) {
char *szProto =GetContactProto(wndData->mhContact);
hContact = (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent);
if (hContact && caGroup) {
@@ -434,7 +434,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara fi.psz = wndData->haUin;
int iLPos = ListView_FindItem(hLV, -1, &fi);
if (iLPos == -1) iLPos = 0;
- if (lstrcmp(psr->nick, _T("")) && psr->nick)
+ if (mir_tstrcmp(psr->nick, _T("")) && psr->nick)
ListView_SetItemText(hLV, iLPos, 1, psr->nick);
ListView_SetItemText(hLV, iLPos, 2, psr->firstName);
ListView_SetItemText(hLV, iLPos, 3, psr->lastName);
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index a414d0a6b8..a5cc8e6076 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -126,7 +126,7 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart) TCHAR oldTitle[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_NAME, oldTitle, SIZEOF(oldTitle));
- if (lstrcmp(uid ? uid : contactName, oldTitle))
+ if (mir_tstrcmp(uid ? uid : contactName, oldTitle))
SetDlgItemText(hwndDlg, IDC_NAME, uid ? uid : contactName);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 0e42d64b7e..9e9d0dd307 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -165,7 +165,7 @@ static int ExtraImgSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
if (hContact) {
/* user details update */
- if (!lstrcmpA(dbcws->szSetting,"RealIP") || !lstrcmpA(dbcws->szSetting,"Country") || !lstrcmpA(dbcws->szSetting,"CompanyCountry")) {
+ if (!mir_strcmp(dbcws->szSetting,"RealIP") || !mir_strcmp(dbcws->szSetting,"Country") || !mir_strcmp(dbcws->szSetting,"CompanyCountry")) {
/* Extra Image */
SetExtraImage(hContact);
/* Status Icon */
diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp index b47ab8ded7..811c66f759 100644 --- a/plugins/CountryFlags/src/ip2country.cpp +++ b/plugins/CountryFlags/src/ip2country.cpp @@ -207,34 +207,34 @@ static int EnumIpDataLines(const char *pszFileCSV,const char *pszFileOut) buf=strchr(pszCountry,'"');
*buf=pszTwo[2]='\0';
/* corrections */
- if (!lstrcmpi(pszCountry,"ANTARCTICA")) continue;
- if (!lstrcmpi(pszCountry,"TIMOR-LESTE")) continue;
- if (!lstrcmpi(pszCountry,"PALESTINIAN TERRITORY, OCCUPIED"))
+ if (!mir_tstrcmpi(pszCountry,"ANTARCTICA")) continue;
+ if (!mir_tstrcmpi(pszCountry,"TIMOR-LESTE")) continue;
+ if (!mir_tstrcmpi(pszCountry,"PALESTINIAN TERRITORY, OCCUPIED"))
mir_tstrcpy(pszCountry,"ISRAEL");
- else if (!lstrcmpi(pszCountry,"UNITED STATES MINOR OUTLYING ISLANDS"))
+ else if (!mir_tstrcmpi(pszCountry,"UNITED STATES MINOR OUTLYING ISLANDS"))
mir_tstrcpy(pszCountry,"UNITED STATES");
- else if (!lstrcmpi(pszCountry,"SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS"))
+ else if (!mir_tstrcmpi(pszCountry,"SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS"))
mir_tstrcpy(pszCountry,"UNITED KINGDOM");
- else if (!lstrcmpi(pszTwo,"JE")) /* map error */
+ else if (!mir_tstrcmpi(pszTwo,"JE")) /* map error */
mir_tstrcpy(pszCountry,"UNITED KINGDOM");
- else if (!lstrcmpi(pszTwo,"AX")) /* Åland Island belongs to Finland */
+ else if (!mir_tstrcmpi(pszTwo,"AX")) /* Åland Island belongs to Finland */
mir_tstrcpy(pszCountry,"FINLAND");
- else if (!lstrcmpi(pszTwo,"ME"))
+ else if (!mir_tstrcmpi(pszTwo,"ME"))
mir_tstrcpy(pszCountry,"MONTENEGRO");
- else if (!lstrcmpi(pszTwo,"RS") || !lstrcmpi(pszTwo,"CS"))
+ else if (!mir_tstrcmpi(pszTwo,"RS") || !mir_tstrcmpi(pszTwo,"CS"))
mir_tstrcpy(pszCountry,"SERBIA");
/* convert */
for(i=0;i<nCountriesCount;i++) {
/* map different writings */
for(j=0;j<SIZEOF(differentCountryNames);j++)
- if (!lstrcmpi(countries[i].szName,differentCountryNames[j].szMir)) {
+ if (!mir_tstrcmpi(countries[i].szName,differentCountryNames[j].szMir)) {
buf=(char*)differentCountryNames[j].szCSV;
break;
}
if (j == SIZEOF(differentCountryNames))
buf=(char*)countries[i].szName;
/* check country */
- if (!lstrcmpiA(pszCountry,buf)) {
+ if (!mir_strcmpi(pszCountry,buf)) {
dwOut=(DWORD)atoi(pszFrom);
AppendToByteBuffer(&buffer,(void*)&dwOut,sizeof(DWORD));
dwOut=(DWORD)atoi(pszTo);
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index 09268d48e4..5a0e49ba90 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -208,7 +208,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM GetProfileDirectory(szMirandaPath, szProfileDir, SIZEOF(szProfileDir));
// search in profile dir (using ini file)
- if (lstrcmpi(szProfileDir, szMirandaProfiles))
+ if (mir_tstrcmpi(szProfileDir, szMirandaProfiles))
FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
@@ -218,7 +218,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM // search in profile dir (using registry path + ini file)
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (PBYTE)szMirandaPath, &cbData) == ERROR_SUCCESS) {
- if (lstrcmp(szProfileDir, szMirandaPath)) {
+ if (mir_tstrcmp(szProfileDir, szMirandaPath)) {
GetProfileDirectory(szMirandaPath, szProfileDir, SIZEOF(szProfileDir));
FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
}
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 3141423c99..d0644db814 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -444,7 +444,7 @@ void importSettings(MCONTACT hContact, char *importstring ) // get the type
type = *(end+1);
- if (lstrcmp(module, "CList") == 0 && lstrcmp(setting, "Group") == 0)
+ if (mir_tstrcmp(module, "CList") == 0 && mir_tstrcmp(setting, "Group") == 0)
{
WCHAR* GroupName = mir_a2u(end+2);
if (!GroupName)
@@ -649,7 +649,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath) HANDLE hFile, hMap;
PBYTE pFile = NULL;
DWORD offset = 0;
- if (lstrcmp(FilePath, "") == 0)
+ if (mir_tstrcmp(FilePath, "") == 0)
offset = Openfile2Import(szFileNames);
else
{
@@ -659,7 +659,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath) mir_tstrcpy(szFileNames, "");
}
- if (!lstrcmp(szFileNames, "") == 0)
+ if (!mir_tstrcmp(szFileNames, "") == 0)
{
if ((DWORD)mir_strlen(szFileNames) < offset)
{
@@ -698,7 +698,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath) break;
}
- if (lstrcmp(FilePath, "") == 0)
+ if (mir_tstrcmp(FilePath, "") == 0)
refreshTree(1);
}
}
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index ee91870904..b3b5586ade 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -1005,7 +1005,7 @@ void SettingsListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam) // hwnd her ///////////////////////// convert to submenu
case MENU_VIEWDECRYPT:
if (!db_get(hContact, module, setting, &dbv) && dbv.type == DBVT_ASCIIZ) {
- if (lstrcmpA(setting, "LoginPassword"))
+ if (mir_strcmp(setting, "LoginPassword"))
msg(dbv.pszVal, Translate("Decoded string.."));
else {
char *str = mir_strdup(dbv.pszVal);
diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index 15761a4874..4203984e61 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -58,7 +58,7 @@ int CDropbox::OnContactDeleted(void *obj, WPARAM hContact, LPARAM lParam) {
CDropbox *instance = (CDropbox*)obj;
- if (lstrcmpiA(GetContactProto(hContact), MODULE) == 0)
+ if (mir_strcmpi(GetContactProto(hContact), MODULE) == 0)
{
if (instance->HasAccessToken())
instance->DestroyAcceessToken();
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h index e3adeabec7..c8adf21ca1 100644 --- a/plugins/FavContacts/src/favlist.h +++ b/plugins/FavContacts/src/favlist.h @@ -56,8 +56,8 @@ public: }
int res = 0;
- if (res = lstrcmp(p1->group, p2->group)) return res;
- if (res = lstrcmp(p1->name, p2->name)) return res;
+ if (res = mir_tstrcmp(p1->group, p2->group)) return res;
+ if (res = mir_tstrcmp(p1->name, p2->name)) return res;
return 0;
}
};
@@ -85,7 +85,7 @@ private: TContactInfo *info = new TContactInfo(hContact, bManual);
insert(info);
TCHAR *group = info->getGroup();
- if (prevGroup && lstrcmp(prevGroup, group))
+ if (prevGroup && mir_tstrcmp(prevGroup, group))
++nGroups;
prevGroup = group;
return 1;
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp index 6136b41c3f..1400a0f09f 100644 --- a/plugins/FavContacts/src/menu.cpp +++ b/plugins/FavContacts/src/menu.cpp @@ -463,7 +463,7 @@ int ShowMenu(bool centered) mis.CtlID = 0;
mis.CtlType = ODT_MENU;
- if (!prevGroup || lstrcmp(prevGroup, favList[i]->getGroup())) {
+ if (!prevGroup || mir_tstrcmp(prevGroup, favList[i]->getGroup())) {
if (prevGroup && g_Options.bUseColumns) {
szMenu.cx += szColumn.cx;
szMenu.cy = max(szMenu.cy, szColumn.cy);
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp index fce6dffea0..4ae06077e1 100644 --- a/plugins/FavContacts/src/services.cpp +++ b/plugins/FavContacts/src/services.cpp @@ -82,7 +82,7 @@ int ProcessSrmmEvent(WPARAM wParam, LPARAM lParam) int ProcessSrmmIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (lstrcmpA(sicd->szModule, "FavContacts")) return 0;
+ if (mir_strcmp(sicd->szModule, "FavContacts")) return 0;
if (!hContact)
return 0;
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index 5af8b3603d..6e5bdbe79b 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -75,7 +75,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM {
if((lpcle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, hContact, indx)) == NULL)
break;
- if(lstrcmp(lpcle->pszService, SERVICE_NAME "/FERecvFile") == 0)
+ if(mir_tstrcmp(lpcle->pszService, SERVICE_NAME "/FERecvFile") == 0)
{
lpcle->lParam = (LPARAM)hWnd;
break;
diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index 05d74ff974..c585be916f 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -1164,7 +1164,7 @@ bool MyBitmap::loadFromFile(const char *fn, const char *fnAlpha) {
char ext[5];
memcpy(ext,fn+(strlen(fn)-4),5);
- if (!lstrcmpiA(ext,".png"))
+ if (!mir_strcmpi(ext,".png"))
{
return loadFromFile_png(fn, fnAlpha);
} else
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index cf6cb8b06e..fb4609f65f 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -3,7 +3,7 @@ int OpenBrowser(WPARAM hContact, LPARAM lParam)
{
char *proto = GetContactProto(hContact);
- if (proto && !lstrcmpA(proto, pluginName)) {
+ if (proto && !mir_strcmp(proto, pluginName)) {
Account *curAcc = GetAccountByContact(hContact);
PUDeletePopup(curAcc->popUpHwnd);
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp index b03a442c96..c031563754 100644 --- a/plugins/GmailNotifier/src/options.cpp +++ b/plugins/GmailNotifier/src/options.cpp @@ -165,7 +165,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_BTNSAV:
if (GetDlgItemTextA(hwndDlg, IDC_NAME, acc[curIndex].name, SIZEOF(acc[curIndex].name))) {
tail = strstr(acc[curIndex].name, "@");
- if (tail && lstrcmpA(tail + 1, "gmail.com") != 0)
+ if (tail && mir_strcmp(tail + 1, "gmail.com") != 0)
mir_strcpy(acc[curIndex].hosted, tail + 1);
SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0);
SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LONG_PTR)acc[curIndex].name);
diff --git a/plugins/GmailNotifier/src/utility.cpp b/plugins/GmailNotifier/src/utility.cpp index 19156366fd..0cd72e28a6 100644 --- a/plugins/GmailNotifier/src/utility.cpp +++ b/plugins/GmailNotifier/src/utility.cpp @@ -24,7 +24,7 @@ void BuildList(void) for (int i = 0; i < acc_num; i++) {
char *tail = strchr(acc[i].name, '@');
- if (tail && lstrcmpA(tail + 1, "gmail.com") != 0)
+ if (tail && mir_strcmp(tail + 1, "gmail.com") != 0)
mir_strcpy(acc[i].hosted, tail + 1);
acc[i].IsChecking = FALSE;
}
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index 4af28a0d93..5533f35eda 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -52,7 +52,7 @@ int OnIconPressed(WPARAM hContact, LPARAM lParam) {
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (!(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName) && db_get_b(NULL, ModuleName, "ChangeInMW", 0)) {
+ if (!(sicd->flags & MBCF_RIGHTBUTTON) && !mir_strcmp(sicd->szModule, ModuleName) && db_get_b(NULL, ModuleName, "ChangeInMW", 0)) {
int nh = sicd->dwId;
StatusIconData sid = { sizeof(sid) };
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index a7568c304d..8970fe672c 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -69,7 +69,7 @@ HICON LoadIconEx(const char* name) HANDLE GetIconHandle(const char* name)
{
for (int i = 0; i < SIZEOF(iconList); i++)
- if (lstrcmpA(iconList[i].szName, name) == 0)
+ if (mir_strcmp(iconList[i].szName, name) == 0)
return hIconLibItem[i];
return NULL;
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 0e2e5ce0be..f3d754766f 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -63,7 +63,7 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto) if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
if (_tcslen(dbv.ptszVal) > 0) {
TCHAR *ext = _tcsrchr(dbv.ptszVal, '.');
- if (ext && lstrcmpi(ext, _T(".xml")) == 0)
+ if (ext && mir_tstrcmpi(ext, _T(".xml")) == 0)
result = (TCHAR*)getFlashAvatar(dbv.ptszVal, (hContact == NULL) ? 1 : 0);
else {
if (result == NULL) {
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 3f46a7856b..e88d4aa31b 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -146,11 +146,11 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if ( !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Mask1"))
+ if ( !mir_strcmp(cws->szModule, "Ignore") && !mir_strcmp(cws->szSetting, "Mask1"))
applyExtraImage(hContact);
else if (hContact == 0) {
- if (( !lstrcmpA(cws->szModule, MODULENAME) && !lstrcmpA(cws->szSetting, "Filter")) ||
- (bUseMirandaSettings && !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Default1")))
+ if (( !mir_strcmp(cws->szModule, MODULENAME) && !mir_strcmp(cws->szSetting, "Filter")) ||
+ (bUseMirandaSettings && !mir_strcmp(cws->szModule, "Ignore") && !mir_strcmp(cws->szSetting, "Default1")))
{
fill_filter();
}
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 9061969c68..9caea5cd99 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -174,7 +174,7 @@ struct compareFunc : std::binary_function<const ProtocolInfo, const ProtocolInfo {
bool operator()(const ProtocolInfo &one, const ProtocolInfo &two) const
{
- return lstrcmp(one.account, two.account) < 0;
+ return mir_tstrcmp(one.account, two.account) < 0;
}
};
diff --git a/plugins/ListeningTo/src/music.cpp b/plugins/ListeningTo/src/music.cpp index 261a2a6584..b1c7e9b1de 100644 --- a/plugins/ListeningTo/src/music.cpp +++ b/plugins/ListeningTo/src/music.cpp @@ -88,15 +88,15 @@ BOOL Equals(const LISTENINGTOINFO *lti1, const LISTENINGTOINFO *lti2) if (lti1->cbSize != lti2->cbSize)
return FALSE;
- return lstrcmpi(lti1->ptszArtist, lti2->ptszArtist) == 0
- && lstrcmpi(lti1->ptszAlbum, lti2->ptszAlbum) == 0
- && lstrcmpi(lti1->ptszTitle, lti2->ptszTitle) == 0
- && lstrcmpi(lti1->ptszTrack, lti2->ptszTrack) == 0
- && lstrcmpi(lti1->ptszYear, lti2->ptszYear) == 0
- && lstrcmpi(lti1->ptszGenre, lti2->ptszGenre) == 0
- && lstrcmpi(lti1->ptszLength, lti2->ptszLength) == 0
- && lstrcmpi(lti1->ptszPlayer, lti2->ptszPlayer) == 0
- && lstrcmpi(lti1->ptszType, lti2->ptszType) == 0;
+ return mir_tstrcmpi(lti1->ptszArtist, lti2->ptszArtist) == 0
+ && mir_tstrcmpi(lti1->ptszAlbum, lti2->ptszAlbum) == 0
+ && mir_tstrcmpi(lti1->ptszTitle, lti2->ptszTitle) == 0
+ && mir_tstrcmpi(lti1->ptszTrack, lti2->ptszTrack) == 0
+ && mir_tstrcmpi(lti1->ptszYear, lti2->ptszYear) == 0
+ && mir_tstrcmpi(lti1->ptszGenre, lti2->ptszGenre) == 0
+ && mir_tstrcmpi(lti1->ptszLength, lti2->ptszLength) == 0
+ && mir_tstrcmpi(lti1->ptszPlayer, lti2->ptszPlayer) == 0
+ && mir_tstrcmpi(lti1->ptszType, lti2->ptszType) == 0;
}
diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp index c3ee3a0059..c83109c958 100644 --- a/plugins/ListeningTo/src/options.cpp +++ b/plugins/ListeningTo/src/options.cpp @@ -135,11 +135,11 @@ BOOL IsTypeEnabled(LISTENINGTOINFO *lti) if (lti->dwFlags & LTI_UNICODE) {
- if (lstrcmpi(lti->ptszType, LPGENT("Music")) == 0)
+ if (mir_tstrcmpi(lti->ptszType, LPGENT("Music")) == 0)
return opts.enable_music;
- if (lstrcmpi(lti->ptszType, LPGENT("Radio")) == 0)
+ if (mir_tstrcmpi(lti->ptszType, LPGENT("Radio")) == 0)
return opts.enable_radio;
- if (lstrcmpi(lti->ptszType, LPGENT("Video")) == 0)
+ if (mir_tstrcmpi(lti->ptszType, LPGENT("Video")) == 0)
return opts.enable_video;
return opts.enable_others;
}
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index a6708aabca..4eec8a98c1 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -262,7 +262,7 @@ void CopyToClipboard(HWND hwnd,LPSTR pszMsg, LPTSTR ptszMsg) BOOL isMetaContact(MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
- if (lstrcmpA(proto, META_PROTO) == 0)
+ if (mir_strcmp(proto, META_PROTO) == 0)
return TRUE;
return FALSE;
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 1e50d9fbc4..9ca5594c6b 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -1801,10 +1801,10 @@ int CAppletManager::HookSettingChanged(WPARAM hContact,LPARAM lParam) CEvent Event; Event.hContact = hContact; - if(!lstrcmpA(dbcws->szSetting,"Nick") || !lstrcmpA(dbcws->szSetting,"MyHandle")) { + if(!mir_strcmp(dbcws->szSetting,"Nick") || !mir_strcmp(dbcws->szSetting,"MyHandle")) { DBVARIANT dbv={0}; // if the protocol nick has changed, check if a custom handle is set - if(!lstrcmpA(dbcws->szSetting,"Nick")) { + if(!mir_strcmp(dbcws->szSetting,"Nick")) { if (!db_get_ts(Event.hContact, "CList", "MyHandle", &dbv)) { // handle found, ignore this event if(dbv.pszVal && strlen(dbv.pszVal)>0) @@ -1828,12 +1828,12 @@ int CAppletManager::HookSettingChanged(WPARAM hContact,LPARAM lParam) db_free(&dbv); } } - else if(!lstrcmpA(dbcws->szModule,"CList")) { - if(!lstrcmpA(dbcws->szSetting,"Hidden")) { + else if(!mir_strcmp(dbcws->szModule,"CList")) { + if(!mir_strcmp(dbcws->szSetting,"Hidden")) { Event.eType = EVENT_CONTACT_HIDDEN; Event.iValue = db_get_b(hContact,"CList","Hidden",0); } - else if(!lstrcmpA(dbcws->szSetting,"Group")) { + else if(!mir_strcmp(dbcws->szSetting,"Group")) { Event.eType = EVENT_CONTACT_GROUP; DBVARIANT dbv; int res = db_get_ts(hContact, "CList", "Group", &dbv); diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp index c78672e85a..98c5f1b1ea 100644 --- a/plugins/MobileState/src/main.cpp +++ b/plugins/MobileState/src/main.cpp @@ -86,8 +86,8 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) if (!proto)
return 0;
- if (!lstrcmpA(cws->szModule,proto))
- if (!lstrcmpA(cws->szSetting, "MirVer"))
+ if (!mir_strcmp(cws->szModule,proto))
+ if (!mir_strcmp(cws->szSetting, "MirVer"))
ExtraIconsApply(wParam, 1);
return 0;
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index da85a22ad9..9d696e30b6 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -121,7 +121,7 @@ static int ModernOptionsObject_Comparator(const ModernOptionsObject *ptr1, const if (obj1->optObject.lptzSubsection && obj2->optObject.lptzSubsection)
{
- int c = lstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection);
+ int c = mir_tstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection);
if (c) return c;
}
@@ -378,7 +378,7 @@ static int lstrcmp_null(TCHAR *p1, TCHAR *p2) if (!p1 && !p2) return 0;
if (!p1) return -1;
if (!p2) return 1;
- return lstrcmp(p1, p2);
+ return mir_tstrcmp(p1, p2);
}
static void ModernOptUI_ShowPage(HWND hwndDlg, struct ModernOptionsData *dat, int iPage)
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 0c923acfcb..ce5145cfa9 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -129,7 +129,7 @@ struct TSelectorData static bool CheckExt(TCHAR *fn, TCHAR *ext, int n)
{
int l = mir_tstrlen(fn);
- return (l > n) && !lstrcmp(fn + l - n, ext);
+ return (l > n) && !mir_tstrcmp(fn + l - n, ext);
}
static void BuildSkinList(HWND hwndList, TCHAR *szExt, int nExtLength = -1, bool start = true)
@@ -148,7 +148,7 @@ static void BuildSkinList(HWND hwndList, TCHAR *szExt, int nExtLength = -1, bool HANDLE h = FindFirstFile(_T("*.*"), &ffd);
if (h != INVALID_HANDLE_VALUE) {
do {
- if (!lstrcmp(ffd.cFileName, _T("")) || !lstrcmp(ffd.cFileName, _T(".")) || !lstrcmp(ffd.cFileName, _T("..")))
+ if (!mir_tstrcmp(ffd.cFileName, _T("")) || !mir_tstrcmp(ffd.cFileName, _T(".")) || !mir_tstrcmp(ffd.cFileName, _T("..")))
continue;
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
@@ -315,7 +315,7 @@ INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wPara int cxIcon = GetSystemMetrics(SM_CXSMICON);
int cyIcon = GetSystemMetrics(SM_CYSMICON);
- if (sd->active && !lstrcmp(sd->active, dat->filename)) {
+ if (sd->active && !mir_tstrcmp(sd->active, dat->filename)) {
DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top+lps->rcItem.bottom-cyIcon)/2,
LoadSkinnedIcon(SKINICON_OTHER_EMPTYBLOB),
cxIcon, cyIcon, 0, NULL, DI_NORMAL);
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index 035db49c93..ce936d1c61 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -121,7 +121,7 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, DWORD lpOrigFunc, DWORD {
char *pszModName = (char *)((PBYTE)hModule + pImportDesc->Name);
- if (lstrcmpiA(lpszImpModName, pszModName) == 0)
+ if (mir_strcmpi(lpszImpModName, pszModName) == 0)
{
PIMAGE_THUNK_DATA pThunk = (PIMAGE_THUNK_DATA)((PBYTE)hModule + pImportDesc->FirstThunk);
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 85eba40907..ca7c6069d9 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -86,7 +86,7 @@ Protocol::~Protocol() void Protocol::lcopystr(TCHAR *dest, TCHAR *src, size_t maxlen)
{
- if (lstrcmp(dest, src) != 0) {
+ if (mir_tstrcmp(dest, src) != 0) {
data_changed = true;
mir_tstrncpy(dest, src, (DWORD)maxlen);
}
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 595df755f0..f5a43e8753 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -473,18 +473,18 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) ARGUMENTSINFO *ai = (ARGUMENTSINFO*)lParam;
ai->flags = AIF_DONTPARSE;
TCString Result;
- if (!lstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) {
+ if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) {
GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].AwaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : _T("H:mm"), Result.GetBuffer(256), 256);
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) {
GetDateFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].AwaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : NULL, Result.GetBuffer(256), 256);
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_STATDESC)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_STATDESC)) {
Result = (VarParseData.Flags & VPF_XSTATUS) ? STR_XSTATUSDESC : pcli->pfnGetStatusModeDescription(g_ProtoStates[VarParseData.szProto].Status, 0);
}
- else if (!lstrcmp(ai->targv[0], VAR_MYNICK)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_MYNICK)) {
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_MYNICKPERPROTO) && VarParseData.szProto)
Result = db_get_s(NULL, VarParseData.szProto, "Nick", (TCHAR*)NULL);
@@ -494,15 +494,15 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (Result == NULL)
Result = TranslateT("Stranger");
}
- else if (!lstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) {
mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0));
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_MESSAGENUM)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_MESSAGENUM)) {
mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0));
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_TIMEPASSED)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_TIMEPASSED)) {
ULARGE_INTEGER ul_AwaySince, ul_Now;
SYSTEMTIME st;
GetLocalTime(&st);
@@ -519,7 +519,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) mir_sntprintf(Result, 256, TranslateT("%d seconds"), ul_Now.LowPart);
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_PREDEFINEDMESSAGE)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_PREDEFINEDMESSAGE)) {
ai->flags = 0; // reset AIF_DONTPARSE flag
if (ai->argc != 2)
return NULL;
@@ -537,7 +537,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (Result == NULL) // if we didn't find a message with specified title
return NULL; // return it now, as later we change NULL to ""
}
- else if (!lstrcmp(ai->targv[0], VAR_PROTOCOL)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_PROTOCOL)) {
if (VarParseData.szProto) {
CString AnsiResult;
CallProtoService(VarParseData.szProto, PS_GETNAME, 256, (LPARAM)AnsiResult.GetBuffer(256));
diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h index 161977cf28..b2a1c4accf 100644 --- a/plugins/NewAwaySysMod/src/CString.h +++ b/plugins/NewAwaySysMod/src/CString.h @@ -31,8 +31,8 @@ __inline int My_lstrlen(LPCSTR lpString) {return mir_strlen(lpString);}
__inline int My_lstrlen(LPCWSTR lpString) {return mir_wstrlen(lpString);}
-__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return lstrcmpA(lpString1, lpString2);}
-__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return lstrcmpW(lpString1, lpString2);}
+__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return mir_strcmp(lpString1, lpString2);}
+__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return mir_wstrcmp(lpString1, lpString2);}
__inline LPCSTR My_strstr(LPCSTR lpString1, LPCSTR lpString2) {return strstr(lpString1, lpString2);}
__inline LPWSTR My_strstr(LPCWSTR lpString1, LPCWSTR lpString2) {return (LPWSTR)wcsstr(lpString1, lpString2);}
__inline LPSTR My_lstrcpy(LPSTR lpString1, LPCSTR lpString2) {return mir_strcpy(lpString1, lpString2);}
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index 48248a6764..bc1fabe341 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -390,7 +390,7 @@ int GroupEnum(const char *szSetting, LPARAM lParam) {
sGroupEnumData *GroupEnumData = (sGroupEnumData*)lParam;
TCString GroupName = db_get_s(NULL, "CListGroups", szSetting, _T(" "));
- if (!lstrcmp(GroupEnumData->GroupName, &GroupName[1]))
+ if (!mir_tstrcmp(GroupEnumData->GroupName, &GroupName[1]))
GroupEnumData->hGroup = (HANDLE)(atol(szSetting) | HCONTACT_ISGROUP);
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 420e0df05f..c62d050c75 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -164,7 +164,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) }
// ugly workaround for metacontacts, part i; store all metacontacts' events to a temporary array, so we'll be able to get the 'source' protocol when subcontact event happens later. we need the protocol to get its status and per-status settings properly
- if (!lstrcmpA(szProto, META_PROTO)) {
+ if (!mir_strcmp(szProto, META_PROTO)) {
// remove outdated events first
DWORD CurTime = time(NULL);
for (int i = MetacontactEvents.GetSize() - 1; i >= 0; i--)
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp index ce7adf0ebd..74b21baf71 100644 --- a/plugins/NewAwaySysMod/src/Properties.cpp +++ b/plugins/NewAwaySysMod/src/Properties.cpp @@ -37,7 +37,7 @@ void ResetSettingsOnStatusChange(const char *szProto = NULL, int bResetPersonalM MCONTACT hContact = db_find_first();
while (hContact) {
const char *szCurProto;
- if (!szProto || ((szCurProto = GetContactProto(hContact)) && !lstrcmpA(szProto, szCurProto))) {
+ if (!szProto || ((szCurProto = GetContactProto(hContact)) && !mir_strcmp(szProto, szCurProto))) {
ResetContactSettingsOnStatusChange(hContact);
if (bResetPersonalMsgs) {
CContactSettings(Status, hContact).SetMsgFormat(SMF_PERSONAL, NULL); // TODO: delete only when SAM dialog opens?
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 8c6e7c8e43..c774f5480c 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -996,7 +996,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA while (hItem = CList->GetNextItem(MCLGN_NEXT | MCLGN_CONTACT | MCLGN_INFO | MCLGN_MULTILEVEL, hItem)) {
if (CList->GetItemType(hItem) == MCLCIT_INFO) {
char *szProto = (char*)CList->GetItemParam(hItem);
- if (!wParam || !lstrcmpA(szProto, (char*)wParam)) {
+ if (!wParam || !mir_strcmp(szProto, (char*)wParam)) {
CList->SetInfoIcon(hItem, LoadSkinnedProtoIcon(szProto, g_ProtoStates[szProto].Status));
}
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 9a3d42a52f..d366d209ea 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -151,16 +151,16 @@ static int CompareStatusMsg(STATUSMSGINFO *smi, DBCONTACTWRITESETTING *cws_new, ret = COMPARE_DEL;
}
else if (dbv_old.type != cws_new->value.type)
- ret = (lstrcmpW(smi->newstatusmsg, smi->oldstatusmsg) ? CheckStrW(smi->newstatusmsg, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
+ ret = (mir_wstrcmp(smi->newstatusmsg, smi->oldstatusmsg) ? CheckStrW(smi->newstatusmsg, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
else if (dbv_old.type == DBVT_ASCIIZ)
- ret = (lstrcmpA(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
+ ret = (mir_strcmp(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
else if (dbv_old.type == DBVT_UTF8)
- ret = (lstrcmpA(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
+ ret = (mir_strcmp(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
else if (dbv_old.type == DBVT_WCHAR)
- ret = (lstrcmpW(cws_new->value.pwszVal, dbv_old.pwszVal) ? CheckStrW(cws_new->value.pwszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
+ ret = (mir_wstrcmp(cws_new->value.pwszVal, dbv_old.pwszVal) ? CheckStrW(cws_new->value.pwszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME);
db_free(&dbv_old);
}
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index deeb313f48..acd2291594 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -35,17 +35,17 @@ TCHAR* CheckFeed(TCHAR *tszURL, HWND hwndDlg) if (hXml != NULL) {
int childcount = 0;
HXML node;
- if (!lstrcmpi(xi.getName(hXml), _T("xml")))
+ if (!mir_tstrcmpi(xi.getName(hXml), _T("xml")))
node = xi.getChild(hXml, childcount);
else
node = hXml;
while (node) {
LPCTSTR szNodeName = xi.getName(node);
- if (!lstrcmpi(szNodeName, _T("rss")) || !lstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
HXML chan = xi.getChild(node, 0);
for (int j = 0; j < xi.getChildCount(chan); j++) {
HXML child = xi.getChild(chan, j);
- if (!lstrcmpi(xi.getName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("title"))) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
@@ -54,10 +54,10 @@ TCHAR* CheckFeed(TCHAR *tszURL, HWND hwndDlg) }
}
}
- else if (!lstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
for (int j = 0; j < xi.getChildCount(node); j++) {
HXML child = xi.getChild(node, j);
- if (!lstrcmpi(xi.getName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("title"))) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
@@ -140,7 +140,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin if (olddbei.timestamp < (DWORD)stamp)
break;
- if (strlen((char*)olddbei.pBlob) == cbOrigLen && !lstrcmpA((char*)olddbei.pBlob, pszTemp)) {
+ if (strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
MesExist = true;
break;
}
@@ -186,18 +186,18 @@ void CheckCurrentFeed(MCONTACT hContact) if (hXml != NULL) {
int childcount = 0;
HXML node;
- if (!lstrcmpi(xi.getName(hXml), _T("xml")))
+ if (!mir_tstrcmpi(xi.getName(hXml), _T("xml")))
node = xi.getChild(hXml, childcount);
else
node = hXml;
while (node) {
LPCTSTR szNodeName = xi.getName(node);
- bool isRSS = !lstrcmpi(szNodeName, _T("rss")), isAtom = !lstrcmpi(szNodeName, _T("rdf"));
+ bool isRSS = !mir_tstrcmpi(szNodeName, _T("rss")), isAtom = !mir_tstrcmpi(szNodeName, _T("rdf"));
if (isRSS || isAtom) {
if (isRSS) {
for (int i = 0; i < xi.getAttrCount(node); i++) {
LPCTSTR szAttrName = xi.getAttrName(node, i);
- if (!lstrcmpi(szAttrName, _T("version"))) {
+ if (!mir_tstrcmpi(szAttrName, _T("version"))) {
TCHAR ver[MAX_PATH];
mir_sntprintf(ver, SIZEOF(ver), _T("RSS %s"), xi.getAttrValue(node, szAttrName));
db_set_ts(hContact, MODULE, "MirVer", ver);
@@ -212,17 +212,17 @@ void CheckCurrentFeed(MCONTACT hContact) for (int j = 0; j < xi.getChildCount(chan); j++) {
HXML child = xi.getChild(chan, j);
LPCTSTR childName = xi.getName(child);
- if (!lstrcmpi(childName, _T("title"))) {
+ if (!mir_tstrcmpi(childName, _T("title"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("link"))) {
+ else if (!mir_tstrcmpi(childName, _T("link"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("description"))) {
+ else if (!mir_tstrcmpi(childName, _T("description"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
ClearText(szValue, szChildText);
@@ -230,30 +230,30 @@ void CheckCurrentFeed(MCONTACT hContact) db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!lstrcmpi(childName, _T("language"))) {
+ else if (!mir_tstrcmpi(childName, _T("language"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("managingEditor"))) {
+ else if (!mir_tstrcmpi(childName, _T("managingEditor"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("category"))) {
+ else if (!mir_tstrcmpi(childName, _T("category"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("copyright"))) {
+ else if (!mir_tstrcmpi(childName, _T("copyright"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_s(hContact, "UserInfo", "MyNotes", _T2A(ClearText(szValue, szChildText)));
}
- else if (!lstrcmpi(childName, _T("image"))) {
+ else if (!mir_tstrcmpi(childName, _T("image"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -281,7 +281,7 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!lstrcmpi(childName, _T("lastBuildDate"))) {
+ else if (!mir_tstrcmpi(childName, _T("lastBuildDate"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
TCHAR *lastupdtime = (TCHAR *)xi.getText(child);
@@ -295,36 +295,36 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!lstrcmpi(childName, _T("item"))) {
+ else if (!mir_tstrcmpi(childName, _T("item"))) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xi.getChildCount(child); z++) {
HXML itemval = xi.getChild(child, z);
LPCTSTR itemName = xi.getName(itemval);
// We only use the first tag for now and ignore the rest.
- if (!lstrcmpi(itemName, _T("title")))
+ if (!mir_tstrcmpi(itemName, _T("title")))
ClearText(title, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("link")))
+ else if (!mir_tstrcmpi(itemName, _T("link")))
ClearText(link, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("pubDate")) || !lstrcmpi(itemName, _T("date"))) {
+ else if (!mir_tstrcmpi(itemName, _T("pubDate")) || !mir_tstrcmpi(itemName, _T("date"))) {
if (stamp == 0)
stamp = DateToUnixTime(xi.getText(itemval), 0);
}
- else if (!lstrcmpi(itemName, _T("description")) || !lstrcmpi(itemName, _T("encoded")))
+ else if (!mir_tstrcmpi(itemName, _T("description")) || !mir_tstrcmpi(itemName, _T("encoded")))
ClearText(descr, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("author")) || !lstrcmpi(itemName, _T("creator")))
+ else if (!mir_tstrcmpi(itemName, _T("author")) || !mir_tstrcmpi(itemName, _T("creator")))
ClearText(author, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("comments")))
+ else if (!mir_tstrcmpi(itemName, _T("comments")))
ClearText(comments, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("guid")))
+ else if (!mir_tstrcmpi(itemName, _T("guid")))
ClearText(guid, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("category")))
+ else if (!mir_tstrcmpi(itemName, _T("category")))
ClearText(category, xi.getText(itemval));
}
@@ -332,27 +332,27 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!lstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
db_set_ts(hContact, MODULE, "MirVer", _T("Atom 3"));
for (int j = 0; j < xi.getChildCount(node); j++) {
HXML child = xi.getChild(node, j);
LPCTSTR szChildName = xi.getName(child);
- if (!lstrcmpi(szChildName, _T("title"))) {
+ if (!mir_tstrcmpi(szChildName, _T("title"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(szChildName, _T("link"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("link"))) {
for (int x = 0; x < xi.getAttrCount(child); x++) {
- if (!lstrcmpi(xi.getAttrName(child, x), _T("rel")))
- if (!lstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self")))
+ if (!mir_tstrcmpi(xi.getAttrName(child, x), _T("rel")))
+ if (!mir_tstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self")))
break;
- if (!lstrcmpi(xi.getAttrName(child, x), _T("href")))
+ if (!mir_tstrcmpi(xi.getAttrName(child, x), _T("href")))
db_set_ts(hContact, MODULE, "Homepage", xi.getAttrValue(child, xi.getAttrName(child, x)));
}
}
- else if (!lstrcmpi(szChildName, _T("subtitle"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("subtitle"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
ClearText(szValue, szChildText);
@@ -360,29 +360,29 @@ void CheckCurrentFeed(MCONTACT hContact) db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!lstrcmpi(szChildName, _T("language"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("language"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(szChildName, _T("author"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("author"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML authorval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(authorval), _T("email"))) {
+ if (!mir_tstrcmpi(xi.getName(authorval), _T("email"))) {
db_set_ts(hContact, MODULE, "e-mail", xi.getText(authorval));
break;
}
}
}
- else if (!lstrcmpi(szChildName, _T("category"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("category"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(szChildName, _T("icon"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("icon"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -407,7 +407,7 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!lstrcmpi(szChildName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("updated"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
TCHAR *lastupdtime = (TCHAR *)szChildText;
@@ -421,57 +421,57 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!lstrcmpi(szChildName, _T("entry"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("entry"))) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xi.getChildCount(child); z++) {
HXML itemval = xi.getChild(child, z);
LPCTSTR szItemName = xi.getName(itemval);
- if (!lstrcmpi(szItemName, _T("title"))) {
+ if (!mir_tstrcmpi(szItemName, _T("title"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(title, szItemText);
}
- else if (!lstrcmpi(szItemName, _T("link"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("link"))) {
for (int x = 0; x < xi.getAttrCount(itemval); x++) {
- if (!lstrcmpi(xi.getAttrName(itemval, x), _T("href"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(itemval, x), _T("href"))) {
ClearText(link, xi.getAttrValue(itemval, xi.getAttrName(itemval, x)));
break;
}
}
}
- else if (!lstrcmpi(szItemName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("updated"))) {
if (stamp == 0)
stamp = DateToUnixTime(xi.getText(itemval), 0);
}
- else if (!lstrcmpi(szItemName, _T("summary")) || !lstrcmpi(szItemName, _T("content"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("summary")) || !mir_tstrcmpi(szItemName, _T("content"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(descr, szItemText);
}
- else if (!lstrcmpi(szItemName, _T("author"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("author"))) {
for (int x = 0; x < xi.getChildCount(itemval); x++) {
HXML authorval = xi.getChild(itemval, x);
- if (!lstrcmpi(xi.getName(authorval), _T("name")) && xi.getText(authorval)) {
+ if (!mir_tstrcmpi(xi.getName(authorval), _T("name")) && xi.getText(authorval)) {
ClearText(author, xi.getText(authorval));
break;
}
}
}
- else if (!lstrcmpi(szItemName, _T("comments"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("comments"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(comments, szItemText);
}
- else if (!lstrcmpi(szItemName, _T("id"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("id"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(guid, xi.getText(itemval));
}
- else if (!lstrcmpi(szItemName, _T("category"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("category"))) {
for (int x = 0; x < xi.getAttrCount(itemval); x++) {
LPCTSTR szAttrName = xi.getAttrName(itemval, x);
- if (!lstrcmpi(szAttrName, _T("term")) && xi.getText(itemval)) {
+ if (!mir_tstrcmpi(szAttrName, _T("term")) && xi.getText(itemval)) {
ClearText(category, xi.getAttrValue(itemval, szAttrName));
break;
}
@@ -521,14 +521,14 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) HXML node = xi.getChild(hXml, childcount);
while (node) {
LPCTSTR szNodeName = xi.getName(node);
- if (!lstrcmpi(szNodeName, _T("rss")) || !lstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
HXML chan = xi.getChild(node, 0);
for (int j = 0; j < xi.getChildCount(chan); j++) {
HXML child = xi.getChild(chan, j);
- if (!lstrcmpi(xi.getName(child), _T("image"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("image"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -556,13 +556,13 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) }
}
}
- else if (!lstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
for (int j = 0; j < xi.getChildCount(node); j++) {
HXML child = xi.getChild(node, j);
- if (!lstrcmpi(xi.getName(child), _T("icon"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("icon"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index dfcbf68b65..894aebc04e 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -68,7 +68,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xi.getNextNode(node);
if (node)
break;
- } while (lstrcmpi(xi.getName(node), _T("body")));
+ } while (mir_tstrcmpi(xi.getName(node), _T("body")));
}
}
else if (!xmlUrl && outlineChildsCount)
@@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TCHAR *text = NULL, *url = NULL, *siteurl = NULL, *group = NULL, *utfgroup = NULL;
BYTE NeedToImport = FALSE;
for (int i = 0; i < outlineAttr; i++) {
- if (!lstrcmpi(xi.getAttrName(node, i), _T("text"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("text"))) {
text = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if (!text) {
isTextUTF = 0;
@@ -88,14 +88,14 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
SendMessage(FeedsImportList, LB_GETTEXT, i, (LPARAM)item);
- if (!lstrcmpi(item, text)) {
+ if (!mir_tstrcmpi(item, text)) {
NeedToImport = TRUE;
break;
}
}
continue;
}
- if (!lstrcmpi(xi.getAttrName(node, i), _T("xmlUrl"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("xmlUrl"))) {
url = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if ( !url) {
isURLUTF = 0;
@@ -108,7 +108,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
continue;
}
- if (!lstrcmpi(xi.getAttrName(node, i), _T("htmlUrl"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("htmlUrl"))) {
siteurl = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if ( !siteurl) {
isSiteURLUTF = 0;
@@ -123,9 +123,9 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (NeedToImport) {
HXML parent = xi.getParent(node);
- while (lstrcmpi(xi.getName(parent), _T("body"))) {
+ while (mir_tstrcmpi(xi.getName(parent), _T("body"))) {
for (int i = 0; i < xi.getAttrCount(parent); i++) {
- if (!lstrcmpi(xi.getAttrName(parent, i), _T("text"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(parent, i), _T("text"))) {
if ( !group)
group = (TCHAR *)xi.getAttrValue(parent, xi.getAttrName(parent, i));
else {
@@ -196,7 +196,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (node)
break;
}
- while (lstrcmpi(xi.getName(tmpnode), _T("body")));
+ while (mir_tstrcmpi(xi.getName(tmpnode), _T("body")));
}
}
}
@@ -262,7 +262,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xi.getNextNode(node);
if (node)
break;
- } while (lstrcmpi(xi.getName(node), _T("body")));
+ } while (mir_tstrcmpi(xi.getName(node), _T("body")));
}
}
else if (!xmlUrl && outlineChildsCount)
@@ -270,7 +270,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM else if (xmlUrl) {
TCHAR *text = NULL;
for (int i = 0; i < outlineAttr; i++) {
- if (!lstrcmpi(xi.getAttrName(node, i), _T("text"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("text"))) {
text = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if (!text) {
isTextUTF = 0;
@@ -297,7 +297,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xi.getNextNode(node);
if (node)
break;
- } while (lstrcmpi(xi.getName(tmpnode), _T("body")));
+ } while (mir_tstrcmpi(xi.getName(tmpnode), _T("body")));
}
}
}
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 8a0293c4ba..198b78d701 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -44,7 +44,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -115,7 +115,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR tszURL[MAX_PATH] = { 0 }, *tszTitle = NULL;
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0)
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0)
tszTitle = CheckFeed(tszURL, hwndDlg);
else
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
@@ -156,14 +156,14 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (dbNick == NULL)
continue;
- if (lstrcmp(dbNick, SelItem.nick) != 0)
+ if (mir_tstrcmp(dbNick, SelItem.nick) != 0)
continue;
ptrT dbURL(db_get_tsa(hContact, MODULE, "URL"));
if (dbURL == NULL)
continue;
- if (lstrcmp(dbURL, SelItem.url) != 0)
+ if (mir_tstrcmp(dbURL, SelItem.url) != 0)
continue;
nSelItem->hContact = hContact;
@@ -208,7 +208,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -278,7 +278,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_DISCOVERY:
TCHAR tszURL[MAX_PATH] = { 0 };
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) {
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
@@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -433,7 +433,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_DISCOVERY:
TCHAR tszURL[MAX_PATH] = { 0 };
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) {
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
@@ -502,13 +502,13 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ptrT dbNick(db_get_tsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
- if (lstrcmp(dbNick, nick))
+ if (mir_tstrcmp(dbNick, nick))
continue;
ptrT dbURL(db_get_tsa(hContact, MODULE, "URL"));
if (dbURL == NULL)
break;
- if (lstrcmp(dbURL, url))
+ if (mir_tstrcmp(dbURL, url))
continue;
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index cb85c4da41..1c7c1dba88 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -216,35 +216,35 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType) int day, month, year, hour, min, sec, timezoneh, timezonem;
if (_tcsstr(p, _T(","))) {
_stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
- if (!lstrcmpi(monthstr, _T("Jan")))
+ if (!mir_tstrcmpi(monthstr, _T("Jan")))
month = 1;
- if (!lstrcmpi(monthstr, _T("Feb")))
+ if (!mir_tstrcmpi(monthstr, _T("Feb")))
month = 2;
- if (!lstrcmpi(monthstr, _T("Mar")))
+ if (!mir_tstrcmpi(monthstr, _T("Mar")))
month = 3;
- if (!lstrcmpi(monthstr, _T("Apr")))
+ if (!mir_tstrcmpi(monthstr, _T("Apr")))
month = 4;
- if (!lstrcmpi(monthstr, _T("May")))
+ if (!mir_tstrcmpi(monthstr, _T("May")))
month = 5;
- if (!lstrcmpi(monthstr, _T("Jun")))
+ if (!mir_tstrcmpi(monthstr, _T("Jun")))
month = 6;
- if (!lstrcmpi(monthstr, _T("Jul")))
+ if (!mir_tstrcmpi(monthstr, _T("Jul")))
month = 7;
- if (!lstrcmpi(monthstr, _T("Aug")))
+ if (!mir_tstrcmpi(monthstr, _T("Aug")))
month = 8;
- if (!lstrcmpi(monthstr, _T("Sep")))
+ if (!mir_tstrcmpi(monthstr, _T("Sep")))
month = 9;
- if (!lstrcmpi(monthstr, _T("Oct")))
+ if (!mir_tstrcmpi(monthstr, _T("Oct")))
month = 10;
- if (!lstrcmpi(monthstr, _T("Nov")))
+ if (!mir_tstrcmpi(monthstr, _T("Nov")))
month = 11;
- if (!lstrcmpi(monthstr, _T("Dec")))
+ if (!mir_tstrcmpi(monthstr, _T("Dec")))
month = 12;
if (year < 2000)
year += 2000;
- if (!lstrcmp(timezonesign, _T("+")))
+ if (!mir_tstrcmp(timezonesign, _T("+")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec);
- else if (!lstrcmp(timezonesign, _T("-")))
+ else if (!mir_tstrcmp(timezonesign, _T("-")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec);
else
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
@@ -256,9 +256,9 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType) else
{
_stscanf(p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
- if (!lstrcmp(timezonesign, _T("+")))
+ if (!mir_tstrcmp(timezonesign, _T("+")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec);
- else if (!lstrcmp(timezonesign, _T("-")))
+ else if (!mir_tstrcmp(timezonesign, _T("-")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec);
else
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
@@ -420,11 +420,11 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) {
char *date = NULL, *size = NULL;
for (int i = 0; i < pReply->headersCount; i++) {
- if (!lstrcmpiA(pReply->headers[i].szName, "Last-Modified")) {
+ if (!mir_strcmpi(pReply->headers[i].szName, "Last-Modified")) {
date = pReply->headers[i].szValue;
continue;
}
- else if (!lstrcmpiA(pReply->headers[i].szName, "Content-Length")) {
+ else if (!mir_strcmpi(pReply->headers[i].szName, "Content-Length")) {
size = pReply->headers[i].szValue;
continue;
}
@@ -581,7 +581,7 @@ MCONTACT GetContactByNick(const TCHAR *nick) for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
- if (!lstrcmpi(contactNick, nick))
+ if (!mir_tstrcmpi(contactNick, nick))
break;
}
return hContact;
@@ -593,7 +593,7 @@ MCONTACT GetContactByURL(const TCHAR *url) for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
- if (!lstrcmpi(contactURL, url))
+ if (!mir_tstrcmpi(contactURL, url))
break;
}
return hContact;
diff --git a/plugins/Non-IM Contact/src/http.cpp b/plugins/Non-IM Contact/src/http.cpp index 8c7ecb594d..92aacc0ec5 100644 --- a/plugins/Non-IM Contact/src/http.cpp +++ b/plugins/Non-IM Contact/src/http.cpp @@ -67,7 +67,7 @@ int InternetDownloadFile (char *szUrl) // get the url for the new location and save it to szInfo
// look for the reply header "Location"
for (i=0; i<nlhrReply->headersCount; i++) {
- if (!lstrcmpA(nlhrReply->headers[i].szName, "Location")) {
+ if (!mir_strcmp(nlhrReply->headers[i].szName, "Location")) {
szData = (char *)malloc(512);
// add "Moved/Location:" in front of the new URL for identification
mir_snprintf(szData, 512, "Moved/Location: %s\n", nlhrReply->headers[i].szValue);
@@ -86,7 +86,7 @@ int InternetDownloadFile (char *szUrl) CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply);
// the recieved data is empty, data was not recieved, so return an error code of 1
- if (!lstrcmpA(szInfo, "")) return 1;
+ if (!mir_strcmp(szInfo, "")) return 1;
return 0;
}
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp index 081cae06b8..76f687eaee 100644 --- a/plugins/PackUpdater/Src/Notifications.cpp +++ b/plugins/PackUpdater/Src/Notifications.cpp @@ -307,7 +307,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam EnableWindow(hwOk, enableOk ? TRUE : FALSE);
}
if (nmlv->uNewState & LVIS_SELECTED) {
- if (lstrcmp(todo[lvI.iItem].tszInfoURL, _T("")))
+ if (mir_tstrcmp(todo[lvI.iItem].tszInfoURL, _T("")))
EnableWindow(GetDlgItem(hDlg, IDC_INFO), TRUE);
else
EnableWindow(GetDlgItem(hDlg, IDC_INFO), FALSE);
@@ -379,7 +379,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam UpdatesCount++;
tszExt = &todo[i].File.tszDownloadURL[mir_tstrlen(todo[i].File.tszDownloadURL)-5];
- if (lstrcmp(tszExt, _T(".html")) == 0) {
+ if (mir_tstrcmp(tszExt, _T(".html")) == 0) {
char* szUrl = mir_t2a(todo[i].File.tszDownloadURL);
CallService(MS_UTILS_OPENURL, TRUE, (LPARAM)szUrl);
mir_free(szUrl);
@@ -412,11 +412,11 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam }
}
- if (UpdatesCount > 1 && lstrcmp(arExt[0].c_str(), _T(".html")) != 0)
+ if (UpdatesCount > 1 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0)
mir_tstrncpy(tszBuff, TranslateT("Downloads complete. Start updating? All your data will be saved and Miranda NG will be closed."), SIZEOF(tszBuff));
- else if (UpdatesCount == 1 && lstrcmp(arExt[0].c_str(), _T(".html")) != 0)
+ else if (UpdatesCount == 1 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0)
mir_tstrncpy(tszBuff, TranslateT("Download complete. Start updating? All your data will be saved and Miranda NG will be closed."), SIZEOF(tszBuff));
- if (UpdatesCount > 0 && lstrcmp(arExt[0].c_str(), _T(".html")) != 0) {
+ if (UpdatesCount > 0 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0) {
INT rc = -1;
Title = TranslateT("Pack Updater");
Text = tszBuff;
@@ -451,7 +451,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break;
case 2:
tszUtilRootPlug = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins"));
- if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootPlug, arFileName[i].c_str());
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootPlug, arAdvFolder[i].c_str(), arFileName[i].c_str());
@@ -464,7 +464,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break;
case 3:
tszUtilRootIco = Utils_ReplaceVarsT(_T("%miranda_path%\\Icons"));
- if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootIco, arFileName[i].c_str());
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootIco, arAdvFolder[i].c_str(), arFileName[i].c_str());
@@ -477,7 +477,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break;
case 4:
tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
- if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
@@ -490,7 +490,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break;
case 5:
tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
- if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index 7a92f49655..edb28607d1 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -196,7 +196,7 @@ static void CheckUpdates(void *) // Load files info
db_get_ts(NULL, MODNAME, "File_VersionURL", &dbVar);
- if (lstrcmp(dbVar.ptszVal, NULL) == 0) { // URL is not set
+ if (mir_tstrcmp(dbVar.ptszVal, NULL) == 0) { // URL is not set
Title=TranslateT("Pack Updater");
Text = TranslateT("URL for checking updates not found.");
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1) && db_get_b(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED)) {
@@ -230,7 +230,7 @@ static void CheckUpdates(void *) dbVar.ptszVal = NULL;
mir_snprintf(szKey, SIZEOF(szKey), "File_%d_CurrentVersion", CurrentFile + 1);
db_get_ts(NULL, MODNAME, szKey, &dbVar);
- if (lstrcmp(dbVar.ptszVal, NULL) == 0) {
+ if (mir_tstrcmp(dbVar.ptszVal, NULL) == 0) {
db_free(&dbVar);
mir_tstrncpy(FileInfo.tszCurVer, _T(""), SIZEOF(FileInfo.tszCurVer));
}
@@ -239,7 +239,7 @@ static void CheckUpdates(void *) dbVar.ptszVal = NULL;
mir_snprintf(szKey, SIZEOF(szKey), "File_%d_LastVersion", CurrentFile + 1);
db_get_ts(NULL, MODNAME, szKey, &dbVar);
- if (lstrcmp(dbVar.ptszVal, NULL) == 0) {
+ if (mir_tstrcmp(dbVar.ptszVal, NULL) == 0) {
db_free(&dbVar);
mir_tstrncpy(FileInfo.tszLastVer, _T(""), SIZEOF(FileInfo.tszLastVer));
}
@@ -275,7 +275,7 @@ static void CheckUpdates(void *) if (Files[CurrentFile].FileType == 2) {
TCHAR pluginFolgerName[MAX_PATH];
- if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("Plugins\\%s"), Files[CurrentFile].File.tszDiskPath);
else
mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("Plugins\\%s\\%s"), Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
@@ -307,7 +307,7 @@ static void CheckUpdates(void *) break;
case 2:
tszUtilRootPlug = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins"));
- if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootPlug, Files[CurrentFile].File.tszDiskPath);
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootPlug, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
@@ -315,7 +315,7 @@ static void CheckUpdates(void *) break;
case 3:
tszUtilRootIco = Utils_ReplaceVarsT(_T("%miranda_path%\\Icons"));
- if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootIco, Files[CurrentFile].File.tszDiskPath);
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootIco, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
@@ -324,7 +324,7 @@ static void CheckUpdates(void *) case 4:
case 5:
tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
- if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, Files[CurrentFile].File.tszDiskPath);
else
mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index db3e581b59..9bd52deea2 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int ActionsSortFunc(const POPUPACTION *p1, const POPUPACTION *p2)
{
- return lstrcmpA(p1->lpzTitle, p2->lpzTitle);
+ return mir_strcmp(p1->lpzTitle, p2->lpzTitle);
}
static LIST<POPUPACTION> gActions(3, ActionsSortFunc);
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 821aa10017..fe3a281f32 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -833,7 +833,7 @@ bool MyBitmap::loadFromFile(const TCHAR *fn, const TCHAR *fnAlpha) TCHAR ext[5];
_tcsncpy_s(ext, fn + (_tcslen(fn) - 4), _TRUNCATE);
- if (!lstrcmpi(ext, _T(".png")))
+ if (!mir_tstrcmpi(ext, _T(".png")))
return loadFromFile_png(fn, fnAlpha);
return loadFromFile_default(fn, fnAlpha);
diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h index 7115b25dad..67cea481c9 100644 --- a/plugins/Popup/src/formula.h +++ b/plugins/Popup/src/formula.h @@ -46,7 +46,7 @@ public: void add(char *name, int value)
{
for (Item *p = items; p; p = p->next)
- if (!lstrcmpA(p->name,name))
+ if (!mir_strcmp(p->name,name))
{
p->value = value;
return;
@@ -56,7 +56,7 @@ public: int get(char *name)
{
for (Item *p = items; p; p = p->next)
- if (!lstrcmpA(p->name,name))
+ if (!mir_strcmp(p->name,name))
return p->value;
return 0;
}
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 57fbf18b62..7223a22100 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -30,9 +30,9 @@ HANDLE g_hntfError, g_hntfWarning, g_hntfNotification; int TreeDataSortFunc(const POPUPTREEDATA *p1, const POPUPTREEDATA *p2)
{
- if (int cmp = lstrcmp(p1->pszTreeRoot, p2->pszTreeRoot))
+ if (int cmp = mir_tstrcmp(p1->pszTreeRoot, p2->pszTreeRoot))
return cmp;
- return lstrcmp(p1->pszDescription, p2->pszDescription);
+ return mir_tstrcmp(p1->pszDescription, p2->pszDescription);
}
@@ -126,10 +126,10 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul) for (int i=0; i < ptd->notification.actionCount; ++i) {
POPUPNOTIFYACTION &p = ptd->notification.lpActions[i];
- if (!lstrcmpA(ptd->leftAction, p.lpzTitle))
+ if (!mir_strcmp(ptd->leftAction, p.lpzTitle))
db_set(NULL, p.lpzLModule, p.lpzLSetting, &p.dbvLData);
- if (!lstrcmpA(ptd->rightAction, p.lpzTitle))
+ if (!mir_strcmp(ptd->rightAction, p.lpzTitle))
db_set(NULL, p.lpzRModule, p.lpzRSetting, &p.dbvRData);
}
}
@@ -309,10 +309,10 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, return false;
}
- if (!lstrcmpA(lpzAction, POPUP_ACTION_NOTHING))
+ if (!mir_strcmp(lpzAction, POPUP_ACTION_NOTHING))
return true;
- if (!lstrcmpA(lpzAction, POPUP_ACTION_DISMISS))
+ if (!mir_strcmp(lpzAction, POPUP_ACTION_DISMISS))
{
PUDeletePopup(hwnd);
return true;
@@ -322,7 +322,7 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, {
if (!(ptd->notification.lpActions[i].dwFlags&PNAF_CALLBACK))
continue;
- if (lstrcmpA(ptd->notification.lpActions[i].lpzTitle, lpzAction))
+ if (mir_strcmp(ptd->notification.lpActions[i].lpzTitle, lpzAction))
continue;
ptd->notification.lpActions[i].pfnCallback(hwnd, message, wparam, lparam,
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 3f0834d28e..40728b454f 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -213,7 +213,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) {
dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i]));
ComboBox_SetItemData(hCtrl, dwItem, i);
- if (PopupOptions.UseEffect && !lstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
+ if (PopupOptions.UseEffect && !mir_tstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
dwActiveItem = dwItem;
}
SendDlgItemMessage(hwnd, IDC_EFFECT, CB_SETCURSEL, dwActiveItem, 0);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 7b441978ed..ce95fadc2c 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -315,13 +315,13 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int index = -1;
OptTree_ProcessMessage(hwndDlg, msg, wParam, lParam, &index, IDC_SKIN_LIST_OPT, skinOptions, skinOptionsCount);
if (index != -1) {
- if (lstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
+ if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopupOptions.SkinPack)) {
skin->setFlag(skinOptions[index].Data, skinOptions[index].bState ? true : false);
}
}
- else if (lstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
+ else if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
switch (skinOptions[index].dwFlag) {
case (1 << 0):
PopupOptions.DisplayTime = skinOptions[index].bState;
@@ -421,7 +421,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack));
//make shure we have select skin (ListBox_SetCurSel may be fail)
ListBox_GetText(hCtrl, ListBox_GetCurSel(hCtrl), &szNewSkin);
- if (lstrcmp(pszOldSkin, szNewSkin) != 0) {
+ if (mir_tstrcmp(pszOldSkin, szNewSkin) != 0) {
mir_free(PopupOptions.SkinPack);
PopupOptions.SkinPack = mir_tstrdup(szNewSkin);
}
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index c7729d199d..515e13256e 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -85,7 +85,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHA while (tvi.hItem) {
TreeView_GetItem(hwndTree, &tvi);
- if (!lstrcmp(tvi.pszText, name))
+ if (!mir_tstrcmp(tvi.pszText, name))
return tvi.hItem;
tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
@@ -324,7 +324,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op int i;
for (i = 0; i < optionCount; ++i) {
if ((!options[i].pszSettingName && !pszSettingName) ||
- (options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName)))
+ (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName)))
{
TVITEM tvi = {0};
tvi.mask = TVIF_HANDLE | TVIF_IMAGE;
@@ -342,7 +342,7 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt HWND hwndTree = GetDlgItem(hwnd, idcTree);
for (int i = 0; i < optionCount; ++i) {
if ((!options[i].pszSettingName && !pszSettingName) ||
- (options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName)))
+ (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName)))
{
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index c33a3f96a0..444c539c95 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -750,7 +750,7 @@ void PopupSkin::loadOptions(std::wistream &f) f.ignore(1024, '\n');
continue;
}
- if (!lstrcmp(buf, _T("option"))) {
+ if (!mir_tstrcmp(buf, _T("option"))) {
int id, val;
f >> id >> val;
f.getline(buf, 1024);
@@ -769,7 +769,7 @@ void PopupSkin::loadOptions(std::wistream &f) else
m_flags &= ~(1 << id);
}
- else if (!lstrcmp(buf, _T("end")))
+ else if (!mir_tstrcmp(buf, _T("end")))
break;
}
delete[] buf;
@@ -842,40 +842,40 @@ void PopupSkin::loadSkin(std::wistream &f) continue;
}
- if (!lstrcmp(buf, _T("popup-version"))) {
+ if (!mir_tstrcmp(buf, _T("popup-version"))) {
f >> m_popup_version;
m_popup_version = PLUGIN_MAKE_VERSION((m_popup_version / 1000000) % 100, (m_popup_version / 10000) % 100, (m_popup_version / 100) % 100, (m_popup_version / 1) % 100);
if (!isCompatible())
break;
}
- else if (!lstrcmp(buf, _T("padding-right"))) {
+ else if (!mir_tstrcmp(buf, _T("padding-right"))) {
f >> m_right_gap;
}
- else if (!lstrcmp(buf, _T("padding-bottom"))) {
+ else if (!mir_tstrcmp(buf, _T("padding-bottom"))) {
f >> m_bottom_gap;
}
- else if (!lstrcmp(buf, _T("shadow-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, _T("shadow-region-opacity"))) {
f >> m_shadow_region_opacity;
}
- else if (!lstrcmp(buf, _T("legacy-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, _T("legacy-region-opacity"))) {
f >> m_legacy_region_opacity;
}
- else if (!lstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, _T("w"))) {
f.getline(buf, 1024);
m_fw.set(buf);
}
- else if (!lstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, _T("h"))) {
f.getline(buf, 1024);
m_fh.set(buf);
}
- else if (!lstrcmp(buf, _T("object"))) {
+ else if (!mir_tstrcmp(buf, _T("object"))) {
head->next = loadObject(f);
if (head->next && ((head->next->type & ST_TYPEMASK) == ST_CLOCK))
m_internalClock = false;
head = head->next;
head->next = NULL;
}
- else if (!lstrcmp(buf, _T("options"))) {
+ else if (!mir_tstrcmp(buf, _T("options"))) {
loadOptions(f);
}
}
@@ -930,32 +930,32 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) continue;
}
- if (!lstrcmp(buf, _T("type"))) {
+ if (!mir_tstrcmp(buf, _T("type"))) {
f >> buf;
- if (!lstrcmp(buf, _T("icon")))
+ if (!mir_tstrcmp(buf, _T("icon")))
element->type = (element->type & ~ST_TYPEMASK) | ST_ICON;
- else if (!lstrcmp(buf, _T("bitmap")))
+ else if (!mir_tstrcmp(buf, _T("bitmap")))
element->type = (element->type & ~ST_TYPEMASK) | ST_MYBITMAP;
- else if (!lstrcmp(buf, _T("text"))) {
+ else if (!mir_tstrcmp(buf, _T("text"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TEXT;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!lstrcmp(buf, _T("title"))) {
+ else if (!mir_tstrcmp(buf, _T("title"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TITLE;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!lstrcmp(buf, _T("avatar"))) {
+ else if (!mir_tstrcmp(buf, _T("avatar"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_AVATAR;
}
- else if (!lstrcmp(buf, _T("clock"))) {
+ else if (!mir_tstrcmp(buf, _T("clock"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_CLOCK;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
}
- else if (!lstrcmp(buf, _T("source"))) {
+ else if (!mir_tstrcmp(buf, _T("source"))) {
f >> buf;
if (((element->type & ST_TYPEMASK) == ST_MYBITMAP) || ((element->type & ST_TYPEMASK) == ST_CLOCK)) {
TCHAR *alpha = mir_tstrdup(buf);
@@ -964,46 +964,46 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) mir_free(alpha);
}
}
- else if (!lstrcmp(buf, _T("mono"))) {
+ else if (!mir_tstrcmp(buf, _T("mono"))) {
element->type |= ST_MONO;
}
- else if (!lstrcmp(buf, _T("layer"))) {
+ else if (!mir_tstrcmp(buf, _T("layer"))) {
element->type |= ST_BLEND;
}
- else if (!lstrcmp(buf, _T("proportional"))) {
+ else if (!mir_tstrcmp(buf, _T("proportional"))) {
f >> element->proportional;
}
- else if (!lstrcmp(buf, _T("x"))) {
+ else if (!mir_tstrcmp(buf, _T("x"))) {
f.getline(buf, 1024);
element->fx.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!lstrcmp(buf, _T("y"))) {
+ else if (!mir_tstrcmp(buf, _T("y"))) {
f.getline(buf, 1024);
element->fy.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!lstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, _T("w"))) {
f.getline(buf, 1024);
element->fw.set(buf);
}
- else if (!lstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, _T("h"))) {
f.getline(buf, 1024);
element->fh.set(buf);
}
- else if (!lstrcmp(buf, _T("ifset"))) {
+ else if (!mir_tstrcmp(buf, _T("ifset"))) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags |= 1 << id;
}
- else if (!lstrcmp(buf, _T("ifnotset"))) {
+ else if (!mir_tstrcmp(buf, _T("ifnotset"))) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags &= ~(1 << id);
}
- else if (!lstrcmp(buf, _T("color"))) {
+ else if (!mir_tstrcmp(buf, _T("color"))) {
if (((element->type & ST_TYPEMASK) != ST_TEXT) &&
((element->type & ST_TYPEMASK) != ST_TITLE) &&
((element->type & ST_TYPEMASK) != ST_CLOCK)) continue;
@@ -1012,7 +1012,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> r >> g >> b;
element->textColor = RGB(r, g, b);
}
- else if (!lstrcmp(buf, _T("clocksize"))) {
+ else if (!mir_tstrcmp(buf, _T("clocksize"))) {
element->clockstart[0] = 0;
f >> element->clocksize[0];
for (int i = 1; i < CLOCK_ITEMS; i++) {
@@ -1020,7 +1020,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> element->clocksize[i];
}
}
- else if (!lstrcmp(buf, _T("end"))) {
+ else if (!mir_tstrcmp(buf, _T("end"))) {
break;
}
}
@@ -1119,7 +1119,7 @@ bool Skins::load(LPCTSTR dir1) WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
- if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && lstrcmp(_T("."), ffd.cFileName) && lstrcmp(_T(".."), ffd.cFileName)) {
+ if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName)) {
SetCurrentDirectory(ffd.cFileName);
SKINLIST *skin = new SKINLIST;
@@ -1147,9 +1147,9 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) {
SKINLIST *any = 0;
for (SKINLIST *p = m_skins; p; p = p->next) {
- if (!lstrcmp(p->name, _T("* Popup Classic")) || !any)
+ if (!mir_tstrcmp(p->name, _T("* Popup Classic")) || !any)
any = p;
- if (!lstrcmpi(p->name, name)) {
+ if (!mir_tstrcmpi(p->name, name)) {
any = p;
break;
}
@@ -1174,7 +1174,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) void Skins::loadActiveSkin()
{
for (SKINLIST *p = m_skins; p; p = p->next)
- if (!lstrcmpi(p->name, PopupOptions.SkinPack)) {
+ if (!mir_tstrcmpi(p->name, PopupOptions.SkinPack)) {
if (p->skin)
break;
@@ -1187,7 +1187,7 @@ void Skins::loadActiveSkin() void Skins::freeAllButActive()
{
for (SKINLIST *p = m_skins; p; p = p->next)
- if (lstrcmpi(p->name, PopupOptions.SkinPack)) {
+ if (mir_tstrcmpi(p->name, PopupOptions.SkinPack)) {
delete p->skin;
p->skin = NULL;
}
diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index e41ee130ce..40039f13fb 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -70,7 +70,7 @@ static int SrmmMenu_ProcessEvent(WPARAM, LPARAM lParam) static int SrmmMenu_ProcessIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (lstrcmpA(sicd->szModule, MODULNAME))
+ if (mir_strcmp(sicd->szModule, MODULNAME))
return 0;
if (!hContact)
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index b02897c206..3a04330268 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -530,7 +530,7 @@ MCONTACT GetSelectedContact(HWND hwndDlg) for(int loop = 0; loop < contacts.getCount(); loop++)
{
- if(!lstrcmpi(cname, GetListName(contacts[loop])))
+ if(!mir_tstrcmpi(cname, GetListName(contacts[loop])))
return contacts[loop]->hcontact;
}
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index b3dd97fdc2..493ade4f56 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -117,7 +117,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) else
replyList.insert(variables_parsedup(value, 0, wParam));
- if (!lstrcmp(value, _T("---")))
+ if (!mir_tstrcmp(value, _T("---")))
AppendMenu((HMENU)hMenu, MF_SEPARATOR, i + 1, NULL);
else
AppendMenu((HMENU)hMenu, MF_STRING, i + 1, replyList[i]);
@@ -130,7 +130,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) int index = TrackPopupMenu(hMenu, TPM_RETURNCMD, cbcd->pt.x, cbcd->pt.y, 0, cbcd->hwndFrom, NULL);
if (index > 0)
{
- if (lstrcmp(replyList[index - 1], _T("")))
+ if (mir_tstrcmp(replyList[index - 1], _T("")))
{
HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE);
if (!hEdit) hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE);
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index 806981626d..17e4237e56 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -110,7 +110,7 @@ int onContactSettingChanged(WPARAM hContact,LPARAM lParam) {
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- if (hContact != NULL && !lstrcmpA(cws->szModule,"CList") && !lstrcmpA(cws->szSetting,"Rate"))
+ if (hContact != NULL && !mir_strcmp(cws->szModule,"CList") && !mir_strcmp(cws->szSetting,"Rate"))
setExtraIcon(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal);
return 0;
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index a4d693c3ac..43e0ef12e4 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -615,7 +615,7 @@ void DeleteFileOrFolder(const char *name) BOOL isMetaContact(MCONTACT hContact)
{
- return lstrcmpA(GetContactProto(hContact), METACONTACTS_PROTOCOL_NAME) == 0;
+ return mir_strcmp(GetContactProto(hContact), METACONTACTS_PROTOCOL_NAME) == 0;
}
diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp index 63a2a0309d..7f12c8c9e6 100644 --- a/plugins/Scriver/src/chat/manager.cpp +++ b/plugins/Scriver/src/chat/manager.cpp @@ -46,9 +46,9 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu pszCurrent = pszOriginal;
while (pTemp != NULL) {
- if (pTemp != currSession && !lstrcmpiA(pszModule, pTemp->pszModule)) {
+ if (pTemp != currSession && !mir_strcmpi(pszModule, pTemp->pszModule)) {
if (my_strstri(pTemp->ptszName, pszOriginal) == pTemp->ptszName) {
- if (prevSession != pTemp && lstrcmpi(pTemp->ptszName, pszCurrent) > 0 && (!pszName || lstrcmpi(pTemp->ptszName, pszName) < 0)) {
+ if (prevSession != pTemp && mir_tstrcmpi(pTemp->ptszName, pszCurrent) > 0 && (!pszName || mir_tstrcmpi(pTemp->ptszName, pszName) < 0)) {
pResult = pTemp;
pszName = pTemp->ptszName;
}
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 596af74bae..475188e03b 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -205,7 +205,7 @@ static void AddToFileList(TCHAR ***pppFiles,int *totalCount,const TCHAR* szFilen mir_tstrcat(szPath,_T("\\*"));
if (( hFind = FindFirstFile( szPath, &fd )) != INVALID_HANDLE_VALUE ) {
do {
- if ( !lstrcmp(fd.cFileName,_T(".")) || !lstrcmp(fd.cFileName,_T(".."))) continue;
+ if ( !mir_tstrcmp(fd.cFileName,_T(".")) || !mir_tstrcmp(fd.cFileName,_T(".."))) continue;
mir_tstrcpy(szPath,szFilename);
mir_tstrcat(szPath,_T("\\"));
mir_tstrcat(szPath,fd.cFileName);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 3a78488668..0b9262c7ec 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -237,7 +237,7 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
char *szProto = GetContactProto(hContact);
- if (!lstrcmpA(cws->szModule, "CList") || !lstrcmpA(cws->szModule, szProto))
+ if (!mir_strcmp(cws->szModule, "CList") || !mir_strcmp(cws->szModule, szProto))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, hContact, lParam);
return 0;
}
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index bd6899a7d7..66a387739c 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -1262,7 +1262,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (tbd->iFlags & TBDF_TEXT) {
TCHAR oldtitle[256];
GetWindowText(hwndDlg, oldtitle, SIZEOF(oldtitle));
- if (lstrcmp(tbd->pszText, oldtitle))
+ if (mir_tstrcmp(tbd->pszText, oldtitle))
SetWindowText(hwndDlg, tbd->pszText);
}
if (tbd->iFlags & TBDF_ICON) {
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index e27515a8f0..db6760389a 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -46,7 +46,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) else szout = ParseString(DEFAULT_USERSTAMP, (MCONTACT)lparam, 0);
SetDlgItemText(hdlg, IDC_INFOTEXT, szout);
- if ( !lstrcmp(szout, TranslateT("<unknown>")))
+ if ( !mir_tstrcmp(szout, TranslateT("<unknown>")))
EnableWindow( GetDlgItem(hdlg, IDC_INFOTEXT), FALSE);
}
break;
diff --git a/plugins/ShellExt/src/shlext.cpp b/plugins/ShellExt/src/shlext.cpp index 702f072fe4..f0ed65c72c 100644 --- a/plugins/ShellExt/src/shlext.cpp +++ b/plugins/ShellExt/src/shlext.cpp @@ -585,7 +585,7 @@ BOOL __stdcall ProcessRequest(HWND hwnd, LPARAM param) hMirandaWorkEvent = OpenEventA(EVENT_ALL_ACCESS, false, CreateProcessUID(pid, szBuf, sizeof(szBuf)));
if (hMirandaWorkEvent != 0) {
GetClassNameA(hwnd, szBuf, sizeof(szBuf));
- if ( lstrcmpA(szBuf, MIRANDACLASS) != 0) {
+ if ( mir_strcmp(szBuf, MIRANDACLASS) != 0) {
// opened but not valid.
logA("ProcessRequest(%d, %p): class %s differs from %s\n", pid, hwnd, szBuf, MIRANDACLASS);
CloseHandle(hMirandaWorkEvent);
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index d92b88e851..092f6ce090 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -238,7 +238,7 @@ INT addEvent(WPARAM hContact, LPARAM lParam) TCHAR *ptszTemp, *ptszTemp2;
db_get_ts(hContact,pszProto,"Nick",&dbvNick);
- if (lstrcmp(dbvNick.ptszVal, NULL) == 0)
+ if (mir_tstrcmp(dbvNick.ptszVal, NULL) == 0)
{
db_free(&dbvNick);
return FALSE;
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index bbf0c7fcef..4871d80f72 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -186,7 +186,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status) mir_free(g_ptszWinampSong);
g_ptszWinampSong = mir_tstrdup(ptszWinampTitle);
}
- else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg"))
+ else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg"))
&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))
{
ptszWinampTitle = mir_tstrdup(g_ptszWinampSong);
@@ -1392,7 +1392,7 @@ VOID CALLBACK UpdateMsgTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD d mir_snprintf(szBuffer, SIZEOF(szBuffer), "Cur%sMsg", accounts->pa[i]->szModuleName);
if (!db_get_ts(NULL, "SimpleStatusMsg", szBuffer, &dbv))
{
- if (tszMsg && dbv.ptszVal && !lstrcmp(tszMsg, dbv.ptszVal) || !tszMsg && !dbv.ptszVal)
+ if (tszMsg && dbv.ptszVal && !mir_tstrcmp(tszMsg, dbv.ptszVal) || !tszMsg && !dbv.ptszVal)
{
db_free(&dbv);
mir_free(tszMsg);
@@ -1620,7 +1620,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM lParam) mir_snprintf(buff, SIZEOF(buff), "SMsg%d", j);
if (!db_get_ts(NULL, "SimpleStatusMsg", buff, &dbv))
{
- if (!lstrcmp(dbv.ptszVal, szMsgW))
+ if (!mir_tstrcmp(dbv.ptszVal, szMsgW))
{
found = TRUE;
mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", ps[i]->szName);
@@ -1666,7 +1666,7 @@ static TCHAR *ParseWinampSong(ARGUMENTSINFO *ai) mir_free(g_ptszWinampSong);
g_ptszWinampSong = mir_tstrdup(ptszWinampTitle);
}
- else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))
+ else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))
ptszWinampTitle = mir_tstrdup(g_ptszWinampSong);
return ptszWinampTitle;
@@ -1864,7 +1864,7 @@ static int OnOkToExit(WPARAM, LPARAM) db_set_w(NULL, "SimpleStatusMsg", szSetting, (WORD)CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0));
}
- if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/)
+ if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/)
DBWriteMessage("AmpLastTitle", g_ptszWinampSong);
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index f0b8941f09..77079b465e 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -614,7 +614,7 @@ int AddToPredefined(HWND hwndDlg, struct MsgBoxData *data) newitem.pszText = text; SendMessage(data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&newitem); - if (LOWORD(newitem.lParam) == PREDEFINED_MSG && !lstrcmp(text, msg)) + if (LOWORD(newitem.lParam) == PREDEFINED_MSG && !mir_tstrcmp(text, msg)) return num_items; } @@ -1177,7 +1177,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA for (int i = 1; i <= msgbox_data->max_hist_msgs; i++) { mir_snprintf(buff, SIZEOF(buff), "SMsg%d", i); if (!db_get_ts(NULL, "SimpleStatusMsg", buff, &dbv)) { - if (!lstrcmp(dbv.ptszVal, tszMsg)) { + if (!mir_tstrcmp(dbv.ptszVal, tszMsg)) { found = TRUE; if (msgbox_data->m_szProto) { mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", msgbox_data->m_szProto); diff --git a/plugins/SmileyAdd/src/regexp/WCPattern.cpp b/plugins/SmileyAdd/src/regexp/WCPattern.cpp index 15ea5d5149..3081143e75 100644 --- a/plugins/SmileyAdd/src/regexp/WCPattern.cpp +++ b/plugins/SmileyAdd/src/regexp/WCPattern.cpp @@ -41,7 +41,7 @@ const unsigned long WCPattern::UNIX_LINE_MODE = 0x10; #define is_alpha IsCharAlphaW
#if defined(_WIN32)
-#define str_icmp lstrcmpiW
+#define str_icmp mir_wstrcmpi
#elif defined(__CYGWIN__) || defined(__APPLE__)
#include <wctype.h>
static inline int str_icmp(const wchar_t * a, const wchar_t * b)
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 10446dbfc2..8a1947424c 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -697,7 +697,7 @@ SmileyPackType* SmileyPackListType::GetSmileyPack(CMString& filename) for (int i=0; i < m_SmileyPacks.getCount(); i++) {
CMString modpath1;
pathToAbsolute(m_SmileyPacks[i].GetFilename(), modpath1);
- if (lstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i];
+ if (mir_tstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i];
}
return NULL;
}
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index c794aca5f8..44597254e0 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -741,7 +741,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) for (int i = 0; i < tmp_dicts->getCount(); i++) { Dictionary *dict = (*tmp_dicts)[i]; - if (lstrcmpi(dict->language, name) == 0) { + if (mir_tstrcmpi(dict->language, name) == 0) { GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGLANGUAGE, dict->english_name, SIZEOF(dict->english_name)); GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLANGUAGE, dict->localized_name, SIZEOF(dict->localized_name)); @@ -793,7 +793,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) if (dict->localized_name[0] == _T('\0')) { for (size_t j = 0; j < SIZEOF(aditionalLanguages); j++) { - if (!lstrcmp(aditionalLanguages[j].language, dict->language)) { + if (!mir_tstrcmp(aditionalLanguages[j].language, dict->language)) { mir_tstrncpy(dict->localized_name, TranslateTS(aditionalLanguages[j].localized_name), SIZEOF(dict->localized_name)); break; } @@ -848,7 +848,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH // Check if dict is new bool exists = false; for (int i = 0; i < dicts.getCount() && !exists; i++) - if (lstrcmp(dicts[i]->language, lang) == 0) + if (mir_tstrcmp(dicts[i]->language, lang) == 0) exists = true; if (!exists) { @@ -899,7 +899,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa key[cchValue] = 0; TCHAR *pos; if (pos = _tcsrchr(key, _T('\\'))) { - if (!lstrcmpi(&pos[1], otherHunspellApps[i].key)) { + if (!mir_tstrcmpi(&pos[1], otherHunspellApps[i].key)) { pos[0] = 0; lResult = ERROR_SUCCESS; break; @@ -927,7 +927,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa // Sort dicts for (int i = 0; i < dicts.getCount(); i++) { for (int j = i + 1; j < dicts.getCount(); j++) { - if (lstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) { + if (mir_tstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) { Dictionary *dict = dicts[i]; sl->items[i] = dicts[j]; sl->items[j] = dict; diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 99f9348962..ba60ccf58d 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -101,7 +101,7 @@ void LoadOptions() int i;
for(i = 0; i < languages.getCount(); i++)
- if (lstrcmp(languages[i]->language, opts.default_language) == 0)
+ if (mir_tstrcmp(languages[i]->language, opts.default_language) == 0)
break;
if (i >= languages.getCount())
@@ -180,7 +180,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LPARAM)languages[i]->full_name);
SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (LPARAM)languages[i]);
- if ( !lstrcmp(opts.default_language, languages[i]->language))
+ if ( !mir_tstrcmp(opts.default_language, languages[i]->language))
sel = i;
}
SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0);
@@ -379,7 +379,7 @@ static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)p->full_name);
SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (LPARAM)new AutoreplaceData(p));
- if ( !lstrcmp(opts.default_language, p->language))
+ if ( !mir_tstrcmp(opts.default_language, p->language))
sel = i;
}
SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0);
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 1027a2a732..cbfab5dddf 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -188,7 +188,7 @@ static int ModulesLoaded(WPARAM, LPARAM) mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); dict->autoReplace = new AutoReplaceMap(filename, dict); - if (lstrcmp(dict->language, opts.default_language) == 0) + if (mir_tstrcmp(dict->language, opts.default_language) == 0) dict->load(); } diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 6b29b3335e..ccf4baf5ee 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -684,7 +684,7 @@ int GetClosestLanguage(TCHAR *lang_name) // Search the language by name
for (i = 0; i < languages.getCount(); i++)
- if (lstrcmpi(languages[i]->language, lang_name) == 0)
+ if (mir_tstrcmpi(languages[i]->language, lang_name) == 0)
return i;
// Try searching by the prefix only
@@ -697,7 +697,7 @@ int GetClosestLanguage(TCHAR *lang_name) // First check if there is a language that is only the prefix
for (i = 0; i < languages.getCount(); i++)
- if (lstrcmpi(languages[i]->language, lang) == 0)
+ if (mir_tstrcmpi(languages[i]->language, lang) == 0)
return i;
// Now try any suffix
@@ -744,9 +744,9 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch for (int i = 0; i < languages.getCount(); i++) {
Dictionary *dict = languages[i];
- if (lstrcmpi(dict->localized_name, lang) == 0
- || lstrcmpi(dict->english_name, lang) == 0
- || lstrcmpi(dict->language, lang) == 0) {
+ if (mir_tstrcmpi(dict->localized_name, lang) == 0
+ || mir_tstrcmpi(dict->english_name, lang) == 0
+ || mir_tstrcmpi(dict->language, lang) == 0) {
mir_tstrncpy(dlg->lang_name, dict->language, SIZEOF(dlg->lang_name));
break;
}
diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp index d7c489669d..18b3e7b108 100644 --- a/plugins/SplashScreen/src/bitmap_funcs.cpp +++ b/plugins/SplashScreen/src/bitmap_funcs.cpp @@ -210,7 +210,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha) TCHAR *ext;
ext = &fn[mir_tstrlen(fn)-4];
- if (!lstrcmpi(ext, _T(".png")))
+ if (!mir_tstrcmpi(ext, _T(".png")))
{
HANDLE hFile, hMap = NULL;
BYTE* ppMap = NULL;
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index 010e8a81fe..495d270d61 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -202,7 +202,7 @@ void SplashMain() logMessage(_T("Extention"), ext);
#endif
- if (lstrcmpi(ext, _T(".png")) & lstrcmpi(ext, _T(".bmp")))
+ if (mir_tstrcmpi(ext, _T(".png")) & mir_tstrcmpi(ext, _T(".bmp")))
continue;
#ifdef _DEBUG
@@ -240,7 +240,7 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) TCHAR * tszModule= mir_a2t(cws->szModule), *tszSetting = mir_a2t(cws->szSetting);
if(options.inheritGS)
{
- if (!lstrcmp(tszModule, _T("Skin")) & !lstrcmp(tszSetting, _T("UseSound")))
+ if (!mir_tstrcmp(tszModule, _T("Skin")) & !mir_tstrcmp(tszSetting, _T("UseSound")))
{
db_set_b(NULL, MODNAME, "PlaySound", cws->value.bVal);
#ifdef _DEBUG
@@ -250,7 +250,7 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
#endif
}
- if (!lstrcmp(tszModule, _T("PluginDisable")) & (!lstrcmp(tszSetting, szDllName)))
+ if (!mir_tstrcmp(tszModule, _T("PluginDisable")) & (!mir_tstrcmp(tszSetting, szDllName)))
{
db_set_b(NULL, MODNAME, "Active", cws->value.bVal);
#ifdef _DEBUG
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index 567feaea6d..33b130e1e7 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -34,7 +34,7 @@ int CompareSettings(const TAAAProtoSetting *p1, const TAAAProtoSetting *p2)
{
- return lstrcmpA(p1->szName, p2->szName);
+ return mir_strcmp(p1->szName, p2->szName);
}
TAAAProtoSettingList autoAwaySettings(10, CompareSettings);
@@ -198,7 +198,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) case PRAC_REMOVED:
for (int i = 0; i < autoAwaySettings.getCount(); i++) {
- if (!lstrcmpA(autoAwaySettings[i].szName, pa->szModuleName)) {
+ if (!mir_strcmp(autoAwaySettings[i].szName, pa->szModuleName)) {
autoAwaySettings.remove(i);
break;
}
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index d1b2192697..163e48f237 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -42,7 +42,7 @@ static HWND hMessageWindow = NULL; static int CompareConnections( const TConnectionSettings *p1, const TConnectionSettings *p2 ) { - return lstrcmpA( p1->szName, p2->szName ); + return mir_strcmp( p1->szName, p2->szName ); } static OBJLIST<TConnectionSettings> connectionSettings( 10, CompareConnections ); @@ -226,7 +226,7 @@ static int AssignStatus(TConnectionSettings* cs, int status, int lastStatus, TCH log_infoA("KeepStatus: assigning status %d to %s", cs->status, cs->szName); - if ( szMsg != NULL && lstrcmp(szMsg, cs->szMsg)) { + if ( szMsg != NULL && mir_tstrcmp(szMsg, cs->szMsg)) { if ( cs->szMsg != NULL ) free(cs->szMsg); @@ -1107,7 +1107,7 @@ INT_PTR AnnounceStatusChangeService(WPARAM wParam, LPARAM lParam) for ( int i=0; i < connectionSettings.getCount(); i++ ) { TConnectionSettings& cs = connectionSettings[i]; - if ( !lstrcmpA( cs.szName, newSituation->szName )) + if ( !mir_strcmp( cs.szName, newSituation->szName )) AssignStatus(&cs, newSituation->status, newSituation->lastStatus, newSituation->szMsg); } @@ -1174,7 +1174,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) case PRAC_REMOVED: for (int i = 0; i < connectionSettings.getCount(); i++) { - if (!lstrcmpA(connectionSettings[i].szName, pa->szModuleName)) { + if (!mir_strcmp(connectionSettings[i].szName, pa->szModuleName)) { connectionSettings.remove(i); break; } diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index f00a0a49dc..9065e97b43 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -23,7 +23,7 @@ static UINT_PTR setStatusTimerId = 0; int CompareSettings(const TSSSetting *p1, const TSSSetting *p2)
{
- return lstrcmpA(p1->szName, p2->szName);
+ return mir_strcmp(p1->szName, p2->szName);
}
static TSettingsList startupSettings(10, CompareSettings);
@@ -191,7 +191,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) case PRAC_REMOVED:
for (int i = 0; i < startupSettings.getCount(); i++) {
- if (!lstrcmpA(startupSettings[i].szName, pa->szModuleName)) {
+ if (!mir_strcmp(startupSettings[i].szName, pa->szModuleName)) {
startupSettings.remove(i);
break;
}
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 04305df0b1..9813826bde 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -43,7 +43,7 @@ struct TConfirmSetting : public PROTOCOLSETTINGEX };
static int CompareSettings( const TConfirmSetting* p1, const TConfirmSetting* p2 )
-{ return lstrcmpA( p1->szName, p2->szName );
+{ return mir_strcmp( p1->szName, p2->szName );
}
static OBJLIST<TConfirmSetting> *confirmSettings;
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index d0779d747b..4d828d5c1c 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -106,7 +106,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // if answer not empty
if (answer.length() > 0) {
// if message equal right answer...
- if (plSets->AnswNotCaseSens.Get() ? !lstrcmpi(message.c_str(), answer.c_str()) : !lstrcmp(message.c_str(), answer.c_str())) {
+ if (plSets->AnswNotCaseSens.Get() ? !mir_tstrcmpi(message.c_str(), answer.c_str()) : !mir_tstrcmp(message.c_str(), answer.c_str())) {
// unhide contact
db_unset(hContact, "CList", "Hidden");
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index cdc0a8af53..9bc5f5dc47 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -885,7 +885,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) mir_tstrncpy(szTimeStamp, pci->MakeTimeStamp(g_Settings.pszTimeStamp, lin->time), 30);
mir_tstrncpy(szOldTimeStamp, pci->MakeTimeStamp(g_Settings.pszTimeStamp, streamData->si->LastTime), 30);
- if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || lstrcmp(szTimeStamp, szOldTimeStamp)) {
+ if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || mir_tstrcmp(szTimeStamp, szOldTimeStamp)) {
streamData->si->LastTime = lin->time;
Log_AppendRTF(streamData, TRUE, &buffer, &bufferEnd, &bufferAlloced, _T("%s"), szTimeStamp);
}
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index 500e5f394d..cd1fdeb004 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -35,7 +35,7 @@ static int sttCompareNicknames(const TCHAR *s1, const TCHAR *s2) if (*s1 && !*s2) return -1;
// compare tails
- return lstrcmpi(s1, s2);
+ return mir_tstrcmpi(s1, s2);
}
int UM_CompareItem(USERINFO *u1, const TCHAR* pszNick, WORD wStatus)
@@ -52,7 +52,7 @@ int UM_CompareItem(USERINFO *u1, const TCHAR* pszNick, WORD wStatus) if (g_Settings.bAlternativeSorting)
return sttCompareNicknames(u1->pszNick, pszNick);
else
- return lstrcmp(u1->pszNick, pszNick);
+ return mir_tstrcmp(u1->pszNick, pszNick);
}
dw1 = dw1 >> 1;
dw2 = dw2 >> 1;
@@ -60,7 +60,7 @@ int UM_CompareItem(USERINFO *u1, const TCHAR* pszNick, WORD wStatus) if (g_Settings.bAlternativeSorting)
return sttCompareNicknames(u1->pszNick, pszNick);
- return lstrcmp(u1->pszNick, pszNick);
+ return mir_tstrcmp(u1->pszNick, pszNick);
}
//---------------------------------------------------
@@ -113,9 +113,9 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu SESSION_INFO *pResult = NULL;
for (SESSION_INFO *si = pci->wndList; si; si = si->next)
- if (si != currSession && !lstrcmpiA(pszModule, si->pszModule))
+ if (si != currSession && !mir_strcmpi(pszModule, si->pszModule))
if (my_strstri(si->ptszName, pszOriginal) == si->ptszName)
- if (prevSession != si && lstrcmpi(si->ptszName, pszCurrent) > 0 && (!pszName || lstrcmpi(si->ptszName, pszName) < 0)) {
+ if (prevSession != si && mir_tstrcmpi(si->ptszName, pszCurrent) > 0 && (!pszName || mir_tstrcmpi(si->ptszName, pszName) < 0)) {
pResult = si;
pszName = si->ptszName;
}
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp index cd25c3d063..5e9059f823 100644 --- a/plugins/TabSRMM/src/chat/muchighlight.cpp +++ b/plugins/TabSRMM/src/chat/muchighlight.cpp @@ -307,7 +307,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProcAdd(HWND hwndDlg, UINT msg, WPARAM wParam Utils::showDlgControl(hwndDlg, IDC_ADDHIGHLIGHTEDITLIST, SW_HIDE);
::SetDlgItemText(hwndDlg, IDC_ADDHIGHLIGHTTITLE, TranslateT("Add user to highlight list"));
::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_INSERTSTRING, -1, (LPARAM)the->ui->pszNick);
- if ( lstrcmp(the->ui->pszNick, the->ui->pszUID))
+ if ( mir_tstrcmp(the->ui->pszNick, the->ui->pszUID))
::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_INSERTSTRING, -1, (LPARAM)the->ui->pszUID);
::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_SETCURSEL, 0, 0);
}
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index dcbb4947e2..7c121e34f1 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -663,7 +663,7 @@ char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex) *iNickIndex = 0;
for (USERINFO *ui = si->pUsers; ui; ui = ui->next) {
- if (!lstrcmp(ui->pszNick, ptszNick)) {
+ if (!mir_tstrcmp(ui->pszNick, ptszNick)) {
STATUSINFO *ti = pci->TM_FindStatus(si->pStatuses, pci->TM_WordToString(si->pStatuses, ui->Status));
if (ti && (int)ti->hIcon < si->iStatusCount) {
if (iNickIndex)
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 1fb1a58d68..e867a9083f 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2814,7 +2814,7 @@ LABEL_SHOWWINDOW: HMENU hMenu = 0; USERINFO uiNew; for (USERINFO *ui = si->pUsers; ui; ui = ui->next) { - if ( lstrcmp(ui->pszNick, tr.lpstrText)) + if ( mir_tstrcmp(ui->pszNick, tr.lpstrText)) continue; pt.x = (short) LOWORD(((ENLINK *) lParam)->lParam); diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 727a1d09ca..07af0eb40b 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2167,7 +2167,7 @@ void TSAPI DeleteContainer(int iIndex) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY)); - if (!lstrcmp(tszValue, tszContainerName)) + if (!mir_tstrcmp(tszValue, tszContainerName)) db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY); } @@ -2201,7 +2201,7 @@ void TSAPI RenameContainer(int iIndex, const TCHAR *szNew) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY)); - if (!lstrcmp(tszValue, tszContainerName)) + if (!mir_tstrcmp(tszValue, tszContainerName)) db_set_ts(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew); } } diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 03d1ff2daf..01b222736d 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -417,11 +417,11 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) }
}
- if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto)))
+ if (mir_strcmp(cws->szModule, "CList") && (szProto == NULL || mir_strcmp(cws->szModule, szProto)))
return 0;
- if (!lstrcmpA(cws->szModule, META_PROTO))
- if (hContact != 0 && !lstrcmpA(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact
+ if (!mir_strcmp(cws->szModule, META_PROTO))
+ if (hContact != 0 && !mir_strcmp(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact
return 0;
if (hwnd) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 511614cd6d..d4f2bf31ce 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -1106,7 +1106,7 @@ void Utils::AddToFileList(TCHAR ***pppFiles, int *totalCount, LPCTSTR szFilename mir_tstrcat(szPath, _T("\\*"));
if ((hFind = FindFirstFile(szPath, &fd)) != INVALID_HANDLE_VALUE) {
do {
- if (!lstrcmp(fd.cFileName, _T(".")) || !lstrcmp(fd.cFileName, _T("..")))
+ if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
continue;
mir_tstrcpy(szPath, szFilename);
mir_tstrcat(szPath, _T("\\"));
diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 3a00979545..92bca196e0 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -131,21 +131,21 @@ void ParseImagePart(FILE *fp, TCHAR *buff, int iPart) }
else if (_tcsstr(buff, _T("tm")))
{
- if (!lstrcmpi(pch, _T("TM_NONE")))
+ if (!mir_tstrcmpi(pch, _T("TM_NONE")))
opt.transfMode[iPart] = TM_NONE;
- else if (!lstrcmpi(pch, _T("TM_CENTRE")))
+ else if (!mir_tstrcmpi(pch, _T("TM_CENTRE")))
opt.transfMode[iPart] = TM_CENTRE;
- else if (!lstrcmpi(pch, _T("TM_STRECH_ALL")))
+ else if (!mir_tstrcmpi(pch, _T("TM_STRECH_ALL")))
opt.transfMode[iPart] = TM_STRECH_ALL;
- else if (!lstrcmpi(pch, _T("TM_STRECH_HORIZONTAL")))
+ else if (!mir_tstrcmpi(pch, _T("TM_STRECH_HORIZONTAL")))
opt.transfMode[iPart] = TM_STRECH_HORIZONTAL;
- else if (!lstrcmpi(pch, _T("TM_STRECH_VERTICAL")))
+ else if (!mir_tstrcmpi(pch, _T("TM_STRECH_VERTICAL")))
opt.transfMode[iPart] = TM_STRECH_VERTICAL;
- else if (!lstrcmpi(pch, _T("TM_TILE_ALL")))
+ else if (!mir_tstrcmpi(pch, _T("TM_TILE_ALL")))
opt.transfMode[iPart] = TM_TILE_ALL;
- else if (!lstrcmpi(pch, _T("TM_TILE_HORIZONTAL")))
+ else if (!mir_tstrcmpi(pch, _T("TM_TILE_HORIZONTAL")))
opt.transfMode[iPart] = TM_TILE_HORIZONTAL;
- else if (!lstrcmpi(pch, _T("TM_TILE_VERTICAL")))
+ else if (!mir_tstrcmpi(pch, _T("TM_TILE_VERTICAL")))
opt.transfMode[iPart] = TM_TILE_VERTICAL;
else
opt.transfMode[iPart] = TM_NONE;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 4a44de9750..70e78edfe0 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -211,9 +211,9 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
bool idle = false;
- if (lstrcmpA(cws->szSetting,"Status")==0)
+ if (mir_strcmp(cws->szSetting,"Status")==0)
idle = false;
- else if (lstrcmpA(cws->szSetting,"IdleTS")==0)
+ else if (mir_strcmp(cws->szSetting,"IdleTS")==0)
idle = true;
else return 0;
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index 762c533e1f..0a192da59b 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -134,7 +134,7 @@ static bool nameexists(const char *name) return false;
for (int i = 0; i < Buttons.getCount(); i++)
- if (!lstrcmpA(Buttons[i]->pszName, name))
+ if (!mir_strcmp(Buttons[i]->pszName, name))
return true;
return false;
diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp index 57e9dfdcaa..6f7c21e503 100644 --- a/plugins/TrafficCounter/src/opttree.cpp +++ b/plugins/TrafficCounter/src/opttree.cpp @@ -93,7 +93,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHA {
TreeView_GetItem(hwndTree, &tvi);
- if (!lstrcmp(tvi.pszText, name))
+ if (!mir_tstrcmp(tvi.pszText, name))
return tvi.hItem;
tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
@@ -368,7 +368,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op for (i = 0; i < optionCount; ++i)
{
if ((!options[i].szSettingName && !szSettingName) ||
- (options[i].szSettingName && szSettingName && !lstrcmpA(options[i].szSettingName, szSettingName)))
+ (options[i].szSettingName && szSettingName && !mir_strcmp(options[i].szSettingName, szSettingName)))
{
TVITEM tvi;
tvi.mask = TVIF_HANDLE|TVIF_IMAGE;
@@ -390,7 +390,7 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt for (i = 0; i < optionCount; ++i)
{
if ((!options[i].szSettingName && !szSettingName) ||
- (options[i].szSettingName && szSettingName && !lstrcmpA(options[i].szSettingName, szSettingName)))
+ (options[i].szSettingName && szSettingName && !mir_strcmp(options[i].szSettingName, szSettingName)))
{
TVITEM tvi;
tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index f0d7764e0e..192010f6e5 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -386,10 +386,10 @@ VOID SwitchLayout(bool lastword) TCHAR szClassName[MAX_PATH];
GetClassName(hwnd2, szClassName, SIZEOF(szClassName));
- if ((lstrcmp(szClassName, _T("THppRichEdit.UnicodeClass")) == 0 || lstrcmp(szClassName, _T("THistoryGrid.UnicodeClass")) == 0 || lstrcmp(szClassName, _T("TExtHistoryGrid.UnicodeClass")) == 0 || lstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) && ServiceExists(MS_POPUP_SHOWMESSAGE)) { // make popup here
+ if ((mir_tstrcmp(szClassName, _T("THppRichEdit.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("THistoryGrid.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("TExtHistoryGrid.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) && ServiceExists(MS_POPUP_SHOWMESSAGE)) { // make popup here
TCHAR buf[2048];
- if (lstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) {
+ if (mir_tstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) {
TCHAR *selected = 0;
IEVIEWEVENT event;
HWND hwnd3 = GetParent(GetParent(hwnd2));
@@ -447,7 +447,7 @@ VOID SwitchLayout(bool lastword) PUAddPopupT(&pd);
}
}
- else if (lstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
+ else if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
DWORD dwStart, dwEnd;
size_t i, slen, start = 0, end = 0;
TCHAR *sel, tchr;
@@ -539,7 +539,7 @@ void TranslitLayout(bool lastword) GetClassName(hwnd2, szClassName, SIZEOF(szClassName));
- if (lstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
+ if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
DWORD dwStart, dwEnd;
size_t slen, start = 0, end = 0;
TCHAR *sel, *boo = NULL;
@@ -618,7 +618,7 @@ void InvertCase(bool lastword) GetClassName(hwnd2, szClassName, SIZEOF(szClassName));
- if (lstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
+ if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
DWORD dwStart, dwEnd;
size_t slen, start = 0, end = 0;
TCHAR *sel, *boo = NULL;
@@ -686,7 +686,7 @@ void InvertCase(bool lastword) int OnButtonPressed(WPARAM wParam, LPARAM lParam)
{
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
- if (lstrcmpA(cbcd->pszModule, "Switch Layout and Send") == 0) {
+ if (mir_strcmp(cbcd->pszModule, "Switch Layout and Send") == 0) {
HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE);
if (!hEdit)
hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE);
@@ -760,7 +760,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) mir_free(sel);
return 1;
}
- if (lstrcmpA(cbcd->pszModule, "Translit and Send") == 0) {
+ if (mir_strcmp(cbcd->pszModule, "Translit and Send") == 0) {
HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE);
if (!hEdit)
hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE);
@@ -802,7 +802,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) mir_free(sel);
return 1;
}
- if (lstrcmpA(cbcd->pszModule, "Invert Case and Send") == 0) {
+ if (mir_strcmp(cbcd->pszModule, "Invert Case and Send") == 0) {
HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE);
if (!hEdit)
hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE);
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 637c6472a4..31251d0c20 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -170,9 +170,9 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) /* user details update */
DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
- if (!lstrcmpA(dbcws->szSetting, SET_CONTACT_COUNTRY) ||
- !lstrcmpA(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) ||
- !lstrcmpA(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY))
+ if (!mir_strcmp(dbcws->szSetting, SET_CONTACT_COUNTRY) ||
+ !mir_strcmp(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) ||
+ !mir_strcmp(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY))
{
/* Extra Image */
SetExtraImage(hContact);
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 326d610276..304dc426ea 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -1336,13 +1336,13 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar break;
}
- if ( !lstrcmpA(pdbcws->szSetting, SET_CONTACT_MYHANDLE) || !lstrcmpA(pdbcws->szSetting, SET_CONTACT_NICK)) {
+ if ( !mir_strcmp(pdbcws->szSetting, SET_CONTACT_MYHANDLE) || !mir_strcmp(pdbcws->szSetting, SET_CONTACT_NICK)) {
// force the update of all propertysheetpages
DlgProc(hDlg, PSM_FORCECHANGED, NULL, NULL);
// update the windowtitle
DlgProc(hDlg, HM_SETWINDOWTITLE, NULL, lParam);
}
- else if ( !lstrcmpA(pdbcws->szModule, USERINFO) || !lstrcmpA(pdbcws->szModule, pPs->pszProto) || !lstrcmpA(pdbcws->szModule, MOD_MBIRTHDAY)) {
+ else if ( !mir_strcmp(pdbcws->szModule, USERINFO) || !mir_strcmp(pdbcws->szModule, pPs->pszProto) || !mir_strcmp(pdbcws->szModule, MOD_MBIRTHDAY)) {
// force the update of all propertysheetpages
DlgProc(hDlg, PSM_FORCECHANGED, NULL, NULL);
}
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 2b4fd52fc3..bc44363ab4 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -489,7 +489,7 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact) // compare protocols pszProto = DB::Contact::Proto(hContact); - if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || lstrcmpA(pszProto, _pszProto)) + if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || mir_strcmp(pszProto, _pszProto)) return FALSE; // compare uids diff --git a/plugins/UserInfoEx/src/psp_about.cpp b/plugins/UserInfoEx/src/psp_about.cpp index aec494654a..2ee8e1fc78 100644 --- a/plugins/UserInfoEx/src/psp_about.cpp +++ b/plugins/UserInfoEx/src/psp_about.cpp @@ -42,7 +42,7 @@ INT_PTR CALLBACK PSPProcEdit(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, PSGetBoldFont(hDlg, hBoldFont);
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
- if (!lstrcmpA(pszSetting, SET_CONTACT_MYNOTES))
+ if (!mir_strcmp(pszSetting, SET_CONTACT_MYNOTES))
SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENT("My notes:"));
else
SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENT("About:"));
diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 8e97677eb6..9cd745643a 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -254,7 +254,7 @@ static UINT MyCountriesCount = 0; static int __cdecl ListSortProc(const LPIDSTRLIST p1, const LPIDSTRLIST p2)
{
- return lstrcmpi(p1->ptszTranslated, p2->ptszTranslated);
+ return mir_tstrcmpi(p1->ptszTranslated, p2->ptszTranslated);
}
/**
diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp index 0582c9c82d..c440d15f3a 100644 --- a/plugins/UserInfoEx/src/svc_gender.cpp +++ b/plugins/UserInfoEx/src/svc_gender.cpp @@ -92,7 +92,7 @@ static int OnCListApplyIcons(MCONTACT hContact, LPARAM) static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
- if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !lstrcmpA(pdbcws->szSetting, SET_CONTACT_GENDER))
+ if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !mir_strcmp(pdbcws->szSetting, SET_CONTACT_GENDER))
OnCListApplyIcons(hContact, 0);
return 0;
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index a5052f2b3d..5ebe29ec83 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -91,8 +91,8 @@ class CTzBias : public LIST<CTimeZone> {
int result = tz2->Bias - tz1->Bias;
// DO NOT USE mir_tcsicmp here as it does only return TRUE or FALSE!!!
- // lstrcmpi takes care of umlauts e.g. Ä,Ö,....
- return (result || !tz1->ptszDisplay || !tz2->ptszDisplay) ? result : lstrcmpi(tz1->ptszDisplay, tz2->ptszDisplay);
+ // mir_tstrcmpi takes care of umlauts e.g. Ä,Ö,....
+ return (result || !tz1->ptszDisplay || !tz2->ptszDisplay) ? result : mir_tstrcmpi(tz1->ptszDisplay, tz2->ptszDisplay);
}
public:
CTzBias() : LIST<CTimeZone>(50, (FTSortFunc) CTzBias::sortFunc)
diff --git a/plugins/Utils/mir_options.cpp b/plugins/Utils/mir_options.cpp index 59b9ff6748..d8f90efedf 100644 --- a/plugins/Utils/mir_options.cpp +++ b/plugins/Utils/mir_options.cpp @@ -270,7 +270,7 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha int i;
for (i = 0; i < count; i++) {
TCHAR *id = (TCHAR *)SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETITEMDATA, (WPARAM)i, 0);
- if (lstrcmp(id, tmp) == 0)
+ if (mir_tstrcmp(id, tmp) == 0)
break;
}
if (i < count)
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 7e79114115..fe0899d6ad 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -237,7 +237,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) tr = NULL; if (*cur==FIELD_CHAR) { for(i = 0; i < fi->cbTemporaryVarsSize; i += 2) { - if (lstrcmp(fi->tszaTemporaryVars[i], token) == 0) { + if (mir_tstrcmp(fi->tszaTemporaryVars[i], token) == 0) { tmpVarPos = i; break; } diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 61904d5a9e..51387e5908 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -178,7 +178,7 @@ int Doubleclick(WPARAM wParam, LPARAM lParam) {
MCONTACT hContact = wParam;
char *szProto = GetContactProto(hContact);
- if ( lstrcmpA(MODULENAME, szProto))
+ if ( mir_strcmp(MODULENAME, szProto))
return 0;
int action = db_get_b(hContact, MODULENAME, DBLE_WIN_KEY, 1);
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 2731f9a263..ea05a9142c 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -132,7 +132,7 @@ static MCONTACT FindContactByUrl(HWND hwndDlg) ptrT db1( db_get_tsa(hContact, MODULENAME, URL_KEY));
ptrT db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
- if (!lstrcmp(urltext, db1) && !lstrcmp(titlebartxt, db2)) {
+ if (!mir_tstrcmp(urltext, db1) && !mir_tstrcmp(titlebartxt, db2)) {
contactcount++;
if (contactcount > 1) {
MessageBox(NULL, TranslateT("ERROR: You have two or more Webview contacts with the same URL and contact name."), _T(MODULENAME), MB_OK);
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 924b8ab9e6..998ec84c8b 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -97,7 +97,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) FILE *pcachefile = _tfopen(newcachepath, _T("r")); if (pcachefile != NULL) { fclose(pcachefile); - if (lstrcmp(newcachepath, renamedcachepath)) { + if (mir_tstrcmp(newcachepath, renamedcachepath)) { MoveFile(newcachepath, renamedcachepath); db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, renamedcachepath); } @@ -112,7 +112,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) int SiteDeleted(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = wParam; - if (lstrcmpA(GetContactProto(hContact), MODULENAME)) + if (mir_strcmp(GetContactProto(hContact), MODULENAME)) return 0; ptrT contactName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); @@ -355,7 +355,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) // check ID to see if the contact already exist in the database if (db_get_ts(hContact, MODULENAME, "URL", &dbv)) continue; - if (!lstrcmpi(psr->nick, dbv.ptszVal)) { + if (!mir_tstrcmpi(psr->nick, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the // contact visible // and add them on the list @@ -406,7 +406,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) for (MCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) { if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { - if (!lstrcmpi(Newnick, dbv.ptszVal)) { + if (!mir_tstrcmpi(Newnick, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the // contact visible // and add them on the list diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index f77ce80ac3..2da59d9130 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -80,7 +80,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p != NULL) {
- if (lstrcmpi(p->path, _T(""))) {
+ if (mir_tstrcmpi(p->path, _T(""))) {
TCHAR shortpath[MAX_PATH];
PathToRelativeT(p->path, shortpath);
db_set_ts(hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index f7df767ace..187a76704a 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -215,7 +215,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (hdr->code) {
case PSN_APPLY:
for (int i = 0; i < XSN_Users.getCount(); i++) {
- if (lstrcmpi(XSN_Users[i]->path, _T(""))) {
+ if (mir_tstrcmpi(XSN_Users[i]->path, _T(""))) {
TCHAR shortpath[MAX_PATH];
PathToRelativeT(XSN_Users[i]->path, shortpath);
db_set_ts(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp index 70fa4f8321..c3e3a85130 100644 --- a/plugins/YAMN/src/mails/mails.cpp +++ b/plugins/YAMN/src/mails/mails.cpp @@ -362,7 +362,7 @@ HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From,char *ID) HYAMNMAIL Browser;
for (Browser=From;Browser != NULL;Browser=Browser->Next)
- if (0==lstrcmpA(Browser->ID,ID))
+ if (0==mir_strcmp(Browser->ID,ID))
break;
return Browser;
}
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 369940ae67..7f21cc5ffe 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -224,7 +224,7 @@ static void LoadPlugins() TCHAR* end = fd.cFileName+len; // get a pointer to the NULL int safe = (end-dot)-1; // figure out how many chars after the dot are "safe", not including NULL - if ((safe != 3) || (lstrcmpi(dot+1, _T("dll")) != 0)) //not bound, however the "dll" string should mean only 3 chars are compared + if ((safe != 3) || (mir_tstrcmpi(dot+1, _T("dll")) != 0)) //not bound, however the "dll" string should mean only 3 chars are compared continue; TCHAR szPluginPath[MAX_PATH]; diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index cb158fdc9e..84a5915b4f 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -66,7 +66,7 @@ static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam)
{
char *szProto = GetContactProto(wParam);
- if ( lstrcmpA(szProto, YAMN_DBMODULE))
+ if ( mir_strcmp(szProto, YAMN_DBMODULE))
return 0;
DBVARIANT dbv;
@@ -169,7 +169,7 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) static INT_PTR ContactMailCheck(WPARAM hContact, LPARAM lParam)
{
char *szProto = GetContactProto(hContact);
- if ( lstrcmpA(szProto, YAMN_DBMODULE))
+ if ( mir_strcmp(szProto, YAMN_DBMODULE))
return 0;
DBVARIANT dbv;
@@ -228,7 +228,7 @@ void MainMenuAccountClicked(WPARAM wParam, LPARAM lParam) /*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM lParam)
{
char *szProto = GetContactProto(wParam);
- if ( lstrcmpA(szProto, YAMN_DBMODULE))
+ if ( mir_strcmp(szProto, YAMN_DBMODULE))
return;
DBVARIANT dbv;
diff --git a/plugins/YAMN/src/yamn.cpp b/plugins/YAMN/src/yamn.cpp index fa171f0dd4..b9ee9b87aa 100644 --- a/plugins/YAMN/src/yamn.cpp +++ b/plugins/YAMN/src/yamn.cpp @@ -60,31 +60,31 @@ INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM lParam) register int i;
for (i=0;i<sizeof(ProtoPluginExportedFcn)/sizeof(ProtoPluginExportedFcn[0]);i++)
- if (0==lstrcmpA((char *)wParam, ProtoPluginExportedFcn[i].ID))
+ if (0==mir_strcmp((char *)wParam, ProtoPluginExportedFcn[i].ID))
return (INT_PTR)ProtoPluginExportedFcn[i].Ptr;
for (i=0;i<sizeof(ProtoPluginExportedSvc)/sizeof(ProtoPluginExportedSvc[0]);i++)
- if (0==lstrcmpA((char *)wParam, ProtoPluginExportedSvc[i].ID))
+ if (0==mir_strcmp((char *)wParam, ProtoPluginExportedSvc[i].ID))
return (INT_PTR)ProtoPluginExportedSvc[i].Ptr;
for (i=0;i<sizeof(SynchroExportedFcn)/sizeof(SynchroExportedFcn[0]);i++)
- if (0==lstrcmpA((char *)wParam, SynchroExportedFcn[i].ID))
+ if (0==mir_strcmp((char *)wParam, SynchroExportedFcn[i].ID))
return (INT_PTR)SynchroExportedFcn[i].Ptr;
for (i=0;i<sizeof(AccountExportedFcn)/sizeof(AccountExportedFcn[0]);i++)
- if (0==lstrcmpA((char *)wParam, AccountExportedFcn[i].ID))
+ if (0==mir_strcmp((char *)wParam, AccountExportedFcn[i].ID))
return (INT_PTR)AccountExportedFcn[i].Ptr;
for (i=0;i<sizeof(AccountExportedSvc)/sizeof(AccountExportedSvc[0]);i++)
- if (0==lstrcmpA((char *)wParam, AccountExportedSvc[i].ID))
+ if (0==mir_strcmp((char *)wParam, AccountExportedSvc[i].ID))
return (INT_PTR)AccountExportedSvc[i].Ptr;
for (i=0;i<sizeof(MailExportedFcn)/sizeof(MailExportedFcn[0]);i++)
- if (0==lstrcmpA((char *)wParam, MailExportedFcn[i].ID))
+ if (0==mir_strcmp((char *)wParam, MailExportedFcn[i].ID))
return (INT_PTR)MailExportedFcn[i].Ptr;
for (i=0;i<sizeof(MailExportedSvc)/sizeof(MailExportedSvc[0]);i++)
- if (0==lstrcmpA((char *)wParam, MailExportedSvc[i].ID))
+ if (0==mir_strcmp((char *)wParam, MailExportedSvc[i].ID))
return (INT_PTR)MailExportedSvc[i].Ptr;
for (i=0;i<sizeof(FilterPluginExportedFcn)/sizeof(FilterPluginExportedFcn[0]);i++)
- if (0==lstrcmpA((char *)wParam, FilterPluginExportedFcn[i].ID))
+ if (0==mir_strcmp((char *)wParam, FilterPluginExportedFcn[i].ID))
return (INT_PTR)FilterPluginExportedFcn[i].Ptr;
for (i=0;i<sizeof(FilterPluginExportedSvc)/sizeof(FilterPluginExportedSvc[0]);i++)
- if (0==lstrcmpA((char *)wParam, FilterPluginExportedSvc[i].ID))
+ if (0==mir_strcmp((char *)wParam, FilterPluginExportedSvc[i].ID))
return (INT_PTR)FilterPluginExportedSvc[i].Ptr;
return (INT_PTR)NULL;
}
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp index 9a79a2af02..467b66356d 100644 --- a/plugins/ZeroNotification/src/main.cpp +++ b/plugins/ZeroNotification/src/main.cpp @@ -108,7 +108,7 @@ static void UpdateMenuItem() static int SoundSettingChanged(WPARAM hContact,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- if(lstrcmpA(cws->szModule, "Skin") || lstrcmpA(cws->szSetting, "UseSound"))
+ if(mir_strcmp(cws->szModule, "Skin") || mir_strcmp(cws->szSetting, "UseSound"))
return 0;
UpdateMenuItem();
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 47411f8f92..c985e8adf2 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -77,7 +77,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) logmsg("ContactSettingChanged1");
- if(hContact==NULL || lstrcmpA(cws->szSetting,"Status")) return 0;
+ if(hContact==NULL || mir_strcmp(cws->szSetting,"Status")) return 0;
WORD newStatus = cws->value.wVal;
WORD oldStatus = DBGetContactSettingRangedWord(hContact,"UserOnline","OldStatus2",ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
|