diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /protocols/JabberG/src/jabber_userinfo.cpp | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_userinfo.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_userinfo.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index cc320b01c0..dad25263b6 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -47,12 +47,12 @@ struct UserInfoStringBuf void append(TCHAR *str) { if (!str) return; - int length = lstrlen(str); + int length = mir_tstrlen(str); if (size - offset < length + 1) { size += (length + STRINGBUF_INCREMENT); buf = (TCHAR *)mir_realloc(buf, size * sizeof(TCHAR)); } - lstrcpy(buf + offset, str); + mir_tstrcpy(buf + offset, str); offset += length; } @@ -65,7 +65,7 @@ struct UserInfoStringBuf } void actualize() { - if (buf) offset = lstrlen(buf); + if (buf) offset = mir_tstrlen(buf); } }; @@ -177,7 +177,7 @@ static HTREEITEM sttFillInfoLine(HWND hwndTree, HTREEITEM htiRoot, HICON hIcon, if (title) mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s"), title, value); else - lstrcpyn(buf, value, SIZEOF(buf)); + mir_tstrncpy(buf, value, SIZEOF(buf)); TVINSERTSTRUCT tvis = {0}; tvis.hParent = htiRoot; @@ -257,14 +257,14 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti // Idle if (r->m_dwIdleStartTime > 0) { - lstrcpyn(buf, _tctime(&r->m_dwIdleStartTime), SIZEOF(buf)); - int len = lstrlen(buf); + mir_tstrncpy(buf, _tctime(&r->m_dwIdleStartTime), SIZEOF(buf)); + int len = mir_tstrlen(buf); if (len > 0) buf[len-1] = 0; } else if (!r->m_dwIdleStartTime) - lstrcpyn(buf, TranslateT("unknown"), SIZEOF(buf)); + mir_tstrncpy(buf, TranslateT("unknown"), SIZEOF(buf)); else - lstrcpyn(buf, TranslateT("<not specified>"), SIZEOF(buf)); + mir_tstrncpy(buf, TranslateT("<not specified>"), SIZEOF(buf)); sttFillInfoLine(hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE)); @@ -365,14 +365,14 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM // logoff JABBER_RESOURCE_STATUS *r = item->getTemp(); if (r->m_dwIdleStartTime > 0) { - lstrcpyn(buf, _tctime(&r->m_dwIdleStartTime), SIZEOF(buf)); - int len = lstrlen(buf); + mir_tstrncpy(buf, _tctime(&r->m_dwIdleStartTime), SIZEOF(buf)); + int len = mir_tstrlen(buf); if (len > 0) buf[len-1] = 0; } else if (!r->m_dwIdleStartTime) - lstrcpyn(buf, TranslateT("unknown"), SIZEOF(buf)); + mir_tstrncpy(buf, TranslateT("unknown"), SIZEOF(buf)); else - lstrcpyn(buf, TranslateT("<not specified>"), SIZEOF(buf)); + mir_tstrncpy(buf, TranslateT("<not specified>"), SIZEOF(buf)); sttFillInfoLine(hwndTree, htiRoot, NULL, (item->jid && _tcschr(item->jid, _T('@'))) ? TranslateT("Last logoff time") : TranslateT("Uptime"), buf, @@ -383,9 +383,9 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM // activity if (item->m_pLastSeenResource) - lstrcpyn(buf, item->m_pLastSeenResource->m_tszResourceName, SIZEOF(buf)); + mir_tstrncpy(buf, item->m_pLastSeenResource->m_tszResourceName, SIZEOF(buf)); else - lstrcpyn(buf, TranslateT("<no information available>"), SIZEOF(buf)); + mir_tstrncpy(buf, TranslateT("<no information available>"), SIZEOF(buf)); sttFillInfoLine(hwndTree, htiRoot, NULL, TranslateT("Last active resource"), buf, sttInfoLineId(0, INFOLINE_LASTACTIVE)); |