From 2a815f8820ca402626bd283dd5b75744ddeb9812 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 23 May 2015 18:55:59 +0000 Subject: mir_tstrncpy <> _tcsncpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13791 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/chat/options.cpp | 78 +++++++++++++++++------------------ plugins/TabSRMM/src/chat/services.cpp | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) (limited to 'plugins/TabSRMM/src/chat') diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index ee5cfaeb4f..5becbc5910 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -494,62 +494,62 @@ void RegisterFontServiceFonts() fid.cbSize = sizeof(FontIDT); cid.cbSize = sizeof(ColourIDT); - mir_strncpy(fid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup)); + strncpy(fid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup)); for (int i = 0; i < SIZEOF(IM_fontOptionsList); i++) { fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS; LoadMsgDlgFont(FONTSECTION_IM, i, &lf, &fontOptionsList[i].colour, FONTMODULE); mir_snprintf(szTemp, SIZEOF(szTemp), "Font%d", i); - mir_strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix)); + strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix)); fid.order = i; - mir_tstrncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name)); + _tcsncpy(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); - 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)); + _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)); switch (i) { case MSGFONTID_MYMSG: case 1: case MSGFONTID_MYNAME: case MSGFONTID_MYTIME: case 21: - mir_tstrncpy(fid.backgroundName, LPGENT("Outgoing background"), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundName, LPGENT("Outgoing background"), SIZEOF(fid.backgroundName)); break; case 8: case 9: case 12: case 13: - mir_tstrncpy(fid.backgroundName, LPGENT("Outgoing background(old)"), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundName, LPGENT("Outgoing background(old)"), SIZEOF(fid.backgroundName)); break; case 10: case 11: case 14: case 15: - mir_tstrncpy(fid.backgroundName, LPGENT("Incoming background(old)"), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundName, LPGENT("Incoming background(old)"), SIZEOF(fid.backgroundName)); break; case MSGFONTID_MESSAGEAREA: - 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)); + _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)); fid.flags |= FIDF_DISABLESTYLES; fid.flags &= ~FIDF_ALLOWEFFECTS; break; case 17: - mir_tstrncpy(fid.backgroundName, LPGENT("Status background"), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundName, LPGENT("Status background"), SIZEOF(fid.backgroundName)); break; case 18: - mir_tstrncpy(fid.backgroundGroup, LPGENT("Message Sessions"), SIZEOF(fid.backgroundGroup)); - mir_tstrncpy(fid.backgroundName, LPGENT("Log background"), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions"), SIZEOF(fid.backgroundGroup)); + _tcsncpy(fid.backgroundName, LPGENT("Log background"), SIZEOF(fid.backgroundName)); break; case 19: - mir_tstrncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName)); break; default: - mir_tstrncpy(fid.backgroundName, LPGENT("Incoming background"), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.backgroundName, LPGENT("Incoming background"), SIZEOF(fid.backgroundName)); break; } FontRegisterT(&fid); @@ -557,37 +557,37 @@ void RegisterFontServiceFonts() fontOptionsList = IP_fontOptionsList; fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS; - 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)); + _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)); 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)); + strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix)); fid.order = i + 100; - mir_tstrncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name)); + _tcsncpy(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; - mir_tstrncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE); + _tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE); if (i == IPFONTCOUNT - 1) { - 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)); + _tcsncpy(fid.backgroundGroup, _T(""), SIZEOF(fid.backgroundGroup)); + _tcsncpy(fid.backgroundName, _T(""), SIZEOF(fid.backgroundName)); + _tcsncpy(fid.group, LPGENT("Message Sessions"), SIZEOF(fid.group)); } FontRegisterT(&fid); } - mir_tstrncpy(cid.group, LPGENT("Message Sessions")_T("/")LPGENT("Group chats"), SIZEOF(cid.group)); - mir_strncpy(cid.dbSettingsGroup, CHAT_MODULE, SIZEOF(cid.dbSettingsGroup)); + _tcsncpy(cid.group, LPGENT("Message Sessions")_T("/")LPGENT("Group chats"), SIZEOF(cid.group)); + strncpy(cid.dbSettingsGroup, CHAT_MODULE, SIZEOF(cid.dbSettingsGroup)); for (int i = 0; i <= 7; i++) { mir_snprintf(szTemp, SIZEOF(szTemp), "NickColor%d", i); - mir_tstrncpy(cid.name, chatcolorsnames[i], SIZEOF(cid.name)); + _tcsncpy(cid.name, chatcolorsnames[i], SIZEOF(cid.name)); cid.order = i + 1; - mir_strncpy(cid.setting, szTemp, SIZEOF(cid.setting)); + strncpy(cid.setting, szTemp, SIZEOF(cid.setting)); switch (i) { case 5: cid.defcolour = GetSysColor(COLOR_HIGHLIGHT); @@ -613,14 +613,14 @@ void RegisterFontServiceFonts() ColourRegisterT(&cid); // static colors (info panel, tool bar background etc...) - mir_strncpy(fid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup)); - mir_strncpy(cid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup)); + strncpy(fid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup)); + strncpy(cid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup)); for (int i = 0; i < SIZEOF(_clrs); i++) { cid.order = _clrs[i].order; - 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)); + _tcsncpy(cid.group, _clrs[i].tszGroup, SIZEOF(fid.group)); + _tcsncpy(cid.name, _clrs[i].tszName, SIZEOF(cid.name)); + strncpy(cid.setting, _clrs[i].szSetting, SIZEOF(cid.setting)); if (_clrs[i].def & 0xff000000) cid.defcolour = GetSysColor(_clrs[i].def & 0x000000ff); else @@ -628,14 +628,14 @@ void RegisterFontServiceFonts() ColourRegisterT(&cid); } - mir_strncpy(cid.dbSettingsGroup, SRMSGMOD_T, SIZEOF(fid.dbSettingsGroup)); + strncpy(cid.dbSettingsGroup, SRMSGMOD_T, SIZEOF(fid.dbSettingsGroup)); // text and background colors for tabs for (int i = 0; i < SIZEOF(_tabclrs); i++) { cid.order = _tabclrs[i].order; - 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)); + _tcsncpy(cid.group, _tabclrs[i].tszGroup, SIZEOF(fid.group)); + _tcsncpy(cid.name, _tabclrs[i].tszName, SIZEOF(cid.name)); + strncpy(cid.setting, _tabclrs[i].szSetting, SIZEOF(cid.setting)); if (_tabclrs[i].def & 0xff000000) cid.defcolour = GetSysColor(_tabclrs[i].def & 0x000000ff); else diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index f996e50832..46c67ba0a1 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"))) - mir_tstrncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN); + _tcsncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN); szName[CONTAINER_NAMELEN] = 0; pContainer = FindContainerByName(szName); } -- cgit v1.2.3