diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
commit | 2a815f8820ca402626bd283dd5b75744ddeb9812 (patch) | |
tree | b230e7ac7d0330f5a1a0c8891d0a7dda9c5b47c6 /plugins/Clist_nicer | |
parent | 9a177a4e355c52775b580ad5687db2120f9282d5 (diff) |
mir_tstrncpy <> _tcsncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13791 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 34 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/extBackg.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/viewmodes.cpp | 10 |
4 files changed, 25 insertions, 25 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 7bc81f8864..1d610cd65d 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -265,7 +265,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) size_t iLen = mir_tstrlen(dbv.ptszVal);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
p->statusMsg = (TCHAR *)realloc(p->statusMsg, (iLen + 2) * sizeof(TCHAR));
- mir_tstrncpy(p->statusMsg, dbv.ptszVal, iLen + 1);
+ _tcsncpy(p->statusMsg, dbv.ptszVal, iLen + 1);
}
else {
int xStatus;
@@ -282,7 +282,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) if (!CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, hContact, (LPARAM)&cst)) {
TCHAR *szwXstatusName = TranslateTS(xStatusName);
p->statusMsg = (TCHAR *)realloc(p->statusMsg, (mir_tstrlen(szwXstatusName) + 2) * sizeof(TCHAR));
- mir_tstrncpy(p->statusMsg, szwXstatusName, mir_tstrlen(szwXstatusName) + 1);
+ _tcsncpy(p->statusMsg, szwXstatusName, mir_tstrlen(szwXstatusName) + 1);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
}
}
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 0b166c5937..c066d54371 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -2010,8 +2010,8 @@ static clistFontDescr[] = { void FS_RegisterFonts() { FontIDT fid = { sizeof(fid) }; - mir_tstrncpy(fid.group, LPGENT("Contact list"), SIZEOF(fid.group)); - mir_strncpy(fid.dbSettingsGroup, "CLC", 5); + _tcsncpy(fid.group, LPGENT("Contact list"), SIZEOF(fid.group)); + strncpy(fid.dbSettingsGroup, "CLC", 5); fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE; HDC hdc = GetDC(NULL); @@ -2028,11 +2028,11 @@ void FS_RegisterFonts() fid.flags &= ~FIDF_CLASSMASK; fid.flags |= clistFontDescr[i].iMask; - mir_tstrncpy(fid.name, clistFontDescr[i].tszName, SIZEOF(fid.name)); + _tcsncpy(fid.name, clistFontDescr[i].tszName, SIZEOF(fid.name)); char idstr[10]; mir_snprintf(idstr, SIZEOF(idstr), "Font%d", i); - mir_strncpy(fid.prefix, idstr, SIZEOF(fid.prefix)); + strncpy(fid.prefix, idstr, SIZEOF(fid.prefix)); fid.order = i; FontRegisterT(&fid); } @@ -2042,35 +2042,35 @@ void FS_RegisterFonts() ColourIDT colourid = {0}; colourid.cbSize = sizeof(colourid); colourid.order = 0; - mir_strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup)); + strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup)); - mir_strncpy(colourid.setting, "BkColour", sizeof(colourid.setting)); - mir_tstrncpy(colourid.name, LPGENT("Background"), SIZEOF(colourid.name)); - mir_tstrncpy(colourid.group, LPGENT("Contact list"), SIZEOF(colourid.group)); + 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); - mir_strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); - mir_tstrncpy(colourid.name, LPGENT("Selected text"), SIZEOF(colourid.name)); + 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); - mir_strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting)); - mir_tstrncpy(colourid.name, LPGENT("Hottrack text"), SIZEOF(colourid.name)); + 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); - mir_strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting)); - mir_tstrncpy(colourid.name, LPGENT("Quicksearch text"), SIZEOF(colourid.name)); + 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); - mir_strncpy(colourid.dbSettingsGroup, "CLUI", sizeof(colourid.dbSettingsGroup)); - mir_strncpy(colourid.setting, "clr_frameborder", sizeof(colourid.setting)); - mir_tstrncpy(colourid.name, LPGENT("Embedded frames border"), SIZEOF(colourid.name)); + strncpy(colourid.dbSettingsGroup, "CLUI", sizeof(colourid.dbSettingsGroup)); + 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); ColourRegisterT(&colourid); diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 2b82577b11..bf285973c1 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:
- mir_strncpy(tmpItem.szName, &itemname[1], sizeof(tmpItem.szName));
+ 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 5126d10f0c..d18dddb6d1 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);
- mir_strncpy(g_szModename, szBuf, sizeof(g_szModename));
+ 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) {
- mir_strncpy(cfg::dat.protoFilter, dbv.pszVal, sizeof(cfg::dat.protoFilter));
+ 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;
}
@@ -1060,7 +1060,7 @@ void ApplyViewMode(const char *name) mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_GF", 246, name);
if (!cfg::getTString(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (mir_tstrlen(dbv.ptszVal) >= 2) {
- mir_tstrncpy(cfg::dat.groupFilter, dbv.ptszVal, SIZEOF(cfg::dat.groupFilter));
+ _tcsncpy(cfg::dat.groupFilter, dbv.ptszVal, SIZEOF(cfg::dat.groupFilter));
cfg::dat.groupFilter[SIZEOF(cfg::dat.groupFilter) - 1] = 0;
cfg::dat.bFilterEffective |= CLVM_FILTER_GROUPS;
}
@@ -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));
- mir_strncpy(cfg::dat.old_viewmode, cfg::dat.current_viewmode, 256);
+ strncpy(cfg::dat.old_viewmode, cfg::dat.current_viewmode, 256);
cfg::dat.old_viewmode[255] = 0;
SetTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE, timerexpire * 1000, NULL);
}
- mir_strncpy(cfg::dat.current_viewmode, name, 256);
+ strncpy(cfg::dat.current_viewmode, name, 256);
cfg::dat.current_viewmode[255] = 0;
if (cfg::dat.filterFlags & CLVM_USELASTMSG) {
|