From babf7873a3fe373d60ef22b1b671d98e014d8819 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 19:52:29 +0000 Subject: replace strcpy to mir_strcpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/Options.cpp | 38 +++++++++++++++--------------- plugins/IEView/src/ScriverHTMLBuilder.cpp | 4 ++-- plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 4 ++-- plugins/IEView/src/TemplateHTMLBuilder.cpp | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index bd63b8a9aa..6b183d236b 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -382,7 +382,7 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates) tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE; tvi.item.stateMask = TVIS_SELECTED | TVIS_STATEIMAGEMASK; if (i == 0) { - strcpy(protoName, Translate("Default")); + mir_strcpy(protoName, Translate("Default")); } else { CallProtoService(proto->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName); @@ -1506,7 +1506,7 @@ void Options::init() proto->setSRMMFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128)); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); if (strncmp(tmpPath, "http://", 7)) PathToAbsolute(dbv.pszVal, tmpPath); @@ -1515,7 +1515,7 @@ void Options::init() } mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); if (strncmp(tmpPath, "http://", 7)) PathToAbsolute(dbv.pszVal, tmpPath); @@ -1524,7 +1524,7 @@ void Options::init() } mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); PathToAbsolute(dbv.pszVal, tmpPath); proto->setSRMMTemplateFilename(tmpPath); db_free(&dbv); @@ -1539,7 +1539,7 @@ void Options::init() proto->setChatFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128)); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); if (strncmp(tmpPath, "http://", 7)) PathToAbsolute(dbv.pszVal, tmpPath); @@ -1548,7 +1548,7 @@ void Options::init() } mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); if (strncmp(tmpPath, "http://", 7)) PathToAbsolute(dbv.pszVal, tmpPath); @@ -1557,7 +1557,7 @@ void Options::init() } mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); PathToAbsolute(dbv.pszVal, tmpPath); proto->setChatTemplateFilename(tmpPath); db_free(&dbv); @@ -1572,7 +1572,7 @@ void Options::init() proto->setHistoryFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128)); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); if (strncmp(tmpPath, "http://", 7)) PathToAbsolute(dbv.pszVal, tmpPath); @@ -1581,7 +1581,7 @@ void Options::init() } mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); if (strncmp(tmpPath, "http://", 7)) PathToAbsolute(dbv.pszVal, tmpPath); @@ -1590,7 +1590,7 @@ void Options::init() } mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE); if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) { - strcpy(tmpPath, dbv.pszVal); + mir_strcpy(tmpPath, dbv.pszVal); PathToAbsolute(dbv.pszVal, tmpPath); proto->setHistoryTemplateFilename(tmpPath); db_free(&dbv); @@ -1691,17 +1691,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS); db_set_dw(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags()); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND); - strcpy(tmpPath, proto->getSRMMBackgroundFilename()); + mir_strcpy(tmpPath, proto->getSRMMBackgroundFilename()); PathToRelative(proto->getSRMMBackgroundFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS); - strcpy(tmpPath, proto->getSRMMCssFilename()); + mir_strcpy(tmpPath, proto->getSRMMCssFilename()); PathToRelative(proto->getSRMMCssFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE); - strcpy(tmpPath, proto->getSRMMTemplateFilename()); + mir_strcpy(tmpPath, proto->getSRMMTemplateFilename()); PathToRelative(proto->getSRMMTemplateFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); @@ -1713,17 +1713,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS); db_set_dw(NULL, ieviewModuleName, dbsName, proto->getChatFlags()); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND); - strcpy(tmpPath, proto->getChatBackgroundFilename()); + mir_strcpy(tmpPath, proto->getChatBackgroundFilename()); PathToRelative(proto->getChatBackgroundFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS); - strcpy(tmpPath, proto->getChatCssFilename()); + mir_strcpy(tmpPath, proto->getChatCssFilename()); PathToRelative(proto->getChatCssFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE); - strcpy(tmpPath, proto->getChatTemplateFilename()); + mir_strcpy(tmpPath, proto->getChatTemplateFilename()); PathToRelative(proto->getChatTemplateFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); @@ -1735,17 +1735,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS); db_set_dw(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags()); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND); - strcpy(tmpPath, proto->getHistoryBackgroundFilename()); + mir_strcpy(tmpPath, proto->getHistoryBackgroundFilename()); PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS); - strcpy(tmpPath, proto->getHistoryCssFilename()); + mir_strcpy(tmpPath, proto->getHistoryCssFilename()); PathToRelative(proto->getHistoryCssFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE); - strcpy(tmpPath, proto->getHistoryTemplateFilename()); + mir_strcpy(tmpPath, proto->getHistoryTemplateFilename()); PathToRelative(proto->getHistoryTemplateFilename(), tmpPath); db_set_s(NULL, ieviewModuleName, dbsName, tmpPath); } diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index ed23d53b5c..ed336a4eea 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -157,9 +157,9 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod } else { if (dwFlags & SMF_LOG_USELONGDATE) - strcpy(format, "D"); + mir_strcpy(format, "D"); else - strcpy(format, "d"); + mir_strcpy(format, "d"); } } if (mode == 0 || mode == 2) { diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index 675430af55..e9c6b01faf 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -177,12 +177,12 @@ char* TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isG if (dwFlags & MWF_LOG_USERELATIVEDATES && check >= today) { dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t"; - strcpy(szResult, Translate("Today")); + mir_strcpy(szResult, Translate("Today")); strcat(szResult, ", "); } else if (dwFlags & MWF_LOG_USERELATIVEDATES && check > (today - 86400)) { dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t"; - strcpy(szResult, Translate("Yesterday")); + mir_strcpy(szResult, Translate("Yesterday")); strcat(szResult, ", "); } else { diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index e81e1fd85a..e0b9feb3f2 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -175,7 +175,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr if (tmpm == NULL) return; - strcpy(tempBase, "file://"); + mir_strcpy(tempBase, "file://"); strncat(tempBase, tmpm->getFilename(), SIZEOF(tempBase) - mir_strlen(tempBase)); char *pathrun = tempBase + mir_strlen(tempBase); while ((*pathrun != '\\' && *pathrun != '/') && (pathrun > tempBase)) @@ -346,7 +346,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, TemplateMap *tmpm = getTemplateMap(protoSettings); if (tmpm != NULL) { - strcpy(tempBase, "file://"); + mir_strcpy(tempBase, "file://"); strcat(tempBase, tmpm->getFilename()); char* pathrun = tempBase + mir_strlen(tempBase); while ((*pathrun != '\\' && *pathrun != '/') && (pathrun > tempBase)) pathrun--; -- cgit v1.2.3