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/IEView/src/ChatHTMLBuilder.cpp | 6 +++--- plugins/IEView/src/HTMLBuilder.cpp | 2 +- plugins/IEView/src/HistoryHTMLBuilder.cpp | 6 +++--- plugins/IEView/src/MUCCHTMLBuilder.cpp | 6 +++--- plugins/IEView/src/ScriverHTMLBuilder.cpp | 6 +++--- plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 6 +++--- plugins/IEView/src/TemplateHTMLBuilder.cpp | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/ChatHTMLBuilder.cpp b/plugins/IEView/src/ChatHTMLBuilder.cpp index 6b262f8a92..c5b65d489c 100644 --- a/plugins/IEView/src/ChatHTMLBuilder.cpp +++ b/plugins/IEView/src/ChatHTMLBuilder.cpp @@ -74,9 +74,9 @@ void ChatHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; mir_snprintf(str, SIZEOF(str), "Font%d", i); if (db_get(NULL, CHATFONTMOD, str, &dbv)) - lstrcpyA(lf->lfFaceName, "Verdana"); + mir_strcpy(lf->lfFaceName, "Verdana"); else { - lstrcpynA(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); + mir_strncpy(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); db_free(&dbv); } } @@ -89,7 +89,7 @@ char *ChatHTMLBuilder::timestampToString(time_t time) char *pszStamp = "[%H:%M]"; //InitSetting( &g_Settings.pszTimeStamp, "HeaderTime", _T("[%H:%M]")); strftime(str, 79, pszStamp, localtime(&time)); - lstrcpynA(szResult, ptrA(mir_utf8encode(str)), 500); + mir_strncpy(szResult, ptrA(mir_utf8encode(str)), 500); return szResult; } diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index b0bebbb8f7..d7ecb26fe3 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -374,7 +374,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) else if (dbei.eventType == EVENTTYPE_FILE) { //blob is: sequenceid(DWORD),filename(ASCIIZ),description(ASCIIZ) char* filename = ((char *)dbei.pBlob) + sizeof(DWORD); - char* descr = filename + lstrlenA(filename) + 1; + char* descr = filename + mir_strlen(filename) + 1; eventData->ptszText = DbGetEventStringT(&dbei, filename); if (*descr != '\0') eventData->ptszText2 = DbGetEventStringT(&dbei, descr); diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp index 493531e2bc..812b3b5b3d 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.cpp +++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp @@ -90,7 +90,7 @@ char *HistoryHTMLBuilder::timestampToString(DWORD dwFlags, time_t check) dbtts.szFormat = (char *)"d t"; CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts); strncat(szResult, str, 500); - lstrcpynA(szResult, ptrA(mir_utf8encode(szResult)), 500); + mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500); return szResult; } @@ -129,9 +129,9 @@ void HistoryHTMLBuilder::loadMsgDlgFont(const char *dbSetting, LOGFONTA * lf, CO lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; mir_snprintf(str, SIZEOF(str), "Font.%s.Name", dbSetting); if (db_get(NULL, HPPMOD, str, &dbv)) - lstrcpyA(lf->lfFaceName, "Verdana"); + mir_strcpy(lf->lfFaceName, "Verdana"); else { - lstrcpynA(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); + mir_strncpy(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); db_free(&dbv); } } diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp index d3e910663e..0728738aac 100644 --- a/plugins/IEView/src/MUCCHTMLBuilder.cpp +++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp @@ -70,9 +70,9 @@ void MUCCHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; mir_snprintf(str, SIZEOF(str), "Font%dFace", i); if (db_get(NULL, MUCCMOD, str, &dbv)) - lstrcpyA(lf->lfFaceName, "Verdana"); + mir_strcpy(lf->lfFaceName, "Verdana"); else { - lstrcpynA(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); + mir_strncpy(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); db_free(&dbv); } } @@ -111,7 +111,7 @@ char *MUCCHTMLBuilder::timestampToString(DWORD dwData, time_t check) } CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts); strncat(szResult, str, 500); - lstrcpynA(szResult, ptrA(mir_utf8encode(szResult)), 500); + mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500); return szResult; } diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index f1057dca36..bc42feb127 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -112,9 +112,9 @@ void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; mir_snprintf(str, SIZEOF(str), "SRMFont%d", i); if (db_get(NULL, SRMMMOD, str, &dbv)) - lstrcpyA(lf->lfFaceName, "Verdana"); + mir_strcpy(lf->lfFaceName, "Verdana"); else { - lstrcpynA(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); + mir_strncpy(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); db_free(&dbv); } } @@ -172,7 +172,7 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod //_tcsncat(szResult, str, 500); strncat(szResult, str, 500); } - lstrcpynA(szResult, ptrA(mir_utf8encode(szResult)), 500); + mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500); return szResult; } diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index da11d66568..2a87dc18f2 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -143,9 +143,9 @@ void TabSRMMHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; mir_snprintf(str, SIZEOF(str), "Font%d", i); if (db_get(NULL, TABSRMM_FONTMODULE, str, &dbv)) - lstrcpyA(lf->lfFaceName, "Verdana"); + mir_strcpy(lf->lfFaceName, "Verdana"); else { - lstrcpynA(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); + mir_strncpy(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName)); db_free(&dbv); } } @@ -195,7 +195,7 @@ char* TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isG } CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts); strncat(szResult, str, 500); - lstrcpynA(szResult, ptrA(mir_utf8encode(szResult)), 500); + mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500); return szResult; } diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index e31a7ed915..0e2e5ce0be 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -146,7 +146,7 @@ char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mo } } - lstrcpynA(szResult, ptrA(mir_utf8encodeT(str)), 500); + mir_strncpy(szResult, ptrA(mir_utf8encodeT(str)), 500); return szResult; } -- cgit v1.2.3