From 9cadeadaff74b37df1c2896e653a80b3ce4c86f6 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 May 2015 18:08:26 +0000 Subject: replace _tcsncpy to mir_tstrncpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13786 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/clcitems.cpp | 4 ++-- plugins/Clist_nicer/src/clui.cpp | 16 ++++++++-------- plugins/Clist_nicer/src/viewmodes.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/Clist_nicer/src') diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 1d610cd65d..7bc81f8864 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)); - _tcsncpy(p->statusMsg, dbv.ptszVal, iLen + 1); + mir_tstrncpy(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)); - _tcsncpy(p->statusMsg, szwXstatusName, mir_tstrlen(szwXstatusName) + 1); + mir_tstrncpy(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 add59df1ed..0b166c5937 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -2010,7 +2010,7 @@ static clistFontDescr[] = { void FS_RegisterFonts() { FontIDT fid = { sizeof(fid) }; - _tcsncpy(fid.group, LPGENT("Contact list"), SIZEOF(fid.group)); + mir_tstrncpy(fid.group, LPGENT("Contact list"), SIZEOF(fid.group)); mir_strncpy(fid.dbSettingsGroup, "CLC", 5); fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE; @@ -2028,7 +2028,7 @@ void FS_RegisterFonts() fid.flags &= ~FIDF_CLASSMASK; fid.flags |= clistFontDescr[i].iMask; - _tcsncpy(fid.name, clistFontDescr[i].tszName, SIZEOF(fid.name)); + mir_tstrncpy(fid.name, clistFontDescr[i].tszName, SIZEOF(fid.name)); char idstr[10]; mir_snprintf(idstr, SIZEOF(idstr), "Font%d", i); @@ -2045,32 +2045,32 @@ void FS_RegisterFonts() mir_strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup)); 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)); + mir_tstrncpy(colourid.name, LPGENT("Background"), SIZEOF(colourid.name)); + mir_tstrncpy(colourid.group, LPGENT("Contact list"), SIZEOF(colourid.group)); colourid.defcolour = CLCDEFAULT_BKCOLOUR; ColourRegisterT(&colourid); mir_strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); - _tcsncpy(colourid.name, LPGENT("Selected text"), SIZEOF(colourid.name)); + mir_tstrncpy(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)); - _tcsncpy(colourid.name, LPGENT("Hottrack text"), SIZEOF(colourid.name)); + mir_tstrncpy(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)); - _tcsncpy(colourid.name, LPGENT("Quicksearch text"), SIZEOF(colourid.name)); + mir_tstrncpy(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)); - _tcsncpy(colourid.name, LPGENT("Embedded frames border"), SIZEOF(colourid.name)); + mir_tstrncpy(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/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index c168e671fe..5126d10f0c 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -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) { - _tcsncpy(cfg::dat.groupFilter, dbv.ptszVal, SIZEOF(cfg::dat.groupFilter)); + mir_tstrncpy(cfg::dat.groupFilter, dbv.ptszVal, SIZEOF(cfg::dat.groupFilter)); cfg::dat.groupFilter[SIZEOF(cfg::dat.groupFilter) - 1] = 0; cfg::dat.bFilterEffective |= CLVM_FILTER_GROUPS; } -- cgit v1.2.3