summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 18:51:36 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 18:51:36 +0000
commit688f55ba998c19304a29727c910504903f4cc49a (patch)
tree69121ebb6d02bcf9e670428b11813087fc7f1640 /plugins/Clist_modern
parent4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff)
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp50
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp40
-rw-r--r--plugins/Clist_modern/src/modern_rowheight_funcs.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp22
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp6
15 files changed, 89 insertions, 89 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 42741e8028..3821131aa1 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -1810,7 +1810,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam)
};
g_pfwFrames[g_nFramesCount].dwFlags = clfrm->Flags;
- if (clfrm->name == NULL || ((clfrm->Flags&F_UNICODE) ? lstrlenW(clfrm->wname) : lstrlenA(clfrm->name)) == 0) {
+ if (clfrm->name == NULL || ((clfrm->Flags&F_UNICODE) ? mir_wstrlen(clfrm->wname) : mir_strlen(clfrm->name)) == 0) {
g_pfwFrames[g_nFramesCount].name = (LPTSTR)mir_alloc(255 * sizeof(TCHAR));
GetClassName(g_pfwFrames[g_nFramesCount].hWnd,g_pfwFrames[g_nFramesCount].name,255);
}
@@ -1820,7 +1820,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam)
}
g_pfwFrames[g_nFramesCount].szName = mir_t2a(g_pfwFrames[g_nFramesCount].name);
if (IsBadCodePtr((FARPROC)clfrm->TBname) || clfrm->TBname == NULL
- || ((clfrm->Flags&F_UNICODE) ? lstrlenW(clfrm->TBwname) : lstrlenA(clfrm->TBname)) == 0)
+ || ((clfrm->Flags&F_UNICODE) ? mir_wstrlen(clfrm->TBwname) : mir_strlen(clfrm->TBname)) == 0)
g_pfwFrames[g_nFramesCount].TitleBar.tbname = mir_tstrdup(g_pfwFrames[g_nFramesCount].name);
else
g_pfwFrames[g_nFramesCount].TitleBar.tbname = (clfrm->Flags&F_UNICODE) ? mir_u2t(clfrm->TBwname) : mir_a2t(clfrm->TBname);
@@ -2873,7 +2873,7 @@ int DrawTitleBar(HDC hdcMem2,RECT *rect,int Frameid)
textrc.left += GetSystemMetrics(SM_CXSMICON)+2;
textrc.top += 2;
}
- ske_TextOut(hdcMem,textrc.left,textrc.top,g_pfwFrames[pos].TitleBar.tbname,lstrlen(g_pfwFrames[pos].TitleBar.tbname));
+ ske_TextOut(hdcMem,textrc.left,textrc.top,g_pfwFrames[pos].TitleBar.tbname,mir_tstrlen(g_pfwFrames[pos].TitleBar.tbname));
}
if (!AlignCOLLIconToLeft)
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 87fae9df20..7eeb92ba6f 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -298,7 +298,7 @@ int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus
if (!noAwayMsg && !noXstatus && xstatus_has_priority && pdnce->hContact && pdnce->m_cache_cszProto) {
DBVARIANT dbv = { 0 };
if (!db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "XStatusName", &dbv)) {
- //lstrcpyn(text, dbv.pszVal, text_size);
+ //mir_tstrncpy(text, dbv.pszVal, text_size);
CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
db_free(&dbv);
@@ -366,7 +366,7 @@ int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xsta
if (!noAwayMsg && xstatus_has_priority && pdnce->hContact && pdnce->m_cache_cszProto) {
// Try to get XStatusMsg
if (!db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "XStatusMsg", &dbv)) {
- //lstrcpyn(text, dbv.pszVal, text_size);
+ //mir_tstrncpy(text, dbv.pszVal, text_size);
CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
db_free(&dbv);
@@ -378,7 +378,7 @@ int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xsta
// Get StatusMsg
if (pdnce->hContact && text[0] == '\0') {
if (!db_get_ts(pdnce->hContact, "CList", "StatusMsg", &dbv)) {
- //lstrcpyn(text, dbv.pszVal, text_size);
+ //mir_tstrncpy(text, dbv.pszVal, text_size);
CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
db_free(&dbv);
@@ -391,7 +391,7 @@ int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xsta
if (!noAwayMsg && !xstatus_has_priority && pdnce->hContact && pdnce->m_cache_cszProto && text[0] == '\0') {
// Try to get XStatusMsg
if (!db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "XStatusMsg", &dbv)) {
- //lstrcpyn(text, dbv.pszVal, text_size);
+ //mir_tstrncpy(text, dbv.pszVal, text_size);
CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
db_free(&dbv);
@@ -439,7 +439,7 @@ int Cache_GetLineText(
if (pdnce->hContact && pdnce->m_cache_cszProto) {
DBVARIANT dbv = {0};
if (!db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "Nick", &dbv)) {
- lstrcpyn(text, dbv.ptszVal, text_size);
+ mir_tstrncpy(text, dbv.ptszVal, text_size);
db_free(&dbv);
CopySkipUnprintableChars(text, text, text_size-1);
}
@@ -493,7 +493,7 @@ int Cache_GetLineText(
case TEXT_TEXT:
{
TCHAR *tmp = variables_parsedup(variable_text, pdnce->tszName, pdnce->hContact);
- lstrcpyn(text, tmp, text_size);
+ mir_tstrncpy(text, tmp, text_size);
mir_free(tmp);
CopySkipUnprintableChars(text, text, text_size-1);
}
@@ -526,19 +526,19 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact)
DBVARIANT dbv = { 0 };
if (!db_get_ts(pdnce->hContact, pdnce->m_cache_cszProto, "Nick", &dbv)) {
TCHAR nick[SIZEOF(contact->szText)];
- lstrcpyn(nick, dbv.ptszVal, SIZEOF(contact->szText));
+ mir_tstrncpy(nick, dbv.ptszVal, SIZEOF(contact->szText));
db_free(&dbv);
// They are the same -> use the name to keep the case
if (_tcsicmp(name, nick) == 0)
- lstrcpyn(contact->szText, name, SIZEOF(contact->szText));
+ mir_tstrncpy(contact->szText, name, SIZEOF(contact->szText));
else
// Append then
mir_sntprintf(contact->szText, SIZEOF(contact->szText), _T("%s - %s"), name, nick);
}
- else lstrcpyn(contact->szText, name, SIZEOF(contact->szText));
+ else mir_tstrncpy(contact->szText, name, SIZEOF(contact->szText));
}
- else lstrcpyn(contact->szText, name, SIZEOF(contact->szText));
+ else mir_tstrncpy(contact->szText, name, SIZEOF(contact->szText));
if (!dat->force_in_dialog) {
struct SHORTDATA data = { 0 };
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 3dfe676130..696dfde5d3 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -298,7 +298,7 @@ static int clcProceedDragToScroll(HWND hwnd, int Y)
static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const TCHAR *text, int prefixOk, BOOL fSearchUp)
{
ClcGroup *group = &dat->list;
- int testlen = lstrlen(text);
+ int testlen = mir_tstrlen(text);
BOOL fReturnAsFound = FALSE;
int nLastFound = -1;
if (index == -1) fReturnAsFound = TRUE;
@@ -1595,7 +1595,7 @@ static LRESULT clcOnIntmNameChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP
return ret;
if (contact) {
- lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText));
+ mir_tstrncpy(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText));
Cache_GetText(dat, contact, 1);
cliRecalcScrollBar(hwnd, dat);
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 9c5ecc6c1e..7b8d3ad64d 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -362,7 +362,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat)
int nHiddenStatus = CLVM_GetContactHiddenStatus(hContact, NULL, dat);
if ((style & CLS_SHOWHIDDEN && nHiddenStatus != -1) || !nHiddenStatus) {
- if (lstrlen(cacheEntry->tszGroup) == 0)
+ if (mir_tstrlen(cacheEntry->tszGroup) == 0)
group = &dat->list;
else
group = cli_AddGroup(hwnd, dat, cacheEntry->tszGroup, (DWORD)-1, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 0c18063a46..032e57fb22 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -1383,7 +1383,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if (!db_get_s(NULL, module, "BkBitmap", &dbv)) {
int retval = PathToAbsolute(dbv.pszVal, dat->item[indx].filename);
if (!retval || retval == CALLSERVICE_NOTFOUND)
- lstrcpynA(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
+ mir_strncpy(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
mir_free(dbv.pszVal);
}
else *dat->item[indx].filename = 0;
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index 689dcca7bc..42d4cfe939 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -209,7 +209,7 @@ void CLCPaint::GetTextSize( SIZE *text_size, HDC hdcMem, RECT free_row_rc, TCHA
free_height = text_rc.bottom - text_rc.top;
// Always need cy...
- text_size->cy = ske_DrawText(hdcMem, szText, lstrlen( szText ), &text_rc, DT_CALCRECT | uTextFormat );
+ text_size->cy = ske_DrawText(hdcMem, szText, mir_tstrlen( szText ), &text_rc, DT_CALCRECT | uTextFormat );
text_size->cy = min( text_size->cy, free_height );
if ( plText == NULL )
text_size->cx = min( text_rc.right - text_rc.left + 2, free_width );
@@ -643,7 +643,7 @@ MODERNMASK* CLCPaint::_GetCLCContactRowBackModernMask( ClcGroup *group, ClcConta
{
TCHAR * b2 = mir_tstrdup( Drawing->szText );
int i, m;
- m = lstrlen( b2 );
+ m = mir_tstrlen( b2 );
for ( i=0; i < m; i++ )
if ( b2[i] == _T( ',' )) b2[i] = _T( '.' );
{
@@ -658,7 +658,7 @@ MODERNMASK* CLCPaint::_GetCLCContactRowBackModernMask( ClcGroup *group, ClcConta
{
TCHAR * b2 = mir_tstrdup( group->parent->cl.items[0]->szText );
int i, m;
- m = lstrlen( b2 );
+ m = mir_tstrlen( b2 );
for ( i=0; i < m; i++ )
if ( b2[i] == _T( ',' )) b2[i] = _T( '.' );
{
@@ -854,7 +854,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
space_width = count_size.cx;
count_rc.right = 0;
count_rc.left = 0;
- ske_DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &count_rc, DT_CALCRECT );
+ ske_DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &count_rc, DT_CALCRECT );
count_size.cx += count_rc.right-count_rc.left;
count_size.cy = count_rc.bottom-count_rc.top;
}
@@ -909,11 +909,11 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
else if ( hottrack )
_SetHotTrackColour(hdcMem, dat );
if ( dat->text_rtl != 0 ) _RTLRect( &nameRect, free_row_rc.right, dx );
- _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, mir_tstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
if (selected && !dat->filterSearch) {
SetTextColor(hdcMem, dat->quickSearchColour );
- _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, mir_tstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
}
if ( szCounts && strlen( szCounts )>0 )
{
@@ -923,7 +923,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
else if ( hottrack )
_SetHotTrackColour(hdcMem, dat );
if ( dat->text_rtl != 0 ) _RTLRect( &countRect, free_row_rc.right, dx );
- ske_DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &countRect, uTextFormat );
+ ske_DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &countRect, uTextFormat );
}
{
RECT rc = fr_rc;
@@ -953,7 +953,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
space_size.cy = min( space_rc.bottom - space_rc.top, fr_rc.bottom-fr_rc.top );
ChangeToFont(hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
- DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &counts_rc, DT_CALCRECT );
+ DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &counts_rc, DT_CALCRECT );
counts_size.cx = counts_rc.right - counts_rc.left;
counts_size.cy = min( counts_rc.bottom - counts_rc.top, fr_rc.bottom-fr_rc.top );
@@ -985,7 +985,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
else if ( hottrack )
_SetHotTrackColour(hdcMem, dat );
if ( dat->text_rtl != 0 ) _RTLRect( &text_rect, free_row_rc.right, dx );
- _DrawTextSmiley(hdcMem, &text_rect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &text_rect, &text_size, Drawing->szText, 0, mir_tstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
if ( ((dat->filterSearch && Drawing->type != CLCIT_GROUP) || selected) && dat->szQuickSearch[0] != '\0' )
{
int idx = 0;
@@ -998,13 +998,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
idx = int(p1 - lowered);
}
SetTextColor(hdcMem, dat->quickSearchColour );
- _DrawTextSmiley(hdcMem, &text_rect, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &text_rect, &text_size, Drawing->szText, idx, mir_tstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
}
if ( Drawing->type == CLCIT_GROUP && szCounts && szCounts[0] && counts_rc.right-counts_rc.left>0 )
{
ChangeToFont(hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
if ( dat->text_rtl != 0 ) _RTLRect( &counts_rc, free_row_rc.right, dx );
- ske_DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &counts_rc, uTextFormat );
+ ske_DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &counts_rc, uTextFormat );
if ( dat->text_rtl == 0 )
text_rect.right = counts_rc.right;
else
@@ -1075,7 +1075,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
SetTextColor(hdcMem, dat->selTextColour );
else if ( hottrack )
_SetHotTrackColour(hdcMem, dat );
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, 0, mir_tstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
if ( (dat->filterSearch || selected) && dat->szQuickSearch[0] != '\0' )
{
int idx = 0;
@@ -1088,7 +1088,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
idx = int(p1 - lowered);
}
SetTextColor(hdcMem, dat->quickSearchColour );
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, idx, mir_tstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
}
Drawing->pos_rename_rect = p_rect;
{
@@ -1119,7 +1119,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
space_width = count_size.cx;
count_rc.right = 0;
count_rc.left = 0;
- ske_DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &count_rc, DT_CALCRECT );
+ ske_DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &count_rc, DT_CALCRECT );
count_size.cx += count_rc.right-count_rc.left;
count_size.cy = count_rc.bottom-count_rc.top;
}
@@ -1173,10 +1173,10 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
SetTextColor(hdcMem, dat->selTextColour );
else if ( hottrack )
_SetHotTrackColour(hdcMem, dat );
- _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, mir_tstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
if (selected && !dat->filterSearch) {
SetTextColor(hdcMem, dat->quickSearchColour );
- _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, mir_tstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
}
if ( szCounts && strlen( szCounts )>0 )
{
@@ -1185,7 +1185,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
SetTextColor(hdcMem, dat->selTextColour );
else if ( hottrack )
_SetHotTrackColour(hdcMem, dat );
- ske_DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &countRect, uTextFormat );
+ ske_DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &countRect, uTextFormat );
}
Drawing->pos_rename_rect = p_rect;
Drawing->pos_label = nameRect;
@@ -1219,7 +1219,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
ChangeToFont(hdcMem, dat, FONTID_SECONDLINE, NULL );
uTextFormat = uTextFormat | ( gl_TrimText?DT_END_ELLIPSIS:0 )|DT_SINGLELINE;
if ( Drawing->type == CLCIT_CONTACT )
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, pdnce->szSecondLineText, 0, lstrlen( pdnce->szSecondLineText ), pdnce->ssSecondLine.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &p_rect, &text_size, pdnce->szSecondLineText, 0, mir_tstrlen( pdnce->szSecondLineText ), pdnce->ssSecondLine.plText, uTextFormat, dat->text_resize_smileys );
break;
}
case TC_TEXT3:
@@ -1248,7 +1248,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
ChangeToFont(hdcMem, dat, FONTID_THIRDLINE, NULL );
uTextFormat = uTextFormat | ( gl_TrimText?DT_END_ELLIPSIS:0 )|DT_SINGLELINE;
if ( Drawing->type == CLCIT_CONTACT )
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, pdnce->szThirdLineText, 0, lstrlen( pdnce->szThirdLineText ), pdnce->ssThirdLine.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, &p_rect, &text_size, pdnce->szThirdLineText, 0, mir_tstrlen( pdnce->szThirdLineText ), pdnce->ssThirdLine.plText, uTextFormat, dat->text_resize_smileys );
break;
}
case TC_STATUS:
@@ -1572,7 +1572,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact
{
// Select font
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL );
- ske_DrawText(hdcMem, szResult, lstrlen( szResult ), &p_rect, DT_NOPREFIX | DT_SINGLELINE|( dat->text_rtl ? DT_RTLREADING : 0 ));
+ ske_DrawText(hdcMem, szResult, mir_tstrlen( szResult ), &p_rect, DT_NOPREFIX | DT_SINGLELINE|( dat->text_rtl ? DT_RTLREADING : 0 ));
}
break;
}
@@ -2400,7 +2400,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL );
// Get text size
- text_size.cy = ske_DrawText(hdcMem, szResult, lstrlen( szResult ), &rc, DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE );
+ text_size.cy = ske_DrawText(hdcMem, szResult, mir_tstrlen( szResult ), &rc, DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE );
text_size.cy = min( text_size.cy, free_row_rc.bottom - free_row_rc.top );
text_size.cx = rc.right - rc.left;
@@ -2525,7 +2525,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, ClcData *dat, ClcContact *D
space_size.cy = min( space_rc.bottom - space_rc.top, free_height );
ChangeToFont(hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
- DrawTextA(hdcMem, szCounts, lstrlenA( szCounts ), &counts_rc, DT_CALCRECT );
+ DrawTextA(hdcMem, szCounts, mir_strlen( szCounts ), &counts_rc, DT_CALCRECT );
//Store position
//StoreItemPos( Drawing, CIT_SUBTEXT1, &counts_rc ); // Or not to comment?
@@ -3029,7 +3029,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
ske_DrawText(hdcMem, Drawing->szText, -1, prcItem, uTextFormat );
if (selected && !dat->filterSearch) {
SetTextColor(hdcMem, dat->quickSearchColour );
- ske_DrawText(hdcMem, Drawing->szText, lstrlen( dat->szQuickSearch ), prcItem, uTextFormat );
+ ske_DrawText(hdcMem, Drawing->szText, mir_tstrlen( dat->szQuickSearch ), prcItem, uTextFormat );
}
}
else if ( Drawing->type == CLCIT_CONTACT )
@@ -3052,7 +3052,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
idx = int(p1 - lowered);
}
SetTextColor(hdcMem, dat->quickSearchColour );
- _DrawTextSmiley(hdcMem, prcItem, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
+ _DrawTextSmiley(hdcMem, prcItem, &text_size, Drawing->szText, idx, mir_tstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
}
}
else
@@ -3112,7 +3112,7 @@ void CLCPaint::_DrawContactTime( HDC hdcMem, ClcData *dat, ClcContact *Drawing,
if (!tmi.printDateTime(pdnce->hTimeZone, _T("t"), szResult, SIZEOF(szResult), 0)) {
// Select font
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL );
- ske_DrawText(hdcMem, szResult, lstrlen( szResult ), prcItem, DT_NOPREFIX | DT_SINGLELINE );
+ ske_DrawText(hdcMem, szResult, mir_tstrlen( szResult ), prcItem, DT_NOPREFIX | DT_SINGLELINE );
}
}
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index 8293adaefc..f23dc89266 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -724,7 +724,7 @@ int ExpandMetaContact(HWND hwnd, ClcContact *contact, ClcData *dat, BOOL bExpand
int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk)
{
ClcGroup *group = &dat->list;
- int testlen = lstrlen(text);
+ int testlen = mir_tstrlen(text);
ClcContact *contact = NULL;
int SubCount = 0;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index ade09879b1..560a76244b 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -355,7 +355,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
else {
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, 16, 16, 0);
TCHAR *ptszEvents = TranslateT("No Events");
- ske_DrawText(hDC, ptszEvents, lstrlen(ptszEvents), &rc, DT_VCENTER | DT_SINGLELINE);
+ ske_DrawText(hDC, ptszEvents, mir_tstrlen(ptszEvents), &rc, DT_VCENTER | DT_SINGLELINE);
ske_DrawIconEx(hDC, 4, (rc.bottom + rc.top - 16) / 2, hIcon, 16, 16, 0, 0, DI_NORMAL | DI_COMPAT);
DestroyIcon(hIcon);
}
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index fcad83ee28..2fe2157340 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -108,7 +108,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
mi.ptszName = FAVMENUROOTNAME;
else {
TCHAR *str1 = TranslateTS(FAVMENUROOTNAME), *str2 = TranslateTS(rates[bContactRate]);
- int bufsize = (lstrlen(str1) + lstrlen(str2) + 15) * sizeof(TCHAR);
+ int bufsize = (mir_tstrlen(str1) + mir_tstrlen(str2) + 15) * sizeof(TCHAR);
TCHAR *name = (TCHAR *)_alloca(bufsize);
mir_sntprintf(name, bufsize / sizeof(TCHAR), _T("%s (%s)"), str1, str2);
mi.ptszName = name;
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index fd01a532de..7ddb44fa42 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -33,21 +33,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "hdr/modern_clcpaint.h"
#include "hdr/modern_sync.h"
-struct PROTOTICKS
-{
- ~PROTOTICKS()
- {
- ImageList_Destroy(himlIconList);
- }
-
- ptrA szProto;
- int nIconsCount;
- int nCycleStartTick;
- int nIndex;
- BOOL bTimerCreated;
- BOOL bGlobal;
- HIMAGELIST himlIconList;
-};
+struct PROTOTICKS
+{
+ ~PROTOTICKS()
+ {
+ ImageList_Destroy(himlIconList);
+ }
+
+ ptrA szProto;
+ int nIconsCount;
+ int nCycleStartTick;
+ int nIndex;
+ BOOL bTimerCreated;
+ BOOL bGlobal;
+ HIMAGELIST himlIconList;
+};
static int CompareTicks(const PROTOTICKS *p1, const PROTOTICKS *p2)
{
@@ -701,9 +701,9 @@ void CLUI_ChangeWindowMode()
TCHAR titleText[255] = { 0 };
DBVARIANT dbv;
if (db_get_ts(NULL, "CList", "TitleText", &dbv))
- lstrcpyn(titleText, _T(MIRANDANAME), SIZEOF(titleText));
+ mir_tstrncpy(titleText, _T(MIRANDANAME), SIZEOF(titleText));
else {
- lstrcpyn(titleText, dbv.ptszVal, SIZEOF(titleText));
+ mir_tstrncpy(titleText, dbv.ptszVal, SIZEOF(titleText));
db_free(&dbv);
}
SetWindowText(pcli->hwndContactList, titleText);
@@ -994,7 +994,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx)
}
// third try global
- lstrcpyn(szFullPath, _T("proto_conn.dll"), SIZEOF(szFullPath));
+ mir_tstrncpy(szFullPath, _T("proto_conn.dll"), SIZEOF(szFullPath));
if (hIcon = CLUI_LoadIconFromExternalFile(szFullPath, idx))
return hIcon;
@@ -2511,7 +2511,7 @@ LRESULT CLUI::OnMeasureItem(UINT msg, WPARAM wParam, LPARAM lParam)
HDC hdc = GetDC(m_hWnd);
TCHAR *ptszStr = TranslateT("Status");
SIZE textSize;
- GetTextExtentPoint32(hdc, ptszStr, lstrlen(ptszStr), &textSize);
+ GetTextExtentPoint32(hdc, ptszStr, mir_tstrlen(ptszStr), &textSize);
pmis->itemWidth = textSize.cx;
pmis->itemHeight = 0;
ReleaseDC(m_hWnd, hdc);
@@ -2572,7 +2572,7 @@ LRESULT CLUI::OnDrawItem(UINT msg, WPARAM wParam, LPARAM lParam)
mir_snprintf(buf, SIZEOF(buf), "Main,ID=StatusMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
SkinDrawGlyph(dis->hDC, &dis->rcItem, &dis->rcItem, buf);
SetTextColor(dis->hDC, (dis->itemState&ODS_SELECTED/*|dis->itemState&ODS_HOTLIGHT*/) ? dat->MenuTextHiColor : dat->MenuTextColor);
- DrawText(dis->hDC, TranslateT("Status"), lstrlen(TranslateT("Status")), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
+ DrawText(dis->hDC, TranslateT("Status"), mir_tstrlen(TranslateT("Status")), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
nStatusMenuState = dis->itemState;
}
else {
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
index e4166f89e9..9593ac6d99 100644
--- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
+++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
@@ -148,7 +148,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
size.cx += count_rc.right-count_rc.left;
count_rc.right = 0;
count_rc.left = 0;
- ske_DrawTextA(hdc,szCounts,lstrlenA(szCounts),&count_rc,DT_CALCRECT);
+ ske_DrawTextA(hdc,szCounts,mir_strlen(szCounts),&count_rc,DT_CALCRECT);
size.cx += count_rc.right-count_rc.left;
tmp = max(tmp,count_rc.bottom-count_rc.top);
}
@@ -306,7 +306,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i
g_clcPainter.ChangeToFont(hdc,dat,FONTID_CONTACT_TIME,NULL);
// Get text size
- text_size.cy = ske_DrawText(hdc, szResult, lstrlen(szResult), &rc, DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE);
+ text_size.cy = ske_DrawText(hdc, szResult, mir_tstrlen(szResult), &rc, DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE);
SelectObject(hdc,GetStockObject(DEFAULT_GUI_FONT));
ske_ResetTextEffect(hdc);
DeleteDC(hdc);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index ba02bcb6df..837610d0bc 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -1868,8 +1868,8 @@ static HBITMAP ske_LoadGlyphImageByDecoders(const TCHAR *tszFileName)
BITMAP bmpInfo;
{
- int l = lstrlen(tszFileName);
- lstrcpyn(ext, tszFileName+(l-4),5);
+ int l = mir_tstrlen(tszFileName);
+ mir_tstrncpy(ext, tszFileName+(l-4),5);
}
if (!_tcschr(tszFileName,'%') && !PathFileExists(tszFileName))
return NULL;
@@ -2552,7 +2552,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect
// Calc len of input string
if (nCount == -1)
- nCount = lstrlen(lpString);
+ nCount = mir_tstrlen(lpString);
// retrieve destination bitmap bits
HBITMAP hDestBitmap = (HBITMAP)GetCurrentObject(hDC, OBJ_BITMAP);
@@ -3669,8 +3669,8 @@ static DWORD ske_HexToARGB(char * Hex)
static TCHAR *ske_ReAppend(TCHAR *lfirst, TCHAR * lsecond, int len)
{
- int l1 = lfirst?lstrlen(lfirst):0;
- int l2 = (len?len:(lstrlen(lsecond)+1));
+ int l1 = lfirst?mir_tstrlen(lfirst):0;
+ int l2 = (len?len:(mir_tstrlen(lsecond)+1));
TCHAR *buf = (TCHAR *)mir_alloc((l1+l2+1)*sizeof(TCHAR));
if (lfirst) memmove(buf,lfirst,l1*sizeof(TCHAR));
memmove(buf+l1,lsecond,l2*sizeof(TCHAR));
@@ -3700,7 +3700,7 @@ TCHAR* ske_ReplaceVar(TCHAR *var)
TCHAR *ske_ParseText(TCHAR *stzText)
{
- int len = lstrlen(stzText);
+ int len = mir_tstrlen(stzText);
TCHAR *result = NULL;
int stpos = 0;
int curpos = 0;
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index 804f7bab41..7748eff498 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -506,7 +506,7 @@ WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim
DWORD end = 0;
DWORD CurentCount = 0;
DWORD len;
- while (i < lstrlen(string))
+ while (i < mir_tstrlen(string))
{
if (string[i] == Delim)
{
@@ -520,7 +520,7 @@ WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim
{
if (SkipSpaces)
{ //remove spaces
- while (string[start] == ' ' && (int)start < lstrlen(string))
+ while (string[start] == ' ' && (int)start < mir_tstrlen(string))
start++;
while (i>1 && string[i-1] == ' ' && i>(int)start)
i--;
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 8922bf04a3..e381ec59e7 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -374,22 +374,22 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
SIZE textSize;
if (p.bShowProtoName) {
- GetTextExtentPoint32(hDC, p.tszProtoHumanName, lstrlen(p.tszProtoHumanName), &textSize);
+ GetTextExtentPoint32(hDC, p.tszProtoHumanName, mir_tstrlen(p.tszProtoHumanName), &textSize);
w += textSize.cx + 3 + spaceWidth;
}
if (p.bShowProtoEmails && p.szProtoEMailCount) {
- GetTextExtentPoint32A(hDC, p.szProtoEMailCount, lstrlenA(p.szProtoEMailCount), &textSize);
+ GetTextExtentPoint32A(hDC, p.szProtoEMailCount, mir_strlen(p.szProtoEMailCount), &textSize);
w += textSize.cx + 3 + spaceWidth;
}
if (p.bShowStatusName) {
- GetTextExtentPoint32(hDC, p.tszProtoStatusText, lstrlen(p.tszProtoStatusText), &textSize);
+ GetTextExtentPoint32(hDC, p.tszProtoStatusText, mir_tstrlen(p.tszProtoStatusText), &textSize);
w += textSize.cx + 3 + spaceWidth;
}
if ((p.xStatusMode & 8) && p.tszProtoXStatus) {
- GetTextExtentPoint32(hDC, p.tszProtoXStatus, lstrlen(p.tszProtoXStatus), &textSize);
+ GetTextExtentPoint32(hDC, p.tszProtoXStatus, mir_tstrlen(p.tszProtoXStatus), &textSize);
w += textSize.cx + 3 + spaceWidth;
}
@@ -530,10 +530,10 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
RECT rt = r;
rt.left = x + (spaceWidth >> 1);
rt.top = textY;
- ske_DrawText(hDC, p.tszProtoHumanName, lstrlen(p.tszProtoHumanName), &rt, 0);
+ ske_DrawText(hDC, p.tszProtoHumanName, mir_tstrlen(p.tszProtoHumanName), &rt, 0);
if ((p.bShowProtoEmails && p.szProtoEMailCount != NULL) || p.bShowStatusName || ((p.xStatusMode & 8) && p.tszProtoXStatus)) {
- GetTextExtentPoint32(hDC, p.tszProtoHumanName, lstrlen(p.tszProtoHumanName), &textSize);
+ GetTextExtentPoint32(hDC, p.tszProtoHumanName, mir_tstrlen(p.tszProtoHumanName), &textSize);
x += textSize.cx + 3;
}
}
@@ -543,9 +543,9 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
RECT rt = r;
rt.left = x + (spaceWidth >> 1);
rt.top = textY;
- ske_DrawTextA(hDC, p.szProtoEMailCount, lstrlenA(p.szProtoEMailCount), &rt, 0);
+ ske_DrawTextA(hDC, p.szProtoEMailCount, mir_strlen(p.szProtoEMailCount), &rt, 0);
if (p.bShowStatusName || ((p.xStatusMode & 8) && p.tszProtoXStatus)) {
- GetTextExtentPoint32A(hDC, p.szProtoEMailCount, lstrlenA(p.szProtoEMailCount), &textSize);
+ GetTextExtentPoint32A(hDC, p.szProtoEMailCount, mir_strlen(p.szProtoEMailCount), &textSize);
x += textSize.cx + 3;
}
}
@@ -555,9 +555,9 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
RECT rt = r;
rt.left = x + (spaceWidth >> 1);
rt.top = textY;
- ske_DrawText(hDC, p.tszProtoStatusText, lstrlen(p.tszProtoStatusText), &rt, 0);
+ ske_DrawText(hDC, p.tszProtoStatusText, mir_tstrlen(p.tszProtoStatusText), &rt, 0);
if (((p.xStatusMode & 8) && p.tszProtoXStatus)) {
- GetTextExtentPoint32(hDC, p.tszProtoStatusText, lstrlen(p.tszProtoStatusText), &textSize);
+ GetTextExtentPoint32(hDC, p.tszProtoStatusText, mir_tstrlen(p.tszProtoStatusText), &textSize);
x += textSize.cx + 3;
}
}
@@ -566,7 +566,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
RECT rt = r;
rt.left = x + (spaceWidth >> 1);
rt.top = textY;
- ske_DrawText(hDC, p.tszProtoXStatus, lstrlen(p.tszProtoXStatus), &rt, 0);
+ ske_DrawText(hDC, p.tszProtoXStatus, mir_tstrlen(p.tszProtoXStatus), &rt, 0);
}
p.protoRect = r;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 34fffc42ce..4324fb1a81 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -650,7 +650,7 @@ void DeleteViewMode( char * szName )
db_unset(NULL, CLVM_MODULE, szSetting);
db_unset(NULL, CLVM_MODULE, szName);
- if (!strcmp(g_CluiData.current_viewmode, szName) && lstrlenA(szName) == lstrlenA(g_CluiData.current_viewmode)) {
+ if (!strcmp(g_CluiData.current_viewmode, szName) && mir_strlen(szName) == mir_strlen(g_CluiData.current_viewmode)) {
g_CluiData.bFilterEffective = 0;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
SetWindowText(hwndSelector, TranslateT("All contacts"));
@@ -1306,7 +1306,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
if (!onlySelector) {
mir_snprintf(szSetting, 256, "%c%s_PF", 246, Name);
if (!db_get_s(NULL, CLVM_MODULE, szSetting, &dbv)) {
- if (lstrlenA(dbv.pszVal) >= 2) {
+ if (mir_strlen(dbv.pszVal) >= 2) {
strncpy(g_CluiData.protoFilter, dbv.pszVal, SIZEOF(g_CluiData.protoFilter));
g_CluiData.protoFilter[SIZEOF(g_CluiData.protoFilter) - 1] = 0;
g_CluiData.bFilterEffective |= CLVM_FILTER_PROTOS;
@@ -1315,7 +1315,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
}
mir_snprintf(szSetting, 256, "%c%s_GF", 246, Name);
if (!db_get_ts(NULL, CLVM_MODULE, szSetting, &dbv)) {
- if (lstrlen(dbv.ptszVal) >= 2) {
+ if (mir_tstrlen(dbv.ptszVal) >= 2) {
_tcsncpy(g_CluiData.groupFilter, dbv.ptszVal, SIZEOF(g_CluiData.groupFilter));
g_CluiData.groupFilter[SIZEOF(g_CluiData.groupFilter) - 1] = 0;
g_CluiData.bFilterEffective |= CLVM_FILTER_GROUPS;