diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /plugins/AutoShutdown/src | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r-- | plugins/AutoShutdown/src/frame.cpp | 2 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/shutdownsvc.cpp | 2 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/utils.cpp | 34 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/watcher.cpp | 2 |
4 files changed, 20 insertions, 20 deletions
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index e406e4a494..b77aba262b 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -455,7 +455,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA if (hdc != NULL) {
if (dat->hFont != NULL)
hFontPrev = (HFONT)SelectObject(hdc,dat->hFont);
- if (GetTextExtentPoint32(hdc,szOutput,lstrlen(szOutput),&size))
+ if (GetTextExtentPoint32(hdc,szOutput,mir_tstrlen(szOutput),&size))
if (size.cx>=(rc.right-rc.left))
dat->flags&=FWPDF_TIMEISCLIPPED;
if (dat->hFont != NULL)
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 1ede40e86d..7f1ab8b818 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -483,7 +483,7 @@ INT_PTR ServiceGetTypeDescription(WPARAM wParam,LPARAM lParam) static char szConvBuf[128];
char *buf=u2a(pszDesc);
if (buf==NULL) return 0;
- lstrcpynA(szConvBuf,buf,sizeof(szConvBuf));
+ mir_strncpy(szConvBuf,buf,sizeof(szConvBuf));
mir_free(buf);
return (INT_PTR)szConvBuf;
}
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;i<SIZEOF(szChars);++i) {
/* trim end */
- psz=&pszStr[lstrlen(pszStr)-1];
+ psz=&pszStr[mir_tstrlen(pszStr)-1];
while(pszStr[0] && *psz==szChars[i]) {
*psz=0;
psz=CharPrev(pszStr,psz);
}
/* trim beginning */
for(psz=pszStr;(*psz && *psz==szChars[i]);psz=CharNext(psz));
- MoveMemory(pszStr,psz,(lstrlen(psz)+1)*sizeof(TCHAR));
+ MoveMemory(pszStr,psz,(mir_tstrlen(psz)+1)*sizeof(TCHAR));
}
}
@@ -209,12 +209,12 @@ int FontService_RegisterFont(const char *pszDbModule,const char *pszDbName,const FontIDT fid;
ZeroMemory(&fid,sizeof(fid));
fid.cbSize=sizeof(fid);
- lstrcpynA(fid.dbSettingsGroup,pszDbModule,sizeof(fid.dbSettingsGroup)); /* buffer safe */
- lstrcpynA(fid.prefix,pszDbName,sizeof(fid.prefix)); /* buffer safe */
- lstrcpyn(fid.group,pszSection,SIZEOF(fid.group)); /* buffer safe */
- lstrcpyn(fid.name,pszDescription,SIZEOF(fid.name)); /* buffer safe */
- lstrcpyn(fid.backgroundGroup,pszBackgroundGroup,SIZEOF(fid.backgroundGroup)); /* buffer safe */
- lstrcpyn(fid.backgroundName,pszBackgroundName,SIZEOF(fid.backgroundName)); /* buffer safe */
+ mir_strncpy(fid.dbSettingsGroup,pszDbModule,sizeof(fid.dbSettingsGroup)); /* buffer safe */
+ mir_strncpy(fid.prefix,pszDbName,sizeof(fid.prefix)); /* buffer safe */
+ mir_tstrncpy(fid.group,pszSection,SIZEOF(fid.group)); /* buffer safe */
+ mir_tstrncpy(fid.name,pszDescription,SIZEOF(fid.name)); /* buffer safe */
+ mir_tstrncpy(fid.backgroundGroup,pszBackgroundGroup,SIZEOF(fid.backgroundGroup)); /* buffer safe */
+ mir_tstrncpy(fid.backgroundName,pszBackgroundName,SIZEOF(fid.backgroundName)); /* buffer safe */
fid.flags=FIDF_ALLOWREREGISTER;
if (bAllowEffects) fid.flags|=FIDF_ALLOWEFFECTS;
fid.order=position;
@@ -227,7 +227,7 @@ int FontService_RegisterFont(const char *pszDbModule,const char *pszDbName,const if (plfDefault->lfUnderline) 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;
}
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 61686744f4..e95b97f145 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -66,7 +66,7 @@ static void __inline ShutdownAndStopWatcher(void) static TCHAR* GetMessageText(BYTE **ppBlob,DWORD *pcbBlob)
{
(*ppBlob)[*pcbBlob]=0;
- DWORD cb = lstrlenA((char*)*ppBlob);
+ DWORD cb = mir_strlen((char*)*ppBlob);
/* use Unicode data if present */
if (*pcbBlob>(cb+3)) {
(*ppBlob)[*pcbBlob-1]=0;
|