summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/NewXstatusNotify/src/utils.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (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/NewXstatusNotify/src/utils.cpp')
-rw-r--r--plugins/NewXstatusNotify/src/utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp
index 3a72826c56..f06b12914c 100644
--- a/plugins/NewXstatusNotify/src/utils.cpp
+++ b/plugins/NewXstatusNotify/src/utils.cpp
@@ -41,20 +41,20 @@ bool CheckMsgWnd(MCONTACT hContact)
return false;
}
-int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue)
+int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSetting, wchar_t *setting, int size, const wchar_t *defaultValue)
{
DBVARIANT dbv;
if (!db_get_ts(hContact, szModule, szSetting, &dbv)) {
- _tcsncpy(setting, dbv.ptszVal, size);
+ wcsncpy(setting, dbv.ptszVal, size);
db_free(&dbv);
return 0;
}
- _tcsncpy(setting, defaultValue, size);
+ wcsncpy(setting, defaultValue, size);
return 1;
}
-void ShowLog(TCHAR *file)
+void ShowLog(wchar_t *file)
{
INT_PTR res = (INT_PTR)ShellExecute(NULL, L"open", file, NULL, NULL, SW_SHOW);
if (res <= 32) // error
@@ -83,16 +83,16 @@ BOOL StatusHasAwayMessage(char *szProto, int status)
}
}
-void LogToFile(TCHAR *stzText)
+void LogToFile(wchar_t *stzText)
{
- FILE *fp = _tfopen(opt.LogFilePath, L"a+b, ccs=UTF-8");
+ FILE *fp = _wfopen(opt.LogFilePath, L"a+b, ccs=UTF-8");
if (fp) {
fprintf(fp, T2Utf(stzText));
fclose(fp);
}
}
-void AddCR(CMString &str, const TCHAR *stzText)
+void AddCR(CMString &str, const wchar_t *stzText)
{
if (stzText == NULL)
return;