diff options
Diffstat (limited to 'plugins/Clist_nicer/src/clcutils.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/clcutils.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 5b21bcaa72..cbbc46ce79 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -37,7 +37,7 @@ extern void ( *saveRecalcScrollBar )(HWND hwnd, struct ClcData *dat); static int MY_pathIsAbsolute(const TCHAR *path)
{
- if ( !path || !(lstrlen(path) > 2))
+ if ( !path || !(mir_tstrlen(path) > 2))
return 0;
if ((path[1] == ':' && path[2] == '\\') || (path[0] == '\\' && path[1] == '\\'))
@@ -48,30 +48,30 @@ static int MY_pathIsAbsolute(const TCHAR *path) size_t MY_pathToRelative(const TCHAR *pSrc, TCHAR *pOut)
{
- if ( !pSrc || !lstrlen(pSrc) || lstrlen(pSrc) > MAX_PATH)
+ if ( !pSrc || !mir_tstrlen(pSrc) || mir_tstrlen(pSrc) > MAX_PATH)
return 0;
if ( !MY_pathIsAbsolute(pSrc)) {
mir_sntprintf(pOut, MAX_PATH, _T("%s"), pSrc);
- return lstrlen(pOut);
+ return mir_tstrlen(pOut);
}
TCHAR szTmp[MAX_PATH];
mir_sntprintf(szTmp, SIZEOF(szTmp), _T("%s"), pSrc);
_tcslwr(szTmp);
if ( _tcsstr(szTmp, cfg::dat.tszProfilePath)) {
- mir_sntprintf(pOut, MAX_PATH, _T("%s"), pSrc + lstrlen(cfg::dat.tszProfilePath) - 1);
+ mir_sntprintf(pOut, MAX_PATH, _T("%s"), pSrc + mir_tstrlen(cfg::dat.tszProfilePath) - 1);
pOut[0]='.';
- return lstrlen(pOut);
+ return mir_tstrlen(pOut);
}
mir_sntprintf(pOut, MAX_PATH, _T("%s"), pSrc);
- return lstrlen(pOut);
+ return mir_tstrlen(pOut);
}
size_t MY_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut)
{
- if ( !pSrc || !lstrlen(pSrc) || lstrlen(pSrc) > MAX_PATH)
+ if ( !pSrc || !mir_tstrlen(pSrc) || mir_tstrlen(pSrc) > MAX_PATH)
return 0;
if (MY_pathIsAbsolute(pSrc)&&pSrc[0]!='.')
@@ -79,7 +79,7 @@ size_t MY_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut) else if (pSrc[0]=='.')
mir_sntprintf(pOut, MAX_PATH, _T("%s\\%s"), cfg::dat.tszProfilePath, pSrc);
- return lstrlen(pOut);
+ return mir_tstrlen(pOut);
}
/*
@@ -149,7 +149,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact hFont = reinterpret_cast<HFONT>(SelectObject(hdc, dat->fontInfo[FONTID_GROUPS].hFont));
else
hFont = reinterpret_cast<HFONT>(SelectObject(hdc, dat->fontInfo[FONTID_CONTACTS].hFont));
- GetTextExtentPoint32(hdc, hitcontact->szText, lstrlen(hitcontact->szText), &textSize);
+ GetTextExtentPoint32(hdc, hitcontact->szText, mir_tstrlen(hitcontact->szText), &textSize);
width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
char *szCounts;
@@ -158,7 +158,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact GetTextExtentPoint32A(hdc, " ", 1, &textSize);
width += textSize.cx;
SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont);
- GetTextExtentPoint32A(hdc, szCounts, lstrlenA(szCounts), &textSize);
+ GetTextExtentPoint32A(hdc, szCounts, mir_strlen(szCounts), &textSize);
width += textSize.cx;
}
}
@@ -290,7 +290,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c hFont = reinterpret_cast<HFONT>(SelectObject(hdc, dat->fontInfo[FONTID_GROUPS].hFont));
else
hFont = reinterpret_cast<HFONT>(SelectObject(hdc, dat->fontInfo[FONTID_CONTACTS].hFont));
- GetTextExtentPoint32(hdc, hitcontact->szText, lstrlen(hitcontact->szText), &textSize);
+ GetTextExtentPoint32(hdc, hitcontact->szText, mir_tstrlen(hitcontact->szText), &textSize);
width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
char *szCounts;
@@ -299,7 +299,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c GetTextExtentPoint32A(hdc, " ", 1, &textSize);
width += textSize.cx;
SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont);
- GetTextExtentPoint32A(hdc, szCounts, lstrlenA(szCounts), &textSize);
+ GetTextExtentPoint32A(hdc, szCounts, mir_strlen(szCounts), &textSize);
width += textSize.cx;
}
}
|