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 /src/core | |
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 'src/core')
-rw-r--r-- | src/core/miranda.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/main.cpp | 24 | ||||
-rw-r--r-- | src/core/stdclist/src/clcfonts.cpp | 28 | ||||
-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 |
7 files changed, 33 insertions, 33 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp index 510b6b2abf..b5b65f8d40 100644 --- a/src/core/miranda.cpp +++ b/src/core/miranda.cpp @@ -363,7 +363,7 @@ static INT_PTR GetMirandaVersionText(WPARAM wParam, LPARAM lParam) UINT blockSize;
VerQueryValue(pVerInfo, _T("\\StringFileInfo\\000004b0\\ProductVersion"), (LPVOID*)&productVersion, &blockSize);
- mir_strncpy((char*)lParam, _T2A(productVersion), wParam);
+ strncpy((char*)lParam, _T2A(productVersion), wParam);
#if defined(_WIN64)
strcat_s((char*)lParam, wParam, " x64");
#endif
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 62ad5f08a7..48b31036a2 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -286,31 +286,31 @@ static void OnLoadSettings() static void RegisterFonts()
{
ColourIDT colourid = { sizeof(colourid) };
- mir_strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
- mir_tstrncpy(colourid.group, LPGENT("Chat module"), SIZEOF(colourid.group));
+ strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
+ _tcsncpy(colourid.group, LPGENT("Chat module"), SIZEOF(colourid.group));
- mir_strncpy(colourid.setting, "ColorLogBG", SIZEOF(colourid.setting));
- mir_tstrncpy(colourid.name, LPGENT("Group chat log background"), SIZEOF(colourid.name));
+ strncpy(colourid.setting, "ColorLogBG", SIZEOF(colourid.setting));
+ _tcsncpy(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));
- mir_tstrncpy(colourid.name, LPGENT("Message background"), SIZEOF(colourid.name));
+ strncpy(colourid.setting, "ColorMessageBG", SIZEOF(colourid.setting));
+ _tcsncpy(colourid.name, LPGENT("Message background"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_WINDOW);
ColourRegisterT(&colourid);
- mir_strncpy(colourid.setting, "ColorNicklistBG", SIZEOF(colourid.setting));
- mir_tstrncpy(colourid.name, LPGENT("Nick list background"), SIZEOF(colourid.name));
+ strncpy(colourid.setting, "ColorNicklistBG", SIZEOF(colourid.setting));
+ _tcsncpy(colourid.name, LPGENT("Nick list background"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_WINDOW);
ColourRegisterT(&colourid);
- mir_strncpy(colourid.setting, "ColorNicklistLines", SIZEOF(colourid.setting));
- mir_tstrncpy(colourid.name, LPGENT("Nick list lines"), SIZEOF(colourid.name));
+ strncpy(colourid.setting, "ColorNicklistLines", SIZEOF(colourid.setting));
+ _tcsncpy(colourid.name, LPGENT("Nick list lines"), SIZEOF(colourid.name));
colourid.defcolour = GetSysColor(COLOR_INACTIVEBORDER);
ColourRegisterT(&colourid);
- mir_strncpy(colourid.setting, "ColorNicklistSelectedBG", SIZEOF(colourid.setting));
- mir_tstrncpy(colourid.name, LPGENT("Nick list background (selected)"), SIZEOF(colourid.name));
+ strncpy(colourid.setting, "ColorNicklistSelectedBG", SIZEOF(colourid.setting));
+ _tcsncpy(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 35f1f78962..02ae7b298e 100644 --- a/src/core/stdclist/src/clcfonts.cpp +++ b/src/core/stdclist/src/clcfonts.cpp @@ -53,8 +53,8 @@ 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));
- mir_tstrncpy(fontid.group, LPGENT("Contact list"), SIZEOF(fontid.group));
+ strncpy(fontid.dbSettingsGroup, "CLC", sizeof(fontid.dbSettingsGroup));
+ _tcsncpy(fontid.group, LPGENT("Contact list"), SIZEOF(fontid.group));
HDC hdc = GetDC(NULL);
for (int i = 0; i < SIZEOF(clistFontDescr); i++) {
@@ -70,11 +70,11 @@ void RegisterCListFonts() fontid.flags &= ~FIDF_CLASSMASK;
fontid.flags |= clistFontDescr[i].iMask;
- mir_tstrncpy(fontid.name, clistFontDescr[i].tszName, SIZEOF(fontid.name));
+ _tcsncpy(fontid.name, clistFontDescr[i].tszName, SIZEOF(fontid.name));
char idstr[10];
mir_snprintf(idstr, SIZEOF(idstr), "Font%d", i);
- mir_strncpy(fontid.prefix, idstr, SIZEOF(fontid.prefix));
+ strncpy(fontid.prefix, idstr, SIZEOF(fontid.prefix));
fontid.order = i;
FontRegisterT(&fontid);
}
@@ -84,28 +84,28 @@ void RegisterCListFonts() ColourIDT colourid = { 0 };
colourid.cbSize = sizeof(ColourIDT);
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);
diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp index 124ca9e37d..81b1a220ba 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;
- mir_tstrncpy(filter, TranslateT("All files"),SIZEOF(filter)-1);
+ _tcsncpy(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 5e50b02df8..ccfaa427e2 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) {
- mir_tstrncpy(str, result, strSize);
+ _tcsncpy(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) {
- mir_tstrncpy(tszTemp, result, SIZEOF(tszTemp));
+ _tcsncpy(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 fa203b42b5..f7e1ddeb2a 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))
- mir_tstrncpy(lf->lfFaceName, fontOptionsList[i].szDefFace, SIZEOF(lf->lfFaceName)-1);
+ _tcsncpy(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 fab500fa2d..176a761ac4 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);
- mir_tstrncpy(buf, msg ? msg : TranslateT("Invalid message"), cbBuf);
+ _tcsncpy(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;
}
- mir_tstrncpy(str, (const TCHAR*)pszSrc, cbStr);
+ _tcsncpy(str, (const TCHAR*)pszSrc, cbStr);
str[cbStr-1] = 0;
mir_free(pszTmp);
}
|