summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/mTextControl/src/FormattedTextDraw.cpp10
-rw-r--r--libs/mTextControl/src/FormattedTextDraw.h10
-rw-r--r--libs/mTextControl/src/services.cpp4
-rw-r--r--plugins/AssocMgr/src/utils.cpp2
-rw-r--r--plugins/AutoShutdown/src/cpuusage.cpp4
-rw-r--r--plugins/AutoShutdown/src/utils.cpp2
-rw-r--r--plugins/AvatarHistory/src/utils.cpp2
-rw-r--r--plugins/BASS_interface/src/Bass.h12
-rw-r--r--plugins/ClientChangeNotify/src/CString.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/CString.h10
-rw-r--r--plugins/Clist_modern/src/modern_commonprototypes.h2
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp2
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp4
-rw-r--r--plugins/CmdLine/src/utils.cpp4
-rw-r--r--plugins/CmdLine/src/utils.h4
-rw-r--r--plugins/CrashDumper/src/sdkstuff.h6
-rw-r--r--plugins/CryptoPP/src/cpp_svcs.cpp20
-rw-r--r--plugins/CryptoPP/src/utf8.cpp2
-rw-r--r--plugins/DbChecker/src/worker.cpp6
-rw-r--r--plugins/FavContacts/src/http_api.cpp2
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp4
-rw-r--r--plugins/HistoryStats/src/_consts.h4
-rw-r--r--plugins/HistoryStats/src/_strfunc.h20
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp10
-rw-r--r--plugins/HistoryStats/src/mu_common.h10
-rw-r--r--plugins/HistoryStats/src/statistic.cpp4
-rw-r--r--plugins/HistoryStats/src/stdafx.h16
-rw-r--r--plugins/HistoryStats/src/utf8buffer.h8
-rw-r--r--plugins/HistoryStats/src/utils.cpp22
-rw-r--r--plugins/HistoryStats/src/utils.h6
-rw-r--r--plugins/IEView/src/IEView.cpp4
-rw-r--r--plugins/IEView/src/IEView.h2
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp2
-rw-r--r--plugins/ListeningTo/src/players/generic.cpp12
-rw-r--r--plugins/ListeningTo/src/players/generic.h6
-rw-r--r--plugins/ListeningTo/src/players/itunes.cpp2
-rw-r--r--plugins/ListeningTo/src/players/itunes.h2
-rw-r--r--plugins/ListeningTo/src/players/wmp.cpp10
-rw-r--r--plugins/ListeningTo/src/players/wmp.h4
-rw-r--r--plugins/ListeningTo/src/stdafx.h2
-rw-r--r--plugins/MirFox/src/MirandaOptions.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/misc.cpp8
-rw-r--r--plugins/MirandaG15/src/LCDFramework/misc.h4
-rw-r--r--plugins/NewAwaySysMod/src/CString.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/CString.h10
-rw-r--r--plugins/NewAwaySysMod/src/GroupCheckbox.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Services.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp2
-rw-r--r--plugins/PasteIt/src/PasteToWeb.cpp2
-rw-r--r--plugins/QuickReplies/src/options.cpp4
-rw-r--r--plugins/Scriver/src/msglog.cpp8
-rw-r--r--plugins/SecureIM/src/mmi.cpp14
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.cpp2
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp2
-rw-r--r--plugins/StopSpamPlus/src/events.cpp4
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_button.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h2
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_avatar.cpp2
-rwxr-xr-xplugins/Watrack_MPD/src/main.cpp2
-rw-r--r--plugins/WinterSpeak/src/ConfigDatabase.cpp2
-rw-r--r--plugins/WinterSpeak/src/ConfigDatabase.h2
-rw-r--r--plugins/WinterSpeak/src/DialogConfigEngine.cpp8
-rw-r--r--plugins/WinterSpeak/src/EventInformation.cpp2
-rw-r--r--plugins/WinterSpeak/src/MirandaDialog.cpp6
-rw-r--r--plugins/WinterSpeak/src/MirandaDialog.h2
-rw-r--r--plugins/WinterSpeak/src/SpeechApi40a.cpp4
-rw-r--r--plugins/WinterSpeak/src/UserInformation.cpp4
-rw-r--r--plugins/WinterSpeak/src/main.cpp4
-rw-r--r--protocols/Facebook/src/avatars.cpp2
-rw-r--r--protocols/JabberG/src/jabber_console.cpp6
-rw-r--r--protocols/JabberG/src/jabber_disco.h2
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp2
-rw-r--r--protocols/LotusNotify/src/LotusNotify.cpp12
-rw-r--r--protocols/Weather/src/stdafx.h8
-rw-r--r--protocols/Weather/src/weather_conv.cpp4
-rw-r--r--protocols/Weather/src/weather_data.cpp6
-rw-r--r--protocols/YAMN/src/account.cpp40
-rw-r--r--protocols/YAMN/src/browser/badconnect.cpp6
-rw-r--r--protocols/YAMN/src/browser/mailbrowser.cpp72
-rw-r--r--protocols/YAMN/src/debug.cpp10
-rw-r--r--protocols/YAMN/src/debug.h4
-rw-r--r--protocols/YAMN/src/mails/decode.cpp20
-rw-r--r--protocols/YAMN/src/mails/mime.cpp12
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3opt.cpp8
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3opt.h2
-rw-r--r--protocols/YAMN/src/services.cpp6
-rw-r--r--protocols/YAMN/src/stdafx.h6
-rw-r--r--src/core/stdfile/src/fileexistsdlg.cpp2
-rw-r--r--src/mir_app/src/button.cpp2
-rw-r--r--src/mir_app/src/clcmsgs.cpp2
-rw-r--r--src/mir_app/src/contacts.cpp2
-rw-r--r--src/mir_app/src/descbutton.cpp4
-rw-r--r--src/mir_app/src/netlib_log.cpp2
-rw-r--r--src/mir_app/src/path.cpp2
99 files changed, 315 insertions, 315 deletions
diff --git a/libs/mTextControl/src/FormattedTextDraw.cpp b/libs/mTextControl/src/FormattedTextDraw.cpp
index eca1044a5c..04fa7f6042 100644
--- a/libs/mTextControl/src/FormattedTextDraw.cpp
+++ b/libs/mTextControl/src/FormattedTextDraw.cpp
@@ -35,12 +35,12 @@ DWORD CALLBACK EditStreamInCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb,
{
COOKIE *pCookie = (COOKIE*)dwCookie;
if (pCookie->isUnicode) {
- if ((pCookie->cbSize - pCookie->cbCount)*sizeof(WCHAR) < (size_t)cb)
- *pcb = LONG(pCookie->cbSize - pCookie->cbCount)*sizeof(WCHAR);
+ if ((pCookie->cbSize - pCookie->cbCount)*sizeof(wchar_t) < (size_t)cb)
+ *pcb = LONG(pCookie->cbSize - pCookie->cbCount)*sizeof(wchar_t);
else
*pcb = cb & ~1UL;
memcpy(pbBuff, pCookie->unicode + pCookie->cbCount, *pcb);
- pCookie->cbCount += *pcb / sizeof(WCHAR);
+ pCookie->cbCount += *pcb / sizeof(wchar_t);
}
else {
if (pCookie->cbSize - pCookie->cbCount < (DWORD)cb)
@@ -77,7 +77,7 @@ HRESULT CFormattedTextDraw::putRTFTextA(char *newVal)
return S_OK;
}
-HRESULT CFormattedTextDraw::putRTFTextW(WCHAR *newVal)
+HRESULT CFormattedTextDraw::putRTFTextW(wchar_t *newVal)
{
if (!m_spTextServices)
return S_FALSE;
@@ -126,7 +126,7 @@ HRESULT CFormattedTextDraw::putTextA(char *newVal)
return S_OK;
}
-HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal)
+HRESULT CFormattedTextDraw::putTextW(wchar_t *newVal)
{
if (!m_spTextServices)
return S_FALSE;
diff --git a/libs/mTextControl/src/FormattedTextDraw.h b/libs/mTextControl/src/FormattedTextDraw.h
index a5128f48a2..27ac6c8810 100644
--- a/libs/mTextControl/src/FormattedTextDraw.h
+++ b/libs/mTextControl/src/FormattedTextDraw.h
@@ -17,7 +17,7 @@ struct COOKIE
union
{
char *ansi;
- WCHAR *unicode;
+ wchar_t *unicode;
};
size_t cbSize, cbCount;
};
@@ -32,9 +32,9 @@ public:
virtual HRESULT Create() = 0;
virtual HRESULT Draw(void *hdcDraw, RECT *prc) = 0;
virtual HRESULT putRTFTextA(char *newVal) = 0;
- virtual HRESULT putRTFTextW(WCHAR *newVal) = 0;
+ virtual HRESULT putRTFTextW(wchar_t *newVal) = 0;
virtual HRESULT putTextA(char *newVal) = 0;
- virtual HRESULT putTextW(WCHAR *newVal) = 0;
+ virtual HRESULT putTextW(wchar_t *newVal) = 0;
virtual ITextServices *getTextService() = 0;
virtual ITextDocument *getTextDocument() = 0;
@@ -111,9 +111,9 @@ public:
HRESULT Create();
HRESULT Draw(void *hdcDraw, RECT *prc);
HRESULT putRTFTextA(char *newVal);
- HRESULT putRTFTextW(WCHAR *newVal);
+ HRESULT putRTFTextW(wchar_t *newVal);
HRESULT putTextA(char *newVal);
- HRESULT putTextW(WCHAR *newVal);
+ HRESULT putTextW(wchar_t *newVal);
ITextServices *getTextService() { return m_spTextServices; };
ITextDocument *getTextDocument() { return m_spTextDocument; };
diff --git a/libs/mTextControl/src/services.cpp b/libs/mTextControl/src/services.cpp
index 048194f067..b27b667180 100644
--- a/libs/mTextControl/src/services.cpp
+++ b/libs/mTextControl/src/services.cpp
@@ -72,7 +72,7 @@ MTEXTCONTROL_DLL(HANDLE) MTextCreateW(HANDLE userHandle, const char *szProto, co
InitRichEdit(result->ftd->getTextService());
MText_InitFormatting0(result->ftd, result->options);
- result->ftd->putTextW((WCHAR*)text);
+ result->ftd->putTextW((wchar_t*)text);
MText_InitFormatting1(result);
return (HANDLE)result;
@@ -91,7 +91,7 @@ MTEXTCONTROL_DLL(HANDLE) MTextCreateEx(HANDLE userHandle, void *text, DWORD flag
MText_InitFormatting0(result->ftd, result->options);
if (flags & MTEXT_FLG_WCHAR)
- result->ftd->putTextW((WCHAR *)text);
+ result->ftd->putTextW((wchar_t *)text);
else
result->ftd->putTextA((char *)text);
MText_InitFormatting1(result);
diff --git a/plugins/AssocMgr/src/utils.cpp b/plugins/AssocMgr/src/utils.cpp
index cafa234e87..8e70d68af5 100644
--- a/plugins/AssocMgr/src/utils.cpp
+++ b/plugins/AssocMgr/src/utils.cpp
@@ -45,7 +45,7 @@ void DynamicLoadInit()
wchar_t* s2t(const void *pszStr, DWORD fUnicode, BOOL fMirCp)
{
if (fUnicode)
- return mir_wstrdup((WCHAR*)pszStr);
+ return mir_wstrdup((wchar_t*)pszStr);
return mir_a2u_cp((char*)pszStr, fMirCp);
}
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp
index 25eb542f35..1e5c3e6231 100644
--- a/plugins/AutoShutdown/src/cpuusage.cpp
+++ b/plugins/AutoShutdown/src/cpuusage.cpp
@@ -83,7 +83,7 @@ static void WinNT_PollThread(CpuUsageThreadParams *param)
PERF_INSTANCE_DEFINITION *pPerfInstance;
PERF_COUNTER_BLOCK *pPerfCounterBlock;
DWORD dwObjectId, dwCounterId;
- WCHAR wszValueName[11], *pwszInstanceName;
+ wchar_t wszValueName[11], *pwszInstanceName;
BYTE nCpuUsage;
BOOL fSwitched, fFound, fIsFirst = FALSE;
LARGE_INTEGER liPrevCounterValue = { 0 }, liCurrentCounterValue = { 0 }, liPrevPerfTime100nSec = { 0 };
@@ -129,7 +129,7 @@ static void WinNT_PollThread(CpuUsageThreadParams *param)
pPerfInstance = (PERF_INSTANCE_DEFINITION*)((BYTE*)pPerfObj + pPerfObj->DefinitionLength);
for (lCount = 0; lCount < (pPerfObj->NumInstances); ++lCount) {
pPerfCounterBlock = (PERF_COUNTER_BLOCK*)((BYTE*)pPerfInstance + pPerfInstance->ByteLength);
- if (!mir_wstrcmpi(pwszInstanceName, (WCHAR*)((BYTE*)pPerfInstance + pPerfInstance->NameOffset))) {
+ if (!mir_wstrcmpi(pwszInstanceName, (wchar_t*)((BYTE*)pPerfInstance + pPerfInstance->NameOffset))) {
liCurrentCounterValue = *(LARGE_INTEGER*)((BYTE*)pPerfCounterBlock + pPerfCounter->CounterOffset);
fFound = TRUE;
break;
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp
index 4a9eb583b0..35e1bb0755 100644
--- a/plugins/AutoShutdown/src/utils.cpp
+++ b/plugins/AutoShutdown/src/utils.cpp
@@ -108,7 +108,7 @@ BOOL TimeStampToSystemTime(time_t timestamp, SYSTEMTIME *st)
BOOL GetFormatedCountdown(wchar_t *pszOut, int nSize, time_t countdown)
{
static BOOL fInited = FALSE;
- static int (WINAPI *pfnGetDurationFormat)(LCID, DWORD, const SYSTEMTIME*, double, WCHAR*, WCHAR*, int);
+ static int (WINAPI *pfnGetDurationFormat)(LCID, DWORD, const SYSTEMTIME*, double, wchar_t*, wchar_t*, int);
/* Init */
if (!fInited && IsWinVerVistaPlus()) {
*(PROC*)&pfnGetDurationFormat = GetProcAddress(GetModuleHandleA("KERNEL32"), "GetDurationFormat");
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp
index 280b5acf79..8ee3ad52a5 100644
--- a/plugins/AvatarHistory/src/utils.cpp
+++ b/plugins/AvatarHistory/src/utils.cpp
@@ -45,7 +45,7 @@ bool ContactEnabled(MCONTACT hContact, char *setting, int def)
}
// Returns true if the unicode buffer only contains 7-bit characters.
-BOOL IsUnicodeAscii(const WCHAR * pBuffer, int nSize)
+BOOL IsUnicodeAscii(const wchar_t * pBuffer, int nSize)
{
for (int nIndex = 0; nIndex < nSize; nIndex++)
if (pBuffer[nIndex] > 0x7F)
diff --git a/plugins/BASS_interface/src/Bass.h b/plugins/BASS_interface/src/Bass.h
index 18e3d0030e..50db57dcef 100644
--- a/plugins/BASS_interface/src/Bass.h
+++ b/plugins/BASS_interface/src/Bass.h
@@ -1092,32 +1092,32 @@ BOOL BASSDEF(BASS_FXReset)(DWORD handle);
}
#if defined(_WIN32) && !defined(NOBASSOVERLOADS)
-static inline HSUBPLUGIN BASS_PluginLoad(const WCHAR *file, DWORD flags)
+static inline HSUBPLUGIN BASS_PluginLoad(const wchar_t *file, DWORD flags)
{
return BASS_PluginLoad((const char*)file, flags | BASS_UNICODE);
}
-static inline HMUSIC BASS_MusicLoad(BOOL mem, const WCHAR *file, QWORD offset, DWORD length, DWORD flags, DWORD freq)
+static inline HMUSIC BASS_MusicLoad(BOOL mem, const wchar_t *file, QWORD offset, DWORD length, DWORD flags, DWORD freq)
{
return BASS_MusicLoad(mem, (const void*)file, offset, length, flags | BASS_UNICODE, freq);
}
-static inline HSAMPLE BASS_SampleLoad(BOOL mem, const WCHAR *file, QWORD offset, DWORD length, DWORD max, DWORD flags)
+static inline HSAMPLE BASS_SampleLoad(BOOL mem, const wchar_t *file, QWORD offset, DWORD length, DWORD max, DWORD flags)
{
return BASS_SampleLoad(mem, (const void*)file, offset, length, max, flags | BASS_UNICODE);
}
-static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const WCHAR *file, QWORD offset, QWORD length, DWORD flags)
+static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const wchar_t *file, QWORD offset, QWORD length, DWORD flags)
{
return BASS_StreamCreateFile(mem, (const void*)file, offset, length, flags | BASS_UNICODE);
}
-static inline HSTREAM BASS_StreamCreateURL(const WCHAR *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user)
+static inline HSTREAM BASS_StreamCreateURL(const wchar_t *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user)
{
return BASS_StreamCreateURL((const char*)url, offset, flags | BASS_UNICODE, proc, user);
}
-static inline BOOL BASS_SetConfigPtr(DWORD option, const WCHAR *value)
+static inline BOOL BASS_SetConfigPtr(DWORD option, const wchar_t *value)
{
return BASS_SetConfigPtr(option | BASS_UNICODE, (const void*)value);
}
diff --git a/plugins/ClientChangeNotify/src/CString.cpp b/plugins/ClientChangeNotify/src/CString.cpp
index ece8b81645..911bda8621 100644
--- a/plugins/ClientChangeNotify/src/CString.cpp
+++ b/plugins/ClientChangeNotify/src/CString.cpp
@@ -255,7 +255,7 @@ TString<T>& TString<T>::operator=(const T *pStr)
template class TString<wchar_t>;
template class TString<char>;
-template class TString<WCHAR>;
+template class TString<wchar_t>;
CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue)
{
diff --git a/plugins/ClientChangeNotify/src/CString.h b/plugins/ClientChangeNotify/src/CString.h
index cf18c6f881..f405457998 100644
--- a/plugins/ClientChangeNotify/src/CString.h
+++ b/plugins/ClientChangeNotify/src/CString.h
@@ -100,17 +100,17 @@ private:
typedef TString<wchar_t> TCString;
typedef TString<char> CString;
-typedef TString<WCHAR> WCString;
+typedef TString<wchar_t> WCString;
#ifdef CHARARRAY_CONVERT
__inline CHARARRAY WCHAR2ANSI_ARRAY(CHARARRAY &c)
{
CHARARRAY Result;
- int Len = WideCharToMultiByte(CP_ACP, 0, (WCHAR*)c.GetData(), c.GetSize() / sizeof(WCHAR), NULL, 0, NULL, NULL);
+ int Len = WideCharToMultiByte(CP_ACP, 0, (wchar_t*)c.GetData(), c.GetSize() / sizeof(wchar_t), NULL, 0, NULL, NULL);
if (Len) {
Result.SetAtGrow(Len - 1);
- if (!WideCharToMultiByte(CP_ACP, 0, (WCHAR*)c.GetData(), c.GetSize() / sizeof(WCHAR), Result.GetData(), Len, NULL, NULL)) {
+ if (!WideCharToMultiByte(CP_ACP, 0, (wchar_t*)c.GetData(), c.GetSize() / sizeof(wchar_t), Result.GetData(), Len, NULL, NULL)) {
Result.RemoveAll();
}
if (Result.GetSize()) {
@@ -125,8 +125,8 @@ __inline CHARARRAY ANSI2WCHAR_ARRAY(CHARARRAY &c)
CHARARRAY Result;
int Len = MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), NULL, 0);
if (Len) {
- Result.SetAtGrow(Len * sizeof(WCHAR) - 1);
- if (!MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), (WCHAR*)Result.GetData(), Len)) {
+ Result.SetAtGrow(Len * sizeof(wchar_t) - 1);
+ if (!MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), (wchar_t*)Result.GetData(), Len)) {
Result.RemoveAll();
}
if (Result.GetSize()) {
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h
index b93b536176..fa9e3b066e 100644
--- a/plugins/Clist_modern/src/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/modern_commonprototypes.h
@@ -157,7 +157,7 @@ void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkC
HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
char* GetParamN(char *string, char *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c
-WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim, BOOL SkipSpaces);
+wchar_t* GetParamN(wchar_t *string, wchar_t *buf, int buflen, BYTE paramN, wchar_t Delim, BOOL SkipSpaces);
DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c
DWORD mod_CalcHash(const char *a); //mod_skin_selector.c
HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status); //clistmod.c
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index 4c12aa9478..cea33b7f92 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -372,7 +372,7 @@ wchar_t* GetParamNT(char *string, wchar_t *buf, int buflen, BYTE paramN, char De
return buf;
}
-WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim, BOOL SkipSpaces)
+wchar_t* GetParamN(wchar_t *string, wchar_t *buf, int buflen, BYTE paramN, wchar_t Delim, BOOL SkipSpaces)
{
size_t i = 0, start = 0, CurentCount = 0, len;
while (i < mir_wstrlen(string)) {
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index d4393eae43..d46e7b55b1 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -106,7 +106,7 @@ int ParseValueParam(wchar_t *param, void *&result)
case 'w':
{
size_t len = mir_wstrlen(param);
- result = (WCHAR *)malloc(len * sizeof(WCHAR));
+ result = (wchar_t *)malloc(len * sizeof(wchar_t));
wcsncpy_s((wchar_t*)result, len, param + 1, _TRUNCATE);
return VALUE_WIDE;
}
@@ -823,7 +823,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r
break;
case VALUE_WIDE:
- db_set_ws(0, module, key, (WCHAR *)value);
+ db_set_ws(0, module, key, (wchar_t *)value);
wrote = Translate("wide string");
break;
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index 86da417721..9dba308c9b 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -90,7 +90,7 @@ int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName
return res;
}
-int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, wchar_t *szError, wchar_t *szResult, size_t count)
{
DBVARIANT dbv = { 0 };
int res = 1;
@@ -129,7 +129,7 @@ int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, si
return GetStringFromDatabase(0, MODULENAME, szSettingName, szError, szResult, size);
}
-int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count)
+int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResult, size_t count)
{
return GetStringFromDatabase(0, MODULENAME, szSettingName, szError, szResult, count);
}
diff --git a/plugins/CmdLine/src/utils.h b/plugins/CmdLine/src/utils.h
index f87c8e6a97..8b7b1258c7 100644
--- a/plugins/CmdLine/src/utils.h
+++ b/plugins/CmdLine/src/utils.h
@@ -39,9 +39,9 @@ void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);
int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size);
-int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, wchar_t *szError, wchar_t *szResult, size_t count);
int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, size_t size);
-int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
+int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResult, size_t count);
wchar_t* GetContactName(MCONTACT hContact, char *szProto);
wchar_t* GetContactID(MCONTACT hContact, char *szProto);
diff --git a/plugins/CrashDumper/src/sdkstuff.h b/plugins/CrashDumper/src/sdkstuff.h
index 31a33a9491..e4dec9fd93 100644
--- a/plugins/CrashDumper/src/sdkstuff.h
+++ b/plugins/CrashDumper/src/sdkstuff.h
@@ -41,9 +41,9 @@ typedef struct _IMAGEHLP_MODULEW64_V2 {
DWORD CheckSum; // checksum from the pe header
DWORD NumSyms; // number of symbols in the symbol table
SYM_TYPE SymType; // type of symbols loaded
- WCHAR ModuleName[32]; // module name
- WCHAR ImageName[256]; // image name
- WCHAR LoadedImageName[256]; // symbol file name
+ wchar_t ModuleName[32]; // module name
+ wchar_t ImageName[256]; // image name
+ wchar_t LoadedImageName[256]; // symbol file name
} IMAGEHLP_MODULEW64_V2;
#ifdef DBGHELP_TRANSLATE_TCHAR
diff --git a/plugins/CryptoPP/src/cpp_svcs.cpp b/plugins/CryptoPP/src/cpp_svcs.cpp
index 00f8b19d8a..c7a47f058b 100644
--- a/plugins/CryptoPP/src/cpp_svcs.cpp
+++ b/plugins/CryptoPP/src/cpp_svcs.cpp
@@ -158,8 +158,8 @@ LPSTR __cdecl cpp_encodeA(HANDLE context, LPCSTR msg)
if (ptr->features & FEATURES_UTF8) {
// ansi message: convert to unicode->utf-8 and encrypt.
int slen = (int)strlen(szOldMsg) + 1;
- LPWSTR wstring = (LPWSTR)alloca(slen*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wstring, slen*sizeof(WCHAR));
+ LPWSTR wstring = (LPWSTR)alloca(slen*sizeof(wchar_t));
+ MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wstring, slen*sizeof(wchar_t));
// encrypt
szNewMsg = cpp_encrypt(ptr, utf8encode(wstring));
}
@@ -242,18 +242,18 @@ LPSTR __cdecl cpp_decode(HANDLE context, LPCSTR szEncMsg)
// utf8 message: convert to unicode -> ansii
LPWSTR wstring = utf8decode(szOldMsg);
int wlen = (int)wcslen(wstring) + 1;
- szNewMsg = (LPSTR)mir_alloc(wlen*(sizeof(WCHAR)+2)); // work.zy@gmail.com
+ szNewMsg = (LPSTR)mir_alloc(wlen*(sizeof(wchar_t)+2)); // work.zy@gmail.com
WideCharToMultiByte(CP_ACP, 0, wstring, -1, szNewMsg, wlen, nullptr, nullptr);
- memcpy(szNewMsg + strlen(szNewMsg) + 1, wstring, wlen*sizeof(WCHAR)); // work.zy@gmail.com
+ memcpy(szNewMsg + strlen(szNewMsg) + 1, wstring, wlen*sizeof(wchar_t)); // work.zy@gmail.com
}
else {
// ansi message: convert to unicode
int slen = (int)strlen(szOldMsg) + 1;
- szNewMsg = (LPSTR)mir_alloc(slen*(sizeof(WCHAR)+1));
+ szNewMsg = (LPSTR)mir_alloc(slen*(sizeof(wchar_t)+1));
memcpy(szNewMsg, szOldMsg, slen);
- WCHAR* wstring = (LPWSTR)alloca(slen*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wstring, slen*sizeof(WCHAR));
- memcpy(szNewMsg + slen, wstring, slen*sizeof(WCHAR));
+ wchar_t* wstring = (LPWSTR)alloca(slen*sizeof(wchar_t));
+ MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wstring, slen*sizeof(wchar_t));
+ memcpy(szNewMsg + slen, wstring, slen*sizeof(wchar_t));
}
}
mir_free(ptr->tmp);
@@ -281,8 +281,8 @@ LPSTR __cdecl cpp_decodeU(HANDLE context, LPCSTR szEncMsg)
else {
// ansi message: convert to utf8
int slen = (int)strlen(szOldMsg) + 1;
- LPWSTR wstring = (LPWSTR)alloca(slen*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wstring, slen*sizeof(WCHAR));
+ LPWSTR wstring = (LPWSTR)alloca(slen*sizeof(wchar_t));
+ MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wstring, slen*sizeof(wchar_t));
szNewMsg = mir_strdup(utf8encode(wstring));
}
}
diff --git a/plugins/CryptoPP/src/utf8.cpp b/plugins/CryptoPP/src/utf8.cpp
index 83d4e4a97a..6a0a6e21a7 100644
--- a/plugins/CryptoPP/src/utf8.cpp
+++ b/plugins/CryptoPP/src/utf8.cpp
@@ -54,7 +54,7 @@ LPWSTR __cdecl utf8decode(LPCSTR str)
size_t len = strlen(str) + 1;
SAFE_FREE(wszOut);
- if ((wszOut = (LPWSTR)malloc(len*sizeof(WCHAR))) == nullptr)
+ if ((wszOut = (LPWSTR)malloc(len*sizeof(wchar_t))) == nullptr)
return nullptr;
p = (LPSTR)str;
i = 0;
diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp
index c6fb08a283..0c39577ec4 100644
--- a/plugins/DbChecker/src/worker.cpp
+++ b/plugins/DbChecker/src/worker.cpp
@@ -28,8 +28,8 @@ static bool ConvertOldEvent(DBEVENTINFO &dbei)
int msglen = (int)mir_strlen((char *)dbei.pBlob) + 1, msglenW = 0;
if (msglen != (int)dbei.cbBlob) {
- int count = ((dbei.cbBlob - msglen) / sizeof(WCHAR));
- WCHAR *p = (WCHAR *)&dbei.pBlob[msglen];
+ int count = ((dbei.cbBlob - msglen) / sizeof(wchar_t));
+ wchar_t *p = (wchar_t *)&dbei.pBlob[msglen];
for (int i = 0; i < count; i++) {
if (p[i] == 0) {
msglenW = i;
@@ -40,7 +40,7 @@ static bool ConvertOldEvent(DBEVENTINFO &dbei)
char *utf8str;
if (msglenW > 0 && msglenW <= msglen)
- utf8str = mir_utf8encodeW((WCHAR *)&dbei.pBlob[msglen]);
+ utf8str = mir_utf8encodeW((wchar_t *)&dbei.pBlob[msglen]);
else
utf8str = mir_utf8encode((char *)dbei.pBlob);
diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp
index eb4ca9140e..c0b3795909 100644
--- a/plugins/FavContacts/src/http_api.cpp
+++ b/plugins/FavContacts/src/http_api.cpp
@@ -99,7 +99,7 @@ public:
}
- void Send(WCHAR *ws)
+ void Send(wchar_t *ws)
{
char *s = mir_utf8encodeW(ws);
m_socket->Send(s);
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index b7699b5a8e..dce300cd1c 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -209,7 +209,7 @@ BOOL __fastcall WildCompare(LPWSTR wszName, LPWSTR wszMask)
return wildcmpw(wszName, wszMask);
size_t s = 1, e = 1;
- LPWSTR wszTemp = (LPWSTR)_alloca(mir_wstrlen(wszMask) * sizeof(WCHAR) + sizeof(WCHAR));
+ LPWSTR wszTemp = (LPWSTR)_alloca(mir_wstrlen(wszMask) * sizeof(wchar_t) + sizeof(wchar_t));
BOOL bExcept;
while (wszMask[e] != L'\0')
@@ -221,7 +221,7 @@ BOOL __fastcall WildCompare(LPWSTR wszName, LPWSTR wszMask)
bExcept = (*(wszMask + s) == L'^');
if (bExcept) s++;
- memcpy(wszTemp, wszMask + s, (e - s) * sizeof(WCHAR));
+ memcpy(wszTemp, wszMask + s, (e - s) * sizeof(wchar_t));
wszTemp[e - s] = L'\0';
if (wildcmpw(wszName, wszTemp))
diff --git a/plugins/HistoryStats/src/_consts.h b/plugins/HistoryStats/src/_consts.h
index d2dbf156c2..a9d8d5a4ed 100644
--- a/plugins/HistoryStats/src/_consts.h
+++ b/plugins/HistoryStats/src/_consts.h
@@ -5,10 +5,10 @@
#if defined(HISTORYSTATS_CONST_DEFINE)
#define CONST_A(nam, txt) extern const char* nam = txt;
-#define CONST_W(nam, txt) extern const WCHAR* nam = L##txt;
+#define CONST_W(nam, txt) extern const wchar_t* nam = L##txt;
#else
#define CONST_A(nam, txt) extern const char* nam;
-#define CONST_W(nam, txt) extern const WCHAR* nam;
+#define CONST_W(nam, txt) extern const wchar_t* nam;
#endif
/*
diff --git a/plugins/HistoryStats/src/_strfunc.h b/plugins/HistoryStats/src/_strfunc.h
index f00af2f367..9577bcfd72 100644
--- a/plugins/HistoryStats/src/_strfunc.h
+++ b/plugins/HistoryStats/src/_strfunc.h
@@ -24,18 +24,18 @@ namespace ext
};
template<>
- class basic_strfunc<WCHAR>
+ class basic_strfunc<wchar_t>
{
public:
- static const WCHAR* chr(const WCHAR* string, WCHAR c) { return wcschr(string, c); }
- static int cmp(const WCHAR* string1, const WCHAR* string2) { return mir_wstrcmp(string1, string2); }
- static int icmp(const WCHAR* string1, const WCHAR* string2) { return _wcsicmp(string1, string2); }
- static int coll(const WCHAR* string1, const WCHAR* string2) { return wcscoll(string1, string2); }
- static int icoll(const WCHAR* string1, const WCHAR* string2) { return _wcsicoll(string1, string2); }
- static const WCHAR* str(const WCHAR* string, const WCHAR* strSearch) { return wcsstr(string, strSearch); }
- static size_t len(const WCHAR* string) { return mir_wstrlen(string); }
- static size_t ftime(WCHAR* strDest, size_t maxsize, const WCHAR* format, const struct tm* timeptr) { return wcsftime(strDest, maxsize, format, timeptr); }
- static int sprintf(WCHAR* buffer, const WCHAR* format, ...) { va_list args; va_start(args, format); return vswprintf(buffer, format, args); }
+ static const wchar_t* chr(const wchar_t* string, wchar_t c) { return wcschr(string, c); }
+ static int cmp(const wchar_t* string1, const wchar_t* string2) { return mir_wstrcmp(string1, string2); }
+ static int icmp(const wchar_t* string1, const wchar_t* string2) { return _wcsicmp(string1, string2); }
+ static int coll(const wchar_t* string1, const wchar_t* string2) { return wcscoll(string1, string2); }
+ static int icoll(const wchar_t* string1, const wchar_t* string2) { return _wcsicoll(string1, string2); }
+ static const wchar_t* str(const wchar_t* string, const wchar_t* strSearch) { return wcsstr(string, strSearch); }
+ static size_t len(const wchar_t* string) { return mir_wstrlen(string); }
+ static size_t ftime(wchar_t* strDest, size_t maxsize, const wchar_t* format, const struct tm* timeptr) { return wcsftime(strDest, maxsize, format, timeptr); }
+ static int sprintf(wchar_t* buffer, const wchar_t* format, ...) { va_list args; va_start(args, format); return vswprintf(buffer, format, args); }
};
}
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index f9283bf433..10c5eadb61 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -125,7 +125,7 @@ namespace mu
* string handling
*/
- char* wideToAnsiDup(const WCHAR* pszWide, UINT uCP /* = CP_ACP */)
+ char* wideToAnsiDup(const wchar_t* pszWide, UINT uCP /* = CP_ACP */)
{
if (!pszWide)
return nullptr;
@@ -140,13 +140,13 @@ namespace mu
return result;
}
- WCHAR* ansiToWideDup(const char* pszAnsi, UINT uCP /* = CP_ACP */)
+ wchar_t* ansiToWideDup(const char* pszAnsi, UINT uCP /* = CP_ACP */)
{
if (!pszAnsi)
return nullptr;
int len = MultiByteToWideChar(uCP, 0, pszAnsi, -1, nullptr, 0);
- WCHAR* result = reinterpret_cast<WCHAR*>(malloc(sizeof(WCHAR)* len));
+ wchar_t* result = reinterpret_cast<wchar_t*>(malloc(sizeof(wchar_t)* len));
if (!result)
return nullptr;
@@ -155,7 +155,7 @@ namespace mu
return result;
}
- char* wideToAnsi(const WCHAR* pszWide, char* pszRes, int maxLen, UINT uCP /* = CP_ACP */)
+ char* wideToAnsi(const wchar_t* pszWide, char* pszRes, int maxLen, UINT uCP /* = CP_ACP */)
{
if (!pszWide)
return nullptr;
@@ -164,7 +164,7 @@ namespace mu
return pszRes;
}
- WCHAR* ansiToWide(const char* pszAnsi, WCHAR* pszRes, int maxLen, UINT uCP /* = CP_ACP */)
+ wchar_t* ansiToWide(const char* pszAnsi, wchar_t* pszRes, int maxLen, UINT uCP /* = CP_ACP */)
{
if (!pszAnsi)
return nullptr;
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h
index f8f9f7923c..635b398a86 100644
--- a/plugins/HistoryStats/src/mu_common.h
+++ b/plugins/HistoryStats/src/mu_common.h
@@ -72,11 +72,11 @@ namespace mu
* string handling
*/
- char* wideToAnsiDup(const WCHAR* pszWide, UINT uCP = CP_ACP);
- WCHAR* ansiToWideDup(const char* pszAnsi, UINT uCP = CP_ACP);
- char* wideToAnsi(const WCHAR* pszWide, char* pszRes, int maxLen, UINT uCP = CP_ACP);
- WCHAR* ansiToWide(const char* pszAnsi, WCHAR* pszRes, int maxLen, UINT uCP = CP_ACP);
- inline void freeWide(WCHAR* pszWide) { free(pszWide); }
+ char* wideToAnsiDup(const wchar_t* pszWide, UINT uCP = CP_ACP);
+ wchar_t* ansiToWideDup(const char* pszAnsi, UINT uCP = CP_ACP);
+ char* wideToAnsi(const wchar_t* pszWide, char* pszRes, int maxLen, UINT uCP = CP_ACP);
+ wchar_t* ansiToWide(const char* pszAnsi, wchar_t* pszRes, int maxLen, UINT uCP = CP_ACP);
+ inline void freeWide(wchar_t* pszWide) { free(pszWide); }
inline void freeAnsi(char* pszAnsi) { free(pszAnsi); }
}
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index aa131b3a91..4ef53b9379 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -420,9 +420,9 @@ bool Statistic::stepReadDB()
char* pAnsiText = reinterpret_cast<char*>(dbei.pBlob);
int nAnsiLenP1 = ext::a::strfunc::len(pAnsiText) + 1;
- WCHAR* pWideText = reinterpret_cast<WCHAR*>(pAnsiText + nAnsiLenP1);
+ wchar_t* pWideText = reinterpret_cast<wchar_t*>(pAnsiText + nAnsiLenP1);
int nWideLen = 0;
- int nWideMaxLen = (dbei.cbBlob - nAnsiLenP1) / sizeof(WCHAR);
+ int nWideMaxLen = (dbei.cbBlob - nAnsiLenP1) / sizeof(wchar_t);
if (dbei.cbBlob >= nAnsiLenP1 * 3) {
for (int i = 0; i < nWideMaxLen; ++i) {
diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h
index 146727511f..0532e2c430 100644
--- a/plugins/HistoryStats/src/stdafx.h
+++ b/plugins/HistoryStats/src/stdafx.h
@@ -77,14 +77,14 @@ namespace ext
{
namespace w
{
- const WCHAR* const endl = L"\n";
-
- typedef std::basic_string <WCHAR> string;
- typedef std::basic_ofstream<WCHAR> ofstream;
- typedef std::basic_ostream <WCHAR> ostream;
- typedef ext::basic_strfunc <WCHAR> strfunc;
- typedef ext::basic_format <WCHAR> format;
- typedef ext::basic_kformat <WCHAR> kformat;
+ const wchar_t* const endl = L"\n";
+
+ typedef std::basic_string <wchar_t> string;
+ typedef std::basic_ofstream<wchar_t> ofstream;
+ typedef std::basic_ostream <wchar_t> ostream;
+ typedef ext::basic_strfunc <wchar_t> strfunc;
+ typedef ext::basic_format <wchar_t> format;
+ typedef ext::basic_kformat <wchar_t> kformat;
}
namespace a
diff --git a/plugins/HistoryStats/src/utf8buffer.h b/plugins/HistoryStats/src/utf8buffer.h
index 8f7d3cdddc..a661b14d39 100644
--- a/plugins/HistoryStats/src/utf8buffer.h
+++ b/plugins/HistoryStats/src/utf8buffer.h
@@ -16,10 +16,10 @@ private:
wchar_t* m_pBuf;
ext::a::ostream& m_Stream;
char* m_pUTF8Buf;
- WCHAR* m_pBufW;
+ wchar_t* m_pBufW;
#if !defined(_UNICODE)
- WCHAR m_CharMap[256];
+ wchar_t m_CharMap[256];
#endif // _UNICODE
private:
@@ -28,7 +28,7 @@ private:
size_t len = pEnd - pBegin;
#if !defined(_UNICODE)
- WCHAR* pW = m_pBufW;
+ wchar_t* pW = m_pBufW;
char* pA = m_pBuf;
while (pA < pEnd)
@@ -87,7 +87,7 @@ public:
#if defined(_UNICODE)
m_pBufW = m_pBuf;
#else // _UNICODE
- m_pBufW = new WCHAR[m_BufSize];
+ m_pBufW = new wchar_t[m_BufSize];
#endif // _UNICODE
#if !defined(_UNICODE)
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp
index a199caa059..aa656e11cb 100644
--- a/plugins/HistoryStats/src/utils.cpp
+++ b/plugins/HistoryStats/src/utils.cpp
@@ -407,7 +407,7 @@ ext::string utils::versionToDotted(DWORD version)
return temp;
}
-ext::a::string utils::convertWToA(const WCHAR* str, size_t len)
+ext::a::string utils::convertWToA(const wchar_t* str, size_t len)
{
char* buf = new char[len + 1];
@@ -424,7 +424,7 @@ ext::a::string utils::convertWToA(const WCHAR* str, size_t len)
ext::w::string utils::convertAToW(const char* str, size_t len)
{
- WCHAR* buf = new WCHAR[len + 1];
+ wchar_t* buf = new wchar_t[len + 1];
len = MultiByteToWideChar(CP_ACP, 0, str, len, buf, len);
@@ -440,17 +440,17 @@ ext::w::string utils::convertAToW(const char* str, size_t len)
ext::a::string utils::convertTToUTF8(const wchar_t* str, size_t str_len)
{
#if defined(_UNICODE)
- const WCHAR* conv_str = str;
+ const wchar_t* conv_str = str;
#else // _UNICODE
const ext::w::string conv_strX = convertAToW(str, str_len);
- const WCHAR* conv_str = conv_strX.c_str();
+ const wchar_t* conv_str = conv_strX.c_str();
#endif // _UNICODE
int len = 0;
upto_each_(i, str_len)
{
- WCHAR c = conv_str[i];
+ wchar_t c = conv_str[i];
if (c <= 0x007F) {
len++;
@@ -469,7 +469,7 @@ ext::a::string utils::convertTToUTF8(const wchar_t* str, size_t str_len)
upto_each_(i, str_len)
{
- WCHAR c = conv_str[i];
+ wchar_t c = conv_str[i];
if (c <= 0x007F) {
out_str[pos++] = (unsigned char)c;
@@ -520,15 +520,15 @@ ext::string utils::convertUTF8ToT(const char* str, size_t str_len)
unsigned char c = (unsigned char)str[in_pos];
if ((c & 0x80) == 0x00) {
- out_str[out_pos] = (WCHAR)c;
+ out_str[out_pos] = (wchar_t)c;
in_pos++;
}
else if ((c & 0xE0) == 0xC0) {
- out_str[out_pos] = (WCHAR)(((c & 0x1F) << 6) | ((unsigned char)str[in_pos + 1] & 0x3F));
+ out_str[out_pos] = (wchar_t)(((c & 0x1F) << 6) | ((unsigned char)str[in_pos + 1] & 0x3F));
in_pos += 2;
}
else if ((c & 0xF0) == 0xE0) {
- out_str[out_pos] = (WCHAR)(((c & 0x0F) << 12) | (((unsigned char)str[in_pos + 1] & 0x3F) << 6) | ((unsigned char)str[in_pos + 2] & 0x3F));
+ out_str[out_pos] = (wchar_t)(((c & 0x0F) << 12) | (((unsigned char)str[in_pos + 1] & 0x3F) << 6) | ((unsigned char)str[in_pos + 2] & 0x3F));
in_pos += 3;
}
else {
@@ -545,13 +545,13 @@ ext::string utils::convertUTF8ToT(const char* str, size_t str_len)
#endif // _UNICODE
}
-size_t utils::rawUTF8Encode(const WCHAR* pIn, size_t lenIn, char* pOut)
+size_t utils::rawUTF8Encode(const wchar_t* pIn, size_t lenIn, char* pOut)
{
char* pOutBegin = pOut;
upto_each_(i, lenIn)
{
- WCHAR c = pIn[i];
+ wchar_t c = pIn[i];
if (c <= 0x007F) {
*pOut++ = (unsigned char)c;
diff --git a/plugins/HistoryStats/src/utils.h b/plugins/HistoryStats/src/utils.h
index 8b5f6c3d9d..7e07ba6cbb 100644
--- a/plugins/HistoryStats/src/utils.h
+++ b/plugins/HistoryStats/src/utils.h
@@ -43,18 +43,18 @@ namespace utils
ext::string versionToDotted(DWORD version);
// character conversion (wide, ansi, utf8)
- ext::a::string convertWToA(const WCHAR* str, size_t len);
+ ext::a::string convertWToA(const wchar_t* str, size_t len);
ext::w::string convertAToW(const char* str, size_t len);
ext::a::string convertTToUTF8(const wchar_t* str, size_t str_len);
ext::string convertUTF8ToT(const char* str, size_t str_len);
- size_t rawUTF8Encode(const WCHAR* pIn, size_t lenIn, char* pOut);
+ size_t rawUTF8Encode(const wchar_t* pIn, size_t lenIn, char* pOut);
size_t getUTF8Len(const char* str);
// character conversion (convenience functions)
inline ext::a::string toA(const wchar_t* str) { return convertWToA(str, ext::strfunc::len(str)); }
inline ext::w::string toW(const wchar_t* str) { return str; }
inline ext::string fromA(const char* str) { return convertAToW(str, ext::a::strfunc::len(str)); }
- inline ext::string fromW(const WCHAR* str) { return str; }
+ inline ext::string fromW(const wchar_t* str) { return str; }
inline ext::a::string toA(const ext::string& str) { return convertWToA(str.c_str(), str.length()); }
inline ext::w::string toW(const ext::string& str) { return str; }
inline ext::string fromA(const ext::a::string& str) { return convertAToW(str.c_str(), str.length()); }
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index 1163503dca..842e9bc33c 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -974,7 +974,7 @@ wchar_t* IEView::getSelection()
/**
* Returns the destination url (href) of the given anchor element (or parent anchor element)
**/
-WCHAR* IEView::getHrefFromAnchor(CComPtr<IHTMLElement> element)
+wchar_t* IEView::getHrefFromAnchor(CComPtr<IHTMLElement> element)
{
if (element == nullptr)
return nullptr;
@@ -982,7 +982,7 @@ WCHAR* IEView::getHrefFromAnchor(CComPtr<IHTMLElement> element)
CComPtr<IHTMLAnchorElement> pAnchor;
if (FAILED(element.QueryInterface(&pAnchor))) {
VARIANT variant;
- WCHAR *url = nullptr;
+ wchar_t *url = nullptr;
if (SUCCEEDED(element->getAttribute(BSTR_PTR(L"href"), 2, &variant)) && variant.vt == VT_BSTR) {
url = mir_wstrdup(variant.bstrVal);
::SysFreeString(variant.bstrVal);
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h
index 57141f0b3e..87f1240d90 100644
--- a/plugins/IEView/src/IEView.h
+++ b/plugins/IEView/src/IEView.h
@@ -509,7 +509,7 @@ class IEView :public IDispatch, public IOleClientSite, public IOleInPlaceSite, p
STDMETHOD(GetZoneMappings)(DWORD dwZone, IEnumString **ppenumString, DWORD dwFlags);
IHTMLDocument2 *getDocument();
- WCHAR* getSelection();
+ wchar_t* getSelection();
wchar_t* getHrefFromAnchor(CComPtr<IHTMLElement> element);
void setBorder();
protected:
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 2cd1c94653..73e52445e6 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -828,7 +828,7 @@ INT_PTR SetNewSong(WPARAM wParam, LPARAM lParam)
((GenericPlayer *)players[GENERIC])->NewData(data, mir_wstrlen(data));
}
else {
- WCHAR *data = (WCHAR *)wParam;
+ wchar_t *data = (wchar_t *)wParam;
((GenericPlayer *)players[GENERIC])->NewData(data, mir_wstrlen(data));
}
diff --git a/plugins/ListeningTo/src/players/generic.cpp b/plugins/ListeningTo/src/players/generic.cpp
index 4e1224cf34..875fe6a916 100644
--- a/plugins/ListeningTo/src/players/generic.cpp
+++ b/plugins/ListeningTo/src/players/generic.cpp
@@ -49,7 +49,7 @@ static LRESULT CALLBACK ReceiverWndProc(HWND hWnd, UINT message, WPARAM wParam,
return FALSE;
if (singleton != nullptr)
- singleton->NewData((WCHAR *)pData->lpData, pData->cbData / 2);
+ singleton->NewData((wchar_t *)pData->lpData, pData->cbData / 2);
return TRUE;
}
@@ -99,14 +99,14 @@ void GenericPlayer::ProcessReceived()
// Do the processing
// L"<Status 0-stoped 1-playing>\\0<Player>\\0<Type>\\0<Title>\\0<Artist>\\0<Album>\\0<Track>\\0<Year>\\0<Genre>\\0<Length (secs)>\\0\\0"
- WCHAR *p1 = wcsstr(received, L"\\0");
+ wchar_t *p1 = wcsstr(received, L"\\0");
if (IsEmpty(received) || p1 == nullptr)
return;
// Process string
- WCHAR *parts[11] = {};
+ wchar_t *parts[11] = {};
int pCount = 0;
- WCHAR *p = received;
+ wchar_t *p = received;
do {
*p1 = '\0';
parts[pCount] = p;
@@ -125,7 +125,7 @@ void GenericPlayer::ProcessReceived()
Player *player = this;
for (int i = FIRST_PLAYER; i < NUM_PLAYERS; i++) {
- WCHAR *player_name = players[i]->name;
+ wchar_t *player_name = players[i]->name;
if (_wcsicmp(parts[1], player_name) == 0) {
player = players[i];
@@ -200,7 +200,7 @@ static VOID CALLBACK SendTimerProc(HWND, UINT, UINT_PTR, DWORD)
}
-void GenericPlayer::NewData(const WCHAR *data, size_t len)
+void GenericPlayer::NewData(const wchar_t *data, size_t len)
{
if (data[0] == '\0')
return;
diff --git a/plugins/ListeningTo/src/players/generic.h b/plugins/ListeningTo/src/players/generic.h
index ca5f6d90d7..3a50d84379 100644
--- a/plugins/ListeningTo/src/players/generic.h
+++ b/plugins/ListeningTo/src/players/generic.h
@@ -29,8 +29,8 @@ public:
GenericPlayer();
virtual ~GenericPlayer();
- WCHAR received[1024];
- WCHAR last_received[1024];
+ wchar_t received[1024];
+ wchar_t last_received[1024];
void ProcessReceived();
- void NewData(const WCHAR *data, size_t len);
+ void NewData(const wchar_t *data, size_t len);
};
diff --git a/plugins/ListeningTo/src/players/itunes.cpp b/plugins/ListeningTo/src/players/itunes.cpp
index 49def11904..abcde96c5d 100644
--- a/plugins/ListeningTo/src/players/itunes.cpp
+++ b/plugins/ListeningTo/src/players/itunes.cpp
@@ -134,7 +134,7 @@ BOOL ITunes::FillCache()
if (listening_info.ptszTitle == nullptr) {
// Get from filename
- WCHAR *p = wcsrchr(filename, '\\');
+ wchar_t *p = wcsrchr(filename, '\\');
if (p != nullptr)
p++;
else
diff --git a/plugins/ListeningTo/src/players/itunes.h b/plugins/ListeningTo/src/players/itunes.h
index db0a73af5a..f427c2943e 100644
--- a/plugins/ListeningTo/src/players/itunes.h
+++ b/plugins/ListeningTo/src/players/itunes.h
@@ -28,7 +28,7 @@ extern "C"
class ITunes : public Player
{
protected:
- WCHAR filename[1024];
+ wchar_t filename[1024];
HWND hwnd;
IiTunes *iTunesApp;
diff --git a/plugins/ListeningTo/src/players/wmp.cpp b/plugins/ListeningTo/src/players/wmp.cpp
index 89f0a3bce1..5a4cd7fd95 100644
--- a/plugins/ListeningTo/src/players/wmp.cpp
+++ b/plugins/ListeningTo/src/players/wmp.cpp
@@ -66,7 +66,7 @@ void WindowsMediaPlayer::ProcessReceived()
// MSNMusicString = L"\\0Music\\0%d\\0%s\\0%s\\0%s\\0%s\\0%s\\0\\0"
// MSNMusicString, msn->msncommand, strMSNFormat, msn->title, msn->artist, msn->album, msn->wmcontentid);
- WCHAR *p1 = wcsstr(received, L"\\0");
+ wchar_t *p1 = wcsstr(received, L"\\0");
if (received[0] == L'\0' || p1 == nullptr) {
NotifyInfoChanged();
@@ -74,9 +74,9 @@ void WindowsMediaPlayer::ProcessReceived()
}
// Process string
- WCHAR *parts[8] = {};
+ wchar_t *parts[8] = {};
int pCount = 0;
- WCHAR *p = received;
+ wchar_t *p = received;
do {
*p1 = L'\0';
parts[pCount] = p;
@@ -123,7 +123,7 @@ static VOID CALLBACK SendTimerProc(HWND, UINT, UINT_PTR, DWORD)
singleton->ProcessReceived();
}
-void WindowsMediaPlayer::NewData(const WCHAR *data, size_t len)
+void WindowsMediaPlayer::NewData(const wchar_t *data, size_t len)
{
mir_cslock lck(cs);
@@ -152,7 +152,7 @@ static LRESULT CALLBACK ReceiverWndProc(HWND hWnd, UINT message, WPARAM wParam,
return FALSE;
if (singleton != nullptr)
- singleton->NewData((WCHAR *)pData->lpData, pData->cbData / 2);
+ singleton->NewData((wchar_t *)pData->lpData, pData->cbData / 2);
return TRUE;
}
diff --git a/plugins/ListeningTo/src/players/wmp.h b/plugins/ListeningTo/src/players/wmp.h
index 954104bcca..f7702a9ea0 100644
--- a/plugins/ListeningTo/src/players/wmp.h
+++ b/plugins/ListeningTo/src/players/wmp.h
@@ -24,12 +24,12 @@ class WindowsMediaPlayer : public Player
{
protected:
HWND hWnd;
- WCHAR received[1024];
+ wchar_t received[1024];
public:
WindowsMediaPlayer();
virtual ~WindowsMediaPlayer();
void ProcessReceived();
- void NewData(const WCHAR *data, size_t len);
+ void NewData(const wchar_t *data, size_t len);
};
diff --git a/plugins/ListeningTo/src/stdafx.h b/plugins/ListeningTo/src/stdafx.h
index 1f996ec4a1..60dc3294ef 100644
--- a/plugins/ListeningTo/src/stdafx.h
+++ b/plugins/ListeningTo/src/stdafx.h
@@ -108,7 +108,7 @@ static bool IsEmpty(const char *str)
{
return str == nullptr || str[0] == 0;
}
-static bool IsEmpty(const WCHAR *str)
+static bool IsEmpty(const wchar_t *str)
{
return str == nullptr || str[0] == 0;
}
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp
index 2a72d98300..7e709e65f7 100644
--- a/plugins/MirFox/src/MirandaOptions.cpp
+++ b/plugins/MirFox/src/MirandaOptions.cpp
@@ -133,7 +133,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
int opt2Len = SendDlgItemMessage(hwndDlg, IDC1_EDIT1, WM_GETTEXTLENGTH, 0, 0);
- wchar_t * opt2Buffer = new WCHAR[opt2Len+1];
+ wchar_t * opt2Buffer = new wchar_t[opt2Len+1];
UINT opt2NumCharCopy = GetDlgItemText(hwndDlg, IDC1_EDIT1, opt2Buffer, opt2Len+1);
mirfoxMiranda.getMirfoxData().getClientsProfilesFilterStringPtr()->assign(opt2Buffer);
delete[] opt2Buffer;
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.cpp b/plugins/MirandaG15/src/LCDFramework/misc.cpp
index deb4430545..97aaeea30f 100644
--- a/plugins/MirandaG15/src/LCDFramework/misc.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/misc.cpp
@@ -93,14 +93,14 @@ tstring Utf8_Decode(const char *str)
int i;
char *p;
- WCHAR *wszTemp = nullptr;
+ wchar_t *wszTemp = nullptr;
if (str == nullptr)
return strRes;
size_t len = mir_strlen(str);
- if ((wszTemp = (WCHAR *)malloc(sizeof(wchar_t) * (len + 2))) == nullptr)
+ if ((wszTemp = (wchar_t *)malloc(sizeof(wchar_t) * (len + 2))) == nullptr)
return strRes;
p = (char *)str;
@@ -131,13 +131,13 @@ tstring Utf8_Decode(const char *str)
* free() the return value
*/
-string Utf8_Encode(const WCHAR *str)
+string Utf8_Encode(const wchar_t *str)
{
string strRes = "";
unsigned char *szOut = nullptr;
int len, i;
- const WCHAR *wszTemp, *w;
+ const wchar_t *wszTemp, *w;
if (str == nullptr)
return strRes;
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.h b/plugins/MirandaG15/src/LCDFramework/misc.h
index 3707ef3a34..3949b72567 100644
--- a/plugins/MirandaG15/src/LCDFramework/misc.h
+++ b/plugins/MirandaG15/src/LCDFramework/misc.h
@@ -57,8 +57,8 @@ inline std::string toNarrowString( const std::string& str )
extern tstring Utf8_Decode(const char *str);
-// extern WCHAR *Utf8_Decode(const char *str);
- extern string Utf8_Encode(const WCHAR *str);
+// extern wchar_t *Utf8_Decode(const char *str);
+ extern string Utf8_Encode(const wchar_t *str);
#else
#define tstring string
inline wchar_t toTchar( char ch )
diff --git a/plugins/NewAwaySysMod/src/CString.cpp b/plugins/NewAwaySysMod/src/CString.cpp
index 69edcf49fc..90a1c7878e 100644
--- a/plugins/NewAwaySysMod/src/CString.cpp
+++ b/plugins/NewAwaySysMod/src/CString.cpp
@@ -269,7 +269,7 @@ TString<T>& TString<T>::operator=(const T *pStr)
template class TString<wchar_t>;
template class TString<char>;
-template class TString<WCHAR>;
+template class TString<wchar_t>;
CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue)
{
diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h
index e079b740cd..730e92bbf5 100644
--- a/plugins/NewAwaySysMod/src/CString.h
+++ b/plugins/NewAwaySysMod/src/CString.h
@@ -98,18 +98,18 @@ private:
typedef TString<wchar_t> TCString;
typedef TString<char> CString;
-typedef TString<WCHAR> WCString;
+typedef TString<wchar_t> WCString;
#ifdef CHARARRAY_CONVERT
__inline CHARARRAY WCHAR2ANSI_ARRAY(CHARARRAY &c)
{
CHARARRAY Result;
- int Len = WideCharToMultiByte(CP_ACP, 0, (WCHAR*)c.GetData(), c.GetSize() / sizeof(WCHAR), NULL, 0, NULL, NULL);
+ int Len = WideCharToMultiByte(CP_ACP, 0, (wchar_t*)c.GetData(), c.GetSize() / sizeof(wchar_t), NULL, 0, NULL, NULL);
if (Len)
{
Result.SetAtGrow(Len - 1);
- if (!WideCharToMultiByte(CP_ACP, 0, (WCHAR*)c.GetData(), c.GetSize() / sizeof(WCHAR), Result.GetData(), Len, NULL, NULL))
+ if (!WideCharToMultiByte(CP_ACP, 0, (wchar_t*)c.GetData(), c.GetSize() / sizeof(wchar_t), Result.GetData(), Len, NULL, NULL))
{
Result.RemoveAll();
}
@@ -127,8 +127,8 @@ __inline CHARARRAY ANSI2WCHAR_ARRAY(CHARARRAY &c)
int Len = MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), NULL, 0);
if (Len)
{
- Result.SetAtGrow(Len * sizeof(WCHAR) - 1);
- if (!MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), (WCHAR*)Result.GetData(), Len))
+ Result.SetAtGrow(Len * sizeof(wchar_t) - 1);
+ if (!MultiByteToWideChar(CP_ACP, 0, c.GetData(), c.GetSize(), (wchar_t*)Result.GetData(), Len))
{
Result.RemoveAll();
}
diff --git a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
index 8fda499b09..d73f7acd4d 100644
--- a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
+++ b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
@@ -88,7 +88,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
HFONT hOldFont = (HFONT)SelectObject(hdc, dat->hFont);
RECT rcText = { 0 };
if (hTheme) {
- WCHAR *szText = (WCHAR*)_alloca(Len * sizeof(WCHAR));
+ wchar_t *szText = (wchar_t*)_alloca(Len * sizeof(wchar_t));
GetWindowTextW(hWnd, szText, Len);
GetThemeTextExtent(hTheme, hdc, BP_GROUPBOX, IsWindowEnabled(hWnd) ? GBS_NORMAL : GBS_DISABLED, szText, -1, DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_SINGLELINE, nullptr, &rcText);
}
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp
index 52f4f55fc8..32411224e4 100644
--- a/plugins/NewAwaySysMod/src/Services.cpp
+++ b/plugins/NewAwaySysMod/src/Services.cpp
@@ -28,7 +28,7 @@ struct NAS_PROTOINFOv1
char *szProto;
union {
char *szMsg;
- WCHAR *wszMsg;
+ wchar_t *wszMsg;
wchar_t *tszMsg;
};
WORD status;
@@ -53,7 +53,7 @@ __inline void PSSetStatus(char *szProto, WORD Status, int bNoClistSetStatusMode
INT_PTR GetStatusMsgW(WPARAM wParam, LPARAM)
{
LogMessage("MS_AWAYMSG_GETSTATUSMSGW called. status=%d", wParam);
- WCHAR *szMsg = mir_wstrdup(GetDynamicStatMsg(INVALID_CONTACT_ID, nullptr, 0, wParam));
+ wchar_t *szMsg = mir_wstrdup(GetDynamicStatMsg(INVALID_CONTACT_ID, nullptr, 0, wParam));
LogMessage("returned szMsgW:\n%S", szMsg ? szMsg : L"NULL");
return (INT_PTR)szMsg;
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 2992e620d2..b9f493172c 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -104,7 +104,7 @@ static int __inline CheckStr(char *str, int not_empty, int empty)
return not_empty;
}
-static int __inline CheckStrW(WCHAR *str, int not_empty, int empty)
+static int __inline CheckStrW(wchar_t *str, int not_empty, int empty)
{
if (str == nullptr || str[0] == L'\0')
return empty;
diff --git a/plugins/PasteIt/src/PasteToWeb.cpp b/plugins/PasteIt/src/PasteToWeb.cpp
index 536bf8001f..738394efdf 100644
--- a/plugins/PasteIt/src/PasteToWeb.cpp
+++ b/plugins/PasteIt/src/PasteToWeb.cpp
@@ -259,7 +259,7 @@ void PasteToWeb::FromClipboard()
isFile = 1;
if (df->fWide) {
// Unicode
- WCHAR* file = (WCHAR*)((BYTE*)obj + df->pFiles);
+ wchar_t* file = (wchar_t*)((BYTE*)obj + df->pFiles);
size_t len = mir_wstrlen(file);
if (*(file + len + 1) == L'\0') {
str.append(file, file + len);
diff --git a/plugins/QuickReplies/src/options.cpp b/plugins/QuickReplies/src/options.cpp
index f64a5e0391..e3c1df2cad 100644
--- a/plugins/QuickReplies/src/options.cpp
+++ b/plugins/QuickReplies/src/options.cpp
@@ -35,13 +35,13 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) { // ctrl-backspace
DWORD start, end;
- WCHAR text[1024];
+ wchar_t text[1024];
SendMessage(hwnd, EM_GETSEL, (WPARAM)&end, 0);
SendMessage(hwnd, WM_KEYDOWN, VK_LEFT, 0);
SendMessage(hwnd, EM_GETSEL, (WPARAM)&start, 0);
GetWindowText(hwnd, text, _countof(text));
- memmove(text + start, text + end, sizeof(WCHAR)*(mir_wstrlen(text) + 1 - end));
+ memmove(text + start, text + end, sizeof(wchar_t)*(mir_wstrlen(text) + 1 - end));
SetWindowText(hwnd, text);
SendMessage(hwnd, EM_SETSEL, start, start);
SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwnd), EN_CHANGE), (LPARAM)hwnd);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index f0914bd2cd..7d773d201b 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -169,12 +169,12 @@ static void freeEvent(EventData *evt)
mir_free(evt);
}
-static int AppendUnicodeOrAnsiiToBufferL(CMStringA &buf, const WCHAR *line, size_t maxLen, BOOL isAnsii)
+static int AppendUnicodeOrAnsiiToBufferL(CMStringA &buf, const wchar_t *line, size_t maxLen, BOOL isAnsii)
{
if (maxLen == -1)
maxLen = mir_wstrlen(line);
- const WCHAR *maxLine = line + maxLen;
+ const wchar_t *maxLine = line + maxLen;
if (isAnsii)
buf.Append("{");
@@ -223,7 +223,7 @@ static int AppendAnsiToBuffer(CMStringA &buf, const char *line)
return AppendUnicodeOrAnsiiToBufferL(buf, _A2T(line), -1, true);
}
-static int AppendUnicodeToBuffer(CMStringA &buf, const WCHAR *line)
+static int AppendUnicodeToBuffer(CMStringA &buf, const wchar_t *line)
{
return AppendUnicodeOrAnsiiToBufferL(buf, line, -1, false);
}
@@ -348,7 +348,7 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf)
return;
BOOL isAnsii = (evt->dwFlags & IEEDF_UNICODE_TEXT) == 0;
- WCHAR *wText;
+ wchar_t *wText;
size_t len;
if (isAnsii) {
len = mir_strlen(evt->szText.a);
diff --git a/plugins/SecureIM/src/mmi.cpp b/plugins/SecureIM/src/mmi.cpp
index d1608069b5..aa6e048882 100644
--- a/plugins/SecureIM/src/mmi.cpp
+++ b/plugins/SecureIM/src/mmi.cpp
@@ -25,11 +25,11 @@ char* m_wwstrcat(LPCSTR strA, LPCSTR strB)
{
int lenA = (int)mir_strlen(strA);
int lenB = (int)mir_strlen(strB);
- LPSTR str = (LPSTR)mir_alloc((lenA + lenB + 1)*(sizeof(WCHAR) + 1));
+ LPSTR str = (LPSTR)mir_alloc((lenA + lenB + 1)*(sizeof(wchar_t) + 1));
memcpy(str, strA, lenA);
memcpy(str + lenA, strB, lenB + 1);
- memcpy(str + lenA + lenB + 1, strA + lenA + 1, lenA*sizeof(WCHAR));
- memcpy(str + lenA + lenB + 1 + lenA*sizeof(WCHAR), strB + lenB + 1, (lenB + 1)*sizeof(WCHAR));
+ memcpy(str + lenA + lenB + 1, strA + lenA + 1, lenA*sizeof(wchar_t));
+ memcpy(str + lenA + lenB + 1 + lenA*sizeof(wchar_t), strB + lenB + 1, (lenB + 1)*sizeof(wchar_t));
return str;
}
@@ -37,9 +37,9 @@ char* m_wwstrcat(LPCSTR strA, LPCSTR strB)
char* m_awstrcat(LPCSTR strA, LPCSTR strB)
{
int lenA = (int)mir_strlen(strA);
- LPSTR tmpA = (LPSTR)mir_alloc((lenA + 1)*(sizeof(WCHAR) + 1));
+ LPSTR tmpA = (LPSTR)mir_alloc((lenA + 1)*(sizeof(wchar_t) + 1));
mir_strcpy(tmpA, strA);
- MultiByteToWideChar(CP_ACP, 0, strA, -1, (LPWSTR)(tmpA + lenA + 1), (lenA + 1)*sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, strA, -1, (LPWSTR)(tmpA + lenA + 1), (lenA + 1)*sizeof(wchar_t));
LPSTR str = m_wwstrcat(tmpA, strB);
mir_free(tmpA);
return str;
@@ -50,10 +50,10 @@ char* m_aastrcat(LPCSTR strA, LPCSTR strB)
{
int lenA = (int)mir_strlen(strA);
int lenB = (int)mir_strlen(strB);
- LPSTR str = (LPSTR)mir_alloc((lenA + lenB + 1)*(sizeof(WCHAR) + 1));
+ LPSTR str = (LPSTR)mir_alloc((lenA + lenB + 1)*(sizeof(wchar_t) + 1));
mir_strcpy(str, strA);
mir_strcat(str, strB);
- MultiByteToWideChar(CP_ACP, 0, str, -1, (LPWSTR)(str + lenA + lenB + 1), (lenA + lenB + 1)*sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, str, -1, (LPWSTR)(str + lenA + lenB + 1), (lenA + lenB + 1)*sizeof(wchar_t));
return str;
}
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index e1b7969d2c..6f1428d55d 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -361,7 +361,7 @@ void SaveGIF(HBITMAP hBmp, const wchar_t *szFilename)
CLSID clsidEncoder;
if (GetEncoderClsid(L"image/gif", clsidEncoder)) {
LPWSTR pswFile = mir_wstrdup(szFilename);
- pBitmap->Save((const WCHAR*)pswFile, &clsidEncoder, nullptr);
+ pBitmap->Save((const wchar_t*)pswFile, &clsidEncoder, nullptr);
mir_free(pswFile);
}
delete pBitmap;
@@ -402,7 +402,7 @@ void SaveTIF(HBITMAP hBmp, const wchar_t *szFilename)
EncParams->Parameter[1].Value = &ulColorDepth;
LPWSTR pswFile = mir_wstrdup(szFilename);
- stat = pBitmap->Save((const WCHAR*)pswFile, &EncCLSID, EncParams);
+ stat = pBitmap->Save((const wchar_t*)pswFile, &EncCLSID, EncParams);
mir_free(pswFile);
free(EncParams);
}
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
index 1eb38d2747..e36dfc347f 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
@@ -159,7 +159,7 @@ static void __fastcall PaintIcon(BTNCTRL *ctl, HDC hdcMem, LPWORD ccText, LPRECT
static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient)
{
RECT rcText = { 0, 0, 0, 0 };
- WCHAR wszText[MAX_PATH] = { 0 };
+ wchar_t wszText[MAX_PATH] = { 0 };
WORD ccText;
// Draw the flat button
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index d804b2336a..28b412000e 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -423,7 +423,7 @@ protected:
wchar_t* fromHunspell(const char *hunspellWord)
{
int len = MultiByteToWideChar(codePage, 0, hunspellWord, -1, nullptr, 0);
- WCHAR *ret = (WCHAR *)malloc((len + 1) * sizeof(WCHAR));
+ wchar_t *ret = (wchar_t *)malloc((len + 1) * sizeof(wchar_t));
MultiByteToWideChar(codePage, 0, hunspellWord, -1, ret, len + 1);
return ret;
}
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index 43d6c6a6a0..3ea1c7736b 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -144,7 +144,7 @@ wchar_t* ReqGetText(DBEVENTINFO* dbei)
char * tstr = (char *)mir_alloc(len + 1);
memcpy(tstr, ptr, len);
tstr[len] = 0;
- WCHAR* msg = nullptr;
+ wchar_t* msg = nullptr;
msg = (dbei->flags&DBEF_UTF) ? mir_utf8decodeW(tstr) : mir_a2u(tstr);
mir_free(tstr);
return (wchar_t *)msg;
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index e6f948f2ef..b13bd5c0af 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -78,12 +78,12 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
tstring message;
if (dbei->flags & DBEF_UTF) {
- WCHAR* msg_u = mir_utf8decodeW((char*)dbei->pBlob);
+ wchar_t* msg_u = mir_utf8decodeW((char*)dbei->pBlob);
message = msg_u;
mir_free(msg_u);
}
else {
- WCHAR* msg_u = mir_a2u((char*)(dbei->pBlob));
+ wchar_t* msg_u = mir_a2u((char*)(dbei->pBlob));
message = msg_u;
mir_free(msg_u);
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 1a4ef3b14d..6fff571a35 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -631,7 +631,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
lvi.iSubItem = 0;
lvi.iItem = lvi.lParam = accs.indexOf(&pa);
- WCHAR wszProto[128];
+ wchar_t wszProto[128];
long lLen = MultiByteToWideChar(CP_ACP, 0, pa->szModuleName, (int)mir_strlen(pa->szModuleName), wszProto, _countof(wszProto));
wszProto[lLen] = L'\0';
@@ -814,7 +814,7 @@ wchar_t* CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, wchar
memset(szString, 0, iBufSize*sizeof(wchar_t));
- WCHAR wszProto[32];
+ wchar_t wszProto[32];
long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, (int)mir_strlen(szProto), wszProto, _countof(wszProto));
wszProto[lLen] = '\0';
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp
index 07ba971802..4db6ec100a 100644
--- a/plugins/UserInfoEx/src/ctrl_button.cpp
+++ b/plugins/UserInfoEx/src/ctrl_button.cpp
@@ -155,7 +155,7 @@ static void __fastcall PaintIcon(BTNCTRL *ctl, HDC hdcMem, LPWORD ccText, LPRECT
static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient)
{
RECT rcText = { 0, 0, 0, 0 };
- WCHAR wszText[MAX_PATH] = { 0 };
+ wchar_t wszText[MAX_PATH] = { 0 };
WORD ccText;
// Draw the flat button
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index 6733e4940d..17cb4a180f 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -163,7 +163,7 @@ size_t CLineBuffer::operator + (const CHAR *szVal)
* return: length of the string, added
**/
-size_t CLineBuffer::operator + (const WCHAR *wszVal)
+size_t CLineBuffer::operator + (const wchar_t *wszVal)
{
if (wszVal) {
CHAR *szVal = mir_u2a(wszVal);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
index 13822c3507..cea4cc9067 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
@@ -38,7 +38,7 @@ public:
size_t operator=(const CHAR *szVal);
size_t operator + (const CHAR *szVal);
- size_t operator + (const WCHAR *wszVal);
+ size_t operator + (const wchar_t *wszVal);
size_t operator + (const CHAR cVal);
size_t operator + (const BYTE bVal);
size_t operator + (const SHORT sVal);
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index f237952e40..cb69877cfb 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -434,7 +434,7 @@ BYTE dbv2String(DBVARIANT* dbv, const BYTE destType)
if (dbv == nullptr)
return 1;
- WCHAR wbuf[32];
+ wchar_t wbuf[32];
CHAR buf[32];
switch (destType) {
// destination type is "utf8" or "ascii"
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp
index 14a1d1c247..e8f80dd237 100644
--- a/plugins/UserInfoEx/src/svc_avatar.cpp
+++ b/plugins/UserInfoEx/src/svc_avatar.cpp
@@ -46,7 +46,7 @@ namespace NServices
if (!mtb.DBGetBirthDate(hContact)) {
MZodiac zodiac;
//ICONINFO iinfo;
- WCHAR szFileName[MAX_PATH];
+ wchar_t szFileName[MAX_PATH];
// get zodiac for birthday
zodiac = mtb.Zodiac();
diff --git a/plugins/Watrack_MPD/src/main.cpp b/plugins/Watrack_MPD/src/main.cpp
index 7dc75f5c73..fb5d454ab5 100755
--- a/plugins/Watrack_MPD/src/main.cpp
+++ b/plugins/Watrack_MPD/src/main.cpp
@@ -300,7 +300,7 @@ int GetStatus(HWND)
return Parser() ? -1 : gbState;
}
-WCHAR* GetFileName(HWND, int)
+wchar_t* GetFileName(HWND, int)
{
if(!ghConnection)
{
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.cpp b/plugins/WinterSpeak/src/ConfigDatabase.cpp
index 3b626691a4..65d419e708 100644
--- a/plugins/WinterSpeak/src/ConfigDatabase.cpp
+++ b/plugins/WinterSpeak/src/ConfigDatabase.cpp
@@ -125,7 +125,7 @@ void ConfigDatabase::save()
//------------------------------------------------------------------------------
// private:
//------------------------------------------------------------------------------
-std::wstring ConfigDatabase::DBGetContactSettingString(const char *szModule, const char *szSetting, const WCHAR *def)
+std::wstring ConfigDatabase::DBGetContactSettingString(const char *szModule, const char *szSetting, const wchar_t *def)
{
std::wstring ret = def;
DBVARIANT dbv;
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.h b/plugins/WinterSpeak/src/ConfigDatabase.h
index 4e7f546aa1..ff511206aa 100644
--- a/plugins/WinterSpeak/src/ConfigDatabase.h
+++ b/plugins/WinterSpeak/src/ConfigDatabase.h
@@ -68,7 +68,7 @@ private:
// def - default string if entry doesn't exist
//--------------------------------------------------------------------------
static std::wstring DBGetContactSettingString(const char *szModule,
- const char *szSetting, const WCHAR *def);
+ const char *szSetting, const wchar_t *def);
VoiceDesc m_voice_desc;
unsigned int m_active_flags;
diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.cpp b/plugins/WinterSpeak/src/DialogConfigEngine.cpp
index 8041453eb7..896a091766 100644
--- a/plugins/WinterSpeak/src/DialogConfigEngine.cpp
+++ b/plugins/WinterSpeak/src/DialogConfigEngine.cpp
@@ -136,7 +136,7 @@ void DialogConfigEngine::save(HWND window)
m_db.setVoiceDesc(desc);
// store the welcome message
- WCHAR *text = Hlp_GetDlgItemText(window, IDC_WELCOME_MSG);
+ wchar_t *text = Hlp_GetDlgItemText(window, IDC_WELCOME_MSG);
m_db.setWelcomeMessage(text);
}
@@ -180,11 +180,11 @@ void DialogConfigEngine::updateVoices(HWND window)
void DialogConfigEngine::getVoiceDesc(HWND window, VoiceDesc &desc)
{
// get the engine
- WCHAR *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE);
+ wchar_t *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE);
desc.engine = text;
// get the voice
- WCHAR *voice = Hlp_GetDlgItemText(window, IDC_SELECT_VOICE);
+ wchar_t *voice = Hlp_GetDlgItemText(window, IDC_SELECT_VOICE);
desc.voice = voice;
/*std::auto_ptr<char> voice(new char[50]);
SendDlgItemMessage(window, IDC_SELECT_VOICE, CB_GETLBTEXT,
@@ -201,7 +201,7 @@ void DialogConfigEngine::getVoiceDesc(HWND window, VoiceDesc &desc)
//------------------------------------------------------------------------------
std::wstring DialogConfigEngine::getEngine(HWND window)
{
- WCHAR *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE);
+ wchar_t *text = Hlp_GetDlgItemText(window, IDC_SELECT_ENGINE);
/*char text[100];
GetDlgItemText(window, IDC_SELECT_ENGINE, mir_a2u(text), _countof(text));*/
diff --git a/plugins/WinterSpeak/src/EventInformation.cpp b/plugins/WinterSpeak/src/EventInformation.cpp
index cb503f377a..becb758c95 100644
--- a/plugins/WinterSpeak/src/EventInformation.cpp
+++ b/plugins/WinterSpeak/src/EventInformation.cpp
@@ -71,7 +71,7 @@ std::wstring EventInformation::getMessage()
//------------------------------------------------------------------------------
size_t EventInformation::getMessageSize()
{
- return std::wstring((WCHAR *)m_event_info.pBlob).size();
+ return std::wstring((wchar_t *)m_event_info.pBlob).size();
}
//------------------------------------------------------------------------------
diff --git a/plugins/WinterSpeak/src/MirandaDialog.cpp b/plugins/WinterSpeak/src/MirandaDialog.cpp
index 646b8a198e..b42a580296 100644
--- a/plugins/WinterSpeak/src/MirandaDialog.cpp
+++ b/plugins/WinterSpeak/src/MirandaDialog.cpp
@@ -16,14 +16,14 @@ void MirandaDialog::changed(HWND window)
SendMessage(GetParent(window), PSM_CHANGED, 0, 0);
}
-WCHAR *MirandaDialog::Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) {
+wchar_t *MirandaDialog::Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) {
int len = SendDlgItemMessage(hwndDlg, nIDDlgItem, WM_GETTEXTLENGTH, 0, 0);
if (len < 0)
return nullptr;
- WCHAR *res = (WCHAR*)mir_alloc((len+1)*sizeof(WCHAR));
- memset(res, 0, ((len + 1) * sizeof(WCHAR)));
+ wchar_t *res = (wchar_t*)mir_alloc((len+1)*sizeof(wchar_t));
+ memset(res, 0, ((len + 1) * sizeof(wchar_t)));
GetDlgItemText(hwndDlg, nIDDlgItem, res, len+1);
return res;
diff --git a/plugins/WinterSpeak/src/MirandaDialog.h b/plugins/WinterSpeak/src/MirandaDialog.h
index 5b66634eb4..91c518c242 100644
--- a/plugins/WinterSpeak/src/MirandaDialog.h
+++ b/plugins/WinterSpeak/src/MirandaDialog.h
@@ -4,7 +4,7 @@ class MirandaDialog : private MNonCopyable
public:
MirandaDialog(void);
virtual ~MirandaDialog(void);
- static WCHAR *Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem);
+ static wchar_t *Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem);
static int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId);
protected:
void changed(HWND window);
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp
index 2c92ba48a6..b562e45369 100644
--- a/plugins/WinterSpeak/src/SpeechApi40a.cpp
+++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp
@@ -92,8 +92,8 @@ bool SpeechApi40a::say(const std::wstring &sentence)
}
else {
SDATA data;
- data.dwSize = (DWORD)(sentence.size() * sizeof(WCHAR));
- data.pData = (WCHAR *)sentence.c_str();
+ data.dwSize = (DWORD)(sentence.size() * sizeof(wchar_t));
+ data.pData = (wchar_t *)sentence.c_str();
m_tts_central->TextData(CHARSET_TEXT, 0, data, nullptr, IID_ITTSBufNotifySinkA);
}
diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp
index 7769261257..cd3fa4323f 100644
--- a/plugins/WinterSpeak/src/UserInformation.cpp
+++ b/plugins/WinterSpeak/src/UserInformation.cpp
@@ -46,7 +46,7 @@ std::wstring UserInformation::statusString(MCONTACT user)
//------------------------------------------------------------------------------
std::wstring UserInformation::statusModeString(MCONTACT user)
{
- WCHAR *status = Clist_GetStatusModeDescription(m_status_info[user], 0);
+ wchar_t *status = Clist_GetStatusModeDescription(m_status_info[user], 0);
if (nullptr == status)
return L"";
@@ -63,7 +63,7 @@ void UserInformation::insertName(std::wstring &str, MCONTACT user) const
//------------------------------------------------------------------------------
std::wstring UserInformation::nameString(MCONTACT hContact) const
{
- WCHAR *ret = Clist_GetContactDisplayName(hContact);
+ wchar_t *ret = Clist_GetContactDisplayName(hContact);
if (nullptr == ret)
return L"";
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp
index 316ae9510b..0419710736 100644
--- a/plugins/WinterSpeak/src/main.cpp
+++ b/plugins/WinterSpeak/src/main.cpp
@@ -32,12 +32,12 @@ CMPlugin::CMPlugin() :
//-----------------------------------------------------------------------------
INT_PTR status(WPARAM wParam, LPARAM lParam)
{
- return g_speak_config->status(reinterpret_cast<WCHAR *>(lParam), MCONTACT(wParam));
+ return g_speak_config->status(reinterpret_cast<wchar_t *>(lParam), MCONTACT(wParam));
}
INT_PTR message(WPARAM wParam, LPARAM lParam)
{
- return g_speak_config->message(reinterpret_cast<WCHAR *>(lParam), MCONTACT(wParam));
+ return g_speak_config->message(reinterpret_cast<wchar_t *>(lParam), MCONTACT(wParam));
}
//-----------------------------------------------------------------------------
diff --git a/protocols/Facebook/src/avatars.cpp b/protocols/Facebook/src/avatars.cpp
index 6a593b8be8..c6eb367ecb 100644
--- a/protocols/Facebook/src/avatars.cpp
+++ b/protocols/Facebook/src/avatars.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void FacebookProto::GetAvatarFilename(MCONTACT hContact, wchar_t *pwszFileName)
{
- WCHAR wszPath[MAX_PATH];
+ wchar_t wszPath[MAX_PATH];
mir_snwprintf(wszPath, MAX_PATH, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName);
CreateDirectoryTreeW(wszPath);
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp
index 94a9fc9c95..31b44d4414 100644
--- a/protocols/JabberG/src/jabber_console.cpp
+++ b/protocols/JabberG/src/jabber_console.cpp
@@ -40,7 +40,7 @@ struct StringBuf
};
static void sttAppendBufRaw(StringBuf *buf, const char *str);
-static void sttAppendBufW(StringBuf *buf, const WCHAR *str);
+static void sttAppendBufW(StringBuf *buf, const wchar_t *str);
#define sttAppendBufT(a,b) (sttAppendBufW((a),(b)))
static void sttEmptyBuf(StringBuf *buf);
@@ -149,14 +149,14 @@ static void sttAppendBufRaw(StringBuf *buf, const char *str)
buf->offset += length;
}
-static void sttAppendBufW(StringBuf *buf, const WCHAR *str)
+static void sttAppendBufW(StringBuf *buf, const wchar_t *str)
{
char tmp[32];
if (!str) return;
sttAppendBufRaw(buf, "{\\uc1 ");
- for (const WCHAR *p = str; *p; ++p) {
+ for (const wchar_t *p = str; *p; ++p) {
if ((*p == '\\') || (*p == '{') || (*p == '}')) {
tmp[0] = '\\';
tmp[1] = (char)*p;
diff --git a/protocols/JabberG/src/jabber_disco.h b/protocols/JabberG/src/jabber_disco.h
index 4b8eb25715..9ea232b38c 100644
--- a/protocols/JabberG/src/jabber_disco.h
+++ b/protocols/JabberG/src/jabber_disco.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _JABBER_DISCO_H_
#define _JABBER_DISCO_H_
-#define CHR_BULLET ((WCHAR)0x2022)
+#define CHR_BULLET ((wchar_t)0x2022)
// #define STR_BULLET L" \u2022 "
#define JABBER_DISCO_RESULT_NOT_REQUESTED 0
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index 1ec3c80106..1197453440 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -288,7 +288,7 @@ INT_PTR __cdecl CJabberProto::JabberSetAvatar(WPARAM, LPARAM lParam)
INT_PTR __cdecl CJabberProto::JabberSetNickname(WPARAM wParam, LPARAM lParam)
{
- wchar_t *nickname = (wParam & SMNN_UNICODE) ? mir_wstrdup((WCHAR*)lParam) : mir_a2u((char*)lParam);
+ wchar_t *nickname = (wParam & SMNN_UNICODE) ? mir_wstrdup((wchar_t*)lParam) : mir_a2u((char*)lParam);
setWString("Nick", nickname);
SetServerVcard(FALSE, L"");
diff --git a/protocols/LotusNotify/src/LotusNotify.cpp b/protocols/LotusNotify/src/LotusNotify.cpp
index 4da1bb7c6f..2412022516 100644
--- a/protocols/LotusNotify/src/LotusNotify.cpp
+++ b/protocols/LotusNotify/src/LotusNotify.cpp
@@ -466,13 +466,13 @@ void showMsg(wchar_t* sender,wchar_t* text, DWORD id, char *strUID)
//what to do with error msg
-void ErMsgW(WCHAR* msg)
+void ErMsgW(wchar_t* msg)
{
wchar_t* msgT = mir_wstrdup(msg);
ErMsgT(msgT);
mir_free(msgT);
}
-///TODO wchar_t->WCHAR and test
+///TODO wchar_t->wchar_t and test
void ErMsgT(wchar_t* msg)
{
log_p(L"Error: %S", msg);
@@ -492,7 +492,7 @@ void ErMsgByLotusCode(STATUS erno)
{
char far error_text_LMBCS[200];
char far error_text_UNICODEatCHAR[400];
- WCHAR far error_text_UNICODE[200];
+ wchar_t far error_text_UNICODE[200];
WORD text_len;
text_len = OSLoadString1(NULLHANDLE, erno, error_text_LMBCS, sizeof(error_text_LMBCS)-1);
@@ -553,7 +553,7 @@ void checkthread(void*)
char field_lotus_LMBCS[MAX_FIELD];
char field_lotus_UNICODEatCHAR[MAX_FIELD * sizeof(wchar_t)];
- WCHAR field_from_UNICODE[MAX_FIELD], field_subject_UNICODE[MAX_FIELD], field_to_UNICODE[MAX_FIELD],field_copy_UNICODE[MAX_FIELD];
+ wchar_t field_from_UNICODE[MAX_FIELD], field_subject_UNICODE[MAX_FIELD], field_to_UNICODE[MAX_FIELD],field_copy_UNICODE[MAX_FIELD];
mir_cslock lck(checkthreadCS);
log(L"checkthread: inside new check thread");
@@ -729,7 +729,7 @@ void checkthread(void*)
field_copy_UNICODE[field_len] = '\0';
- WCHAR msgFrom[512], msgSubject[512];
+ wchar_t msgFrom[512], msgSubject[512];
memset(msgFrom, 0, sizeof(msgFrom));
memset(msgSubject, 0, sizeof(msgSubject));
@@ -764,7 +764,7 @@ void checkthread(void*)
if (attSize) {
- WCHAR field_attachments_UNICODE[MAX_FIELD];
+ wchar_t field_attachments_UNICODE[MAX_FIELD];
mir_snwprintf(field_attachments_UNICODE, TranslateT("Attachments: %d bytes"), attSize);
mir_snwprintf(msgSubject, L"%S\n%s\n%s", field_date, field_subject_UNICODE, field_attachments_UNICODE);
}
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h
index 6a0ebd261d..5d358de96b 100644
--- a/protocols/Weather/src/stdafx.h
+++ b/protocols/Weather/src/stdafx.h
@@ -410,7 +410,7 @@ HICON GetStatusIconBig(MCONTACT hContact);
WORD GetIcon(const wchar_t* cond, WIDATA *Data);
void CaseConv(wchar_t *str);
void TrimString(char *str);
-void TrimString(WCHAR *str);
+void TrimString(wchar_t *str);
void ConvertBackslashes(char *str);
char *GetSearchStr(char *dis);
@@ -432,10 +432,10 @@ void EraseAllInfo(void);
void GetDataValue(WIDATAITEM *UpdateData, wchar_t *Data, wchar_t** szInfo);
void ConvertDataValue(WIDATAITEM *UpdateData, wchar_t *Data);
void wSetData(char *&Data, const char *Value);
-void wSetData(WCHAR *&Data, const char *Value);
-void wSetData(WCHAR *&Data, const WCHAR *Value);
+void wSetData(wchar_t *&Data, const char *Value);
+void wSetData(wchar_t *&Data, const wchar_t *Value);
void wfree(char *&Data);
-void wfree(WCHAR *&Data);
+void wfree(wchar_t *&Data);
void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam);
diff --git a/protocols/Weather/src/weather_conv.cpp b/protocols/Weather/src/weather_conv.cpp
index e7f495e5f4..2c29e1865f 100644
--- a/protocols/Weather/src/weather_conv.cpp
+++ b/protocols/Weather/src/weather_conv.cpp
@@ -404,14 +404,14 @@ void TrimString(char *str)
memmove(str, str + start, len - start + 1);
}
-void TrimString(WCHAR *str)
+void TrimString(wchar_t *str)
{
size_t len, start;
len = mir_wstrlen(str);
while (len && (unsigned char)str[len - 1] <= ' ') str[--len] = 0;
for (start = 0; (unsigned char)str[start] <= ' ' && str[start]; start++);
- memmove(str, str + start, (len - start + 1) * sizeof(WCHAR));
+ memmove(str, str + start, (len - start + 1) * sizeof(wchar_t));
}
// convert \t to tab and \n to linefeed
diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp
index 8cc44575b2..fe668dbfe8 100644
--- a/protocols/Weather/src/weather_data.cpp
+++ b/protocols/Weather/src/weather_data.cpp
@@ -356,7 +356,7 @@ void wSetData(char *&Data, const char *Value)
Data = "";
}
-void wSetData(WCHAR *&Data, const char *Value)
+void wSetData(wchar_t *&Data, const char *Value)
{
if (Value[0] != 0)
Data = (g_bIsUtf) ? mir_utf8decodeW(Value) : mir_a2u(Value);
@@ -364,7 +364,7 @@ void wSetData(WCHAR *&Data, const char *Value)
Data = L"";
}
-void wSetData(WCHAR *&Data, const WCHAR *Value)
+void wSetData(wchar_t *&Data, const wchar_t *Value)
{
if (Value[0] != 0)
Data = mir_wstrdup(Value);
@@ -381,7 +381,7 @@ void wfree(char *&Data)
Data = nullptr;
}
-void wfree(WCHAR *&Data)
+void wfree(wchar_t *&Data)
{
if (Data && mir_wstrlen(Data) > 0)
mir_free(Data);
diff --git a/protocols/YAMN/src/account.cpp b/protocols/YAMN/src/account.cpp
index 36ac6e7072..43af27579c 100644
--- a/protocols/YAMN/src/account.cpp
+++ b/protocols/YAMN/src/account.cpp
@@ -269,23 +269,23 @@ DWORD ReadStringFromMemory(char **Parser, char *End, char **StoreTo)
}
#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES)
-DWORD ReadStringFromMemoryW(WCHAR **Parser,wchar_t *End,WCHAR **StoreTo,WCHAR *DebugString)
+DWORD ReadStringFromMemoryW(wchar_t **Parser,wchar_t *End,wchar_t **StoreTo,wchar_t *DebugString)
{
//This is the debug version of ReadStringFromMemoryW function. This version shows MessageBox where
//read string is displayed
- WCHAR *Dest,*Finder;
+ wchar_t *Dest,*Finder;
DWORD Size;
- WCHAR Debug[65536];
+ wchar_t Debug[65536];
Finder=*Parser;
- while((*Finder != (WCHAR)0) && (Finder<=(WCHAR *)End)) Finder++;
- mir_snwprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder-*Parser, (WCHAR *)End-Finder);
+ while((*Finder != (wchar_t)0) && (Finder<=(wchar_t *)End)) Finder++;
+ mir_snwprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder-*Parser, (wchar_t *)End-Finder);
MessageBoxW(NULL,Debug,L"debug",MB_OK);
- if (Finder>=(WCHAR *)End)
+ if (Finder>=(wchar_t *)End)
return EACC_FILECOMPATIBILITY;
if (Size=Finder-*Parser)
{
- if (NULL==(Dest=*StoreTo=new WCHAR[Size+1]))
+ if (NULL==(Dest=*StoreTo=new wchar_t[Size+1]))
return EACC_ALLOC;
for (;*Parser<=Finder;(*Parser)++,Dest++)
*Dest=**Parser;
@@ -299,18 +299,18 @@ DWORD ReadStringFromMemoryW(WCHAR **Parser,wchar_t *End,WCHAR **StoreTo,WCHAR *D
}
#endif //if defined(DEBUG...)
-DWORD ReadStringFromMemoryW(WCHAR **Parser, WCHAR *End, WCHAR **StoreTo)
+DWORD ReadStringFromMemoryW(wchar_t **Parser, wchar_t *End, wchar_t **StoreTo)
{
- WCHAR *Dest, *Finder;
+ wchar_t *Dest, *Finder;
DWORD Size;
Finder = *Parser;
- while ((*Finder != (WCHAR)0) && (Finder <= (WCHAR *)End)) Finder++;
- if (Finder >= (WCHAR *)End)
+ while ((*Finder != (wchar_t)0) && (Finder <= (wchar_t *)End)) Finder++;
+ if (Finder >= (wchar_t *)End)
return EACC_FILECOMPATIBILITY;
if (Size = Finder - *Parser)
{
- if (nullptr == (Dest = *StoreTo = new WCHAR[Size + 1]))
+ if (nullptr == (Dest = *StoreTo = new wchar_t[Size + 1]))
return EACC_ALLOC;
for (; *Parser <= Finder; (*Parser)++, Dest++)
*Dest = **Parser;
@@ -365,15 +365,15 @@ static DWORD ReadNotificationFromMemory(char **Parser, char *End, YAMN_NOTIFICAT
#endif
#ifdef DEBUG_FILEREAD
- if (Stat=ReadStringFromMemoryW((WCHAR **)Parser,(WCHAR*)End,&Which->App,L"App"))
+ if (Stat=ReadStringFromMemoryW((wchar_t **)Parser,(wchar_t*)End,&Which->App,L"App"))
#else
- if (Stat = ReadStringFromMemoryW((WCHAR **)Parser, (WCHAR*)End, &Which->App))
+ if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t*)End, &Which->App))
#endif
return Stat;
#ifdef DEBUG_FILEREAD
- if (Stat=ReadStringFromMemoryW((WCHAR **)Parser,(WCHAR*)End,&Which->AppParam,L"AppParam"))
+ if (Stat=ReadStringFromMemoryW((wchar_t **)Parser,(wchar_t*)End,&Which->AppParam,L"AppParam"))
#else
- if (Stat = ReadStringFromMemoryW((WCHAR **)Parser, (WCHAR*)End, &Which->AppParam))
+ if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t*)End, &Which->AppParam))
#endif
return Stat;
return 0;
@@ -760,20 +760,20 @@ DWORD WriteStringToFile(HANDLE File, char *Source)
return 0;
}
-DWORD WriteStringToFileW(HANDLE File, WCHAR *Source)
+DWORD WriteStringToFileW(HANDLE File, wchar_t *Source)
{
DWORD Length, WrittenBytes;
- WCHAR null = (WCHAR)0;
+ wchar_t null = (wchar_t)0;
if ((Source == nullptr) || !(Length = (DWORD)mir_wstrlen(Source)))
{
- if (!WriteFile(File, &null, sizeof(WCHAR), &WrittenBytes, nullptr))
+ if (!WriteFile(File, &null, sizeof(wchar_t), &WrittenBytes, nullptr))
{
CloseHandle(File);
return EACC_SYSTEM;
}
}
- else if (!WriteFile(File, Source, (Length + 1)*sizeof(WCHAR), &WrittenBytes, nullptr))
+ else if (!WriteFile(File, Source, (Length + 1)*sizeof(wchar_t), &WrittenBytes, nullptr))
return EACC_SYSTEM;
return 0;
}
diff --git a/protocols/YAMN/src/browser/badconnect.cpp b/protocols/YAMN/src/browser/badconnect.cpp
index 86e202d2e6..04e50b0675 100644
--- a/protocols/YAMN/src/browser/badconnect.cpp
+++ b/protocols/YAMN/src/browser/badconnect.cpp
@@ -30,11 +30,11 @@ LRESULT CALLBACK BadConnectPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
DebugLog(SynchroFile, "PopupProc:LEFTCLICK:ActualAccountSO-read enter\n");
#endif
if (ActualAccount->BadConnectN.App != nullptr) {
- WCHAR *Command;
+ wchar_t *Command;
if (ActualAccount->BadConnectN.AppParam != nullptr)
- Command = new WCHAR[mir_wstrlen(ActualAccount->BadConnectN.App) + mir_wstrlen(ActualAccount->BadConnectN.AppParam) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->BadConnectN.App) + mir_wstrlen(ActualAccount->BadConnectN.AppParam) + 6];
else
- Command = new WCHAR[mir_wstrlen(ActualAccount->BadConnectN.App) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->BadConnectN.App) + 6];
if (Command != nullptr) {
mir_wstrcpy(Command, L"\"");
diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp
index dc25d78161..4c0b3c285f 100644
--- a/protocols/YAMN/src/browser/mailbrowser.cpp
+++ b/protocols/YAMN/src/browser/mailbrowser.cpp
@@ -402,7 +402,7 @@ int UpdateMails(HWND hDlg, CAccount *ActualAccount, DWORD nflags, DWORD nnflags)
if (RunMailBrowser) {
size_t len = mir_strlen(ActualAccount->Name) + mir_strlen(Translate(MAILBROWSERTITLE)) + 10; //+10 chars for numbers
char *TitleStrA = new char[len];
- WCHAR *TitleStrW = new WCHAR[len];
+ wchar_t *TitleStrW = new wchar_t[len];
mir_snprintf(TitleStrA, len, Translate(MAILBROWSERTITLE), ActualAccount->Name, MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display);
MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, TitleStrA, -1, TitleStrW, (int)mir_strlen(TitleStrA) + 1);
@@ -470,12 +470,12 @@ int ChangeExistingMailStatus(HWND hListView, CAccount *ActualAccount)
return TRUE;
}
-void MimeDateToLocalizedDateTime(char *datein, WCHAR *dateout, int lendateout);
+void MimeDateToLocalizedDateTime(char *datein, wchar_t *dateout, int lendateout);
int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, DWORD nflags)
{
- WCHAR *FromStr;
- WCHAR SizeStr[20];
- WCHAR LocalDateStr[128];
+ wchar_t *FromStr;
+ wchar_t SizeStr[20];
+ wchar_t LocalDateStr[128];
LVITEMW item;
LVFINDINFO fi;
@@ -542,7 +542,7 @@ int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, DWORD nflags)
if ((UnicodeHeader.From != nullptr) && (UnicodeHeader.FromNick != nullptr)) {
size_t size = mir_wstrlen(UnicodeHeader.From) + mir_wstrlen(UnicodeHeader.FromNick) + 4;
- FromStr = new WCHAR[size];
+ FromStr = new wchar_t[size];
mir_snwprintf(FromStr, size, L"%s <%s>", UnicodeHeader.FromNick, UnicodeHeader.From);
FromStrNew = TRUE;
}
@@ -565,7 +565,7 @@ int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, DWORD nflags)
item.iItem = SendMessage(hListView, LVM_INSERTITEM, 0, (LPARAM)&item);
item.iSubItem = 1;
- item.pszText = (nullptr != UnicodeHeader.Subject ? UnicodeHeader.Subject : (WCHAR*)L"");
+ item.pszText = (nullptr != UnicodeHeader.Subject ? UnicodeHeader.Subject : (wchar_t*)L"");
SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item);
item.iSubItem = 2;
@@ -720,11 +720,11 @@ void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN,
si.cb = sizeof(si);
if (ActualAccount->NewMailN.App != nullptr) {
- WCHAR *Command;
+ wchar_t *Command;
if (ActualAccount->NewMailN.AppParam != nullptr)
- Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6];
else
- Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6];
if (Command != nullptr) {
mir_wstrcpy(Command, L"\"");
@@ -1073,7 +1073,7 @@ ULONGLONG MimeDateToFileTime(char *datein)
return res;
}
-void FileTimeToLocalizedDateTime(LONGLONG filetime, WCHAR *dateout, int lendateout)
+void FileTimeToLocalizedDateTime(LONGLONG filetime, wchar_t *dateout, int lendateout)
{
int localeID = Langpack_GetDefaultLocale();
//int localeID = MAKELCID(LANG_URDU, SORT_DEFAULT);
@@ -1120,7 +1120,7 @@ void FileTimeToLocalizedDateTime(LONGLONG filetime, WCHAR *dateout, int lendateo
}
}
-void MimeDateToLocalizedDateTime(char *datein, WCHAR *dateout, int lendateout)
+void MimeDateToLocalizedDateTime(char *datein, wchar_t *dateout, int lendateout)
{
ULONGLONG ft = MimeDateToFileTime(datein);
FileTimeToLocalizedDateTime(ft, dateout, lendateout);
@@ -1246,8 +1246,8 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
return mir_callNextSubclass(hwnd, SplitterSubclassProc, msg, wParam, lParam);
}
-void ConvertCodedStringToUnicode(char *stream, WCHAR **storeto, DWORD cp, int mode);
-int ConvertStringToUnicode(char *stream, unsigned int cp, WCHAR **out);
+void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, DWORD cp, int mode);
+int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out);
INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -1255,8 +1255,8 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
case WM_INITDIALOG:
{
PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)lParam;
- WCHAR *iHeaderW = nullptr;
- WCHAR *iValueW = nullptr;
+ wchar_t *iHeaderW = nullptr;
+ wchar_t *iValueW = nullptr;
int StrLen;
HWND hListView = GetDlgItem(hDlg, IDC_LISTHEADERS);
mir_subclassWindow(GetDlgItem(hDlg, IDC_SPLITTER), SplitterSubclassProc);
@@ -1267,11 +1267,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
ListView_SetExtendedListViewStyle(hListView, LVS_EX_FULLROWSELECT);
StrLen = MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Header"), -1, nullptr, 0);
- iHeaderW = new WCHAR[StrLen + 1];
+ iHeaderW = new wchar_t[StrLen + 1];
MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Header"), -1, iHeaderW, StrLen);
StrLen = MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Value"), -1, nullptr, 0);
- iValueW = new WCHAR[StrLen + 1];
+ iValueW = new wchar_t[StrLen + 1];
MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Value"), -1, iValueW, StrLen);
LVCOLUMN lvc0 = { LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 130, iHeaderW, 0, 0 };
@@ -1301,40 +1301,40 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
struct CMimeItem *Header;
LVITEMW item;
item.mask = LVIF_TEXT | LVIF_PARAM;
- WCHAR *From = nullptr, *Subj = nullptr;
+ wchar_t *From = nullptr, *Subj = nullptr;
char *contentType = nullptr, *transEncoding = nullptr, *body = nullptr; //should not be delete[]-ed
for (Header = MailParam->mail->MailData->TranslatedHeader; Header != nullptr; Header = Header->Next) {
- WCHAR *str1 = nullptr;
- WCHAR *str2 = nullptr;
- WCHAR str_nul[2] = { 0 };
+ wchar_t *str1 = nullptr;
+ wchar_t *str2 = nullptr;
+ wchar_t str_nul[2] = { 0 };
if (!body) if (!_stricmp(Header->name, "Body")) { body = Header->value; continue; }
if (!contentType) if (!_stricmp(Header->name, "Content-Type")) contentType = Header->value;
if (!transEncoding) if (!_stricmp(Header->name, "Content-Transfer-Encoding")) transEncoding = Header->value;
//ConvertCodedStringToUnicode(Header->name,&str1,MailParam->mail->MailData->CP,1);
{
int streamsize = MultiByteToWideChar(20127, 0, Header->name, -1, nullptr, 0);
- str1 = (WCHAR *)malloc(sizeof(WCHAR) * (streamsize + 1));
+ str1 = (wchar_t *)malloc(sizeof(wchar_t) * (streamsize + 1));
MultiByteToWideChar(20127, 0, Header->name, -1, str1, streamsize);//US-ASCII
}
ConvertCodedStringToUnicode(Header->value, &str2, MailParam->mail->MailData->CP, 1);
- if (!str2) { str2 = (WCHAR *)str_nul; }// the header value may be NULL
+ if (!str2) { str2 = (wchar_t *)str_nul; }// the header value may be NULL
if (!From) if (!_stricmp(Header->name, "From")) {
- From = new WCHAR[mir_wstrlen(str2) + 1];
+ From = new wchar_t[mir_wstrlen(str2) + 1];
mir_wstrcpy(From, str2);
}
if (!Subj) if (!_stricmp(Header->name, "Subject")) {
- Subj = new WCHAR[mir_wstrlen(str2) + 1];
+ Subj = new wchar_t[mir_wstrlen(str2) + 1];
mir_wstrcpy(Subj, str2);
}
//if (!hasBody) if (!mir_strcmp(Header->name,"Body")) hasBody = true;
- int count = 0; WCHAR **split = nullptr;
+ int count = 0; wchar_t **split = nullptr;
int ofs = 0;
while (str2[ofs]) {
if ((str2[ofs] == 0x266A) || (str2[ofs] == 0x25D9) || (str2[ofs] == 0x25CB) ||
(str2[ofs] == 0x09) || (str2[ofs] == 0x0A) || (str2[ofs] == 0x0D))count++;
ofs++;
}
- split = new WCHAR*[count + 1];
+ split = new wchar_t*[count + 1];
count = 0; ofs = 0;
split[0] = str2;
while (str2[ofs]) {
@@ -1343,7 +1343,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (str2[ofs - 1]) {
count++;
}
- split[count] = (WCHAR *)(str2 + ofs + 1);
+ split[count] = (wchar_t *)(str2 + ofs + 1);
str2[ofs] = 0;
}
ofs++;
@@ -1370,11 +1370,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (str1)
free(str1);
- if (str2 != (WCHAR *)str_nul)
+ if (str2 != (wchar_t *)str_nul)
free(str2);
}
if (body) {
- WCHAR *bodyDecoded = nullptr;
+ wchar_t *bodyDecoded = nullptr;
char *localBody = nullptr;
if (contentType) {
if (!_strnicmp(contentType, "text", 4)) {
@@ -1422,9 +1422,9 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
}
ShowWindow(GetDlgItem(hDlg, IDC_SPLITTER), (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE);
ShowWindow(hEdit, (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE);
- WCHAR *title = nullptr;
+ wchar_t *title = nullptr;
size_t size = (From ? mir_wstrlen(From) : 0) + (Subj ? mir_wstrlen(Subj) : 0) + 4;
- title = new WCHAR[size];
+ title = new wchar_t[size];
if (From && Subj)
mir_snwprintf(title, size, L"%s (%s)", Subj, From);
else if (From)
@@ -1955,11 +1955,11 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) {
if (ActualAccount->NewMailN.App != nullptr) {
- WCHAR *Command;
+ wchar_t *Command;
if (ActualAccount->NewMailN.AppParam != nullptr)
- Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6];
else
- Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6];
if (Command != nullptr) {
mir_wstrcpy(Command, L"\"");
diff --git a/protocols/YAMN/src/debug.cpp b/protocols/YAMN/src/debug.cpp
index 971b3dcbce..2f5c1d4761 100644
--- a/protocols/YAMN/src/debug.cpp
+++ b/protocols/YAMN/src/debug.cpp
@@ -103,23 +103,23 @@ void DebugLog(HANDLE File,const char *fmt,...)
free(str);
}
-void DebugLogW(HANDLE File,const WCHAR *fmt,...)
+void DebugLogW(HANDLE File,const wchar_t *fmt,...)
{
- WCHAR *str;
+ wchar_t *str;
char tids[32];
va_list vararg;
int strsize;
DWORD Written;
va_start(vararg,fmt);
- str=(WCHAR *)malloc((strsize=65536)*sizeof(WCHAR));
+ str=(wchar_t *)malloc((strsize=65536)*sizeof(wchar_t));
mir_snprintf(tids, "[%x]",GetCurrentThreadId());
while(mir_vsnwprintf(str, strsize, fmt, vararg)==-1)
- str=(WCHAR *)realloc(str,(strsize+=65536)*sizeof(WCHAR));
+ str=(wchar_t *)realloc(str,(strsize+=65536)*sizeof(wchar_t));
va_end(vararg);
EnterCriticalSection(&FileAccessCS);
WriteFile(File,tids,(DWORD)mir_strlen(tids),&Written,nullptr);
- WriteFile(File,str,(DWORD)mir_wstrlen(str)*sizeof(WCHAR),&Written,nullptr);
+ WriteFile(File,str,(DWORD)mir_wstrlen(str)*sizeof(wchar_t),&Written,nullptr);
LeaveCriticalSection(&FileAccessCS);
free(str);
}
diff --git a/protocols/YAMN/src/debug.h b/protocols/YAMN/src/debug.h
index a28add5662..f0405d7453 100644
--- a/protocols/YAMN/src/debug.h
+++ b/protocols/YAMN/src/debug.h
@@ -13,7 +13,7 @@
//#define DEBUG_FILEREADMESSAGES //debug file reading messages to message boxes
void DebugLog(HANDLE,const char *fmt,...);
-void DebugLogW(HANDLE File,const WCHAR *fmt,...);
+void DebugLogW(HANDLE File,const wchar_t *fmt,...);
#ifdef DEBUG_SYNCHRO
// Used for synchronization debug
@@ -38,7 +38,7 @@ DWORD ReadStringFromMemoryW(char **Parser,wchar_t *End,char **StoreTo,wchar_t *D
#else
DWORD ReadStringFromMemory(char **Parser,char *End,char **StoreTo);
-DWORD ReadStringFromMemoryW(WCHAR **Parser,WCHAR *End,WCHAR **StoreTo);
+DWORD ReadStringFromMemoryW(wchar_t **Parser,wchar_t *End,wchar_t **StoreTo);
#endif
diff --git a/protocols/YAMN/src/mails/decode.cpp b/protocols/YAMN/src/mails/decode.cpp
index 5ac1346c7c..39e04a0ba9 100644
--- a/protocols/YAMN/src/mails/decode.cpp
+++ b/protocols/YAMN/src/mails/decode.cpp
@@ -191,14 +191,14 @@ int DecodeBase64(char *Src,char *Dst,int DstLen);
// stream- input string
// cp- codepage of input string
// out- pointer to new allocated memory that contains unicode string
-int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out);
+int ConvertStringToUnicode(char *stream,unsigned int cp,wchar_t **out);
//Converts string from MIME header to unicode
// stream- input string
// cp- codepage of input string
// storeto- pointer to memory that contains unicode string
// mode- MIME_PLAIN or MIME_MAIL (MIME_MAIL deletes '"' from start and end of string)
-void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode);
+void ConvertCodedStringToUnicode(char *stream,wchar_t **storeto,DWORD cp,int mode);
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
@@ -382,10 +382,10 @@ end:
-int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out)
+int ConvertStringToUnicode(char *stream,unsigned int cp,wchar_t **out)
{
CPINFO CPInfo;
- WCHAR *temp,*src=*out,*dest;
+ wchar_t *temp,*src=*out,*dest;
size_t outlen;
int streamlen,Index;
@@ -413,11 +413,11 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out)
outlen=mir_wstrlen(*out);
else
outlen=0;
- temp=new WCHAR[streamlen+outlen+1];
+ temp=new wchar_t[streamlen+outlen+1];
if (*out != nullptr)
{
- for (dest=temp;*src != (WCHAR)0;src++,dest++) //copy old string from *out to temp
+ for (dest=temp;*src != (wchar_t)0;src++,dest++) //copy old string from *out to temp
*dest=*src;
// *dest++=L' '; //add space?
delete[] *out;
@@ -439,7 +439,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out)
return 1;
}
-void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode)
+void ConvertCodedStringToUnicode(char *stream,wchar_t **storeto,DWORD cp,int mode)
{
char *start=stream,*finder,*finderend;
char Encoding=0;
@@ -448,7 +448,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode)
return;
while(WS(start)) start++;
- WCHAR *tempstore=nullptr;
+ wchar_t *tempstore=nullptr;
if (!ConvertStringToUnicode(stream,cp,&tempstore))return;
size_t tempstoreLength = mir_wstrlen(tempstore);
@@ -530,10 +530,10 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode)
DecodedResult[len+1]=0;
finderend++;
}
- WCHAR *oneWord=nullptr;
+ wchar_t *oneWord=nullptr;
if (ConvertStringToUnicode(DecodedResult,cp,&oneWord)) {
size_t len = mir_wstrlen(oneWord);
- memcpy(&tempstore[outind],oneWord,len*sizeof(WCHAR));
+ memcpy(&tempstore[outind],oneWord,len*sizeof(wchar_t));
outind += len;
}
delete oneWord;
diff --git a/protocols/YAMN/src/mails/mime.cpp b/protocols/YAMN/src/mails/mime.cpp
index 8db0b045d9..37afafc2d7 100644
--- a/protocols/YAMN/src/mails/mime.cpp
+++ b/protocols/YAMN/src/mails/mime.cpp
@@ -481,7 +481,7 @@ struct APartDataType
BYTE TransEncType; //TE_something
char *body;
int bodyLen;
- WCHAR *wBody;
+ wchar_t *wBody;
};
@@ -567,16 +567,16 @@ void ParseAPart(APartDataType *data)
//from decode.cpp
int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ);
int DecodeBase64(char *Src, char *Dst, int DstLen);
-int ConvertStringToUnicode(char *stream, unsigned int cp, WCHAR **out);
+int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out);
-WCHAR *ParseMultipartBody(char *src, char *bond)
+wchar_t *ParseMultipartBody(char *src, char *bond)
{
char *srcback = _strdup(src);
size_t sizebond = mir_strlen(bond);
int numparts = 1;
int i;
char *courbond = srcback;
- WCHAR *dest;
+ wchar_t *dest;
for (; (courbond = strstr(courbond, bond)); numparts++, courbond += sizebond);
APartDataType *partData = new APartDataType[numparts];
memset(partData, 0, sizeof(APartDataType)*numparts);
@@ -637,7 +637,7 @@ FailBackRaw:
}// if (partData[i].body)
resultSize += 100 + 4 + 3; //cr+nl+100+ 3*bullet
}
- dest = new WCHAR[resultSize + 1];
+ dest = new wchar_t[resultSize + 1];
size_t destpos = 0;
for (i = 0; i < numparts; i++) {
if (i) { // part before first boudary should not have headers
@@ -673,7 +673,7 @@ FailBackRaw:
}
mir_snprintf(infoline + linesize, _countof(infoline) - linesize, ".\r\n");
{
- WCHAR *temp = nullptr;
+ wchar_t *temp = nullptr;
dest[destpos] = dest[destpos + 1] = dest[destpos + 2] = 0x2022; // bullet;
destpos += 3;
ConvertStringToUnicode(infoline, CP_ACP, &temp);
diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp
index fc111ef7c7..a24eba24e2 100644
--- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp
@@ -508,7 +508,7 @@ BOOL DlgSetItemText(HWND hDlg, WPARAM wParam, const char* str)
return TRUE;
}
-BOOL DlgSetItemTextW(HWND hDlg, WPARAM wParam, const WCHAR* str)
+BOOL DlgSetItemTextW(HWND hDlg, WPARAM wParam, const wchar_t* str)
{
if (str == nullptr)
SetDlgItemTextW(hDlg, wParam, L"");
@@ -846,7 +846,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) {
char Text[MAX_PATH];
- WCHAR TextW[MAX_PATH];
+ wchar_t TextW[MAX_PATH];
BOOL Translated, NewAcc = FALSE, Check, CheckMsg, CheckSnd, CheckIco, CheckApp, CheckAPOP;
BOOL CheckNMsgP, CheckFMsg, CheckFSnd, CheckFIco;
BOOL CheckKBN, CheckContact, CheckContactNick, CheckContactNoEvent;
@@ -981,13 +981,13 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
GetDlgItemTextW(hDlg, IDC_EDITAPP, TextW, _countof(TextW));
if (nullptr != ActualAccount->NewMailN.App)
delete[] ActualAccount->NewMailN.App;
- ActualAccount->NewMailN.App = new WCHAR[mir_wstrlen(TextW) + 1];
+ ActualAccount->NewMailN.App = new wchar_t[mir_wstrlen(TextW) + 1];
mir_wstrcpy(ActualAccount->NewMailN.App, TextW);
GetDlgItemTextW(hDlg, IDC_EDITAPPPARAM, TextW, _countof(TextW));
if (nullptr != ActualAccount->NewMailN.AppParam)
delete[] ActualAccount->NewMailN.AppParam;
- ActualAccount->NewMailN.AppParam = new WCHAR[mir_wstrlen(TextW) + 1];
+ ActualAccount->NewMailN.AppParam = new wchar_t[mir_wstrlen(TextW) + 1];
mir_wstrcpy(ActualAccount->NewMailN.AppParam, TextW);
ActualAccount->Server->Port = Port;
diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.h b/protocols/YAMN/src/proto/pop3/pop3opt.h
index 245f7679a4..d6a49c59a8 100644
--- a/protocols/YAMN/src/proto/pop3/pop3opt.h
+++ b/protocols/YAMN/src/proto/pop3/pop3opt.h
@@ -31,7 +31,7 @@ int POP3OptInit(WPARAM wParam,LPARAM lParam);
//Sets dialog item text
BOOL DlgSetItemText(HWND hDlg,WPARAM wParam,const char*);
-BOOL DlgSetItemTextW(HWND hDlg,WPARAM wParam,const WCHAR*);
+BOOL DlgSetItemTextW(HWND hDlg,WPARAM wParam,const wchar_t*);
#define DlgSetItemTextT DlgSetItemTextW
diff --git a/protocols/YAMN/src/services.cpp b/protocols/YAMN/src/services.cpp
index 5126aba275..98fd18f24d 100644
--- a/protocols/YAMN/src/services.cpp
+++ b/protocols/YAMN/src/services.cpp
@@ -84,11 +84,11 @@ static INT_PTR ContactApplication(WPARAM wParam, LPARAM)
DebugLog(SynchroFile, "ContactApplication:ualAccountSO-read enter\n");
#endif
if (ActualAccount->NewMailN.App != nullptr) {
- WCHAR *Command;
+ wchar_t *Command;
if (ActualAccount->NewMailN.AppParam != nullptr)
- Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6];
else
- Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + 6];
+ Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6];
if (Command != nullptr) {
mir_wstrcpy(Command, L"\"");
diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h
index 2858640d6b..3c9f07cd79 100644
--- a/protocols/YAMN/src/stdafx.h
+++ b/protocols/YAMN/src/stdafx.h
@@ -94,7 +94,7 @@ DWORD ReadAccountFromMemory(CAccount *Which, char **Parser, wchar_t *End);
INT_PTR AddAccountsFromFileSvc(WPARAM wParam, LPARAM lParam);
DWORD WriteStringToFile(HANDLE File, char *Source);
-DWORD WriteStringToFileW(HANDLE File, WCHAR *Source);
+DWORD WriteStringToFileW(HANDLE File, wchar_t *Source);
DWORD WriteMessagesToFile(HANDLE File, CAccount *Which);
@@ -203,7 +203,7 @@ void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head);
void DeleteHeaderContent(struct CHeader *head);
void DeleteShortHeaderContent(struct CShortHeader *head);
char *ExtractFromContentType(char *ContentType, char *value);
-WCHAR *ParseMultipartBody(char *src, char *bond);
+wchar_t *ParseMultipartBody(char *src, char *bond);
//From account.cpp
void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value);
@@ -246,7 +246,7 @@ extern struct WndHandles *MessageWnd;
extern int GetCharsetFromString(char *input, size_t size);
extern void SendMsgToRecepients(struct WndHandles *FirstWin, UINT msg, WPARAM wParam, LPARAM lParam);
-extern void ConvertCodedStringToUnicode(char *stream, WCHAR **storeto, DWORD cp, int mode);
+extern void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, DWORD cp, int mode);
extern void __cdecl MailBrowser(void *Param);
extern DWORD WINAPI NoNewMailProc(LPVOID Param);
extern void __cdecl BadConnection(void *Param);
diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp
index da3037190f..b18cac040f 100644
--- a/src/core/stdfile/src/fileexistsdlg.cpp
+++ b/src/core/stdfile/src/fileexistsdlg.cpp
@@ -52,7 +52,7 @@ static void DoAnnoyingShellCommand(HWND hwnd, const wchar_t *szFilename, int cmd
IShellFolder *pDesktopFolder;
if (SHGetDesktopFolder(&pDesktopFolder) == NOERROR) {
ITEMIDLIST *pCurrentIdl;
- WCHAR *wszFilename = (LPWSTR)szFilename;
+ wchar_t *wszFilename = (LPWSTR)szFilename;
if (pDesktopFolder->ParseDisplayName(nullptr, nullptr, wszFilename, nullptr, &pCurrentIdl, nullptr) == NOERROR) {
if (pCurrentIdl->mkid.cb) {
diff --git a/src/mir_app/src/button.cpp b/src/mir_app/src/button.cpp
index 0e75bf862f..cbae11116c 100644
--- a/src/mir_app/src/button.cpp
+++ b/src/mir_app/src/button.cpp
@@ -464,7 +464,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS;
ti.uId = (UINT_PTR)bct->hwnd;
if (lParam & BATF_UNICODE)
- ti.lpszText = mir_wstrdup(TranslateW((WCHAR*)wParam));
+ ti.lpszText = mir_wstrdup(TranslateW((wchar_t*)wParam));
else
ti.lpszText = Langpack_PcharToTchar((char*)wParam);
SendMessage(bct->hwndToolTips, TTM_ADDTOOL, 0, (LPARAM)&ti);
diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp
index 44ffd89bad..2c75d2e81e 100644
--- a/src/mir_app/src/clcmsgs.cpp
+++ b/src/mir_app/src/clcmsgs.cpp
@@ -67,7 +67,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar
ClcContact *cc;
if (msg == CLM_ADDINFOITEMA) {
- WCHAR* wszText = mir_a2u((char*)cii->pszText);
+ wchar_t* wszText = mir_a2u((char*)cii->pszText);
cc = g_clistApi.pfnAddInfoItemToGroup(group, cii->flags, wszText);
mir_free(wszText);
}
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp
index 1a33be2375..0bf652d1aa 100644
--- a/src/mir_app/src/contacts.cpp
+++ b/src/mir_app/src/contacts.cpp
@@ -230,7 +230,7 @@ MIR_APP_DLL(wchar_t*) Contact_GetInfo(int type, MCONTACT hContact, const char *s
DBVARIANT dbv2;
if (!db_get_ws(hContact, szProto, nameOrder[i] == 6 ? "LastName" : "FirstName", &dbv2)) {
size_t len = mir_wstrlen(dbv.pwszVal) + mir_wstrlen(dbv2.pwszVal) + 2;
- wchar_t *buf = (WCHAR*)mir_alloc(sizeof(WCHAR)*len);
+ wchar_t *buf = (wchar_t*)mir_alloc(sizeof(wchar_t)*len);
if (buf != nullptr)
mir_wstrcat(mir_wstrcat(mir_wstrcpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
diff --git a/src/mir_app/src/descbutton.cpp b/src/mir_app/src/descbutton.cpp
index 623648db80..f2d21fc03f 100644
--- a/src/mir_app/src/descbutton.cpp
+++ b/src/mir_app/src/descbutton.cpp
@@ -278,7 +278,7 @@ static LRESULT CALLBACK MDescButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wPara
if (dat->lpzTitle)
mir_free(dat->lpzTitle);
if (wParam & MDBCF_UNICODE)
- dat->lpzTitle = mir_wstrdup((WCHAR *)lParam);
+ dat->lpzTitle = mir_wstrdup((wchar_t *)lParam);
else
dat->lpzTitle = mir_a2u((char *)lParam);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE);
@@ -288,7 +288,7 @@ static LRESULT CALLBACK MDescButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wPara
if (dat->lpzDescription)
mir_free(dat->lpzDescription);
if (wParam & MDBCF_UNICODE)
- dat->lpzDescription = mir_wstrdup((WCHAR *)lParam);
+ dat->lpzDescription = mir_wstrdup((wchar_t *)lParam);
else
dat->lpzDescription = mir_a2u((char *)lParam);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE);
diff --git a/src/mir_app/src/netlib_log.cpp b/src/mir_app/src/netlib_log.cpp
index 9a3955eeae..b407e1499f 100644
--- a/src/mir_app/src/netlib_log.cpp
+++ b/src/mir_app/src/netlib_log.cpp
@@ -406,7 +406,7 @@ void PROTO_INTERFACE::debugLogA(const char *szFormat, ...)
void PROTO_INTERFACE::debugLogW(const wchar_t *wszFormat, ...)
{
- WCHAR buf[4096];
+ wchar_t buf[4096];
va_list args;
va_start(args, wszFormat);
int res = _vsnwprintf(buf, _countof(buf), wszFormat, args);
diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp
index 443b2501e6..c78c4505c7 100644
--- a/src/mir_app/src/path.cpp
+++ b/src/mir_app/src/path.cpp
@@ -366,7 +366,7 @@ MIR_APP_DLL(char*) Utils_ReplaceVars(const char *szData, MCONTACT hContact, REPL
MIR_APP_DLL(wchar_t*) Utils_ReplaceVarsW(const wchar_t *wszData, MCONTACT hContact, REPLACEVARSARRAY *vars)
{
- return ReplaceVariables<WCHAR>(wszData, hContact, vars);
+ return ReplaceVariables<wchar_t>(wszData, hContact, vars);
}
/////////////////////////////////////////////////////////////////////////////////////////