diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/FTPFileYM/src/utils.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src/utils.cpp')
-rw-r--r-- | plugins/FTPFileYM/src/utils.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp index d17bb4ba6c..d15a706055 100644 --- a/plugins/FTPFileYM/src/utils.cpp +++ b/plugins/FTPFileYM/src/utils.cpp @@ -32,7 +32,7 @@ int Utils::getDeleteTimeMin() return -1;
}
-int Utils::msgBox(TCHAR *stzMsg, UINT uType)
+int Utils::msgBox(wchar_t *stzMsg, UINT uType)
{
HWND hwnd = (uDlg != NULL) ? uDlg->m_hwnd : 0;
return MessageBox(hwnd, stzMsg, TranslateT("FTP File"), uType);
@@ -58,14 +58,14 @@ HANDLE Utils::getIconHandle(const char *szName) return IcoLib_GetIconHandle(buff);
}
-TCHAR* Utils::getFileNameFromPath(TCHAR *stzPath)
+wchar_t* Utils::getFileNameFromPath(wchar_t *stzPath)
{
- TCHAR *pch = _tcsrchr(stzPath, '\\');
+ wchar_t *pch = wcsrchr(stzPath, '\\');
if (pch) return pch + 1;
else return L"file.zip";
}
-TCHAR* Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff)
+wchar_t* Utils::getTextFragment(wchar_t *stzText, size_t length, wchar_t *buff)
{
if (mir_tstrlen(stzText) > length) {
mir_tstrcpy(buff, stzText);
@@ -95,7 +95,7 @@ void Utils::copyToClipboard(char *szText) const char from_chars[] = "àáâãäå¸æçèéêëìíîïðñòóôõö÷øùúûüýþÿÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß !@#$%^&=,{}[];'`";
const char to_chars[] = "abvgdeezziiklmnoprstufhccwwqyqeuaABVGDEEZZIIKLMNOPRSTUFHCCWWQYQEUA_________________";
-char* Utils::makeSafeString(TCHAR *input, char *output)
+char* Utils::makeSafeString(wchar_t *input, char *output)
{
char *buff = mir_t2a(input);
size_t length = mir_strlen(buff);
@@ -155,12 +155,12 @@ void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TCHAR *fileName = (TCHAR *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ wchar_t *fileName = (wchar_t *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- fileName = (TCHAR *)lParam;
+ fileName = (wchar_t *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)fileName);
SetDlgItemText(hwndDlg, IDC_NAME, fileName);
@@ -189,7 +189,7 @@ INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam return FALSE;
}
-bool Utils::setFileNameDlg(TCHAR *nameBuff)
+bool Utils::setFileNameDlg(wchar_t *nameBuff)
{
if (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_DLG_NAME), 0, DlgProcSetFileName, (LPARAM)nameBuff) == IDOK)
return true;
@@ -199,8 +199,8 @@ bool Utils::setFileNameDlg(TCHAR *nameBuff) bool Utils::setFileNameDlgA(char *nameBuff)
{
- TCHAR buff[64];
- TCHAR *tmp = mir_a2t(nameBuff);
+ wchar_t buff[64];
+ wchar_t *tmp = mir_a2t(nameBuff);
mir_tstrcpy(buff, tmp);
FREE(tmp);
|