summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/MirandaG15/src
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src')
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp18
-rw-r--r--plugins/MirandaG15/src/CAppletManager.h2
-rw-r--r--plugins/MirandaG15/src/CChatScreen.cpp2
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp4
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp12
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/debug.cpp4
-rw-r--r--plugins/MirandaG15/src/LCDFramework/debug.h2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/misc.cpp6
-rw-r--r--plugins/MirandaG15/src/LCDFramework/misc.h8
-rw-r--r--plugins/MirandaG15/src/LCDFramework/stdafx.h1
-rw-r--r--plugins/MirandaG15/src/StdAfx.h1
14 files changed, 32 insertions, 34 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index b1be837708..ddaaeef100 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -199,10 +199,10 @@ bool CAppletManager::Shutdown()
//************************************************************************
// Translates the specified string, and inserts the parameters
//************************************************************************
-tstring CAppletManager::TranslateString(TCHAR *szString, ...)
+tstring CAppletManager::TranslateString(wchar_t *szString, ...)
{
- TCHAR out[1024];
- TCHAR *szTranslatedString = TranslateTS(szString);
+ wchar_t out[1024];
+ wchar_t *szTranslatedString = TranslateTS(szString);
va_list body;
va_start(body, szString);
@@ -532,19 +532,19 @@ tstring CAppletManager::GetFormattedTimestamp(tm *tm_time)
time(&now);
localtime_s(&tm_now, &now);
- TCHAR buffer[128];
+ wchar_t buffer[128];
if (tm_time->tm_mday != tm_now.tm_mday || tm_time->tm_mon != tm_now.tm_mon) {
if (CConfig::GetBoolSetting(TIMESTAMP_SECONDS))
- _tcsftime(buffer, 128, L"[%x %H:%M:%S]", tm_time);
+ wcsftime(buffer, 128, L"[%x %H:%M:%S]", tm_time);
else
- _tcsftime(buffer, 128, L"[%x %H:%M]", tm_time);
+ wcsftime(buffer, 128, L"[%x %H:%M]", tm_time);
}
else {
if (CConfig::GetBoolSetting(TIMESTAMP_SECONDS))
- _tcsftime(buffer, 128, L"[%H:%M:%S]", tm_time);
+ wcsftime(buffer, 128, L"[%H:%M:%S]", tm_time);
else
- _tcsftime(buffer, 128, L"[%H:%M]", tm_time);
+ wcsftime(buffer, 128, L"[%H:%M]", tm_time);
}
return toTstring(buffer);
@@ -875,7 +875,7 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd
pEvent->strValue = Utf8_Decode((char*)dbevent.pBlob);
}
else if ((int)dbevent.cbBlob == msglen * 3) {
- pEvent->strValue = (TCHAR *)& dbevent.pBlob[msglen];
+ pEvent->strValue = (wchar_t *)& dbevent.pBlob[msglen];
}
else {
pEvent->strValue = toTstring((char*)dbevent.pBlob);
diff --git a/plugins/MirandaG15/src/CAppletManager.h b/plugins/MirandaG15/src/CAppletManager.h
index a01b3268a1..f80b612c83 100644
--- a/plugins/MirandaG15/src/CAppletManager.h
+++ b/plugins/MirandaG15/src/CAppletManager.h
@@ -108,7 +108,7 @@ public:
// checks if the patched IRC protocol is in place
bool IsIRCHookEnabled();
- static tstring TranslateString(TCHAR *szString,...);
+ static tstring TranslateString(wchar_t *szString,...);
private:
list<CIRCHistory*> m_LIRCHistorys;
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp
index 34c228c697..12020a9630 100644
--- a/plugins/MirandaG15/src/CChatScreen.cpp
+++ b/plugins/MirandaG15/src/CChatScreen.cpp
@@ -178,7 +178,7 @@ void CChatScreen::UpdateLabels()
m_iStatus = db_get_w(m_hContact,szProto,"Status",ID_STATUS_OFFLINE);
}
- TCHAR *szStatus = pcli->pfnGetStatusModeDescription(m_iStatus, 0);
+ wchar_t *szStatus = pcli->pfnGetStatusModeDescription(m_iStatus, 0);
if(szStatus != NULL)
strStatus = toTstring(szStatus);
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index 6e6f42593b..69a7e1e972 100644
--- a/plugins/MirandaG15/src/CContactList.cpp
+++ b/plugins/MirandaG15/src/CContactList.cpp
@@ -109,7 +109,7 @@ void CContactList::AddContact(MCONTACT hContact)
return;
int iStatus = db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE);
- TCHAR *szStatus = pcli->pfnGetStatusModeDescription(iStatus, 0);
+ wchar_t *szStatus = pcli->pfnGetStatusModeDescription(iStatus, 0);
CContactListEntry *psContact = new CContactListEntry();
@@ -721,7 +721,7 @@ void CContactList::OnStatusChange(MCONTACT hContact,int iStatus)
int iOldStatus = pItemData->iStatus;
// Update the list entry
- TCHAR *szStatus = pcli->pfnGetStatusModeDescription(iStatus, 0);
+ wchar_t *szStatus = pcli->pfnGetStatusModeDescription(iStatus, 0);
if(szStatus != NULL)
pItemData->strStatus =toTstring(szStatus);
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
index 1ca9bd4378..2a121c22c1 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
@@ -101,7 +101,7 @@ bool CLCDInput::Draw(CLCDGfx *pGfx)
int iLine = m_iLinePosition;
int iEndLine = m_iLinePosition + m_iLineCount;
int iLen = 0;
- TCHAR *pcOffset = NULL;
+ wchar_t *pcOffset = NULL;
while(iLine < iEndLine && iLine < m_vLineOffsets.size())
{
// Calculate the text length
@@ -115,7 +115,7 @@ bool CLCDInput::Draw(CLCDGfx *pGfx)
else iLen = (int)m_strText.length() - m_vLineOffsets[iLine].iOffset;
// Draw the text
- pcOffset = (TCHAR*)m_strText.c_str() + m_vLineOffsets[iLine].iOffset;
+ pcOffset = (wchar_t*)m_strText.c_str() + m_vLineOffsets[iLine].iOffset;
DrawTextEx(pGfx->GetHDC(),
(LPTSTR)pcOffset,
iLen,
@@ -380,7 +380,7 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam)
{
#ifdef _UNICODE
- TCHAR output[4];
+ wchar_t output[4];
#else
unsigned char output[2];
#endif
@@ -419,9 +419,9 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam)
return 1;
if(m_bInsert || m_strText[m_Marker[0].iPosition] == '\r')
- m_strText.insert(m_Marker[0].iPosition,(TCHAR*)output,res);
+ m_strText.insert(m_Marker[0].iPosition,(wchar_t*)output,res);
else
- m_strText.replace(m_Marker[0].iPosition,res,(TCHAR*)output);
+ m_strText.replace(m_Marker[0].iPosition,res,(wchar_t*)output);
scroll = 1;
size = res;
@@ -601,7 +601,7 @@ void CLCDInput::UpdateOffsets(int iModified)
// Initialize variables
int iLen = (int)m_strText.length();
int *piWidths = new int[iLen];
- TCHAR *pszText = (TCHAR*)m_strText.c_str();
+ wchar_t *pszText = (wchar_t*)m_strText.c_str();
tstring::size_type pos = 0;
int iMaxChars = 0;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp
index 2c0a0bd866..e416be2810 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp
@@ -150,7 +150,7 @@ void CLCDLabel::UpdateCutOffIndex()
if(m_bWordWrap && GetWidth() > 0)
{
int *piExtents = new int[m_strText.length()];
- TCHAR *szString = (TCHAR*)m_strText.c_str();
+ wchar_t *szString = (wchar_t*)m_strText.c_str();
int iMaxChars = 0;
tstring::size_type pos = 0;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp
index f0c30b78cf..bbb9b689df 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp
@@ -304,7 +304,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry)
SIZE sizeLine = {0, 0};
int *piExtents = new int[strString.length()];
- TCHAR *szString = (TCHAR*)strString.c_str();
+ wchar_t *szString = (wchar_t*)strString.c_str();
int iMaxChars = 0;
tstring::size_type pos = 0;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp
index 56c2d9f68c..236cefc71b 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp
@@ -108,7 +108,7 @@ void CLCDTextObject::SetFontFaceName(tstring strFontName)
memset(&lf, 0, sizeof(lf));
GetObject(m_hFont, sizeof(LOGFONT), &lf);
- _tcsncpy(lf.lfFaceName, strFontName.c_str(), LF_FACESIZE);
+ wcsncpy(lf.lfFaceName, strFontName.c_str(), LF_FACESIZE);
SetFont(lf);
}
diff --git a/plugins/MirandaG15/src/LCDFramework/debug.cpp b/plugins/MirandaG15/src/LCDFramework/debug.cpp
index abca919bfe..1eb18013c7 100644
--- a/plugins/MirandaG15/src/LCDFramework/debug.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/debug.cpp
@@ -25,9 +25,9 @@
}
#endif
-void _trace(TCHAR *fmt, ...)
+void _trace(wchar_t *fmt, ...)
{
- TCHAR out[1024];
+ wchar_t out[1024];
va_list body;
va_start(body, fmt);
#ifdef _UNICODE
diff --git a/plugins/MirandaG15/src/LCDFramework/debug.h b/plugins/MirandaG15/src/LCDFramework/debug.h
index 55bb8719e5..b9d49bf17f 100644
--- a/plugins/MirandaG15/src/LCDFramework/debug.h
+++ b/plugins/MirandaG15/src/LCDFramework/debug.h
@@ -12,7 +12,7 @@ extern void UnInitDebug();
#include "ConStream.h"
#endif
#define TRACE _trace
-extern void _trace(TCHAR *fmt, ...);
+extern void _trace(wchar_t *fmt, ...);
#else
inline void _trace(LPCTSTR, ...) { }
#define TRACE 1 ? (void)0 : _trace
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.cpp b/plugins/MirandaG15/src/LCDFramework/misc.cpp
index 968bb5ce6c..339b88e393 100644
--- a/plugins/MirandaG15/src/LCDFramework/misc.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/misc.cpp
@@ -7,7 +7,7 @@ tstring tstringprintf(tstring strFormat,...) {
va_start(vlist, strFormat);
int mlen = (int)strFormat.length()+128;
- TCHAR *text = (TCHAR*)malloc(mlen*sizeof(TCHAR));
+ wchar_t *text = (wchar_t*)malloc(mlen*sizeof(wchar_t));
_vsntprintf(text,mlen,strFormat.c_str(),vlist);
va_end(vlist);
@@ -122,7 +122,7 @@ tstring Utf8_Decode(const char *str)
size_t len = mir_strlen(str);
- if ((wszTemp = (WCHAR *) malloc(sizeof(TCHAR) * (len + 2))) == NULL)
+ if ((wszTemp = (WCHAR *) malloc(sizeof(wchar_t) * (len + 2))) == NULL)
return strRes;
p = (char *) str;
@@ -140,7 +140,7 @@ tstring Utf8_Decode(const char *str)
wszTemp[i++] |= (*(p++) & 0x3f);
}
}
- wszTemp[i] = (TCHAR)'\0';
+ wszTemp[i] = (wchar_t)'\0';
strRes = wszTemp;
free(wszTemp);
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.h b/plugins/MirandaG15/src/LCDFramework/misc.h
index 0dd4494f0c..c5f2bb4f06 100644
--- a/plugins/MirandaG15/src/LCDFramework/misc.h
+++ b/plugins/MirandaG15/src/LCDFramework/misc.h
@@ -30,11 +30,11 @@ inline std::string toNarrowString( const std::string& str )
#ifdef _UNICODE
#define tstring wstring
- inline TCHAR toTchar( char ch )
+ inline wchar_t toTchar( char ch )
{
return (wchar_t)ch ;
}
- inline TCHAR toTchar( wchar_t ch )
+ inline wchar_t toTchar( wchar_t ch )
{
return ch ;
}
@@ -61,11 +61,11 @@ inline std::string toNarrowString( const std::string& str )
extern string Utf8_Encode(const WCHAR *str);
#else
#define tstring string
- inline TCHAR toTchar( char ch )
+ inline wchar_t toTchar( char ch )
{
return ch ;
}
- inline TCHAR toTchar( wchar_t ch )
+ inline wchar_t toTchar( wchar_t ch )
{
return (ch >= 0 && ch <= 0xFF) ? (char)ch : '?' ;
}
diff --git a/plugins/MirandaG15/src/LCDFramework/stdafx.h b/plugins/MirandaG15/src/LCDFramework/stdafx.h
index 2195cdf02e..2ae74c24b1 100644
--- a/plugins/MirandaG15/src/LCDFramework/stdafx.h
+++ b/plugins/MirandaG15/src/LCDFramework/stdafx.h
@@ -6,7 +6,6 @@
#define ASSERT assert
#include <Windows.h>
-#include <tchar.h>
#include <string>
#include <vector>
#include <queue>
diff --git a/plugins/MirandaG15/src/StdAfx.h b/plugins/MirandaG15/src/StdAfx.h
index 176f52cdb6..64723b62b2 100644
--- a/plugins/MirandaG15/src/StdAfx.h
+++ b/plugins/MirandaG15/src/StdAfx.h
@@ -8,7 +8,6 @@
#include <Windows.h>
#include <CommCtrl.h>
-#include <tchar.h>
#include <time.h>
#include <string>
#include <vector>