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/AVS | |
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/AVS')
-rw-r--r-- | plugins/AVS/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 16 | ||||
-rw-r--r-- | plugins/AVS/src/services.cpp | 10 | ||||
-rw-r--r-- | plugins/AVS/src/utils.cpp | 6 |
4 files changed, 19 insertions, 19 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
|