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 /src/modules/utils | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/utils')
-rw-r--r-- | src/modules/utils/bmpfilter.cpp | 98 | ||||
-rw-r--r-- | src/modules/utils/hyperlink.cpp | 2 | ||||
-rw-r--r-- | src/modules/utils/openurl.cpp | 2 |
3 files changed, 51 insertions, 51 deletions
diff --git a/src/modules/utils/bmpfilter.cpp b/src/modules/utils/bmpfilter.cpp index 1c9f86a48d..47ef5b7178 100644 --- a/src/modules/utils/bmpfilter.cpp +++ b/src/modules/utils/bmpfilter.cpp @@ -41,7 +41,7 @@ static INT_PTR sttBitmapLoader(const TCHAR* ptszFileName) if (!PathToAbsoluteT(ptszFileName, szFilename))
mir_sntprintf(szFilename, SIZEOF(szFilename), _T("%s"), ptszFileName);
- int filenameLen = lstrlen(szFilename);
+ int filenameLen = mir_tstrlen(szFilename);
if (filenameLen > 4) {
TCHAR* pszExt = szFilename + filenameLen - 4;
@@ -143,41 +143,41 @@ static INT_PTR BmpFilterGetStrings(WPARAM wParam, LPARAM lParam) int bytesLeft = wParam;
char *filter = (char*)lParam, *pfilter;
- lstrcpynA(filter, Translate("All bitmaps"), bytesLeft); bytesLeft-=lstrlenA(filter);
+ mir_strncpy(filter, Translate("All bitmaps"), bytesLeft); bytesLeft-=mir_strlen(filter);
strncat(filter, " (*.bmp;*.jpg;*.gif;*.png)", bytesLeft);
- pfilter = filter+lstrlenA(filter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, "*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter = filter+mir_strlen(filter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_strncpy(pfilter, "*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG", bytesLeft);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, Translate("Windows bitmaps"), bytesLeft); bytesLeft-=lstrlenA(pfilter);
+ mir_strncpy(pfilter, Translate("Windows bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
strncat(pfilter, " (*.bmp;*.rle)", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, "*.BMP;*.RLE", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_strncpy(pfilter, "*.BMP;*.RLE", bytesLeft);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, Translate("JPEG bitmaps"), bytesLeft); bytesLeft-=lstrlenA(pfilter);
+ mir_strncpy(pfilter, Translate("JPEG bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
strncat(pfilter, " (*.jpg;*.jpeg)", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, "*.JPG;*.JPEG", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_strncpy(pfilter, "*.JPG;*.JPEG", bytesLeft);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, Translate("GIF bitmaps"), bytesLeft); bytesLeft-=lstrlenA(pfilter);
+ mir_strncpy(pfilter, Translate("GIF bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
strncat(pfilter, " (*.gif)", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, "*.GIF", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_strncpy(pfilter, "*.GIF", bytesLeft);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, Translate("PNG bitmaps"), bytesLeft); bytesLeft-=lstrlenA(pfilter);
+ mir_strncpy(pfilter, Translate("PNG bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
strncat(pfilter, " (*.png)", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, "*.PNG", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_strncpy(pfilter, "*.PNG", bytesLeft);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, Translate("All files"), bytesLeft); bytesLeft-=lstrlenA(pfilter);
+ mir_strncpy(pfilter, Translate("All files"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
strncat(pfilter, " (*)", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpynA(pfilter, "*", bytesLeft);
- pfilter+=lstrlenA(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_strncpy(pfilter, "*", bytesLeft);
+ pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
if (bytesLeft) *pfilter = '\0';
return 0;
@@ -188,41 +188,41 @@ static INT_PTR BmpFilterGetStringsW(WPARAM wParam, LPARAM lParam) int bytesLeft = wParam;
TCHAR *filter = (TCHAR*)lParam, *pfilter;
- lstrcpyn(filter, TranslateT("All bitmaps"), bytesLeft); bytesLeft-=lstrlen(filter);
+ mir_tstrncpy(filter, TranslateT("All bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(filter);
_tcsncat(filter, _T(" (*.bmp;*.jpg;*.gif;*.png)"), bytesLeft);
- pfilter = filter+lstrlen(filter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, _T("*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter = filter+mir_tstrlen(filter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_tstrncpy(pfilter, _T("*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG"), bytesLeft);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, TranslateT("Windows bitmaps"), bytesLeft); bytesLeft-=lstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("Windows bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.bmp;*.rle)"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, _T("*.BMP;*.RLE"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_tstrncpy(pfilter, _T("*.BMP;*.RLE"), bytesLeft);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, TranslateT("JPEG bitmaps"), bytesLeft); bytesLeft-=lstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("JPEG bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.jpg;*.jpeg)"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, _T("*.JPG;*.JPEG"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_tstrncpy(pfilter, _T("*.JPG;*.JPEG"), bytesLeft);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, TranslateT("GIF bitmaps"), bytesLeft); bytesLeft-=lstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("GIF bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.gif)"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, _T("*.GIF"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_tstrncpy(pfilter, _T("*.GIF"), bytesLeft);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, TranslateT("PNG bitmaps"), bytesLeft); bytesLeft-=lstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("PNG bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.png)"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, _T("*.PNG"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_tstrncpy(pfilter, _T("*.PNG"), bytesLeft);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, TranslateT("All files"), bytesLeft); bytesLeft-=lstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("All files"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*)"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
- lstrcpyn(pfilter, _T("*"), bytesLeft);
- pfilter+=lstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ mir_tstrncpy(pfilter, _T("*"), bytesLeft);
+ pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
if (bytesLeft) *pfilter = '\0';
return 0;
diff --git a/src/modules/utils/hyperlink.cpp b/src/modules/utils/hyperlink.cpp index 7eaba363de..9f075a7514 100644 --- a/src/modules/utils/hyperlink.cpp +++ b/src/modules/utils/hyperlink.cpp @@ -165,7 +165,7 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA if (hdc == NULL) return 0; /* text change failed */
if (dat->hEnableFont != NULL) hPrevFont = (HFONT)SelectObject(hdc, dat->hEnableFont);
if (dat->hEnableFont == NULL || hPrevFont != NULL) /* select failed? */
- if (GetTextExtentPoint32(hdc, (TCHAR*)lParam, lstrlen((TCHAR*)lParam), &textSize))
+ if (GetTextExtentPoint32(hdc, (TCHAR*)lParam, mir_tstrlen((TCHAR*)lParam), &textSize))
if (GetClientRect(hwnd, &rc)) {
dat->rcText.top = 0;
dat->rcText.bottom = dat->rcText.top+textSize.cy;
diff --git a/src/modules/utils/openurl.cpp b/src/modules/utils/openurl.cpp index a4722f804f..7228182874 100644 --- a/src/modules/utils/openurl.cpp +++ b/src/modules/utils/openurl.cpp @@ -38,7 +38,7 @@ static void OpenURLThread(void *arg) return;
//wack a protocol on it
- size_t size = lstrlen(hUrlInfo->szUrl)+9;
+ size_t size = mir_tstrlen(hUrlInfo->szUrl)+9;
TCHAR *szResult = (TCHAR*)mir_alloc(sizeof(TCHAR)*size);
if ((isalpha(hUrlInfo->szUrl[0]) && hUrlInfo->szUrl[1] == ':') || hUrlInfo->szUrl[0] == '\\') {
mir_sntprintf(szResult, size, _T("file:///%s"), hUrlInfo->szUrl);
|