From 428bf0cbd77813a43094cb5c984436deff251936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jul 2016 12:36:34 +0000 Subject: no more TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/deprecated/m_errors.h | 6 ---- include/m_awaymsg.h | 6 ---- include/m_button.h | 5 ---- include/m_chat_int.h | 2 +- include/m_cluiframes.h | 11 -------- include/m_crypto.h | 6 ---- include/m_database.h | 33 ++-------------------- include/m_descbutton.h | 9 ++---- include/m_fontservice.h | 66 ------------------------------------------- include/m_genmenu.h | 7 ----- include/m_gui.h | 2 +- include/m_hotkeys.h | 10 ++----- include/m_icolib.h | 10 ------- include/m_iconheader.h | 7 +---- include/m_imgsrvc.h | 18 ------------ include/m_langpack.h | 8 ------ include/m_message.h | 12 -------- include/m_netlib.h | 6 ---- include/m_options.h | 6 ---- include/m_popup.h | 10 ++----- include/m_protocols.h | 6 ---- include/m_protoint.h | 12 -------- include/m_protosvc.h | 26 ----------------- include/m_skin.h | 36 ++++++++++------------- include/m_string.h | 6 ---- include/m_utils.h | 10 ------- include/m_xstatus.h | 6 ---- include/newpluginapi.h | 9 ++---- 28 files changed, 28 insertions(+), 323 deletions(-) (limited to 'include') diff --git a/include/deprecated/m_errors.h b/include/deprecated/m_errors.h index c714ba4e87..ab2a37626d 100644 --- a/include/deprecated/m_errors.h +++ b/include/deprecated/m_errors.h @@ -31,12 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MERR_DEFAULT_ERROR 0x08 #define MERR_DEFAULT_ALL 0x0E -#ifdef _UNICODE - #define MERR_TCHAR MERR_UNICODE -#else - #define MERR_TCHAR 0 -#endif - // Error notifications are sorted according to this level #define MERR_LEVEL_INFO 1 #define MERR_LEVEL_WARNING 2 diff --git a/include/m_awaymsg.h b/include/m_awaymsg.h index 3b5ab38c26..0217dddeef 100644 --- a/include/m_awaymsg.h +++ b/include/m_awaymsg.h @@ -38,10 +38,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //returns status msg. Remember to free the return value using mir_free/ptrW #define MS_AWAYMSG_GETSTATUSMSGW "SRAway/GetStatusMessageW" -#ifdef _UNICODE -#define MS_AWAYMSG_GETSTATUSMSGT MS_AWAYMSG_GETSTATUSMSGW -#else -#define MS_AWAYMSG_GETSTATUSMSGT not implemented -#endif - #endif // M_AWAYMSG_H__ diff --git a/include/m_button.h b/include/m_button.h index ba75f72aee..6b754333af 100644 --- a/include/m_button.h +++ b/include/m_button.h @@ -61,11 +61,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // lParam = BATF_* flags combination // Usage: SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)LPGEN("My Tip"), 0); #define BATF_UNICODE 1 -#if defined(_UNICODE) - #define BATF_TCHAR BATF_UNICODE -#else - #define BATF_TCHAR 0 -#endif #define BUTTONADDTOOLTIP (WM_USER+5) diff --git a/include/m_chat_int.h b/include/m_chat_int.h index b0007d519d..b37c6e7ef1 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -395,7 +395,7 @@ struct CHAT_MANAGER void (*ReloadSettings)(void); void (*ColorChooser)(SESSION_INFO *si, BOOL bFG, HWND hwndDlg, HWND hwndTarget, HWND hwndChooser); - int (*DoRtfToTags)(CMString &pszText, int iNumColors, COLORREF *pColors); + int (*DoRtfToTags)(CMStringW &pszText, int iNumColors, COLORREF *pColors); int logPixelSY, logPixelSX; char *szActiveWndModule; diff --git a/include/m_cluiframes.h b/include/m_cluiframes.h index 894ab40b8f..746792f8c8 100644 --- a/include/m_cluiframes.h +++ b/include/m_cluiframes.h @@ -66,11 +66,6 @@ typedef struct tagCLISTFrame { #define F_NO_SUBCONTAINER 1024 //Support skining no subcontainer needed #define F_SKINNED 2048 // skinned frame (for owned subframe only) #define F_UNICODE 32768 //Use unicode text -#ifdef _UNICODE -# define F_TCHAR F_UNICODE -#else -# define F_TCHAR 0 -#endif // frame alignment #define alTop 0x00000001 @@ -99,12 +94,6 @@ typedef struct tagCLISTFrame { #define FO_FLOATING 0x000a //Change floating mode #define FO_UNICODETEXT 0x8000 // flag for FO_NAME,FO_TBNAME, FO_TBTIPNAME set/get lPAram as unicode wchar_t -#ifdef _UNICODE - #define FO_TCHAR FO_UNICODETEXT -#else - #define FO_TCHAR 0x0000 -#endif - ////////////////////////////////////////////////////////////////////////// //want show tooltip for statusbar diff --git a/include/m_crypto.h b/include/m_crypto.h index 1fcb7999bd..427925d56b 100644 --- a/include/m_crypto.h +++ b/include/m_crypto.h @@ -63,12 +63,6 @@ typedef MICryptoEngine* (__cdecl *pfnCryptoProviderFactory)(void); #define CPF_UNICODE 1 -#if defined(_UNICODE) - #define CPF_TCHAR CPF_UNICODE -#else - #define CPF_TCHAR 0 -#endif - typedef struct tagCRYPTOPROVIDER { DWORD dwSize; diff --git a/include/m_database.h b/include/m_database.h index d5cc35208c..fa0dcc74f3 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -59,11 +59,7 @@ extern "C" #define DBVT_BLOB 254 // cpbVal and pbVal are valid #define DBVT_UTF8 253 // pszVal is valid #define DBVT_WCHAR 252 // pwszVal is valid -#if defined(_UNICODE) -#define DBVT_TCHAR DBVT_WCHAR -#else -#define DBVT_TCHAR DBVT_ASCIIZ -#endif + #define DBVTF_VARIABLELENGTH 0x80 typedef struct @@ -323,18 +319,6 @@ MIR_CORE_DLL(BOOL) db_set_resident(LPCSTR szModule, const char *szService, BOOL #define db_get_ws(a,b,c,d) db_get_s(a,b,c,d,DBVT_WCHAR) #define db_get_utf(a,b,c,d) db_get_s(a,b,c,d,DBVT_UTF8) -#ifdef _UNICODE -#define db_get_ts(a,b,c,d) db_get_s(a,b,c,d,DBVT_WCHAR) -#define db_get_tsa db_get_wsa -#define db_set_ts db_set_ws -#define db_get_tstatic db_get_wstatic -#else -#define db_get_ts(a,b,c,d) db_get_s(a,b,c,d,DBVT_ASCIIZ) -#define db_get_tsa db_get_sa -#define db_set_ts db_set_s -#define db_get_tstatic db_get_static -#endif - #if defined(__cplusplus) } #endif @@ -365,17 +349,10 @@ pszName is a pointer to the buffer that receives the path of the profile cbSize is the size in characters of the pszName buffer Returns 0 on success or nonzero otherwise */ + #define MS_DB_GETPROFILEPATH "DB/GetProfilePath" #define MS_DB_GETPROFILEPATHW "DB/GetProfilePathW" -#if defined(_UNICODE) - #define MS_DB_GETPROFILEPATHT MS_DB_GETPROFILEPATHW - #define MS_DB_GETPROFILENAMET MS_DB_GETPROFILENAMEW -#else - #define MS_DB_GETPROFILEPATHT MS_DB_GETPROFILEPATH - #define MS_DB_GETPROFILENAMET MS_DB_GETPROFILENAME -#endif - /* DB/SetDefaultProfile service Sets the default profile name programmatically Analog of Database/DefaultProfile in mirandaboot.ini @@ -555,12 +532,6 @@ __forceinline WCHAR* DbGetEventTextW(DBEVENTINFO* dbei, int codepage) return (WCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp); } -__forceinline TCHAR* DbGetEventTextT(DBEVENTINFO* dbei, int codepage) -{ - DBEVENTGETTEXT temp = { dbei, DBVT_TCHAR, codepage }; - return (TCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp); -} - /* DB/Event/GetIcon (0.7.0.1+) Retrieves the event's icon wParam = (WPARAM)(int)flags - use LR_SHARED for shared HICON diff --git a/include/m_descbutton.h b/include/m_descbutton.h index 3f11bcd866..0c3a0ce94c 100644 --- a/include/m_descbutton.h +++ b/include/m_descbutton.h @@ -31,11 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MDBCF_SHAREDICON 0x01 #define MDBCF_UNICODE 0x02 -#ifdef _UNICODE - #define MDBCF_TCHAR MDBCF_UNICODE -#else - #define MDBCF_TCHAR 0 -#endif #define DBCM_FIRST (WM_USER+1024) #define DBCM_LAST (ITCM_FIRST+64) @@ -45,9 +40,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DBCM_SETICON (DBCM_FIRST+3) //WPARAM is set of flags, LPARAM icon handle #define MDescButton_SetTitle(hwnd, title) \ - (SendMessage((hwnd), DBCM_SETTITLE, MDBCF_TCHAR, (LPARAM)(title))) + (SendMessage((hwnd), DBCM_SETTITLE, MDBCF_UNICODE, (LPARAM)(title))) #define MDescButton_SetDescription(hwnd, title) \ - (SendMessage((hwnd), DBCM_SETDESCRIPTION, MDBCF_TCHAR, (LPARAM)(title))) + (SendMessage((hwnd), DBCM_SETDESCRIPTION, MDBCF_UNICODE, (LPARAM)(title))) #define MDescButton_SetIcon(hwnd, hicon) \ (SendMessage((hwnd), DBCM_SETICON, 0, (LPARAM)(hicon))) #define MDescButton_SetIconShared(hwnd, hicon) \ diff --git a/include/m_fontservice.h b/include/m_fontservice.h index a0667721c9..10fb006760 100644 --- a/include/m_fontservice.h +++ b/include/m_fontservice.h @@ -57,12 +57,6 @@ typedef struct FontSettingsW_tag } FontSettingsW; -#if defined( _UNICODE ) - #define FontSettingsT FontSettingsW -#else - #define FontSettingsT FontSettings -#endif - // a font identifier structure - used for registering a font, and getting one out again // WARNING: do not use Translate(TS) for name or group as they @@ -100,12 +94,6 @@ typedef struct FontIDW_tag } FontIDW; -#if defined( _UNICODE ) - #define FontIDT FontIDW -#else - #define FontIDT FontID -#endif - // register a font // wparam = (FontID *)&font_id // lparam = hLangpack @@ -120,14 +108,6 @@ __forceinline void FontRegisterW( FontIDW* pFontID ) { CallService("Font/RegisterW", (WPARAM)pFontID, hLangpack); } -#if defined( _UNICODE ) - #define MS_FONT_REGISTERT MS_FONT_REGISTERW - #define FontRegisterT FontRegisterW -#else - #define MS_FONT_REGISTERT MS_FONT_REGISTER - #define FontRegisterT FontRegister -#endif - // get a font // will fill the logfont structure passed in with the user's choices, or the default if it was set and the user has not chosen a font yet, // or the global default font settings otherwise (i.e. no user choice and default set, or font not registered) @@ -138,12 +118,6 @@ __forceinline void FontRegisterW( FontIDW* pFontID ) #define MS_FONT_GET "Font/Get" #define MS_FONT_GETW "Font/GetW" -#if defined( _UNICODE ) - #define MS_FONT_GETT MS_FONT_GETW -#else - #define MS_FONT_GETT MS_FONT_GET -#endif - // fired when a user modifies font settings, so reload your fonts // wparam = lparam = 0 #define ME_FONT_RELOAD "Font/Reload" @@ -186,12 +160,6 @@ typedef struct ColourIDW_tag } ColourIDW; -#if defined( _UNICODE ) - #define ColourIDT ColourIDW -#else - #define ColourIDT ColourID -#endif - // register a colour (this should be used for everything except actual text colour for registered fonts) // [note - a colour with name 'Background' [translated!] has special meaning and will be used as the background colour of // the font list box in the options, for the given group] @@ -206,26 +174,12 @@ __forceinline void ColourRegisterW(ColourIDW* pColorID) { CallService("Colour/RegisterW", (WPARAM)pColorID, hLangpack); } -#if defined( _UNICODE ) - #define MS_COLOUR_REGISTERT MS_COLOUR_REGISTERW - #define ColourRegisterT ColourRegisterW -#else - #define MS_COLOUR_REGISTERT MS_COLOUR_REGISTER - #define ColourRegisterT ColourRegister -#endif - // get a colour // wparam = (ColourID *)&colour_id (only name and group matter) // rerturns the colour (as COLORREF), or -1 if not found #define MS_COLOUR_GET "Colour/Get" #define MS_COLOUR_GETW "Colour/GetW" -#if defined( _UNICODE ) - #define MS_COLOUR_GETT MS_COLOUR_GETW -#else - #define MS_COLOUR_GETT MS_COLOUR_GET -#endif - // fired when a user modifies font settings, so reget your fonts and colours // wparam = lparam = 0 #define ME_COLOUR_RELOAD "Colour/Reload" @@ -275,12 +229,6 @@ typedef struct EffectIDW_tag } EffectIDW; -#if defined( _UNICODE ) - #define EffectIDT EffectIDW -#else - #define EffectIDT EffectID -#endif - // register an effect // wparam = (EffectID *)&effect_id // lparam = 0 @@ -293,14 +241,6 @@ __forceinline void EffectRegisterW(EffectIDW* pEffectID) { CallService("Effect/RegisterW", (WPARAM)pEffectID, hLangpack); } -#if defined( _UNICODE ) - #define MS_EFFECT_REGISTERT MS_EFFECT_REGISTERW - #define EffectRegisterT EffectRegisterW -#else - #define MS_EFFECT_REGISTERT MS_EFFECT_REGISTER - #define EffectRegisterT EffectRegister -#endif - // get a effect // wparam = (EffectID *)&effect_id (only name and group matter) // lparam = (FONTEFFECT *)&effect @@ -308,12 +248,6 @@ __forceinline void EffectRegisterW(EffectIDW* pEffectID) #define MS_EFFECT_GET "Effect/Get" #define MS_EFFECT_GETW "Effect/GetW" -#if defined( _UNICODE ) - #define MS_EFFECT_GETT MS_EFFECT_GETW -#else - #define MS_EFFECT_GETT MS_EFFECT_GET -#endif - // fired when a user modifies font settings, so reget your fonts and colours // wparam = lparam = 0 #define ME_EFFECT_RELOAD "Effect/Reload" diff --git a/include/m_genmenu.h b/include/m_genmenu.h index 15a7ded349..aa442e6ae3 100644 --- a/include/m_genmenu.h +++ b/include/m_genmenu.h @@ -30,14 +30,7 @@ #define CMIF_NOTOFFLIST 0x0040 // item won't appear on contacts that have the 'NotOnList' setting #define CMIF_UNMOVABLE 0x0080 // item's position cannot be changed #define CMIF_SYSTEM 0x0100 // item's presence & position cannot be changed - #define CMIF_UNICODE 0x0200 // will use wchar_t* instead of char* -#if defined(_UNICODE) -#define CMIF_TCHAR CMIF_UNICODE -#else -#define CMIF_TCHAR 0 -#endif - #define CMIF_KEEPUNTRANSLATED 0x0400 // don't translate a menu item #define CMIF_CUSTOM 0x0800 // custom menu item. doesn't exist in a code #define CMIF_DEFAULT 0x1000 // this menu item is the default one diff --git a/include/m_gui.h b/include/m_gui.h index 9090efc69a..c37b37bd8b 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -356,7 +356,7 @@ private: public: __forceinline CMOptionLink(CMOption &option) : - CDataLink(DBVT_TCHAR), m_option(&option) + CDataLink(DBVT_WCHAR), m_option(&option) {} __forceinline DWORD LoadInt() { return 0; } diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index a732dda242..913d586242 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -29,23 +29,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define HKD_UNICODE 0x0001 -#if defined(_UNICODE) - #define HKD_TCHAR HKD_UNICODE -#else - #define HKD_TCHAR 0 -#endif - typedef struct { int cbSize; const char *pszName; /* name to refer to hotkey when playing and in db */ union { const char *pszDescription; /* description for options dialog */ - const wchar_t *ptszDescription; + const wchar_t *pwszDescription; }; union { const char *pszSection; /* section name used to group sounds (NULL is acceptable) */ - const wchar_t *ptszSection; + const wchar_t *pwszSection; }; const char *pszService; /* Service to call when HotKey Pressed */ WORD DefHotKey; /* default hot key for action */ diff --git a/include/m_icolib.h b/include/m_icolib.h index cdef7dfae6..6e9efe6e5d 100644 --- a/include/m_icolib.h +++ b/include/m_icolib.h @@ -41,16 +41,6 @@ extern int hLangpack; #define SIDF_PATH_UNICODE 0x200 // Default File is in UCS-2 #define SIDF_ALL_UNICODE SIDF_PATH_UNICODE | SIDF_UNICODE -#if defined(_UNICODE) - #define SIDF_TCHAR SIDF_UNICODE - #define SIDF_PATH_TCHAR SIDF_PATH_UNICODE - #define SIDF_ALL_TCHAR SIDF_ALL_UNICODE -#else - #define SIDF_TCHAR 0 - #define SIDF_PATH_TCHAR 0 - #define SIDF_ALL_TCHAR 0 -#endif - struct SKINICONDESC { MAllStrings section; // section name used to group icons diff --git a/include/m_iconheader.h b/include/m_iconheader.h index 715ce3408b..d577f00bd6 100644 --- a/include/m_iconheader.h +++ b/include/m_iconheader.h @@ -31,11 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MITCF_SHAREDICON 0x01 #define MITCF_UNICODE 0x02 -#ifdef _UNICODE - #define MITCF_TCHAR MITCF_UNICODE -#else - #define MITCF_TCHAR 0 -#endif #define ITCM_FIRST (WM_USER+1024) #define ITCM_LAST (ITCM_FIRST+64) @@ -74,7 +69,7 @@ typedef struct { static __forceinline void MIcoTab_AddItem(HWND hwnd, TCHAR *lptzName, HICON hIcon, LPARAM data, BOOL bSharedIcon) { MIcoTab mit = {0}; - mit.flag = (bSharedIcon?MITCF_SHAREDICON:0)|MITCF_TCHAR; + mit.flag = (bSharedIcon?MITCF_SHAREDICON:0)| MITCF_UNICODE; mit.hIcon = hIcon; mit.tcsName = lptzName; mit.data = data; diff --git a/include/m_imgsrvc.h b/include/m_imgsrvc.h index 0d829a7551..005eb67422 100644 --- a/include/m_imgsrvc.h +++ b/include/m_imgsrvc.h @@ -344,18 +344,6 @@ typedef struct _tagFI_interface { } FI_INTERFACE; -#if defined(UNICODE) || defined(_UNICODE) -#define FI_GetFIFFromFilenameT FI_GetFIFFromFilenameU -#define FI_GetFileTypeT FI_GetFileTypeU -#define FI_LoadT FI_LoadU -#define FI_OpenMultiBitmapT FI_OpenMultiBitmapU -#else -#define FI_GetFIFFromFilenameT FI_GetFIFFromFilename -#define FI_GetFileTypeT FI_GetFileType -#define FI_LoadT FI_Load -#define FI_OpenMultiBitmapT FI_OpenMultiBitmap -#endif - /* * image services * @@ -398,12 +386,6 @@ typedef struct _tagFI_interface { #define IMGL_WCHAR 2 // filename is wchar_t -#if defined(UNICODE) || defined(_UNICODE) - #define IMGL_TCHAR IMGL_WCHAR -#else - #define IMGL_TCHAR 0 -#endif - // load an image from disk // wParam = full path and filename to the image // lParam = IMGL_* flags diff --git a/include/m_langpack.h b/include/m_langpack.h index 56f8c5b9ce..3262c62bc5 100644 --- a/include/m_langpack.h +++ b/include/m_langpack.h @@ -54,14 +54,6 @@ EXTERN_C MIR_CORE_DLL(void) TranslateDialog_LP(HWND hDlg, int hLang); #define TranslateT(s) TranslateW_LP(_A2W(s), hLangpack) #define TranslateDialogDefault(h) TranslateDialog_LP(h,hLangpack) -#ifdef _UNICODE - #define TranslateTS(s) TranslateW_LP(s,hLangpack) - #define TranslateTH(l,s) TranslateW_LP(s,l) -#else - #define TranslateTS(s) TranslateA_LP(s,hLangpack) - #define TranslateTH(l,s) TranslateA_LP(s,l) -#endif - // If you're storing some string for calling later-on Translate or using it // with an API call that does translation automatically marked with // [TRANSLATED-BY-CORE] please wrap it with one of LPGEN macros in order to diff --git a/include/m_message.h b/include/m_message.h index 224384437a..5c68940eaa 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -40,12 +40,6 @@ extern int hLangpack; #define MS_MSG_SENDMESSAGE "SRMsg/SendCommand" #define MS_MSG_SENDMESSAGEW "SRMsg/SendCommandW" -#ifdef _UNICODE -#define MS_MSG_SENDMESSAGET MS_MSG_SENDMESSAGEW -#else -#define MS_MSG_SENDMESSAGET MS_MSG_SENDMESSAGE -#endif - #define ME_MSG_WINDOWEVENT "MessageAPI/WindowEvent" //wparam = 0 //lparam = (WPARAM)(MessageWindowEventData*)hWindowEvent; @@ -166,12 +160,6 @@ typedef struct { #define MBF_HIDDEN 0x02 #define MBF_UNICODE 0x04 -#ifdef _UNICODE - #define MBF_TCHAR MBF_UNICODE -#else - #define MBF_TCHAR 0 -#endif - typedef struct { int cbSize; // must be equal to sizeof(StatusIconData) char *szModule; // used in combo with the dwId below to create a unique identifier diff --git a/include/m_netlib.h b/include/m_netlib.h index 577eb3b2a9..e5dbc7ca00 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -90,12 +90,6 @@ typedef struct { #define NUF_UNICODE 0x40 // if set ptszDescriptiveName points to Unicode, otherwise it points to ANSI string #define MS_NETLIB_REGISTERUSER "Netlib/RegisterUser" -#if defined(_UNICODE) - #define NUF_TCHAR NUF_UNICODE -#else - #define NUF_TCHAR 0 -#endif - ///////////////////////////////////////////////////////////////////////////////////////// // Assign a Netlib user handle a set of dynamic HTTP headers to be used with all // diff --git a/include/m_options.h b/include/m_options.h index 50dd7e1627..3e0f4243b6 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -92,12 +92,6 @@ typedef struct { #define ODPF_USERINFOTAB 16 // options page is tabbed #define ODPF_DONTTRANSLATE 32 // do not translate option page title -#if defined(_UNICODE) - #define ODPF_TCHAR ODPF_UNICODE -#else - #define ODPF_TCHAR 0 -#endif - #define PSM_GETBOLDFONT (WM_USER+102) //returns HFONT used for group box titles __forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp) diff --git a/include/m_popup.h b/include/m_popup.h index 87d69bb297..d19054520f 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -61,14 +61,8 @@ typedef struct // this data, however you MUST NOT chahge that. // unicode or ansi mode -#define PU2_ANSI 0x00 -#define PU2_UNICODE 0x01 -#if defined(UNICODE) || defined(_UNICODE) -#define PU2_TCHAR PU2_UNICODE -#else -#define PU2_TCHAR PU2_ANSI -#endif - +#define PU2_ANSI 0x00 +#define PU2_UNICODE 0x01 #define PU2_CUSTOM_POPUP 0x02 typedef struct diff --git a/include/m_protocols.h b/include/m_protocols.h index f1cb75c125..cc19e7e8b1 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -106,12 +106,6 @@ typedef struct { #define PFTS_UNICODE 2 #define PFTS_UTF 4 -#if defined(_UNICODE) - #define PFTS_TCHAR PFTS_UNICODE -#else - #define PFTS_TCHAR 0 -#endif - typedef struct tagPROTOFILETRANSFERSTATUS { size_t cbSize; diff --git a/include/m_protoint.h b/include/m_protoint.h index 10bb8d3685..5bf7092524 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -182,18 +182,6 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject __forceinline void setWString(const char *name, const WCHAR* value) { db_set_ws(NULL, m_szModuleName, name, value); } __forceinline void setWString(MCONTACT hContact, const char *name, const WCHAR* value) { db_set_ws(hContact, m_szModuleName, name, value); } - #if defined(_UNICODE) - #define debugLog debugLogW - #define getTString getWString - #define getTStringA getWStringA - #define setTString setWString - #else - #define debugLog debugLogA - #define getTString getString - #define getTStringA getStringA - #define setTString setString - #endif - ////////////////////////////////////////////////////////////////////////////////////// // Virtual functions diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 831aa08d91..86708741e9 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -338,12 +338,6 @@ static __inline unsigned long Proto_Status2Flag(int status) #define PSR_UNICODE 0x0001 // all strings go in UTF16-LE #define PSR_UTF8 0x0002 // all strings go in UTF8 -#if defined(_UNICODE) - #define PSR_TCHAR PSR_UNICODE -#else - #define PSR_TCHAR 0 -#endif - typedef struct { int cbSize; MAllStrings nick; @@ -518,11 +512,6 @@ typedef struct { // Remember to mir_free the return value #define SGMA_UNICODE 1 // return Unicode status -#if defined(_UNICODE) - #define SGMA_TCHAR SGMA_UNICODE -#else - #define SGMA_TCHAR 0 -#endif #define PS_GETMYAWAYMSG "/GetMyAwayMsg" @@ -533,11 +522,6 @@ typedef struct { // return = 0 for success #define SMNN_UNICODE 1 // return Unicode status -#if defined(_UNICODE) - #define SMNN_TCHAR SMNN_UNICODE -#else - #define SMNN_TCHAR 0 -#endif #define PS_SETMYNICKNAME "/SetNickname" @@ -552,11 +536,6 @@ typedef struct { // WAYD = What are you doing #define WAYD_UNICODE 1 // return Unicode texts -#if defined(_UNICODE) - #define WAYD_TCHAR WAYD_UNICODE -#else - #define WAYD_TCHAR 0 -#endif /////////////////////////////////////////////////////////////////////////////// // Get the WAYD message for the user @@ -821,11 +800,6 @@ __forceinline INT_PTR Proto_AuthRecv(const char *szProtoName, PROTORECVEVENT *pc // lParam = (LPARAM)(PROTORECVFILET*)&prf #define PRFF_UNICODE 1 -#if defined(_UNICODE) - #define PRFF_TCHAR PRFF_UNICODE -#else - #define PRFF_TCHAR 0 -#endif typedef struct { DWORD dwFlags; // PRFF_* diff --git a/include/m_skin.h b/include/m_skin.h index b31f6ada56..d198a308d3 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -129,26 +129,20 @@ EXTERN_C MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, #define SSDF_UNICODE 0x0001 -#if defined(_UNICODE) - #define SSDF_TCHAR SSDF_UNICODE -#else - #define SSDF_TCHAR 0 -#endif - typedef struct { int cbSize; const char *pszName; // name to refer to sound when playing and in db union { const char *pszDescription; // [TRANSLATED-BY-CORE] description for options dialog - const TCHAR *ptszDescription; + const wchar_t *pwszDescription; }; union { const char *pszDefaultFile; // default sound file to use - const TCHAR *ptszDefaultFile; + const wchar_t *pwszDefaultFile; }; union { const char *pszSection; // [TRANSLATED-BY-CORE] section name used to group sounds (NULL is acceptable) - const TCHAR *ptszSection; + const wchar_t *pwszSection; }; DWORD dwFlags; } @@ -165,15 +159,15 @@ __forceinline INT_PTR SkinAddNewSoundEx(const char *name, const char *section, c return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd); } -__forceinline INT_PTR SkinAddNewSoundExT(const char *name, const TCHAR *section, const TCHAR *description, const TCHAR *defaultFile = NULL) +__forceinline INT_PTR SkinAddNewSoundExW(const char *name, const wchar_t *section, const wchar_t *description, const wchar_t *defaultFile = NULL) { SKINSOUNDDESCEX ssd = { 0 }; ssd.cbSize = sizeof(ssd); - ssd.dwFlags = SSDF_TCHAR; + ssd.dwFlags = SSDF_UNICODE; ssd.pszName = name; - ssd.ptszSection = section; - ssd.ptszDescription = description; - ssd.ptszDefaultFile = defaultFile; + ssd.pwszSection = section; + ssd.pwszDescription = description; + ssd.pwszDefaultFile = defaultFile; return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd); } @@ -182,7 +176,7 @@ __forceinline INT_PTR Skin_AddSound(SKINSOUNDDESCEX *ssd) return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)ssd); } -#define MS_SKIN_PLAYSOUND "Skin/Sounds/Play" +#define MS_SKIN_PLAYSOUND "Skin/Sounds/Play" ///////////////////////////////////////////////////////////////////////////////////////// // plays a named sound event @@ -194,13 +188,13 @@ __forceinline INT_PTR SkinPlaySound(const char *name) { return CallService(MS_SKIN_PLAYSOUND, 0, (LPARAM)name); } -#define MS_SKIN_PLAYSOUNDFILE "Skin/Sounds/PlayFile" +#define MS_SKIN_PLAYSOUNDFILE "Skin/Sounds/PlayFile" ///////////////////////////////////////////////////////////////////////////////////////// // plays any sound file // wParam = 0 -// lParam = (LPARAM)(const TCHAR*)ptszFileName -__forceinline INT_PTR SkinPlaySoundFile(const TCHAR *ptszFileName) { +// lParam = (LPARAM)(const wchar_t*)ptszFileName +__forceinline INT_PTR SkinPlaySoundFile(const wchar_t *ptszFileName) { return CallService(MS_SKIN_PLAYSOUNDFILE, 0, (LPARAM)ptszFileName); } @@ -212,14 +206,14 @@ EXTERN_C MIR_APP_DLL(void) KillModuleSounds(int hLangpack); // sent when the icons DLL has been changed in the options dialog, and everyone // should re-make their image lists // wParam = lParam = 0 -#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged" +#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged" ///////////////////////////////////////////////////////////////////////////////////////// // wParam: 0 when playing sound (1 when sound is being previewed) -// lParam: (TCHAR*) pszSoundFile +// lParam: (wchar_t*) pszSoundFile // Affect: This hook is fired when the sound module needs to play a sound // Note : This event has default processing, if no one HookEvent()'s this event then it will // use the default hook code, which uses PlaySound() -#define ME_SKIN_PLAYINGSOUND "Skin/Sounds/Playing" +#define ME_SKIN_PLAYINGSOUND "Skin/Sounds/Playing" #endif //M_SKIN_H__ diff --git a/include/m_string.h b/include/m_string.h index 15d34aac8a..6bcdbd3c5f 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -961,10 +961,4 @@ MIR_CORE_EXPORT CMStringT CALLBACK operator+(char ch1, c typedef CMStringT< wchar_t, ChTraitsCRT< wchar_t > > CMStringW; typedef CMStringT< char, ChTraitsCRT< char > > CMStringA; -#ifdef _UNICODE - typedef CMStringW CMString; -#else - typedef CMStringA CMString; -#endif - #endif // M_STRING_H__ diff --git a/include/m_utils.h b/include/m_utils.h index c7eef10006..c8e4cac76f 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -284,8 +284,6 @@ EXTERN_C MIR_CORE_DLL(int) PathToAbsolute(const char *pszSrc, char *pszOut, cons EXTERN_C MIR_CORE_DLL(int) PathToAbsoluteW(const wchar_t *pwszSrc, wchar_t *pwszOut, const wchar_t* pwszBase); #endif -#define PathToAbsoluteT PathToAbsoluteW - ///////////////////////////////////////////////////////////////////////////////////////// // Creates a directory tree (even more than one directories levels are missing) // Returns 0 on success or an error code otherwise @@ -293,8 +291,6 @@ EXTERN_C MIR_CORE_DLL(int) PathToAbsoluteW(const wchar_t *pwszSrc, wchar_t *pwsz EXTERN_C MIR_CORE_DLL(int) CreateDirectoryTree(const char *pszDir); EXTERN_C MIR_CORE_DLL(int) CreateDirectoryTreeW(const wchar_t *pwszDir); -#define CreateDirectoryTreeT CreateDirectoryTreeW - ///////////////////////////////////////////////////////////////////////////////////////// // Creates all subdirectories required to create a file with the file name given // Returns 0 on success or an error code otherwise @@ -302,8 +298,6 @@ EXTERN_C MIR_CORE_DLL(int) CreateDirectoryTreeW(const wchar_t *pwszDir); EXTERN_C MIR_CORE_DLL(void) CreatePathToFile(char *wszFilePath); EXTERN_C MIR_CORE_DLL(void) CreatePathToFileW(wchar_t *wszFilePath); -#define CreatePathToFileT CreatePathToFileW - ///////////////////////////////////////////////////////////////////////////////////////// // Checks if a file name is absolute or not // returns TRUE if yes or FALSE if not @@ -311,8 +305,6 @@ EXTERN_C MIR_CORE_DLL(void) CreatePathToFileW(wchar_t *wszFilePath); EXTERN_C MIR_CORE_DLL(int) PathIsAbsolute(const char *pSrc); EXTERN_C MIR_CORE_DLL(int) PathIsAbsoluteW(const wchar_t *pSrc); -#define PathIsAbsoluteT PathIsAbsoluteW - ///////////////////////////////////////////////////////////////////////////////////////// // Generates Random number of any length // wParam = size - length of the random number to generate @@ -384,8 +376,6 @@ EXTERN_C MIR_APP_DLL(wchar_t*) Utils_ReplaceVarsW(const wchar_t *szData, MCONTAC ptrW(Utils_ReplaceVarsW(str)) {} }; - - typedef VARSW VARST; #endif ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/m_xstatus.h b/include/m_xstatus.h index 7ef91f2123..89d34aee27 100644 --- a/include/m_xstatus.h +++ b/include/m_xstatus.h @@ -38,12 +38,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CSSF_STR_SIZES 0x0200 // returns sizes of custom status name & message (wParam & lParam members) in chars #define CSSF_UNICODE 0x1000 // strings are in UCS-2 -#if defined(_UNICODE) - #define CSSF_TCHAR CSSF_UNICODE -#else - #define CSSF_TCHAR 0 -#endif - typedef struct { int cbSize; // size of the structure int flags; // combination of CSSF_* diff --git a/include/newpluginapi.h b/include/newpluginapi.h index 157549f2c1..418c928234 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -30,13 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PLUGIN_MAKE_VERSION(a, b, c, d) (((((DWORD)(a))&0xFF)<<24)|((((DWORD)(b))&0xFF)<<16)|((((DWORD)(c))&0xFF)<<8)|(((DWORD)(d))&0xFF)) #define MAXMODULELABELLENGTH 64 -#if defined(_UNICODE) - #define UNICODE_AWARE 0x0001 -#else - #define UNICODE_AWARE 0x0000 -#endif - -#define STATIC_PLUGIN 0x0002 +#define UNICODE_AWARE 0x0001 +#define STATIC_PLUGIN 0x0002 ///////////////////////////////////////////////////////////////////////////////////////// // The UUID structure below is used to for plugin UUID's and module type definitions -- cgit v1.2.3