From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: 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 --- protocols/JabberG/src/stdafx.h | 106 ++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 53 deletions(-) (limited to 'protocols/JabberG/src/stdafx.h') diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h index 805b83eb23..56f199f509 100644 --- a/protocols/JabberG/src/stdafx.h +++ b/protocols/JabberG/src/stdafx.h @@ -149,7 +149,7 @@ public: CCtrlFilterListView(CDlgBase* dlg, int ctrlId, bool trackFilter, bool keepHiglight); ~CCtrlFilterListView(); - TCHAR *GetFilterText(); + wchar_t *GetFilterText(); CCallback OnFilterChanged; protected: @@ -159,7 +159,7 @@ protected: void OnInit(); LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam); - void FilterHighlight(TCHAR *filter); + void FilterHighlight(wchar_t *filter); }; #if !defined(OPENFILENAME_SIZE_VERSION_400) @@ -177,8 +177,8 @@ protected: #define JABBER_IQID "mir_" #define JABBER_MAX_JID_LEN 1024 -#define JABBER_GC_MSG_QUIT LPGENT("I'm happy Miranda NG user. Get it at http://miranda-ng.org/.") -#define JABBER_GC_MSG_SLAP LPGENT("/me slaps %s around a bit with a large trout") +#define JABBER_GC_MSG_QUIT LPGENW("I'm happy Miranda NG user. Get it at http://miranda-ng.org/.") +#define JABBER_GC_MSG_SLAP LPGENW("/me slaps %s around a bit with a large trout") #define JABBER_SERVER_URL "https://xmpp.net/services.php" // registered db event types @@ -307,12 +307,12 @@ enum { struct CJabberHttpAuthParams { enum {IQ = 1, MSG = 2} m_nType; - TCHAR *m_szFrom; - TCHAR *m_szIqId; - TCHAR *m_szThreadId; - TCHAR *m_szId; - TCHAR *m_szMethod; - TCHAR *m_szUrl; + wchar_t *m_szFrom; + wchar_t *m_szIqId; + wchar_t *m_szThreadId; + wchar_t *m_szId; + wchar_t *m_szMethod; + wchar_t *m_szUrl; CJabberHttpAuthParams() { memset(this, 0, sizeof(CJabberHttpAuthParams)); @@ -352,8 +352,8 @@ typedef HANDLE JABBER_SOCKET; struct JABBER_CONN_DATA : public MZeroedObject { - TCHAR username[512]; - TCHAR password[512]; + wchar_t username[512]; + wchar_t password[512]; char server[128]; char manualHost[128]; int port; @@ -401,8 +401,8 @@ struct ThreadData // connection & login data JABBER_CONN_DATA conn; - TCHAR resource[128]; - TCHAR fullJID[JABBER_MAX_JID_LEN]; + wchar_t resource[128]; + wchar_t fullJID[JABBER_MAX_JID_LEN]; ptrT tszNewPassword; class TJabberAuth *auth; @@ -420,11 +420,11 @@ struct ThreadData struct JABBER_MODEMSGS { - TCHAR *szOnline; - TCHAR *szAway; - TCHAR *szNa; - TCHAR *szDnd; - TCHAR *szFreechat; + wchar_t *szOnline; + wchar_t *szAway; + wchar_t *szNa; + wchar_t *szDnd; + wchar_t *szFreechat; }; typedef enum { FT_SI, FT_OOB, FT_BYTESTREAM, FT_IBB } JABBER_FT_TYPE; @@ -444,10 +444,10 @@ struct filetransfer JABBER_FT_TYPE type; JABBER_SOCKET s; JABBER_FILE_STATE state; - TCHAR *jid; + wchar_t *jid; int fileId; - TCHAR* szId; - TCHAR *sid; + wchar_t* szId; + wchar_t *sid; int bCompleted; HANDLE hWaitEvent; @@ -459,13 +459,13 @@ struct filetransfer // Used by file receiving only char* httpHostName; WORD httpPort; - TCHAR *httpPath; + wchar_t *httpPath; unsigned __int64 dwExpectedRecvFileSize; // Used by file sending only HANDLE hFileEvent; unsigned __int64 *fileSize; - TCHAR *szDescription; + wchar_t *szDescription; CJabberProto *ppro; }; @@ -500,11 +500,11 @@ struct JABBER_MUC_JIDLIST_INFO ~JABBER_MUC_JIDLIST_INFO(); JABBER_MUC_JIDLIST_TYPE type; - TCHAR *roomJid; // filled-in by the WM_JABBER_REFRESH code + wchar_t *roomJid; // filled-in by the WM_JABBER_REFRESH code HXML iqNode; CJabberProto *ppro; - TCHAR *type2str(void) const; + wchar_t *type2str(void) const; }; typedef void (CJabberProto::*JABBER_FORM_SUBMIT_FUNC)(HXML values, void *userdata); @@ -533,7 +533,7 @@ public: void CreateInfoItem(char *pszName, bool bCompact=false, LPARAM pUserData=0); void SetInfoItemCallback(char *pszName, void (CJabberProto::*onEvent)(CJabberInfoFrame_Event *)); - void UpdateInfoItem(char *pszName, HANDLE hIcolibItem, TCHAR *pszText); + void UpdateInfoItem(char *pszName, HANDLE hIcolibItem, wchar_t *pszText); void ShowInfoItem(char *pszName, bool bShow); void RemoveInfoItem(char *pszName); @@ -564,7 +564,7 @@ private: void UpdateSize(); void RemoveTooltip(int id); - void SetToolTip(int id, RECT *rc, TCHAR *pszText); + void SetToolTip(int id, RECT *rc, wchar_t *pszText); void PaintSkinGlyph(HDC hdc, RECT *rc, char **glyphs, COLORREF fallback); void PaintCompact(HDC hdc); @@ -590,7 +590,7 @@ extern HINSTANCE hInst; extern HANDLE hExtraMood; extern HANDLE hExtraActivity; -extern TCHAR szCoreVersion[]; +extern wchar_t szCoreVersion[]; extern unsigned int g_nTempFileId; extern int g_cbCountries; @@ -613,11 +613,11 @@ void TreeList_Reset(HWND hwnd); void TreeList_SetMode(HWND hwnd, int mode); HTREELISTITEM TreeList_GetActiveItem(HWND hwnd); void TreeList_SetSortMode(HWND hwnd, int col, BOOL descending); -void TreeList_SetFilter(HWND hwnd, TCHAR *filter); -HTREELISTITEM TreeList_AddItem(HWND hwnd, HTREELISTITEM hParent, TCHAR *text, LPARAM data); +void TreeList_SetFilter(HWND hwnd, wchar_t *filter); +HTREELISTITEM TreeList_AddItem(HWND hwnd, HTREELISTITEM hParent, wchar_t *text, LPARAM data); void TreeList_ResetItem(HWND hwnd, HTREELISTITEM hParent); void TreeList_MakeFakeParent(HTREELISTITEM hItem, BOOL flag); -void TreeList_AppendColumn(HTREELISTITEM hItem, TCHAR *text); +void TreeList_AppendColumn(HTREELISTITEM hItem, wchar_t *text); int TreeList_AddIcon(HWND hwnd, HICON hIcon, int iOverlay); void TreeList_SetIcon(HTREELISTITEM hItem, int iIcon, int iOverlay); LPARAM TreeList_GetData(HTREELISTITEM hItem); @@ -641,9 +641,9 @@ typedef struct TJabberFormLayoutInfo *HJFORMLAYOUT; void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCompact = FALSE); void JabberFormDestroyUI(HWND hwndStatic); -void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text); +void JabberFormSetInstruction(HWND hwndForm, const wchar_t *text); HJFORMLAYOUT JabberFormCreateLayout(HWND hwndStatic); // use mir_free to destroy -HJFORMCTRL JabberFormAppendControl(HWND hwndStatic, HJFORMLAYOUT layout_info, TJabberFormControlType type, const TCHAR *labelStr, const TCHAR *valueStr); +HJFORMCTRL JabberFormAppendControl(HWND hwndStatic, HJFORMLAYOUT layout_info, TJabberFormControlType type, const wchar_t *labelStr, const wchar_t *valueStr); void JabberFormLayoutControls(HWND hwndStatic, HJFORMLAYOUT layout_info, int *formHeight); HXML JabberFormGetData(HWND hwndStatic, HXML xNode); @@ -659,7 +659,7 @@ void ImageList_AddIcon_Icolib(HIMAGELIST hIml, HICON hIcon); //---- jabber_libstr.c ---------------------------------------------- -int lstrcmp_null(const TCHAR *s1, const TCHAR *s2); +int lstrcmp_null(const wchar_t *s1, const wchar_t *s2); //---- jabber_menu.c ------------------------------------------------ @@ -670,17 +670,17 @@ int g_OnToolbarInit(WPARAM, LPARAM); //---- jabber_misc.c ------------------------------------------------ void JabberChatDllError(void); -TCHAR* UnEscapeChatTags(TCHAR* str_in); +wchar_t* UnEscapeChatTags(wchar_t* str_in); //---- jabber_adhoc.cpp --------------------------------------------- struct CJabberAdhocStartupParams { - TCHAR *m_szJid; - TCHAR *m_szNode; + wchar_t *m_szJid; + wchar_t *m_szNode; CJabberProto *m_pProto; - CJabberAdhocStartupParams(CJabberProto *proto, TCHAR* szJid, TCHAR* szNode = NULL) + CJabberAdhocStartupParams(CJabberProto *proto, wchar_t* szJid, wchar_t* szNode = NULL) { m_pProto = proto; m_szJid = mir_tstrdup(szJid); @@ -702,7 +702,7 @@ struct JabberAdHocData RECT frameRect; HXML AdHocNode; HXML CommandsNode; - TCHAR *ResponderJID; + wchar_t *ResponderJID; }; //---- jabber_util.cpp ------------------------------------------------------------------ @@ -725,27 +725,27 @@ struct TStringPairs typedef char JabberShaStrBuf[2*MIR_SHA1_HASH_SIZE + 1]; -TCHAR* __stdcall JabberNickFromJID(const TCHAR *jid); -TCHAR* JabberPrepareJid(LPCTSTR jid); +wchar_t* __stdcall JabberNickFromJID(const wchar_t *jid); +wchar_t* JabberPrepareJid(LPCTSTR jid); void __stdcall JabberUrlDecodeW(WCHAR *str); char* __stdcall JabberSha1(const char *str, JabberShaStrBuf buf); -TCHAR* __stdcall JabberStrFixLines(const TCHAR *str); -void __stdcall JabberHttpUrlDecode(TCHAR *str); +wchar_t* __stdcall JabberStrFixLines(const wchar_t *str); +void __stdcall JabberHttpUrlDecode(wchar_t *str); int __stdcall JabberCombineStatus(int status1, int status2); -TCHAR* __stdcall JabberErrorStr(int errorCode); -TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int *errorCode = NULL); -time_t __stdcall JabberIsoToUnixTime(const TCHAR *stamp); -TCHAR* __stdcall JabberStripJid(const TCHAR *jid, TCHAR *dest, size_t destLen); +wchar_t* __stdcall JabberErrorStr(int errorCode); +wchar_t* __stdcall JabberErrorMsg(HXML errorNode, int *errorCode = NULL); +time_t __stdcall JabberIsoToUnixTime(const wchar_t *stamp); +wchar_t* __stdcall JabberStripJid(const wchar_t *jid, wchar_t *dest, size_t destLen); int __stdcall JabberGetPacketID(HXML n); -TCHAR* __stdcall JabberId2string(int id); +wchar_t* __stdcall JabberId2string(int id); LPCTSTR __stdcall JabberGetPictureType(HXML node, const char *picBuf); -TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen); -time_t str2time(const TCHAR*); +wchar_t* time2str(time_t _time, wchar_t *buf, size_t bufLen); +time_t str2time(const wchar_t*); -const TCHAR* JabberStrIStr(const TCHAR *str, const TCHAR *substr); -void JabberCopyText(HWND hwnd, const TCHAR *text); +const wchar_t* JabberStrIStr(const wchar_t *str, const wchar_t *substr); +void JabberCopyText(HWND hwnd, const wchar_t *text); CJabberProto* JabberChooseInstance(bool bIsLink=false); bool JabberReadXep203delay(HXML node, time_t &msgTime); -- cgit v1.2.3