diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /plugins/AVS/src/options.cpp | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src/options.cpp')
-rw-r--r-- | plugins/AVS/src/options.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index d6b94ba9a7..0c2b87803c 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -68,8 +68,8 @@ static void RemoveProtoPic(const char *szProto) if (strstr(szProto, "Global avatar for")) { char szProtoname[MAX_PATH] = { 0 }; - lstrcpynA(szProtoname, szProto, lstrlenA(szProto) - lstrlenA("accounts")); - lstrcpyA(szProtoname, strrchr(szProtoname, ' ') + 1); + mir_strncpy(szProtoname, szProto, mir_strlen(szProto) - mir_strlen("accounts")); + mir_strcpy(szProtoname, strrchr(szProtoname, ' ') + 1); for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; @@ -129,7 +129,7 @@ static void SetProtoPic(char *szProto) if (!lstrcmpA(AVS_DEFAULT, szProto)) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (lstrlenA(p.szProtoname) == 0) + if (mir_strlen(p.szProtoname) == 0) continue; if (p.hbmPic == 0 || !lstrcmpA(p.szProtoname, AVS_DEFAULT)) { @@ -140,8 +140,8 @@ static void SetProtoPic(char *szProto) } else if (strstr(szProto, "Global avatar for")) { char szProtoname[MAX_PATH] = { 0 }; - lstrcpynA(szProtoname, szProto, lstrlenA(szProto) - lstrlenA("accounts")); - lstrcpyA(szProtoname, strrchr(szProtoname, ' ') + 1); + mir_strncpy(szProtoname, szProto, mir_strlen(szProto) - mir_strlen("accounts")); + 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)) @@ -149,7 +149,7 @@ static void SetProtoPic(char *szProto) if (!lstrcmpA(g_ProtoPictures[i].szProtoname, szProto) || !lstrcmpA(pdescr->szProtoName, szProtoname)) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (lstrlenA(p.szProtoname) != 0) { + if (mir_strlen(p.szProtoname) != 0) { if (p.hbmPic == 0) { CreateAvatarInCache(0, &p, szProto); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); @@ -161,10 +161,10 @@ static void SetProtoPic(char *szProto) else { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (lstrlenA(p.szProtoname) == 0) + if (mir_strlen(p.szProtoname) == 0) break; - if (!strcmp(p.szProtoname, szProto) && lstrlenA(p.szProtoname) == lstrlenA(szProto)) { + if (!strcmp(p.szProtoname, szProto) && mir_strlen(p.szProtoname) == mir_strlen(szProto)) { if (p.hbmPic != 0) DeleteObject(p.hbmPic); ZeroMemory(&p, sizeof(avatarCacheEntry)); |