From 688f55ba998c19304a29727c910504903f4cc49a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 18:51:36 +0000 Subject: lstr* replacements git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AutoShutdown/src/utils.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'plugins/AutoShutdown/src/utils.cpp') diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index 75c65dc345..5c537fa06c 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -51,14 +51,14 @@ void TrimString(TCHAR *pszStr) TCHAR *psz,szChars[]=_T(" \r\n\t"); for(i=0;ilfUnderline) fid.deffontsettings.style|=DBFONTF_UNDERLINE; if (plfDefault->lfStrikeOut) fid.deffontsettings.style|=DBFONTF_STRIKEOUT; fid.deffontsettings.charset=plfDefault->lfCharSet; - lstrcpyn(fid.deffontsettings.szFace,plfDefault->lfFaceName,SIZEOF(fid.deffontsettings.szFace)); /* buffer safe */ + mir_tstrncpy(fid.deffontsettings.szFace,plfDefault->lfFaceName,SIZEOF(fid.deffontsettings.szFace)); /* buffer safe */ } FontRegisterT(&fid); return 0; @@ -237,8 +237,8 @@ int FontService_GetFont(const TCHAR *pszSection,const TCHAR *pszDescription,COLO { FontIDT fid; fid.cbSize=sizeof(fid); - lstrcpyn(fid.group,pszSection,SIZEOF(fid.group)); /* buffer sfae */ - lstrcpyn(fid.name,pszDescription,SIZEOF(fid.name)); /* buffer safe */ + mir_tstrncpy(fid.group,pszSection,SIZEOF(fid.group)); /* buffer sfae */ + mir_tstrncpy(fid.name,pszDescription,SIZEOF(fid.name)); /* buffer safe */ *pclr=(COLORREF)CallService(MS_FONT_GETT,(WPARAM)&fid,(LPARAM)plf); /* uses fallback font on error */ return (int)*pclr==-1; } @@ -249,10 +249,10 @@ int FontService_RegisterColor(const char *pszDbModule,const char *pszDbName,cons ZeroMemory(&cid,sizeof(cid)); cid.cbSize=sizeof(cid); cid.defcolour=clrDefault; - lstrcpynA(cid.dbSettingsGroup,pszDbModule,sizeof(cid.dbSettingsGroup)); /* buffer safe */ - lstrcpynA(cid.setting,pszDbName,sizeof(cid.setting)); /* buffer safe */ - lstrcpyn(cid.group,pszSection,SIZEOF(cid.group)); /* buffer safe */ - lstrcpyn(cid.name,pszDescription,SIZEOF(cid.name)); /* buffer safe */ + mir_strncpy(cid.dbSettingsGroup,pszDbModule,sizeof(cid.dbSettingsGroup)); /* buffer safe */ + mir_strncpy(cid.setting,pszDbName,sizeof(cid.setting)); /* buffer safe */ + mir_tstrncpy(cid.group,pszSection,SIZEOF(cid.group)); /* buffer safe */ + mir_tstrncpy(cid.name,pszDescription,SIZEOF(cid.name)); /* buffer safe */ ColourRegisterT(&cid); return 0; } @@ -262,8 +262,8 @@ int FontService_GetColor(const TCHAR *pszSection,const TCHAR *pszDescription,COL ColourIDT cid; ZeroMemory(&cid,sizeof(cid)); cid.cbSize=sizeof(cid); - lstrcpyn(cid.group,pszSection,sizeof(cid.group)); /* buffer safe */ - lstrcpyn(cid.name,pszDescription,sizeof(cid.name)); /* buffer safe */ + mir_tstrncpy(cid.group,pszSection,sizeof(cid.group)); /* buffer safe */ + mir_tstrncpy(cid.name,pszDescription,sizeof(cid.name)); /* buffer safe */ *pclr=(COLORREF)CallService(MS_COLOUR_GETT,(WPARAM)&cid,0); return (int)*pclr==-1; } -- cgit v1.2.3