diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:56:56 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:56:56 +0000 |
commit | 2136c7efff71099e8ad1fc2196cd973f2316bc03 (patch) | |
tree | 8633b70fe927baaa614febcfe670303070ffcf6b /plugins/Clist_modern/src | |
parent | 7cfd634814762a3cd8a22fce9a4ec6d47bb8f536 (diff) |
self strcmp function replaced by core function
git-svn-id: http://svn.miranda-ng.org/main/trunk@13755 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r-- | plugins/Clist_modern/src/hdr/modern_commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinbutton.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinengine.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinselector.cpp | 24 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_utils.cpp | 19 |
6 files changed, 19 insertions, 40 deletions
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h index ab4108520f..8e8f4f36b9 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h @@ -138,8 +138,6 @@ extern TCHAR SkinsFolder[MAX_PATH]; #define SCF_BOTTOM 6
char* __cdecl strstri(char *a, const char *b);
-BOOL __cdecl mir_bool_strcmpi(const char *a, const char *b);
-BOOL __cdecl mir_bool_tstrcmpi(const TCHAR *a, const TCHAR *b);
DWORD exceptFunction(LPEXCEPTION_POINTERS EP);
// Register of plugin's user
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 9683c423d9..2f3b1c2db9 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1750,7 +1750,7 @@ int ClcDoProtoAck(MCONTACT, ACKDATA *ack) if (ack->hContact) { char *val = db_get_sa(ack->hContact, "CList", "StatusMsg"); if (val) { - if (!mir_bool_strcmpi(val, "")) + if (!mir_strcmpi(val, "")) db_set_s(ack->hContact, "CList", "StatusMsg", ""); else gtaRenewText(ack->hContact); diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index 3049b8f7e5..ddc8e834e0 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -232,7 +232,7 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection, char *ValueTypeD switch (ValueTypeDef[0]) { case 's': Value = db_get_sa(NULL, section, key); - if (!Value || (Value && mir_bool_strcmpi(Value, val2))) + if (!Value || (Value && mir_strcmpi(Value, val2))) Value = mir_strdup(val); else Value = mir_strdup(val2); diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index ed4f9f5b1f..6e810d7fc4 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -1306,7 +1306,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) int ske_AddDescriptorToSkinObjectList(LPSKINOBJECTDESCRIPTOR lpDescr, SKINOBJECTSLIST* Skin) { SKINOBJECTSLIST *sk = (Skin ? Skin : &g_SkinObjectList); - if (mir_bool_strcmpi(lpDescr->szObjectID, "_HEADER_")) + if (mir_strcmpi(lpDescr->szObjectID, "_HEADER_")) return 0; //check if new object allready presents. for (DWORD i = 0; i < sk->dwObjLPAlocated; i++) @@ -1675,16 +1675,16 @@ static HBITMAP ske_LoadGlyphImageByDecoders(const TCHAR *tszFileName) if (!_tcschr(tszFileName, '%') && !PathFileExists(tszFileName)) return NULL; - if (mir_bool_tstrcmpi(ext, _T(".tga"))) { + if (mir_tstrcmpi(ext, _T(".tga"))) { hBitmap = ske_LoadGlyphImage_TGA(tszFileName); f = 1; } - else if (ServiceExists("Image/Png2Dib") && mir_bool_tstrcmpi(ext, _T(".png"))) { + else if (ServiceExists("Image/Png2Dib") && mir_tstrcmpi(ext, _T(".png"))) { hBitmap = ske_LoadGlyphImage_Png2Dib(tszFileName); GetObject(hBitmap, sizeof(BITMAP), &bmpInfo); f = (bmpInfo.bmBits != NULL); } - else if (!mir_bool_tstrcmpi(ext, _T(".png"))) { + else if (!mir_tstrcmpi(ext, _T(".png"))) { hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)tszFileName); } @@ -1729,7 +1729,7 @@ HBITMAP ske_LoadGlyphImage(const TCHAR *tszFileName) if (pLoadedImages) { for (DWORD i = 0; i < dwLoadedImagesCount; i++) { - if (mir_bool_tstrcmpi(pLoadedImages[i].szFileName, szFile)) { + if (mir_tstrcmpi(pLoadedImages[i].szFileName, szFile)) { pLoadedImages[i].dwLoadedTimes++; return pLoadedImages[i].hGlyph; } diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp index 234ec3a4d0..cde374a5cd 100644 --- a/plugins/Clist_modern/src/modern_skinselector.cpp +++ b/plugins/Clist_modern/src/modern_skinselector.cpp @@ -516,7 +516,7 @@ int RegisterButtonByParce(char * ObjectName, char * Params) char Type[250] = { 0 };
DWORD alingnto;
- int a = ((int)mir_bool_strcmpi(buf, "Switch")) * 2;
+ int a = ((int)mir_strcmpi(buf, "Switch")) * 2;
GetParamN(Params, pServiceName, SIZEOF(pServiceName), 1, ',', 0);
// if (a) GetParamN(Params,pStatusServiceName, sizeof(pStatusServiceName),a+1,',',0);
@@ -561,9 +561,9 @@ int RegisterObjectByParce(char * ObjectName, char * Params) char buf[250];
obj.szObjectID = mir_strdup(ObjectName);
GetParamN(Params, buf, SIZEOF(buf), 0, ',', 0);
- if (mir_bool_strcmpi(buf, "Glyph"))
+ if (mir_strcmpi(buf, "Glyph"))
obj.bType = OT_GLYPHOBJECT;
- else if (mir_bool_strcmpi(buf, "Font"))
+ else if (mir_strcmpi(buf, "Font"))
obj.bType = OT_FONTOBJECT;
switch (obj.bType) {
@@ -571,7 +571,7 @@ int RegisterObjectByParce(char * ObjectName, char * Params) {
GLYPHOBJECT gl = { 0 };
GetParamN(Params, buf, SIZEOF(buf), 1, ',', 0);
- if (mir_bool_strcmpi(buf, "Solid")) {
+ if (mir_strcmpi(buf, "Solid")) {
//Solid
gl.Style = ST_BRUSH;
int r = atoi(GetParamN(Params, buf, SIZEOF(buf), 2, ',', 0));
@@ -580,7 +580,7 @@ int RegisterObjectByParce(char * ObjectName, char * Params) gl.dwAlpha = atoi(GetParamN(Params, buf, SIZEOF(buf), 5, ',', 0));
gl.dwColor = RGB(r, g, b);
}
- else if (mir_bool_strcmpi(buf, "Image")) {
+ else if (mir_strcmpi(buf, "Image")) {
//Image
gl.Style = ST_IMAGE;
gl.szFileName = mir_strdup(GetParamN(Params, buf, SIZEOF(buf), 2, ',', 0));
@@ -590,12 +590,12 @@ int RegisterObjectByParce(char * ObjectName, char * Params) gl.dwBottom = atoi(GetParamN(Params, buf, SIZEOF(buf), 7, ',', 0));
gl.dwAlpha = atoi(GetParamN(Params, buf, SIZEOF(buf), 8, ',', 0));
GetParamN(Params, buf, SIZEOF(buf), 3, ',', 0);
- if (mir_bool_strcmpi(buf, "TileBoth")) gl.FitMode = FM_TILE_BOTH;
- else if (mir_bool_strcmpi(buf, "TileVert")) gl.FitMode = FM_TILE_VERT;
- else if (mir_bool_strcmpi(buf, "TileHorz")) gl.FitMode = FM_TILE_HORZ;
+ if (mir_strcmpi(buf, "TileBoth")) gl.FitMode = FM_TILE_BOTH;
+ else if (mir_strcmpi(buf, "TileVert")) gl.FitMode = FM_TILE_VERT;
+ else if (mir_strcmpi(buf, "TileHorz")) gl.FitMode = FM_TILE_HORZ;
else gl.FitMode = 0;
}
- else if (mir_bool_strcmpi(buf, "Fragment")) {
+ else if (mir_strcmpi(buf, "Fragment")) {
//Image
gl.Style = ST_FRAGMENT;
gl.szFileName = mir_strdup(GetParamN(Params, buf, SIZEOF(buf), 2, ',', 0));
@@ -611,9 +611,9 @@ int RegisterObjectByParce(char * ObjectName, char * Params) gl.dwBottom = atoi(GetParamN(Params, buf, SIZEOF(buf), 11, ',', 0));
gl.dwAlpha = atoi(GetParamN(Params, buf, SIZEOF(buf), 12, ',', 0));
GetParamN(Params, buf, SIZEOF(buf), 7, ',', 0);
- if (mir_bool_strcmpi(buf, "TileBoth")) gl.FitMode = FM_TILE_BOTH;
- else if (mir_bool_strcmpi(buf, "TileVert")) gl.FitMode = FM_TILE_VERT;
- else if (mir_bool_strcmpi(buf, "TileHorz")) gl.FitMode = FM_TILE_HORZ;
+ if (mir_strcmpi(buf, "TileBoth")) gl.FitMode = FM_TILE_BOTH;
+ else if (mir_strcmpi(buf, "TileVert")) gl.FitMode = FM_TILE_VERT;
+ else if (mir_strcmpi(buf, "TileHorz")) gl.FitMode = FM_TILE_HORZ;
else gl.FitMode = 0;
}
else {
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index ed0739042e..b4116451e7 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -23,25 +23,6 @@ char * __cdecl strstri(char *a, const char *b) return NULL;
}
-BOOL __cdecl mir_bool_strcmpi(const char *a, const char *b)
-{
- if (a == NULL && b == NULL) return 1;
- if (a == NULL || b == NULL) return _stricmp(a ? a : "", b ? b : "") == 0;
- return _stricmp(a, b) == 0;
-}
-
-BOOL __cdecl mir_bool_tstrcmpi(const TCHAR *a, const TCHAR *b)
-{
- if (a == NULL && b == NULL) return 1;
- if (a == NULL || b == NULL) return _tcsicmp(a ? a : _T(""), b ? b : _T("")) == 0;
- return _tcsicmp(a, b) == 0;
-}
-
-#ifdef mir_strlen
-#undef mir_strcmp
-#undef mir_strlen
-#endif
-
//copy len symbols from string - do not check is it null terminated or len is more then actual
char * strdupn(const char * src, int len)
{
|