summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 21:20:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 21:20:14 +0000
commitd9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch)
treea6f925c63bc31e4b4dba301183cc3b429d52d816 /protocols/VKontakte
parentce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff)
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp10
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp2
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp12
3 files changed, 12 insertions, 12 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index f55c97edde..01ffaf8ce8 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -136,7 +136,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
JSONNODE *info = json_get(pResponse, "info");
if (info != NULL) {
ptrT tszTitle(json_as_string(json_get(info, "title")));
- if (lstrcmp(tszTitle, cc->m_tszTopic)) {
+ if (mir_tstrcmp(tszTitle, cc->m_tszTopic)) {
cc->m_tszTopic = mir_tstrdup(tszTitle);
setTString(cc->m_hContact, "Nick", tszTitle);
@@ -301,7 +301,7 @@ void CVkProto::AppendChatMessage(CVkChatInfo *cc, int mid, int uid, int msgTime,
CVkChatInfo* CVkProto::GetChatById(LPCTSTR ptszId)
{
for (int i = 0; i < m_chats.getCount(); i++)
- if (!lstrcmp(m_chats[i].m_tszId, ptszId))
+ if (!mir_tstrcmp(m_chats[i].m_tszId, ptszId))
return &m_chats[i];
return NULL;
@@ -350,7 +350,7 @@ int CVkProto::OnChatEvent(WPARAM, LPARAM lParam)
if (gch == NULL)
return 0;
- if (lstrcmpiA(gch->pDest->pszModule, m_szModuleName))
+ if (mir_strcmpi(gch->pDest->pszModule, m_szModuleName))
return 0;
CVkChatInfo *cc = GetChatById(gch->pDest->ptszID);
@@ -689,7 +689,7 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam)
if (gcmi == NULL)
return 0;
- if (lstrcmpiA(gcmi->pszModule, m_szModuleName))
+ if (mir_strcmpi(gcmi->pszModule, m_szModuleName))
return 0;
if (gcmi->Type == MENU_ON_LOG) {
@@ -710,7 +710,7 @@ static void FilterContacts(HWND hwndDlg, CVkProto *ppro)
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
- if (lstrcmpA(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
+ if (mir_strcmp(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0))
SendMessage(hwndClist, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index a134baddb1..dbdd478119 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static int sttCompareProtocols(const CVkProto *p1, const CVkProto *p2)
{
- return lstrcmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
LIST<CVkProto> vk_Instances(1, sttCompareProtocols);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 78843d5ea5..1729833541 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -1250,7 +1250,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
for (int k = 0; (pAttach = json_at(pAttachments, k)) != NULL; k++) {
res.AppendChar('\t');
ptrT ptszType(json_as_string(json_get(pAttach, "type")));
- if (!lstrcmp(ptszType, L"photo")) {
+ if (!mir_tstrcmp(ptszType, L"photo")) {
JSONNODE *pPhoto = json_get(pAttach, "photo");
if (pPhoto == NULL)
continue;
@@ -1270,7 +1270,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
if (m_bAddImgBbc)
res.AppendFormat(L"\n\t[img]%s[/img]", ptszLink);
}
- else if (!lstrcmp(ptszType, L"audio")) {
+ else if (!mir_tstrcmp(ptszType, L"audio")) {
JSONNODE *pAudio = json_get(pAttach, "audio");
if (pAudio == NULL)
continue;
@@ -1281,7 +1281,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
res.AppendFormat(L"%s: (%s - %s) - %s",
TranslateT("Audio"), ptszArtist, ptszTitle, ptszUrl);
}
- else if (!lstrcmp(ptszType, L"video")) {
+ else if (!mir_tstrcmp(ptszType, L"video")) {
JSONNODE *pVideo = json_get(pAttach, "video");
if (pVideo == NULL)
continue;
@@ -1291,7 +1291,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
int ownerID = json_as_int(json_get(pVideo, "owner_id"));
res.AppendFormat(L"%s: %s - http://vk.com/video%d_%d", TranslateT("Video"), ptszTitle, ownerID, vid);
}
- else if (!lstrcmp(ptszType, L"doc")) {
+ else if (!mir_tstrcmp(ptszType, L"doc")) {
JSONNODE *pDoc = json_get(pAttach, "doc");
if (pDoc == NULL)
continue;
@@ -1300,7 +1300,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
ptrT ptszUrl(json_as_string(json_get(pDoc, "url")));
res.AppendFormat(L"%s: (%s) - %s", TranslateT("Document"), ptszTitle, ptszUrl);
}
- else if (!lstrcmp(ptszType, L"wall")) {
+ else if (!mir_tstrcmp(ptszType, L"wall")) {
JSONNODE *pWall = json_get(pAttach, "wall");
if (pWall == NULL)
continue;
@@ -1310,7 +1310,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
int fromID = json_as_int(json_get(pWall, "from_id"));
res.AppendFormat(L"%s: %s - http://vk.com/wall%d_%d", TranslateT("Wall post"), ptszText ? ptszText : L" ", fromID, id);
}
- else if (!lstrcmp(ptszType, _T("sticker"))) {
+ else if (!mir_tstrcmp(ptszType, _T("sticker"))) {
JSONNODE *pSticker = json_get(pAttach, "sticker");
if (pSticker == NULL)
continue;