summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_cachefuncs.cpp
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/src/modern_cachefuncs.cpp
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/src/modern_cachefuncs.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp20
1 files changed, 10 insertions, 10 deletions
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 };