From d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 21:20:14 +0000 Subject: new sorting functions applied git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/chat/log.cpp | 2 +- plugins/TabSRMM/src/chat/manager.cpp | 10 +++++----- plugins/TabSRMM/src/chat/muchighlight.cpp | 2 +- plugins/TabSRMM/src/chat/tools.cpp | 2 +- plugins/TabSRMM/src/chat/window.cpp | 2 +- plugins/TabSRMM/src/container.cpp | 4 ++-- plugins/TabSRMM/src/globals.cpp | 6 +++--- plugins/TabSRMM/src/utils.cpp | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/TabSRMM/src') 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("\\")); -- cgit v1.2.3