diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:49:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:49:58 +0000 |
commit | 6fcfba2c46a456677b5825a899469ba4e8905448 (patch) | |
tree | b4b6f6f9001b8609998a815ec1c7c92aa30b287e /plugins/Clist_nicer/src | |
parent | 24bed968f1e96aa4598d8dbe3a6e8a34dded3dc2 (diff) |
replace strncpy to mir_strncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 18 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/extBackg.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/viewmodes.cpp | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c066d54371..add59df1ed 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -2011,7 +2011,7 @@ void FS_RegisterFonts() { FontIDT fid = { sizeof(fid) }; _tcsncpy(fid.group, LPGENT("Contact list"), SIZEOF(fid.group)); - strncpy(fid.dbSettingsGroup, "CLC", 5); + mir_strncpy(fid.dbSettingsGroup, "CLC", 5); fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE; HDC hdc = GetDC(NULL); @@ -2032,7 +2032,7 @@ void FS_RegisterFonts() char idstr[10]; mir_snprintf(idstr, SIZEOF(idstr), "Font%d", i); - strncpy(fid.prefix, idstr, SIZEOF(fid.prefix)); + mir_strncpy(fid.prefix, idstr, SIZEOF(fid.prefix)); fid.order = i; FontRegisterT(&fid); } @@ -2042,34 +2042,34 @@ void FS_RegisterFonts() ColourIDT colourid = {0}; colourid.cbSize = sizeof(colourid); colourid.order = 0; - strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup)); + mir_strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup)); - strncpy(colourid.setting, "BkColour", sizeof(colourid.setting)); + mir_strncpy(colourid.setting, "BkColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Background"), SIZEOF(colourid.name)); _tcsncpy(colourid.group, LPGENT("Contact list"), SIZEOF(colourid.group)); colourid.defcolour = CLCDEFAULT_BKCOLOUR; ColourRegisterT(&colourid); - strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); + mir_strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Selected text"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_SELTEXTCOLOUR; ColourRegisterT(&colourid); - strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting)); + mir_strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Hottrack text"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_HOTTEXTCOLOUR; ColourRegisterT(&colourid); - strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting)); + mir_strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Quicksearch text"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_QUICKSEARCHCOLOUR; ColourRegisterT(&colourid); - strncpy(colourid.dbSettingsGroup, "CLUI", sizeof(colourid.dbSettingsGroup)); - strncpy(colourid.setting, "clr_frameborder", sizeof(colourid.setting)); + mir_strncpy(colourid.dbSettingsGroup, "CLUI", sizeof(colourid.dbSettingsGroup)); + mir_strncpy(colourid.setting, "clr_frameborder", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Embedded frames border"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = RGB(40, 40, 40); diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index bf285973c1..2b82577b11 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -774,7 +774,7 @@ void IMG_ReadItem(const char *itemname, const char *szFileName) done_with_glyph:
- strncpy(tmpItem.szName, &itemname[1], sizeof(tmpItem.szName));
+ mir_strncpy(tmpItem.szName, &itemname[1], sizeof(tmpItem.szName));
tmpItem.szName[sizeof(tmpItem.szName) - 1] = 0;
_splitpath(szFileName, szDrive, szPath, NULL, NULL);
mir_snprintf(szFinalName, SIZEOF(szFinalName), "%s\\%s\\%s", szDrive, szPath, buffer);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index d18dddb6d1..c168e671fe 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -447,7 +447,7 @@ void UpdateFilters() szBuf = (char *)malloc(iLen + 1);
SendDlgItemMessageA(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szBuf);
- strncpy(g_szModename, szBuf, sizeof(g_szModename));
+ mir_strncpy(g_szModename, szBuf, sizeof(g_szModename));
g_szModename[sizeof(g_szModename) - 1] = 0;
mir_snprintf(szTemp, SIZEOF(szTemp), Translate("Current view mode: %s"), g_szModename);
SetDlgItemTextA(clvmHwnd, IDC_CURVIEWMODE2, szTemp);
@@ -1051,7 +1051,7 @@ void ApplyViewMode(const char *name) mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_PF", 246, name);
if (!cfg::getString(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (mir_strlen(dbv.pszVal) >= 2) {
- strncpy(cfg::dat.protoFilter, dbv.pszVal, sizeof(cfg::dat.protoFilter));
+ mir_strncpy(cfg::dat.protoFilter, dbv.pszVal, sizeof(cfg::dat.protoFilter));
cfg::dat.protoFilter[sizeof(cfg::dat.protoFilter) - 1] = 0;
cfg::dat.bFilterEffective |= CLVM_FILTER_PROTOS;
}
@@ -1084,11 +1084,11 @@ void ApplyViewMode(const char *name) DWORD timerexpire;
mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_OPT", 246, name);
timerexpire = LOWORD(cfg::getDword(CLVM_MODULE, szSetting, 0));
- strncpy(cfg::dat.old_viewmode, cfg::dat.current_viewmode, 256);
+ mir_strncpy(cfg::dat.old_viewmode, cfg::dat.current_viewmode, 256);
cfg::dat.old_viewmode[255] = 0;
SetTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE, timerexpire * 1000, NULL);
}
- strncpy(cfg::dat.current_viewmode, name, 256);
+ mir_strncpy(cfg::dat.current_viewmode, name, 256);
cfg::dat.current_viewmode[255] = 0;
if (cfg::dat.filterFlags & CLVM_USELASTMSG) {
|