diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 18:08:26 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 18:08:26 +0000 |
commit | 9cadeadaff74b37df1c2896e653a80b3ce4c86f6 (patch) | |
tree | 399715b05def27cc4e13ced2cbefad3a17b77c4e /src | |
parent | 6fcfba2c46a456677b5825a899469ba4e8905448 (diff) |
replace _tcsncpy to mir_tstrncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13786 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdchat/src/main.cpp | 12 | ||||
-rw-r--r-- | src/core/stdclist/src/clcfonts.cpp | 14 | ||||
-rw-r--r-- | src/core/stdfile/src/fileexistsdlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/src/filerecvdlg.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 2 | ||||
-rw-r--r-- | src/core/stduihist/src/history.cpp | 4 | ||||
-rw-r--r-- | src/modules/netlib/netlibsecurity.cpp | 2 | ||||
-rw-r--r-- | src/modules/utils/path.cpp | 2 |
8 files changed, 21 insertions, 21 deletions
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 28390d4b66..62ad5f08a7 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -287,30 +287,30 @@ static void RegisterFonts() {
ColourIDT colourid = { sizeof(colourid) };
mir_strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
- _tcsncpy(colourid.group, LPGENT("Chat module"), SIZEOF(colourid.group));
+ mir_tstrncpy(colourid.group, LPGENT("Chat module"), SIZEOF(colourid.group));
mir_strncpy(colourid.setting, "ColorLogBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Group chat log background"), SIZEOF(colourid.name));
+ mir_tstrncpy(colourid.name, LPGENT("Group chat log background"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_WINDOW);
ColourRegisterT(&colourid);
mir_strncpy(colourid.setting, "ColorMessageBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Message background"), SIZEOF(colourid.name));
+ mir_tstrncpy(colourid.name, LPGENT("Message background"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_WINDOW);
ColourRegisterT(&colourid);
mir_strncpy(colourid.setting, "ColorNicklistBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Nick list background"), SIZEOF(colourid.name));
+ mir_tstrncpy(colourid.name, LPGENT("Nick list background"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_WINDOW);
ColourRegisterT(&colourid);
mir_strncpy(colourid.setting, "ColorNicklistLines", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Nick list lines"), SIZEOF(colourid.name));
+ mir_tstrncpy(colourid.name, LPGENT("Nick list lines"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_INACTIVEBORDER);
ColourRegisterT(&colourid);
mir_strncpy(colourid.setting, "ColorNicklistSelectedBG", SIZEOF(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Nick list background (selected)"), SIZEOF(colourid.name));
+ mir_tstrncpy(colourid.name, LPGENT("Nick list background (selected)"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
ColourRegisterT(&colourid);
}
diff --git a/src/core/stdclist/src/clcfonts.cpp b/src/core/stdclist/src/clcfonts.cpp index 07e823d998..35f1f78962 100644 --- a/src/core/stdclist/src/clcfonts.cpp +++ b/src/core/stdclist/src/clcfonts.cpp @@ -54,7 +54,7 @@ void RegisterCListFonts() FontIDT fontid = { sizeof(fontid) };
fontid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWREREGISTER | FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS;
mir_strncpy(fontid.dbSettingsGroup, "CLC", sizeof(fontid.dbSettingsGroup));
- _tcsncpy(fontid.group, LPGENT("Contact list"), SIZEOF(fontid.group));
+ mir_tstrncpy(fontid.group, LPGENT("Contact list"), SIZEOF(fontid.group));
HDC hdc = GetDC(NULL);
for (int i = 0; i < SIZEOF(clistFontDescr); i++) {
@@ -70,7 +70,7 @@ void RegisterCListFonts() fontid.flags &= ~FIDF_CLASSMASK;
fontid.flags |= clistFontDescr[i].iMask;
- _tcsncpy(fontid.name, clistFontDescr[i].tszName, SIZEOF(fontid.name));
+ mir_tstrncpy(fontid.name, clistFontDescr[i].tszName, SIZEOF(fontid.name));
char idstr[10];
mir_snprintf(idstr, SIZEOF(idstr), "Font%d", i);
@@ -87,25 +87,25 @@ void RegisterCListFonts() 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);
diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp index 81b1a220ba..124ca9e37d 100644 --- a/src/core/stdfile/src/fileexistsdlg.cpp +++ b/src/core/stdfile/src/fileexistsdlg.cpp @@ -287,7 +287,7 @@ INT_PTR CALLBACK DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
- _tcsncpy(filter, TranslateT("All files"),SIZEOF(filter)-1);
+ mir_tstrncpy(filter, TranslateT("All files"),SIZEOF(filter)-1);
mir_tstrcat(filter, _T(" (*)"));
pfilter = filter + mir_tstrlen(filter) + 1;
mir_tstrcpy(pfilter, _T("*"));
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index ccfaa427e2..5e50b02df8 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -117,7 +117,7 @@ static void patchDir(TCHAR *str, size_t strSize) TCHAR *result = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)str, (LPARAM)&dat);
if (result) {
- _tcsncpy(str, result, strSize);
+ mir_tstrncpy(str, result, strSize);
mir_free(result);
}
@@ -158,7 +158,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOO dat.hContact = hContact;
TCHAR *result = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)tszTemp, (LPARAM)&dat);
if (result) {
- _tcsncpy(tszTemp, result, SIZEOF(tszTemp));
+ mir_tstrncpy(tszTemp, result, SIZEOF(tszTemp));
mir_free(result);
for (int i = 0; i < (SIZEOF(rvaVarsToReplace) - 1); i++)
mir_free(rvaVarsToReplace[i].lptzValue);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index f7e1ddeb2a..fa203b42b5 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -82,7 +82,7 @@ bool LoadMsgDlgFont(int i, LOGFONT* lf, COLORREF * colour) DBVARIANT dbv;
if (db_get_ts(NULL, SRMMMOD, str, &dbv))
- _tcsncpy(lf->lfFaceName, fontOptionsList[i].szDefFace, SIZEOF(lf->lfFaceName)-1);
+ mir_tstrncpy(lf->lfFaceName, fontOptionsList[i].szDefFace, SIZEOF(lf->lfFaceName)-1);
else {
mir_tstrncpy(lf->lfFaceName, dbv.ptszVal, SIZEOF(lf->lfFaceName));
db_free(&dbv);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index 176a761ac4..fab500fa2d 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -40,7 +40,7 @@ static HGENMENU hContactMenu = 0; static void GetMessageDescription(DBEVENTINFO *dbei, TCHAR* buf, int cbBuf)
{
TCHAR *msg = DbGetEventTextT(dbei, CP_ACP);
- _tcsncpy(buf, msg ? msg : TranslateT("Invalid message"), cbBuf);
+ mir_tstrncpy(buf, msg ? msg : TranslateT("Invalid message"), cbBuf);
buf[ cbBuf-1 ] = 0;
mir_free(msg);
}
@@ -125,7 +125,7 @@ static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr) return;
}
- _tcsncpy(str, (const TCHAR*)pszSrc, cbStr);
+ mir_tstrncpy(str, (const TCHAR*)pszSrc, cbStr);
str[cbStr-1] = 0;
mir_free(pszTmp);
}
diff --git a/src/modules/netlib/netlibsecurity.cpp b/src/modules/netlib/netlibsecurity.cpp index 31873e94a7..a00f667076 100644 --- a/src/modules/netlib/netlibsecurity.cpp +++ b/src/modules/netlib/netlibsecurity.cpp @@ -292,7 +292,7 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge, size_t newLoginLen = mir_tstrlen(login) + domainLen + 1;
TCHAR *newLogin = (TCHAR*)alloca(newLoginLen * sizeof(TCHAR));
- _tcsncpy(newLogin, domainName, domainLen);
+ mir_tstrncpy(newLogin, domainName, domainLen);
newLogin[domainLen] = '\\';
mir_tstrcpy(newLogin + domainLen + 1, login);
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index 91b8dba050..b5dad26176 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -196,7 +196,7 @@ static __forceinline int _xcscmp(const TCHAR *s1, const TCHAR *s2) { return mir_ static __forceinline int _xcsncmp(const TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncmp(s1, s2, n); }
static __forceinline size_t _xcslen(const TCHAR *s1) { return mir_tstrlen(s1); }
static __forceinline TCHAR *_xcscpy(TCHAR *s1, const TCHAR *s2) { return mir_tstrcpy(s1, s2); }
-static __forceinline TCHAR *_xcsncpy(TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncpy(s1, s2, n); }
+static __forceinline TCHAR *_xcsncpy(TCHAR *s1, const TCHAR *s2, size_t n) { return mir_tstrncpy(s1, s2, n); }
static __forceinline TCHAR *_xstrselect(TCHAR *, char *s1, TCHAR *s2) { return s2; }
static __forceinline TCHAR *_itox(TCHAR *, int a) { return _itot(a, (TCHAR *)mir_alloc(sizeof(TCHAR)*20), 10); }
static __forceinline TCHAR *mir_a2x(TCHAR *, char *s) { return mir_a2t(s); }
|