summaryrefslogtreecommitdiff
path: root/plugins/FavContacts
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/FavContacts
parent4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff)
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FavContacts')
-rw-r--r--plugins/FavContacts/src/contact_cache.cpp14
-rw-r--r--plugins/FavContacts/src/menu.cpp20
-rw-r--r--plugins/FavContacts/src/services.cpp56
3 files changed, 45 insertions, 45 deletions
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp
index bda23904e2..48cfe368a0 100644
--- a/plugins/FavContacts/src/contact_cache.cpp
+++ b/plugins/FavContacts/src/contact_cache.cpp
@@ -131,8 +131,8 @@ static bool AppendInfo(TCHAR *buf, int size, MCONTACT hContact, int info)
bool ret = false;
if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci) && (ci.type == CNFT_ASCIIZ) && ci.pszVal) {
- if (*ci.pszVal && (lstrlen(ci.pszVal) < size - 2)) {
- lstrcpy(buf, ci.pszVal);
+ if (*ci.pszVal && (mir_tstrlen(ci.pszVal) < size - 2)) {
+ mir_tstrcpy(buf, ci.pszVal);
ret = true;
}
mir_free(ci.pszVal);
@@ -156,7 +156,7 @@ void CContactCache::TContactInfo::LoadInfo()
for (int i = 0; i < SIZEOF(items); ++i)
if (AppendInfo(p, SIZEOF(info) - (p - info), hContact, items[i]))
- p += lstrlen(p) + 1;
+ p += mir_tstrlen(p) + 1;
*p = 0;
@@ -171,8 +171,8 @@ TCHAR *nb_stristr(TCHAR *str, TCHAR *substr)
TCHAR *str_up = NEWTSTR_ALLOCA(str);
TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
- CharUpperBuff(str_up, lstrlen(str_up));
- CharUpperBuff(substr_up, lstrlen(substr_up));
+ CharUpperBuff(str_up, mir_tstrlen(str_up));
+ CharUpperBuff(substr_up, mir_tstrlen(substr_up));
TCHAR *p = _tcsstr(str_up, substr_up);
return p ? (str + (p - str_up)) : NULL;
@@ -193,7 +193,7 @@ bool CContactCache::filter(int rate, TCHAR *str)
for (int iLayout = 0; iLayout < nKbdLayouts; ++iLayout) {
if (kbdLayoutActive == kbdLayouts[iLayout])
- lstrcpy(buf, str);
+ mir_tstrcpy(buf, str);
else {
int i;
for (i = 0; str[i]; ++i) {
@@ -204,7 +204,7 @@ bool CContactCache::filter(int rate, TCHAR *str)
buf[i] = 0;
}
- for (TCHAR *p = m_cache[rate]->info; p && *p; p = p + lstrlen(p) + 1)
+ for (TCHAR *p = m_cache[rate]->info; p && *p; p = p + mir_tstrlen(p) + 1)
if (nb_stristr(p, buf))
return true;
}
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 3138ff9ba8..6136b41c3f 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -47,7 +47,7 @@ static BOOL sttMeasureItem_Group(LPMEASUREITEMSTRUCT lpmis, Options *options)
SelectObject(hdc, g_Options.hfntName);
SIZE sz;
- GetTextExtentPoint32(hdc, name, lstrlen(name), &sz);
+ GetTextExtentPoint32(hdc, name, mir_tstrlen(name), &sz);
lpmis->itemHeight = sz.cy + 8;
lpmis->itemWidth = sz.cx + 10;
SelectObject(hdc, hfntSave);
@@ -81,7 +81,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
if (!options->bSysColors)
SelectObject(hdc, g_Options.hfntSecond);
- GetTextExtentPoint32(hdc, title, lstrlen(title), &sz);
+ GetTextExtentPoint32(hdc, title, mir_tstrlen(title), &sz);
textWidth = sz.cx;
lpmis->itemHeight += sz.cy + 3;
@@ -92,7 +92,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (!options->bSysColors) SelectObject(hdc, g_Options.hfntName);
- GetTextExtentPoint32(hdc, name, lstrlen(name), &sz);
+ GetTextExtentPoint32(hdc, name, mir_tstrlen(name), &sz);
textWidth = max(textWidth, sz.cx);
SelectObject(hdc, hfntSave);
@@ -158,7 +158,7 @@ static BOOL sttDrawItem_Group(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
TCHAR *name = sttGetGroupName(-INT_PTR(lpdis->itemData));
if (!options->bSysColors)
SelectObject(lpdis->hDC, g_Options.hfntName);
- DrawText(lpdis->hDC, name, lstrlen(name), &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_CENTER);
+ DrawText(lpdis->hDC, name, mir_tstrlen(name), &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_CENTER);
SelectObject(lpdis->hDC, hfntSave);
@@ -306,10 +306,10 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
if (!options->bSysColors)
SelectObject(hdcTemp, g_Options.hfntName);
SetTextColor(hdcTemp, clLine1);
- DrawText(hdcTemp, name, lstrlen(name), &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_TOP | DT_LEFT);
+ DrawText(hdcTemp, name, mir_tstrlen(name), &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_TOP | DT_LEFT);
SIZE sz;
- GetTextExtentPoint32(hdcTemp, name, lstrlen(name), &sz);
+ GetTextExtentPoint32(hdcTemp, name, mir_tstrlen(name), &sz);
lpdis->rcItem.top += sz.cy + 3;
}
@@ -324,7 +324,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
if (!options->bSysColors) SelectObject(hdcTemp, g_Options.hfntSecond);
SetTextColor(hdcTemp, clLine2);
- DrawText(hdcTemp, title, lstrlen(title), &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_TOP | DT_LEFT);
+ DrawText(hdcTemp, title, mir_tstrlen(title), &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_TOP | DT_LEFT);
if (bFree) mir_free(title);
}
@@ -390,13 +390,13 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam,
RemoveMenu((HMENU)lParam, 1, MF_BYPOSITION);
if (LOWORD(wParam) == VK_BACK) {
- if (int l = lstrlen(g_filter))
+ if (int l = mir_tstrlen(g_filter))
g_filter[l - 1] = 0;
}
else if (_istalnum(LOWORD(wParam))) {
- if (lstrlen(g_filter) < SIZEOF(g_filter) - 1) {
+ if (mir_tstrlen(g_filter) < SIZEOF(g_filter) - 1) {
TCHAR s[] = { LOWORD(wParam), 0 };
- lstrcat(g_filter, s);
+ mir_tstrcat(g_filter, s);
}
}
{
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp
index b853dac162..fce6dffea0 100644
--- a/plugins/FavContacts/src/services.cpp
+++ b/plugins/FavContacts/src/services.cpp
@@ -128,27 +128,27 @@ int ProcessReloadFonts(WPARAM wParam, LPARAM lParam)
LOGFONT lf = { 0 };
FontIDT fontid = { sizeof(fontid) };
- lstrcpy(fontid.group, LPGENT("Favorite Contacts"));
- lstrcpy(fontid.name, LPGENT("Contact name"));
+ mir_tstrcpy(fontid.group, LPGENT("Favorite Contacts"));
+ mir_tstrcpy(fontid.name, LPGENT("Contact name"));
g_Options.clLine1 = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
g_Options.hfntName = CreateFontIndirect(&lf);
- lstrcpy(fontid.name, LPGENT("Second line"));
+ mir_tstrcpy(fontid.name, LPGENT("Second line"));
g_Options.clLine2 = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
g_Options.hfntSecond = CreateFontIndirect(&lf);
- lstrcpy(fontid.name, LPGENT("Selected contact name (color)"));
+ mir_tstrcpy(fontid.name, LPGENT("Selected contact name (color)"));
g_Options.clLine1Sel = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
- lstrcpy(fontid.name, LPGENT("Selected second line (color)"));
+ mir_tstrcpy(fontid.name, LPGENT("Selected second line (color)"));
g_Options.clLine2Sel = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
ColourIDT colourid = { sizeof(colourid) };
- lstrcpy(colourid.group, LPGENT("Favorite Contacts"));
- lstrcpy(colourid.name, LPGENT("Background"));
+ mir_tstrcpy(colourid.group, LPGENT("Favorite Contacts"));
+ mir_tstrcpy(colourid.name, LPGENT("Background"));
g_Options.clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, (LPARAM)&lf);
- lstrcpy(colourid.name, LPGENT("Selected background"));
+ mir_tstrcpy(colourid.name, LPGENT("Selected background"));
g_Options.clBackSel = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, (LPARAM)&lf);
return 0;
@@ -171,39 +171,39 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////
FontIDT fontid = { sizeof(fontid) };
- lstrcpy(fontid.group, LPGENT("Favorite Contacts"));
- lstrcpyA(fontid.dbSettingsGroup, "FavContacts");
- lstrcpy(fontid.backgroundGroup, LPGENT("Favorite Contacts"));
+ mir_tstrcpy(fontid.group, LPGENT("Favorite Contacts"));
+ mir_strcpy(fontid.dbSettingsGroup, "FavContacts");
+ mir_tstrcpy(fontid.backgroundGroup, LPGENT("Favorite Contacts"));
fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
fontid.deffontsettings.size = -11;
- lstrcpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"));
+ mir_tstrcpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"));
fontid.deffontsettings.style = 0;
- lstrcpy(fontid.backgroundName, LPGENT("Background"));
+ mir_tstrcpy(fontid.backgroundName, LPGENT("Background"));
- lstrcpy(fontid.name, LPGENT("Contact name"));
- lstrcpyA(fontid.prefix, "fntName");
+ mir_tstrcpy(fontid.name, LPGENT("Contact name"));
+ mir_strcpy(fontid.prefix, "fntName");
fontid.deffontsettings.colour = GetSysColor(COLOR_MENUTEXT);
fontid.deffontsettings.style = DBFONTF_BOLD;
FontRegisterT(&fontid);
- lstrcpy(fontid.name, LPGENT("Second line"));
- lstrcpyA(fontid.prefix, "fntSecond");
+ mir_tstrcpy(fontid.name, LPGENT("Second line"));
+ mir_strcpy(fontid.prefix, "fntSecond");
fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_MENUTEXT), GetSysColor(COLOR_MENU));
fontid.deffontsettings.style = 0;
FontRegisterT(&fontid);
- lstrcpy(fontid.backgroundName, LPGENT("Selected background"));
+ mir_tstrcpy(fontid.backgroundName, LPGENT("Selected background"));
- lstrcpy(fontid.name, LPGENT("Selected contact name (color)"));
- lstrcpyA(fontid.prefix, "fntNameSel");
+ mir_tstrcpy(fontid.name, LPGENT("Selected contact name (color)"));
+ mir_strcpy(fontid.prefix, "fntNameSel");
fontid.deffontsettings.colour = GetSysColor(COLOR_HIGHLIGHTTEXT);
fontid.deffontsettings.style = DBFONTF_BOLD;
FontRegisterT(&fontid);
- lstrcpy(fontid.name, LPGENT("Selected second line (color)"));
- lstrcpyA(fontid.prefix, "fntSecondSel");
+ mir_tstrcpy(fontid.name, LPGENT("Selected second line (color)"));
+ mir_strcpy(fontid.prefix, "fntSecondSel");
fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_HIGHLIGHTTEXT), GetSysColor(COLOR_HIGHLIGHT));
fontid.deffontsettings.style = 0;
FontRegisterT(&fontid);
@@ -211,16 +211,16 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////
ColourIDT colourid = { sizeof(colourid) };
- lstrcpy(colourid.group, LPGENT("Favorite Contacts"));
- lstrcpyA(colourid.dbSettingsGroup, "FavContacts");
+ mir_tstrcpy(colourid.group, LPGENT("Favorite Contacts"));
+ mir_strcpy(colourid.dbSettingsGroup, "FavContacts");
- lstrcpy(colourid.name, LPGENT("Background"));
- lstrcpyA(colourid.setting, "BackColour");
+ mir_tstrcpy(colourid.name, LPGENT("Background"));
+ mir_strcpy(colourid.setting, "BackColour");
colourid.defcolour = GetSysColor(COLOR_MENU);
ColourRegisterT(&colourid);
- lstrcpy(colourid.name, LPGENT("Selected background"));
- lstrcpyA(colourid.setting, "SelectedColour");
+ mir_tstrcpy(colourid.name, LPGENT("Selected background"));
+ mir_strcpy(colourid.setting, "SelectedColour");
colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
ColourRegisterT(&colourid);