summaryrefslogtreecommitdiff
path: root/plugins/Clist_blind
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_blind')
-rw-r--r--plugins/Clist_blind/src/clcpaint.cpp16
-rw-r--r--plugins/Clist_blind/src/init.cpp22
2 files changed, 19 insertions, 19 deletions
diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp
index 2e041b0765..e4a6a1408d 100644
--- a/plugins/Clist_blind/src/clcpaint.cpp
+++ b/plugins/Clist_blind/src/clcpaint.cpp
@@ -307,14 +307,14 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
ChangeToFont(hdcMem, dat, FONTID_OFFLINE, &fontHeight);
else
ChangeToFont(hdcMem, dat, FONTID_CONTACTS, &fontHeight);
- GetTextExtentPoint32(hdcMem, group->cl.items[group->scanIndex]->szText, lstrlen(group->cl.items[group->scanIndex]->szText), &textSize);
+ GetTextExtentPoint32(hdcMem, group->cl.items[group->scanIndex]->szText, mir_tstrlen(group->cl.items[group->scanIndex]->szText), &textSize);
width = textSize.cx;
if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP) {
szCounts = pcli->pfnGetGroupCountsText(dat, group->cl.items[group->scanIndex]);
if (szCounts[0]) {
GetTextExtentPoint32A(hdcMem, " ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
- GetTextExtentPoint32A(hdcMem, szCounts, lstrlenA(szCounts), &countsSize);
+ GetTextExtentPoint32A(hdcMem, szCounts, mir_strlen(szCounts), &countsSize);
width += spaceSize.cx + countsSize.cx;
}
}
@@ -388,7 +388,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
rc.right = rc.left + ((clRect.right - rc.left - textSize.cx) >> 1) - 3;
DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT);
TextOut(hdcMem, rc.right + 3, y + ((dat->rowHeight - fontHeight) >> 1), group->cl.items[group->scanIndex]->szText,
- lstrlen(group->cl.items[group->scanIndex]->szText));
+ mir_tstrlen(group->cl.items[group->scanIndex]->szText));
rc.left = rc.right + 6 + textSize.cx;
rc.right = clRect.right;
DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT);
@@ -404,7 +404,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
if (rc.right < rc.left + 4)
rc.right = clRect.right + 1;
else
- TextOutA(hdcMem, rc.right, rc.top + groupCountsFontTopShift, szCounts, lstrlenA(szCounts));
+ TextOutA(hdcMem, rc.right, rc.top + groupCountsFontTopShift, szCounts, mir_strlen(szCounts));
ChangeToFont(hdcMem, dat, FONTID_GROUPS, &fontHeight);
if (selected)
SetTextColor(hdcMem, dat->selTextColour);
@@ -412,12 +412,12 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
SetHotTrackColour(hdcMem, dat);
rc.right--;
ExtTextOut(hdcMem, rc.left, rc.top, ETO_CLIPPED, &rc, group->cl.items[group->scanIndex]->szText,
- lstrlen(group->cl.items[group->scanIndex]->szText), NULL);
+ mir_tstrlen(group->cl.items[group->scanIndex]->szText), NULL);
}
else
TextOut(hdcMem, dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace,
y + ((dat->rowHeight - fontHeight) >> 1), group->cl.items[group->scanIndex]->szText,
- lstrlen(group->cl.items[group->scanIndex]->szText));
+ mir_tstrlen(group->cl.items[group->scanIndex]->szText));
if (dat->exStyle & CLS_EX_LINEWITHGROUPS) {
rc.top = y + (dat->rowHeight >> 1);
rc.bottom = rc.top + 2;
@@ -434,13 +434,13 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
rc.top = y + ((dat->rowHeight - fontHeight) >> 1);
rc.right = (clRect.right - clRect.left);
rc.bottom = rc.top;
- DrawText(hdcMem, szText, lstrlen(szText), &rc, DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP | DT_WORD_ELLIPSIS | DT_SINGLELINE);
+ DrawText(hdcMem, szText, mir_tstrlen(szText), &rc, DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP | DT_WORD_ELLIPSIS | DT_SINGLELINE);
}
if (selected) {
if (group->cl.items[group->scanIndex]->type != CLCIT_DIVIDER) {
TCHAR *szText = group->cl.items[group->scanIndex]->szText;
RECT rc;
- int qlen = lstrlen(dat->szQuickSearch);
+ int qlen = mir_tstrlen(dat->szQuickSearch);
SetTextColor(hdcMem, dat->quickSearchColour);
rc.left = dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace;
rc.top = y + ((dat->rowHeight - fontHeight) >> 1);
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index d2302364e7..c2e6c53512 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -185,15 +185,15 @@ TCHAR* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* setti
else if (dbv.type == DBVT_UTF8)
MultiByteToWideChar(CP_UTF8, 0, dbv.pszVal, -1, out, (int)len);
else if (dbv.type == DBVT_WCHAR)
- lstrcpyn(out, dbv.pwszVal, (int)len);
+ mir_tstrncpy(out, dbv.pwszVal, (int)len);
else if (def != NULL)
- lstrcpyn(out, def, (int)len);
+ mir_tstrncpy(out, def, (int)len);
db_free(&dbv);
}
else {
if (def != NULL)
- lstrcpyn(out, def, (int)len);
+ mir_tstrncpy(out, def, (int)len);
}
return out;
@@ -262,7 +262,7 @@ TCHAR * ParseText(const TCHAR *text,
const TCHAR **variables, size_t variablesSize,
const TCHAR **data, size_t dataSize)
{
- size_t length = lstrlen(text);
+ size_t length = mir_tstrlen(text);
size_t nextPos = 0;
StringHelper ret = {0};
size_t i;
@@ -294,11 +294,11 @@ TCHAR * ParseText(const TCHAR *text,
// See if can find it
for(j = 0 ; j < size ; j++)
{
- size_t vlen = lstrlen(variables[j]);
+ size_t vlen = mir_tstrlen(variables[j]);
if (_tcsnicmp(&text[i], variables[j], vlen) == 0)
{
- if (CopyData(&ret, data[j], lstrlen(data[j])))
+ if (CopyData(&ret, data[j], mir_tstrlen(data[j])))
return NULL;
i += vlen - 1;
@@ -448,7 +448,7 @@ TCHAR *GetStatusName(struct ClcContact *item)
// Get status name
status = db_get_w(item->hContact, item->proto, "Status", ID_STATUS_OFFLINE);
- lstrcpyn(status_name, pcli->pfnGetStatusModeDescription(status, GSMDF_TCHAR), MAX_REGS(status_name));
+ mir_tstrncpy(status_name, pcli->pfnGetStatusModeDescription(status, GSMDF_TCHAR), MAX_REGS(status_name));
return status_name;
}
@@ -484,7 +484,7 @@ TCHAR *GetProtoName(struct ClcContact *item)
proto_name[0] = '\0';
if (item->hContact == NULL || item->proto == NULL)
{
- lstrcpyn(proto_name, TranslateT("Unknown Protocol"), MAX_REGS(proto_name));
+ mir_tstrncpy(proto_name, TranslateT("Unknown Protocol"), MAX_REGS(proto_name));
return proto_name;
}
@@ -501,7 +501,7 @@ TCHAR *GetProtoName(struct ClcContact *item)
return proto_name;
}
- lstrcpyn(proto_name, acc->tszAccountName, MAX_REGS(proto_name));
+ mir_tstrncpy(proto_name, acc->tszAccountName, MAX_REGS(proto_name));
return proto_name;
}
@@ -590,7 +590,7 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig)
txt = ParseText(template_group, t, MAX_REGS(t), v, MAX_REGS(v));
if (txt != NULL)
- lstrcpyn(text, txt, (int)size);
+ mir_tstrncpy(text, txt, (int)size);
mir_free(txt);
break;
}
@@ -612,7 +612,7 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig)
TCHAR *txt = ParseText(template_contact, t, MAX_REGS(t), v, MAX_REGS(v));
if (txt != NULL)
- lstrcpyn(text, txt, (int)size);
+ mir_tstrncpy(text, txt, (int)size);
mir_free(txt);
break;
}