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 /plugins/TabSRMM/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 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 58 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/selectcontainer.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 4 |
11 files changed, 45 insertions, 45 deletions
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 38df7808a1..ee5cfaeb4f 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -502,54 +502,54 @@ void RegisterFontServiceFonts() mir_snprintf(szTemp, SIZEOF(szTemp), "Font%d", i);
mir_strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix));
fid.order = i;
- _tcsncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name));
fid.deffontsettings.colour = fontOptionsList[i].colour;
fid.deffontsettings.size = (char)lf.lfHeight;
fid.deffontsettings.style = (lf.lfWeight >= FW_BOLD ? FONTF_BOLD : 0) | (lf.lfItalic ? FONTF_ITALIC : 0);
fid.deffontsettings.charset = lf.lfCharSet;
fid.flags = fid.flags & ~FIDF_CLASSMASK | (fid.deffontsettings.style&FONTF_BOLD ? FIDF_CLASSHEADER : FIDF_CLASSGENERAL);
- _tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions")_T("/")LPGENT("Single Messaging"), SIZEOF(fid.backgroundGroup));
- _tcsncpy(fid.group, LPGENT("Message Sessions")_T("/")LPGENT("Single Messaging"), SIZEOF(fid.group));
+ mir_tstrncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
+ mir_tstrncpy(fid.backgroundGroup, LPGENT("Message Sessions")_T("/")LPGENT("Single Messaging"), SIZEOF(fid.backgroundGroup));
+ mir_tstrncpy(fid.group, LPGENT("Message Sessions")_T("/")LPGENT("Single Messaging"), SIZEOF(fid.group));
switch (i) {
case MSGFONTID_MYMSG:
case 1:
case MSGFONTID_MYNAME:
case MSGFONTID_MYTIME:
case 21:
- _tcsncpy(fid.backgroundName, LPGENT("Outgoing background"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Outgoing background"), SIZEOF(fid.backgroundName));
break;
case 8:
case 9:
case 12:
case 13:
- _tcsncpy(fid.backgroundName, LPGENT("Outgoing background(old)"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Outgoing background(old)"), SIZEOF(fid.backgroundName));
break;
case 10:
case 11:
case 14:
case 15:
- _tcsncpy(fid.backgroundName, LPGENT("Incoming background(old)"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Incoming background(old)"), SIZEOF(fid.backgroundName));
break;
case MSGFONTID_MESSAGEAREA:
- _tcsncpy(fid.group, LPGENT("Message Sessions"), SIZEOF(fid.group));
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions"), SIZEOF(fid.backgroundGroup));
- _tcsncpy(fid.backgroundName, LPGENT("Input area background"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.group, LPGENT("Message Sessions"), SIZEOF(fid.group));
+ mir_tstrncpy(fid.backgroundGroup, LPGENT("Message Sessions"), SIZEOF(fid.backgroundGroup));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Input area background"), SIZEOF(fid.backgroundName));
fid.flags |= FIDF_DISABLESTYLES;
fid.flags &= ~FIDF_ALLOWEFFECTS;
break;
case 17:
- _tcsncpy(fid.backgroundName, LPGENT("Status background"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Status background"), SIZEOF(fid.backgroundName));
break;
case 18:
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions"), SIZEOF(fid.backgroundGroup));
- _tcsncpy(fid.backgroundName, LPGENT("Log background"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundGroup, LPGENT("Message Sessions"), SIZEOF(fid.backgroundGroup));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Log background"), SIZEOF(fid.backgroundName));
break;
case 19:
- _tcsncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName));
break;
default:
- _tcsncpy(fid.backgroundName, LPGENT("Incoming background"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Incoming background"), SIZEOF(fid.backgroundName));
break;
}
FontRegisterT(&fid);
@@ -557,35 +557,35 @@ void RegisterFontServiceFonts() fontOptionsList = IP_fontOptionsList;
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
- _tcsncpy(fid.group, LPGENT("Message Sessions")_T("/")LPGENT("Info Panel"), SIZEOF(fid.group));
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions")_T("/")LPGENT("Info Panel"), SIZEOF(fid.backgroundGroup));
- _tcsncpy(fid.backgroundName, LPGENT("Fields background"), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.group, LPGENT("Message Sessions")_T("/")LPGENT("Info Panel"), SIZEOF(fid.group));
+ mir_tstrncpy(fid.backgroundGroup, LPGENT("Message Sessions")_T("/")LPGENT("Info Panel"), SIZEOF(fid.backgroundGroup));
+ mir_tstrncpy(fid.backgroundName, LPGENT("Fields background"), SIZEOF(fid.backgroundName));
for (int i = 0; i < IPFONTCOUNT; i++) {
LoadMsgDlgFont(FONTSECTION_IP, i + 100, &lf, &fontOptionsList[i].colour, FONTMODULE);
mir_snprintf(szTemp, SIZEOF(szTemp), "Font%d", i + 100);
mir_strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix));
fid.order = i + 100;
- _tcsncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name));
fid.deffontsettings.colour = fontOptionsList[i].colour;
fid.deffontsettings.size = (char)lf.lfHeight;
fid.deffontsettings.style = (lf.lfWeight >= FW_BOLD ? FONTF_BOLD : 0) | (lf.lfItalic ? FONTF_ITALIC : 0);
fid.deffontsettings.charset = lf.lfCharSet;
fid.flags = fid.flags & ~FIDF_CLASSMASK | (fid.deffontsettings.style&FONTF_BOLD ? FIDF_CLASSHEADER : FIDF_CLASSGENERAL);
fid.deffontsettings.charset = lf.lfCharSet;
- _tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
+ mir_tstrncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
if (i == IPFONTCOUNT - 1) {
- _tcsncpy(fid.backgroundGroup, _T(""), SIZEOF(fid.backgroundGroup));
- _tcsncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName));
- _tcsncpy(fid.group, LPGENT("Message Sessions"), SIZEOF(fid.group));
+ mir_tstrncpy(fid.backgroundGroup, _T(""), SIZEOF(fid.backgroundGroup));
+ mir_tstrncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.group, LPGENT("Message Sessions"), SIZEOF(fid.group));
}
FontRegisterT(&fid);
}
- _tcsncpy(cid.group, LPGENT("Message Sessions")_T("/")LPGENT("Group chats"), SIZEOF(cid.group));
+ mir_tstrncpy(cid.group, LPGENT("Message Sessions")_T("/")LPGENT("Group chats"), SIZEOF(cid.group));
mir_strncpy(cid.dbSettingsGroup, CHAT_MODULE, SIZEOF(cid.dbSettingsGroup));
for (int i = 0; i <= 7; i++) {
mir_snprintf(szTemp, SIZEOF(szTemp), "NickColor%d", i);
- _tcsncpy(cid.name, chatcolorsnames[i], SIZEOF(cid.name));
+ mir_tstrncpy(cid.name, chatcolorsnames[i], SIZEOF(cid.name));
cid.order = i + 1;
mir_strncpy(cid.setting, szTemp, SIZEOF(cid.setting));
switch (i) {
@@ -618,8 +618,8 @@ void RegisterFontServiceFonts() for (int i = 0; i < SIZEOF(_clrs); i++) {
cid.order = _clrs[i].order;
- _tcsncpy(cid.group, _clrs[i].tszGroup, SIZEOF(fid.group));
- _tcsncpy(cid.name, _clrs[i].tszName, SIZEOF(cid.name));
+ mir_tstrncpy(cid.group, _clrs[i].tszGroup, SIZEOF(fid.group));
+ mir_tstrncpy(cid.name, _clrs[i].tszName, SIZEOF(cid.name));
mir_strncpy(cid.setting, _clrs[i].szSetting, SIZEOF(cid.setting));
if (_clrs[i].def & 0xff000000)
cid.defcolour = GetSysColor(_clrs[i].def & 0x000000ff);
@@ -633,8 +633,8 @@ void RegisterFontServiceFonts() // text and background colors for tabs
for (int i = 0; i < SIZEOF(_tabclrs); i++) {
cid.order = _tabclrs[i].order;
- _tcsncpy(cid.group, _tabclrs[i].tszGroup, SIZEOF(fid.group));
- _tcsncpy(cid.name, _tabclrs[i].tszName, SIZEOF(cid.name));
+ mir_tstrncpy(cid.group, _tabclrs[i].tszGroup, SIZEOF(fid.group));
+ mir_tstrncpy(cid.name, _tabclrs[i].tszName, SIZEOF(cid.name));
mir_strncpy(cid.setting, _tabclrs[i].szSetting, SIZEOF(cid.setting));
if (_tabclrs[i].def & 0xff000000)
cid.defcolour = GetSysColor(_tabclrs[i].def & 0x000000ff);
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 46c67ba0a1..f996e50832 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -168,7 +168,7 @@ void ShowRoom(SESSION_INFO *si, WPARAM, BOOL) if (pContainer == NULL) {
GetContainerNameForContact(si->hContact, szName, CONTAINER_NAMELEN);
if (!g_Settings.bOpenInDefault && !mir_tstrcmp(szName, _T("default")))
- _tcsncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN);
+ mir_tstrncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN);
szName[CONTAINER_NAMELEN] = 0;
pContainer = FindContainerByName(szName);
}
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 61e9997c1c..1e3632a40d 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1788,7 +1788,7 @@ TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hCo TContainerData *pContainer = (TContainerData*)mir_calloc(sizeof(TContainerData));
if (pContainer == NULL)
return NULL;
- _tcsncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
+ mir_tstrncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
AppendToContainerList(pContainer);
if (M.GetByte("limittabs", 0) && !mir_tstrcmp(name, _T("default")))
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 94fe049ccc..3282ca59e3 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -979,7 +979,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR _tcsncpy_s(wBuf, TranslateT("Session list.\nClick left for a list of open sessions.\nClick right to access favorites and quickly configure message window behavior"), _TRUNCATE);
}
else if (sid->tszTooltip)
- _tcsncpy(wBuf, sid->tszTooltip, SIZEOF(wBuf));
+ mir_tstrncpy(wBuf, sid->tszTooltip, SIZEOF(wBuf));
if (wBuf[0]) {
CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index f7d9d81686..40bbe9448c 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -532,7 +532,7 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) TCHAR lpzText[MAX_SECONDLINE];
int i, available = MAX_SECONDLINE - 1;
if (pdata->pluginOptions->bShowHeaders) {
- _tcsncpy(lpzText, szHeader, MAX_SECONDLINE);
+ mir_tstrncpy(lpzText, szHeader, MAX_SECONDLINE);
available -= (int)mir_tstrlen(szHeader);
}
else lpzText[0] = 0;
@@ -622,12 +622,12 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve _tcsncpy_s(pud.lptzText, szPreview, _TRUNCATE);
mir_free(szPreview);
}
- else _tcsncpy(pud.lptzText, _T(" "), MAX_SECONDLINE);
+ else mir_tstrncpy(pud.lptzText, _T(" "), MAX_SECONDLINE);
pdata->eventData = (EVENT_DATAT *)mir_alloc(NR_MERGED * sizeof(EVENT_DATAT));
pdata->eventData[0].hEvent = hEvent;
pdata->eventData[0].timestamp = dbe.timestamp;
- _tcsncpy(pdata->eventData[0].tszText, pud.lptzText, MAX_SECONDLINE);
+ mir_tstrncpy(pdata->eventData[0].tszText, pud.lptzText, MAX_SECONDLINE);
pdata->eventData[0].tszText[MAX_SECONDLINE - 1] = 0;
pdata->nrEventsAlloced = NR_MERGED;
pdata->nrMerged = 1;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index be469c5842..68640fb48c 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1780,7 +1780,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam) if (dat->idle != dwOldIdle || lParam != 0) { if (item.mask & TCIF_TEXT) { item.pszText = newtitle; - _tcsncpy(dat->newtitle, newtitle, SIZEOF(dat->newtitle)); + mir_tstrncpy(dat->newtitle, newtitle, SIZEOF(dat->newtitle)); dat->newtitle[127] = 0; if (dat->pWnd) dat->pWnd->updateTitle(dat->cache->getNick()); diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 9c642a0db2..e3363eb1ae 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -989,11 +989,11 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors TCHAR tmp[10];
if (p[3] != ' ' && p[3] != '\\') {
- _tcsncpy(tmp, p + 2, 3);
+ mir_tstrncpy(tmp, p + 2, 3);
tmp[3] = 0;
}
else {
- _tcsncpy(tmp, p + 2, 2);
+ mir_tstrncpy(tmp, p + 2, 2);
tmp[2] = 0;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 67f7fb0733..d32949d03f 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -133,8 +133,8 @@ void TSAPI CacheLogFonts() }
mir_snprintf(rtfFontsGlobal[MSGDLGFONTCOUNT], SIZEOF(rtfFontsGlobal[MSGDLGFONTCOUNT]), "\\f%u\\cf%u\\b%d\\i%d\\fs%u", MSGDLGFONTCOUNT, MSGDLGFONTCOUNT, 0, 0, 0);
- _tcsncpy(szToday, TranslateT("Today"), 20);
- _tcsncpy(szYesterday, TranslateT("Yesterday"), 20);
+ mir_tstrncpy(szToday, TranslateT("Today"), 20);
+ mir_tstrncpy(szYesterday, TranslateT("Yesterday"), 20);
szToday[19] = szYesterday[19] = 0;
// cache/create the info panel fonts
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 5e83a533bc..070771b799 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -787,7 +787,7 @@ static int TSAPI SetupIconLibConfig() int j = 2, version = 0;
TCHAR szFilename[MAX_PATH];
- _tcsncpy(szFilename, _T("icons\\tabsrmm_icons.dll"), MAX_PATH);
+ mir_tstrncpy(szFilename, _T("icons\\tabsrmm_icons.dll"), MAX_PATH);
g_hIconDLL = LoadLibrary(szFilename);
if (g_hIconDLL == 0) {
CWarning::show(CWarning::WARN_ICONPACKMISSING, CWarning::CWF_NOALLOWHIDE | MB_ICONERROR | MB_OK);
@@ -824,7 +824,7 @@ static int TSAPI SetupIconLibConfig() sid.iDefaultIndex = -IDI_CLOCK;
Skin_AddIcon(&sid);
- _tcsncpy(szFilename, _T("plugins\\tabsrmm.dll"), MAX_PATH);
+ mir_tstrncpy(szFilename, _T("plugins\\tabsrmm.dll"), MAX_PATH);
sid.pszName = "tabSRMM_overlay_disabled";
sid.pszDescription = LPGEN("Feature disabled (used as overlay)");
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp index 41b7951151..6b34af57fe 100644 --- a/plugins/TabSRMM/src/selectcontainer.cpp +++ b/plugins/TabSRMM/src/selectcontainer.cpp @@ -128,7 +128,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_RESETCONTENT, 0, 0);
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
if (!_tcsncmp(p->szName, szName, CONTAINER_NAMELEN) && mir_tstrlen(p->szName) == mir_tstrlen(szName)) {
- _tcsncpy(p->szName, szNewName, CONTAINER_NAMELEN);
+ mir_tstrncpy(p->szName, szNewName, CONTAINER_NAMELEN);
SendMessage(p->hwnd, DM_CONFIGURECONTAINER, 0, 0);
}
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index f8762db894..a4bb0e2243 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -342,7 +342,7 @@ TCHAR* Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat) DBVARIANT dbv = { 0 };
if (!db_get_ts(dat->hContact, (char *)dat->szProto, "XStatusName", &dbv)) {
- _tcsncpy(szTemp, dbv.ptszVal, 500);
+ mir_tstrncpy(szTemp, dbv.ptszVal, 500);
szTemp[500] = 0;
db_free(&dbv);
title.insert(tempmark + 2, szTemp);
@@ -363,7 +363,7 @@ TCHAR* Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat) DBVARIANT dbv = { 0 };
if (!db_get_ts(dat->hContact, (char *)dat->szProto, "XStatusName", &dbv)) {
- _tcsncpy(szTemp, dbv.ptszVal, 500);
+ mir_tstrncpy(szTemp, dbv.ptszVal, 500);
szTemp[500] = 0;
db_free(&dbv);
title.insert(tempmark + 2, szTemp);
|