From 688f55ba998c19304a29727c910504903f4cc49a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 18:51:36 +0000 Subject: lstr* replacements git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/xstatus.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/NewXstatusNotify/src/xstatus.cpp') diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 113d20a642..06cbeffe0e 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -101,7 +101,7 @@ TCHAR *ReplaceVars(XSTATUSCHANGE *xsc, const TCHAR *tmplt) TCHAR *str = (TCHAR *)mir_alloc(2048 * sizeof(TCHAR)); str[0] = _T('\0'); - int len = lstrlen(tmplt); + int len = mir_tstrlen(tmplt); for (int i = 0; i < len; i++) { tmp[0] = _T('\0'); @@ -112,32 +112,32 @@ TCHAR *ReplaceVars(XSTATUSCHANGE *xsc, const TCHAR *tmplt) case 'n': { TCHAR stzType[32]; - lstrcpyn(tmp, GetStatusTypeAsString(xsc->type, stzType), SIZEOF(tmp)); + mir_tstrncpy(tmp, GetStatusTypeAsString(xsc->type, stzType), SIZEOF(tmp)); } break; case 't': if (xsc->stzTitle == NULL || xsc->stzTitle[0] == _T('\0')) - lstrcpyn(tmp, TranslateT(""), SIZEOF(tmp)); + mir_tstrncpy(tmp, TranslateT(""), SIZEOF(tmp)); else - lstrcpyn(tmp, xsc->stzTitle, SIZEOF(tmp)); + mir_tstrncpy(tmp, xsc->stzTitle, SIZEOF(tmp)); break; case 'm': if (xsc->stzText == NULL || xsc->stzText[0] == _T('\0')) - lstrcpyn(tmp, TranslateT(""), SIZEOF(tmp)); + mir_tstrncpy(tmp, TranslateT(""), SIZEOF(tmp)); else { TCHAR *_tmp = AddCR(xsc->stzText); - lstrcpyn(tmp, _tmp, SIZEOF(tmp)); + mir_tstrncpy(tmp, _tmp, SIZEOF(tmp)); mir_free(_tmp); } break; case 'c': if (xsc->hContact == NULL) - lstrcpyn(tmp, TranslateT("Contact"), SIZEOF(tmp)); + mir_tstrncpy(tmp, TranslateT("Contact"), SIZEOF(tmp)); else - lstrcpyn(tmp, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)xsc->hContact, GCDNF_TCHAR), SIZEOF(tmp)); + mir_tstrncpy(tmp, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)xsc->hContact, GCDNF_TCHAR), SIZEOF(tmp)); break; default: @@ -165,10 +165,10 @@ TCHAR *ReplaceVars(XSTATUSCHANGE *xsc, const TCHAR *tmplt) tmp[0] = tmplt[i], tmp[1] = _T('\0'); if (tmp[0] != _T('\0')) { - if (lstrlen(tmp) + lstrlen(str) < 2044) - lstrcat(str, tmp); + if (mir_tstrlen(tmp) + mir_tstrlen(str) < 2044) + mir_tstrcat(str, tmp); else { - lstrcat(str, _T("...")); + mir_tstrcat(str, _T("...")); break; } } -- cgit v1.2.3