diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-29 16:24:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-29 16:24:08 +0000 |
commit | e4709ec279fe4e531d33154c3b833a715cf56fbc (patch) | |
tree | 4f4183bc7486783e0fd6f6c10f5ce370c01468a8 | |
parent | c70673812db722c68caef569e2c299f5462b9c13 (diff) |
removing TCHAR + WCHAR from headers
git-svn-id: http://svn.miranda-ng.org/main/trunk@17146 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
39 files changed, 320 insertions, 320 deletions
diff --git a/include/deprecated/m_errors.h b/include/deprecated/m_errors.h index ab2a37626d..a227d64f8b 100644 --- a/include/deprecated/m_errors.h +++ b/include/deprecated/m_errors.h @@ -60,9 +60,9 @@ typedef struct char *name;
union {
- TCHAR *ptszTitle;
+ wchar_t *ptszTitle;
char *pszTitle;
- WCHAR *pwszTitle;
+ wchar_t *pwszTitle;
};
} MIRANDAERROR_TYPE;
@@ -74,9 +74,9 @@ typedef struct char *type;
union {
- TCHAR *ptszModuleTitle;
+ wchar_t *ptszModuleTitle;
char *pszModuleTitle;
- WCHAR *pwszModuleTitle;
+ wchar_t *pwszModuleTitle;
};
int buttons;
@@ -88,14 +88,14 @@ typedef struct // information itself
HANDLE hContact;
union {
- TCHAR *ptszTitle;
+ wchar_t *ptszTitle;
char *pszTitle;
- WCHAR *pwszTitle;
+ wchar_t *pwszTitle;
};
union {
- TCHAR *ptszText;
+ wchar_t *ptszText;
char *pszText;
- WCHAR *pwszText;
+ wchar_t *pwszText;
};
// filled by core and may be used in handlers.
@@ -112,9 +112,9 @@ typedef struct HANDLE hIcolibIcon;
union {
- TCHAR *ptszTitle;
+ wchar_t *ptszTitle;
char *pszTitle;
- WCHAR *pwszTitle;
+ wchar_t *pwszTitle;
};
} MIRANDAERROR_HANDLER;
@@ -130,7 +130,7 @@ typedef struct #define DEFVAL(x)
#endif
- static __forceinline void mir_ReportError(HANDLE hContact, TCHAR *ptszModuleTitle, char *pszType, TCHAR *ptszText, TCHAR *ptszTitle DEFVAL(NULL))
+ static __forceinline void mir_ReportError(HANDLE hContact, wchar_t *ptszModuleTitle, char *pszType, wchar_t *ptszText, wchar_t *ptszTitle DEFVAL(NULL))
{
MIRANDAERROR err = {0};
err.cbSize = sizeof(err);
diff --git a/include/m_avatars.h b/include/m_avatars.h index 00ea200854..65b1375011 100644 --- a/include/m_avatars.h +++ b/include/m_avatars.h @@ -81,7 +81,7 @@ typedef struct avatarCacheEntry // use it whenever they access the avatar. may be used in the future
// to implement cache expiration
LPVOID lpDIBSection; // unused field
- TCHAR szFilename[MAX_PATH]; // filename of the avatar (absolute path)
+ wchar_t szFilename[MAX_PATH]; // filename of the avatar (absolute path)
}
AVATARCACHEENTRY;
@@ -217,8 +217,8 @@ typedef struct _contactAvatarChangedNotification { int cbSize; // sizeof()
MCONTACT hContact; // this might have to be set by the caller too
int format; // PA_FORMAT_*
- TCHAR filename[MAX_PATH]; // full path to filename which contains the avatar
- TCHAR hash[128]; // avatar hash
+ wchar_t filename[MAX_PATH]; // full path to filename which contains the avatar
+ wchar_t hash[128]; // avatar hash
} CONTACTAVATARCHANGEDNOTIFICATION;
// fired when the contacts avatar is changed by the contact
@@ -254,13 +254,13 @@ typedef struct _contactAvatarChangedNotification { /*
wParam=0
-lParam=(const TCHAR*)Avatar file name or NULL to remove the avatar
+lParam=(const wchar_t*)Avatar file name or NULL to remove the avatar
return=0 for sucess
*/
#define PS_SETMYAVATAR "/SetMyAvatar"
/*
-wParam=(TCHAR*)Buffer to file name
+wParam=(wchar_t*)Buffer to file name
lParam=(int)Buffer size
return=0 for sucess
*/
diff --git a/include/m_awaymsg.h b/include/m_awaymsg.h index 0217dddeef..05ab9fe88e 100644 --- a/include/m_awaymsg.h +++ b/include/m_awaymsg.h @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //returns immediately, without waiting for the message to retrieve
#define MS_AWAYMSG_SHOWAWAYMSG "SRAway/GetMessage"
-//returns (TCHAR*)the default status message for a status
+//returns (wchar_t*)the default status message for a status
//wParam = (int)status
//lParam = (LPARAM)(char*)szProto
//returns status msg. Remember to free the return value using mir_free/ptrW
diff --git a/include/m_button_int.h b/include/m_button_int.h index 400ebf443a..c700718774 100644 --- a/include/m_button_int.h +++ b/include/m_button_int.h @@ -42,7 +42,7 @@ struct MButtonCtrl HBITMAP hBitmap;
HTHEME hThemeButton;
HTHEME hThemeToolbar;
- TCHAR cHot;
+ wchar_t cHot;
HWND hwndToolTips;
bool bIsPushBtn, // button has two states
diff --git a/include/m_chat.h b/include/m_chat.h index ae034350be..c7a26dbbd1 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -587,18 +587,18 @@ struct GCHOOK // contains info on a menuitem to be added
struct gc_item {
- TCHAR *pszDesc; // Textual description of the menu item to add
- DWORD dwID; // when/if the user selects this menu item this
+ wchar_t *pszDesc; // Textual description of the menu item to add
+ DWORD dwID; // when/if the user selects this menu item this
// value will be returned via the above hook, GC_USER_LOGMENU
// or GC_USER_NICKLISTMENU. Must not be 0 and must be unique.
- int uType; // What kind of menu item is it? Use MENU_* flags above
- BOOL bDisabled; // should the menu item be shown as disabled
+ int uType; // What kind of menu item is it? Use MENU_* flags above
+ BOOL bDisabled; // should the menu item be shown as disabled
};
typedef struct {
LPSTR pszModule; // Contains the protocol name, do NOT change.
- LPTSTR pszID; // The unique identifier of the session that triggered the hook, do NOT change.
- LPTSTR pszUID; // Contains the unique identifier if Type = MENU_ON_NICKLIST. do NOT change.
+ LPWSTR pszID; // The unique identifier of the session that triggered the hook, do NOT change.
+ LPWSTR pszUID; // Contains the unique identifier if Type = MENU_ON_NICKLIST. do NOT change.
int Type; // Type of menu. MENU_ON_* flags used. do NOT change.
int nItems; // Set this to the number of menu items you want to add
gc_item *Item; // pointer to the first in the array of gc_item's
@@ -628,8 +628,8 @@ typedef struct { //////////////////////////////////////////////////////////////////////////
// Get Chat ToolTip Text for buddy
-// wParam = (WPARAM)(TCHAR*) roomID parentdat->ptszID
-// lParam = (WPARAM)(TCHAR*) userID ui1->pszUID
-// result (int)(TCHAR*)mir_tstrdup("tooltip text")
+// wParam = (WPARAM)(wchar_t*) roomID parentdat->ptszID
+// lParam = (WPARAM)(wchar_t*) userID ui1->pszUID
+// result (int)(wchar_t*)mir_tstrdup("tooltip text")
// returns pointer to text of tooltip and starts owns it
#define MS_GC_PROTO_GETTOOLTIPTEXT "/GetChatToolTipText"
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index b37c6e7ef1..e2c9711c4f 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -110,7 +110,7 @@ struct LOGSTREAMDATA; struct GCModuleInfoBase
{
char* pszModule;
- TCHAR* ptszModDispName;
+ wchar_t* ptszModDispName;
char* pszHeader;
bool bBold;
bool bUnderline;
@@ -145,11 +145,11 @@ struct FONTINFO struct LOGINFO
{
- TCHAR* ptszText;
- TCHAR* ptszNick;
- TCHAR* ptszUID;
- TCHAR* ptszStatus;
- TCHAR* ptszUserInfo;
+ wchar_t* ptszText;
+ wchar_t* ptszNick;
+ wchar_t* ptszUID;
+ wchar_t* ptszStatus;
+ wchar_t* ptszUserInfo;
BOOL bIsMe;
BOOL bIsHighlighted;
time_t time;
@@ -160,7 +160,7 @@ struct LOGINFO struct STATUSINFO
{
- TCHAR* pszGroup;
+ wchar_t* pszGroup;
HICON hIcon;
WORD Status;
STATUSINFO *next;
@@ -168,8 +168,8 @@ struct STATUSINFO struct USERINFO
{
- TCHAR* pszNick;
- TCHAR* pszUID;
+ wchar_t* pszNick;
+ wchar_t* pszUID;
WORD Status;
int iStatusEx;
WORD ContactStatus;
@@ -188,10 +188,10 @@ struct GCSessionInfoBase BOOL bTrimmed;
char* pszModule;
- TCHAR* ptszID;
- TCHAR* ptszName;
- TCHAR* ptszStatusbarText;
- TCHAR* ptszTopic;
+ wchar_t* ptszID;
+ wchar_t* ptszName;
+ wchar_t* ptszStatusbarText;
+ wchar_t* ptszTopic;
int iType;
int iFG;
@@ -222,7 +222,7 @@ struct GCSessionInfoBase USERINFO* pMe;
STATUSINFO* pStatuses;
- TCHAR pszLogFileName[MAX_PATH];
+ wchar_t pszLogFileName[MAX_PATH];
SESSION_INFO *next;
};
@@ -267,12 +267,12 @@ struct GlobalLogSettingsBase int iSplitterY;
int iWidth;
int iHeight;
- TCHAR* pszTimeStamp;
- TCHAR* pszTimeStampLog;
- TCHAR* pszIncomingNick;
- TCHAR* pszOutgoingNick;
- TCHAR* pszHighlightWords;
- TCHAR* pszLogDir;
+ wchar_t* pszTimeStamp;
+ wchar_t* pszTimeStampLog;
+ wchar_t* pszIncomingNick;
+ wchar_t* pszOutgoingNick;
+ wchar_t* pszHighlightWords;
+ wchar_t* pszLogDir;
HFONT UserListFont;
HFONT UserListHeadingsFont;
HFONT NameFont;
@@ -295,46 +295,46 @@ struct CHAT_MANAGER_INITDATA {
GlobalLogSettingsBase *pSettings;
int cbModuleInfo, cbSession;
- TCHAR *szFontGroup;
+ wchar_t *szFontGroup;
int iFontMode;
};
struct CHAT_MANAGER
{
- void (*SetActiveSession)(const TCHAR *pszID, const char *pszModule);
+ void (*SetActiveSession)(const wchar_t *pszID, const char *pszModule);
void (*SetActiveSessionEx)(SESSION_INFO *si);
SESSION_INFO* (*GetActiveSession)(void);
- SESSION_INFO* (*SM_AddSession)(const TCHAR *pszID, const char *pszModule);
- int (*SM_RemoveSession)(const TCHAR *pszID, const char *pszModule, BOOL removeContact);
- SESSION_INFO* (*SM_FindSession)(const TCHAR *pszID, const char *pszModule);
- USERINFO* (*SM_AddUser)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID, const TCHAR *pszNick, WORD wStatus);
- BOOL (*SM_ChangeUID)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID, const TCHAR* pszNewUID);
- BOOL (*SM_ChangeNick)(const TCHAR *pszID, const char *pszModule, GCEVENT *gce);
- BOOL (*SM_RemoveUser)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID);
- BOOL (*SM_SetOffline)(const TCHAR *pszID, const char *pszModule);
+ SESSION_INFO* (*SM_AddSession)(const wchar_t *pszID, const char *pszModule);
+ int (*SM_RemoveSession)(const wchar_t *pszID, const char *pszModule, BOOL removeContact);
+ SESSION_INFO* (*SM_FindSession)(const wchar_t *pszID, const char *pszModule);
+ USERINFO* (*SM_AddUser)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus);
+ BOOL (*SM_ChangeUID)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID, const wchar_t* pszNewUID);
+ BOOL (*SM_ChangeNick)(const wchar_t *pszID, const char *pszModule, GCEVENT *gce);
+ BOOL (*SM_RemoveUser)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID);
+ BOOL (*SM_SetOffline)(const wchar_t *pszID, const char *pszModule);
BOOL (*SM_SetTabbedWindowHwnd)(SESSION_INFO *si, HWND hwnd);
HICON (*SM_GetStatusIcon)(SESSION_INFO *si, USERINFO * ui);
- BOOL (*SM_SetStatus)(const TCHAR *pszID, const char *pszModule, int wStatus);
- BOOL (*SM_SetStatusEx)(const TCHAR *pszID, const char *pszModule, const TCHAR* pszText, int flags);
- BOOL (*SM_SendUserMessage)(const TCHAR *pszID, const char *pszModule, const TCHAR* pszText);
- STATUSINFO* (*SM_AddStatus)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszStatus);
+ BOOL (*SM_SetStatus)(const wchar_t *pszID, const char *pszModule, int wStatus);
+ BOOL (*SM_SetStatusEx)(const wchar_t *pszID, const char *pszModule, const wchar_t* pszText, int flags);
+ BOOL (*SM_SendUserMessage)(const wchar_t *pszID, const char *pszModule, const wchar_t* pszText);
+ STATUSINFO* (*SM_AddStatus)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszStatus);
BOOL (*SM_AddEventToAllMatchingUID)(GCEVENT *gce);
- BOOL (*SM_AddEvent)(const TCHAR *pszID, const char *pszModule, GCEVENT *gce, BOOL bIsHighlighted);
- LRESULT (*SM_SendMessage)(const TCHAR *pszID, const char *pszModule, UINT msg, WPARAM wParam, LPARAM lParam);
- BOOL (*SM_PostMessage)(const TCHAR *pszID, const char *pszModule, UINT msg, WPARAM wParam, LPARAM lParam);
+ BOOL (*SM_AddEvent)(const wchar_t *pszID, const char *pszModule, GCEVENT *gce, BOOL bIsHighlighted);
+ LRESULT (*SM_SendMessage)(const wchar_t *pszID, const char *pszModule, UINT msg, WPARAM wParam, LPARAM lParam);
+ BOOL (*SM_PostMessage)(const wchar_t *pszID, const char *pszModule, UINT msg, WPARAM wParam, LPARAM lParam);
BOOL (*SM_BroadcastMessage)(const char *pszModule, UINT msg, WPARAM wParam, LPARAM lParam, BOOL bAsync);
BOOL (*SM_RemoveAll)(void);
- BOOL (*SM_GiveStatus)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID, const TCHAR *pszStatus);
- BOOL (*SM_SetContactStatus)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID, WORD pszStatus);
- BOOL (*SM_TakeStatus)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID, const TCHAR *pszStatus);
- BOOL (*SM_MoveUser)(const TCHAR *pszID, const char *pszModule, const TCHAR *pszUID);
- void (*SM_AddCommand)(const TCHAR *pszID, const char *pszModule, const char* lpNewCommand);
- char* (*SM_GetPrevCommand)(const TCHAR *pszID, const char *pszModule);
- char* (*SM_GetNextCommand)(const TCHAR *pszID, const char *pszModule);
+ BOOL (*SM_GiveStatus)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID, const wchar_t *pszStatus);
+ BOOL (*SM_SetContactStatus)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID, WORD pszStatus);
+ BOOL (*SM_TakeStatus)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID, const wchar_t *pszStatus);
+ BOOL (*SM_MoveUser)(const wchar_t *pszID, const char *pszModule, const wchar_t *pszUID);
+ void (*SM_AddCommand)(const wchar_t *pszID, const char *pszModule, const char* lpNewCommand);
+ char* (*SM_GetPrevCommand)(const wchar_t *pszID, const char *pszModule);
+ char* (*SM_GetNextCommand)(const wchar_t *pszID, const char *pszModule);
int (*SM_GetCount)(const char *pszModule);
SESSION_INFO* (*SM_FindSessionByIndex)(const char *pszModule, int iItem);
char* (*SM_GetUsers)(SESSION_INFO *si);
- USERINFO* (*SM_GetUserFromIndex)(const TCHAR *pszID, const char *pszModule, int index);
+ USERINFO* (*SM_GetUserFromIndex)(const wchar_t *pszID, const char *pszModule, int index);
void (*SM_InvalidateLogDirectories)(void);
MODULEINFO* (*MM_AddModule)(const char *pszModule);
@@ -344,54 +344,54 @@ struct CHAT_MANAGER void (*MM_IconsChanged)(void);
BOOL (*MM_RemoveAll)(void);
- STATUSINFO* (*TM_AddStatus)(STATUSINFO** ppStatusList, const TCHAR *pszStatus, int* iCount);
- STATUSINFO* (*TM_FindStatus)(STATUSINFO* pStatusList, const TCHAR *pszStatus);
- WORD (*TM_StringToWord)(STATUSINFO* pStatusList, const TCHAR *pszStatus);
- TCHAR* (*TM_WordToString)(STATUSINFO* pStatusList, WORD Status);
+ STATUSINFO* (*TM_AddStatus)(STATUSINFO** ppStatusList, const wchar_t *pszStatus, int* iCount);
+ STATUSINFO* (*TM_FindStatus)(STATUSINFO* pStatusList, const wchar_t *pszStatus);
+ WORD (*TM_StringToWord)(STATUSINFO* pStatusList, const wchar_t *pszStatus);
+ wchar_t* (*TM_WordToString)(STATUSINFO* pStatusList, WORD Status);
BOOL (*TM_RemoveAll)(STATUSINFO** pStatusList);
- BOOL (*UM_SetStatusEx)(USERINFO* pUserList, const TCHAR* pszText, int onlyMe);
- USERINFO* (*UM_AddUser)(STATUSINFO* pStatusList, USERINFO** pUserList, const TCHAR *pszUID, const TCHAR *pszNick, WORD wStatus);
- USERINFO* (*UM_SortUser)(USERINFO** ppUserList, const TCHAR *pszUID);
- USERINFO* (*UM_FindUser)(USERINFO* pUserList, const TCHAR *pszUID);
+ BOOL (*UM_SetStatusEx)(USERINFO* pUserList, const wchar_t* pszText, int onlyMe);
+ USERINFO* (*UM_AddUser)(STATUSINFO* pStatusList, USERINFO** pUserList, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus);
+ USERINFO* (*UM_SortUser)(USERINFO** ppUserList, const wchar_t *pszUID);
+ USERINFO* (*UM_FindUser)(USERINFO* pUserList, const wchar_t *pszUID);
USERINFO* (*UM_FindUserFromIndex)(USERINFO* pUserList, int index);
- USERINFO* (*UM_GiveStatus)(USERINFO* pUserList, const TCHAR *pszUID, WORD status);
- USERINFO* (*UM_SetContactStatus)(USERINFO* pUserList, const TCHAR *pszUID, WORD status);
- USERINFO* (*UM_TakeStatus)(USERINFO* pUserList, const TCHAR *pszUID, WORD status);
- TCHAR* (*UM_FindUserAutoComplete)(USERINFO* pUserList, const TCHAR* pszOriginal, const TCHAR* pszCurrent);
- BOOL (*UM_RemoveUser)(USERINFO** pUserList, const TCHAR *pszUID);
+ USERINFO* (*UM_GiveStatus)(USERINFO* pUserList, const wchar_t *pszUID, WORD status);
+ USERINFO* (*UM_SetContactStatus)(USERINFO* pUserList, const wchar_t *pszUID, WORD status);
+ USERINFO* (*UM_TakeStatus)(USERINFO* pUserList, const wchar_t *pszUID, WORD status);
+ wchar_t* (*UM_FindUserAutoComplete)(USERINFO* pUserList, const wchar_t* pszOriginal, const wchar_t* pszCurrent);
+ BOOL (*UM_RemoveUser)(USERINFO** pUserList, const wchar_t *pszUID);
BOOL (*UM_RemoveAll)(USERINFO** ppUserList);
- int (*UM_CompareItem)(USERINFO * u1, const TCHAR *pszNick, WORD wStatus);
+ int (*UM_CompareItem)(USERINFO * u1, const wchar_t *pszNick, WORD wStatus);
LOGINFO* (*LM_AddEvent)(LOGINFO** ppLogListStart, LOGINFO** ppLogListEnd);
BOOL (*LM_TrimLog)(LOGINFO** ppLogListStart, LOGINFO** ppLogListEnd, int iCount);
BOOL (*LM_RemoveAll)(LOGINFO** ppLogListStart, LOGINFO** ppLogListEnd);
- MCONTACT (*AddRoom)(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType);
+ MCONTACT (*AddRoom)(const char *pszModule, const wchar_t *pszRoom, const wchar_t *pszDisplayName, int iType);
BOOL (*SetOffline)(MCONTACT hContact, BOOL bHide);
BOOL (*SetAllOffline)(BOOL bHide, const char *pszModule);
- BOOL (*AddEvent)(MCONTACT hContact, HICON hIcon, MEVENT hEvent, int type, TCHAR* fmt, ...);
- MCONTACT (*FindRoom)(const char *pszModule, const TCHAR *pszRoom);
+ BOOL (*AddEvent)(MCONTACT hContact, HICON hIcon, MEVENT hEvent, int type, wchar_t* fmt, ...);
+ MCONTACT (*FindRoom)(const char *pszModule, const wchar_t *pszRoom);
char* (*Log_CreateRTF)(LOGSTREAMDATA *streamData);
char* (*Log_CreateRtfHeader)(MODULEINFO *mi);
void (*LoadMsgDlgFont)(int i, LOGFONT *lf, COLORREF *color);
- TCHAR* (*MakeTimeStamp)(TCHAR *pszStamp, time_t time);
+ wchar_t* (*MakeTimeStamp)(wchar_t *pszStamp, time_t time);
- BOOL (*DoEventHook)(const TCHAR *pszID, const char *pszModule, int iType, const TCHAR *pszUID, const TCHAR* pszText, INT_PTR dwItem);
- BOOL (*DoEventHookAsync)(HWND hwnd, const TCHAR *pszID, const char *pszModule, int iType, const TCHAR* pszUID, const TCHAR* pszText, INT_PTR dwItem);
+ BOOL (*DoEventHook)(const wchar_t *pszID, const char *pszModule, int iType, const wchar_t *pszUID, const wchar_t* pszText, INT_PTR dwItem);
+ BOOL (*DoEventHookAsync)(HWND hwnd, const wchar_t *pszID, const char *pszModule, int iType, const wchar_t* pszUID, const wchar_t* pszText, INT_PTR dwItem);
BOOL (*DoSoundsFlashPopupTrayStuff)(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight, int bManyFix);
BOOL (*DoTrayIcon)(SESSION_INFO *si, GCEVENT *gce);
BOOL (*DoPopup)(SESSION_INFO *si, GCEVENT *gce);
- int (*ShowPopup)(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...);
+ int (*ShowPopup)(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, wchar_t* pszRoomName, COLORREF crBkg, const wchar_t* fmt, ...);
BOOL (*LogToFile)(SESSION_INFO *si, GCEVENT *gce);
- TCHAR* (*GetChatLogsFilename)(SESSION_INFO *si, time_t tTime);
+ wchar_t* (*GetChatLogsFilename)(SESSION_INFO *si, time_t tTime);
int (*GetColorIndex)(const char *pszModule, COLORREF cr);
char* (*Log_SetStyle)(int style);
BOOL (*IsHighlighted)(SESSION_INFO *si, GCEVENT *pszText);
- TCHAR* (*RemoveFormatting)(const TCHAR *pszText);
+ wchar_t* (*RemoveFormatting)(const wchar_t *pszText);
void (*ReloadSettings)(void);
void (*ColorChooser)(SESSION_INFO *si, BOOL bFG, HWND hwndDlg, HWND hwndTarget, HWND hwndChooser);
@@ -399,7 +399,7 @@ struct CHAT_MANAGER int logPixelSY, logPixelSX;
char *szActiveWndModule;
- TCHAR *szActiveWndID;
+ wchar_t *szActiveWndID;
HICON hIcons[30];
HBRUSH hListBkgBrush, hListSelectedBkgBrush;
HANDLE hBuildMenuEvent, hSendEvent;
@@ -421,7 +421,7 @@ struct CHAT_MANAGER void (*ShowRoom)(SESSION_INFO*, WPARAM wp, BOOL bSetForeground);
void (*OnAddLog)(SESSION_INFO*, int);
void (*OnClearLog)(SESSION_INFO*);
- void (*OnGetLogName)(SESSION_INFO*, const TCHAR*);
+ void (*OnGetLogName)(SESSION_INFO*, const wchar_t*);
void (*OnEventBroadcast)(SESSION_INFO *si, GCEVENT *gce);
void (*OnSetStatusBar)(SESSION_INFO*);
diff --git a/include/m_clc.h b/include/m_clc.h index 7357e2fb1a..715eef8bc4 100644 --- a/include/m_clc.h +++ b/include/m_clc.h @@ -83,7 +83,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CLM_GETFONT (CLM_FIRST+18) //wParam = fontId, see clm_setfont. returns hFont.
#define CLM_GETINDENT (CLM_FIRST+19) //wParam = new group indent
#define CLM_GETISEARCHSTRING (CLM_FIRST+20) //lParam = (char*)pszStr, max 120 bytes, returns number of chars in string
-#define CLM_GETITEMTEXT (CLM_FIRST+21) //wParam = hItem, lParam = (TCHAR*)pszStr, max 120 bytes
+#define CLM_GETITEMTEXT (CLM_FIRST+21) //wParam = hItem, lParam = (wchar_t*)pszStr, max 120 bytes
#define CLM_GETSCROLLTIME (CLM_FIRST+22) //returns time in ms
#define CLM_GETSELECTION (CLM_FIRST+23) //returns hItem
#define CLM_SETEXTRASPACE (CLM_FIRST+24) //wParam=extra space between icons
@@ -152,7 +152,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CLM_SETLEFTMARGIN (CLM_FIRST+47) //wParam = pixels
typedef struct {
int cbSize;
- const TCHAR *pszText;
+ const wchar_t *pszText;
HANDLE hParentGroup;
DWORD flags;
HICON hIcon; //todo
diff --git a/include/m_clist.h b/include/m_clist.h index 972485651e..3cde4222f9 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -220,7 +220,7 @@ typedef struct { char *pszService; // name of the service to call on activation
union {
char *pszTooltip; // short description of the event to display as a
- TCHAR *ptszTooltip; // tooltip on the system tray
+ wchar_t *ptszTooltip; // tooltip on the system tray
};
} CLISTEVENT;
#define CLEF_URGENT 1 // flashes the icon even if the user is occupied,
@@ -232,7 +232,7 @@ typedef struct { #define CLEF_PROTOCOLGLOBAL 8 // set event globally for protocol, hContact has to be NULL,
// lpszProtocol the protocol ID name to be set
#if defined(_UNICODE)
- #define CLEF_TCHAR CLEF_UNICODE //will use TCHAR* instead of char*
+ #define CLEF_TCHAR CLEF_UNICODE //will use wchar_t* instead of char*
#else
#define CLEF_TCHAR 0 //will return char*, as usual
#endif
@@ -329,8 +329,8 @@ typedef struct { typedef struct {
int cbSize; // size in bytes of this structure
- TCHAR *pszOldName; // old group name, NULL if a new group was created
- TCHAR *pszNewName; // new group name, NULL if an old group was deleted
+ wchar_t *pszOldName; // old group name, NULL if a new group was created
+ wchar_t *pszNewName; // new group name, NULL if an old group was deleted
} CLISTGROUPCHANGE;
#define ME_CLIST_GROUPCHANGE "CList/GroupChange"
@@ -348,10 +348,10 @@ EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupExists(LPCTSTR ptszGroupName); // returns a handle to the new group
// hParentGroup is NULL to create the new group at the root, or can be the
// handle of the group of which the new group should be a subgroup.
-// groupName is a TCHAR* pointing to the group name to create or NULL for
+// groupName is a wchar_t* pointing to the group name to create or NULL for
// API to create unique name by itself
-EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupCreate(MGROUP hParent, const TCHAR *ptszGroupName);
+EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupCreate(MGROUP hParent, const wchar_t *ptszGroupName);
/////////////////////////////////////////////////////////////////////////////////////////
// a new group was created. Add it to the list
@@ -370,17 +370,17 @@ EXTERN_C MIR_APP_DLL(int) Clist_GroupDelete(MGROUP hGroup); // renames a group
// returns 0 on success, nonzero on failure
-EXTERN_C MIR_APP_DLL(int) Clist_GroupRename(MGROUP hGroup, const TCHAR *ptszNewName);
+EXTERN_C MIR_APP_DLL(int) Clist_GroupRename(MGROUP hGroup, const wchar_t *ptszNewName);
/////////////////////////////////////////////////////////////////////////////////////////
// retrieves a group's name
-// returns a TCHAR* on success, NULL on failure
+// returns a wchar_t* on success, NULL on failure
// if pdwFlags is not NULL, also stores group flags into it (one of GROUPF_* constants
#define GROUPF_EXPANDED 0x04
#define GROUPF_HIDEOFFLINE 0x08
-EXTERN_C MIR_APP_DLL(TCHAR*) Clist_GroupGetName(MGROUP hGroup, DWORD *pdwFlags = NULL);
+EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GroupGetName(MGROUP hGroup, DWORD *pdwFlags = NULL);
/////////////////////////////////////////////////////////////////////////////////////////
// change the expanded state flag for a group internally
@@ -509,11 +509,11 @@ typedef struct { char *szProto; // protocol to show under (may have no effect)
union {
char *szInfoTitle; // only 64chars of it will be used
- TCHAR *tszInfoTitle; // used if NIIF_INTERN_UNICODE is specified
+ wchar_t *tszInfoTitle; // used if NIIF_INTERN_UNICODE is specified
};
union {
char *szInfo; // only 256chars of it will be used
- TCHAR *tszInfo; // used if NIIF_INTERN_UNICODE is specified
+ wchar_t *tszInfo; // used if NIIF_INTERN_UNICODE is specified
};
DWORD dwInfoFlags; // see NIIF_* stuff
UINT uTimeout; // how long to show the tip for
diff --git a/include/m_clistint.h b/include/m_clistint.h index 0557703c01..749188c444 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -113,7 +113,7 @@ struct ClcContactBase };
};
WORD iExtraImage[EXTRA_ICON_COUNT];
- TCHAR szText[120-EXTRA_ICON_COUNT];
+ wchar_t szText[120-EXTRA_ICON_COUNT];
char *proto; // MS_PROTO_GETBASEPROTO
ClcCacheEntry *pce; // cache is persistent, contacts aren't
};
@@ -132,7 +132,7 @@ struct ClcDataBase : public MZeroedObject int scrollTime;
HIMAGELIST himlHighlight;
int groupIndent;
- TCHAR szQuickSearch[128];
+ wchar_t szQuickSearch[128];
int iconXSpace;
HWND hwndRenameEdit;
COLORREF bkColour, selBkColour, selTextColour, hotTextColour, quickSearchColour;
@@ -182,7 +182,7 @@ struct trayIconInfo_t char* szProto;
HICON hBaseIcon;
int isBase;
- TCHAR* ptszToolTip;
+ wchar_t* ptszToolTip;
};
struct MenuProto
@@ -262,8 +262,8 @@ struct ClcProtoStatus struct ClcCacheEntryBase
{
MCONTACT hContact;
- TCHAR* tszName;
- TCHAR* tszGroup;
+ wchar_t* tszName;
+ wchar_t* tszGroup;
int bIsHidden;
};
@@ -298,13 +298,13 @@ struct CLIST_INTERFACE /* clcitems.c */
ClcContact* (*pfnCreateClcContact)(void);
- struct ClcGroup* (*pfnAddGroup)(HWND hwnd, struct ClcData *dat, const WCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
+ struct ClcGroup* (*pfnAddGroup)(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
struct ClcGroup* (*pfnRemoveItemFromGroup)(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount);
void (*pfnFreeContact)(ClcContact *contact);
void (*pfnFreeGroup)(ClcGroup *group);
- ClcContact* (*pfnAddInfoItemToGroup)(ClcGroup *group, int flags, const WCHAR *pszText);
+ ClcContact* (*pfnAddInfoItemToGroup)(ClcGroup *group, int flags, const wchar_t *pszText);
ClcContact* (*pfnAddItemToGroup)(ClcGroup *group, int iAboveItem);
ClcContact* (*pfnAddContactToGroup)(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
@@ -322,14 +322,14 @@ struct CLIST_INTERFACE void (*pfnPaintClc)(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint);
/* clcutils.c */
- WCHAR* (*pfnGetGroupCountsText)(struct ClcData *dat, ClcContact *contact);
+ wchar_t* (*pfnGetGroupCountsText)(struct ClcData *dat, ClcContact *contact);
int (*pfnHitTest)(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
void (*pfnScrollTo)(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
void (*pfnEnsureVisible)(HWND hwnd, struct ClcData *dat, int iItem, int partialOk);
void (*pfnRecalcScrollBar)(HWND hwnd, struct ClcData *dat);
void (*pfnSetGroupExpand)(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
void (*pfnDoSelectionDefaultAction)(HWND hwnd, struct ClcData *dat);
- int (*pfnFindRowByText)(HWND hwnd, struct ClcData *dat, const WCHAR *text, int prefixOk);
+ int (*pfnFindRowByText)(HWND hwnd, struct ClcData *dat, const wchar_t *text, int prefixOk);
void (*pfnEndRename)(HWND hwnd, struct ClcData *dat, int save);
void (*pfnDeleteFromContactList)(HWND hwnd, struct ClcData *dat);
void (*pfnBeginRenameSelection)(HWND hwnd, struct ClcData *dat);
@@ -362,7 +362,7 @@ struct CLIST_INTERFACE int (*pfnShowHide)(WPARAM, LPARAM);
#define GSMDF_UNTRANSLATED 4 // don't tranlate the result
- WCHAR* (*pfnGetStatusModeDescription)(int mode, int flags);
+ wchar_t* (*pfnGetStatusModeDescription)(int mode, int flags);
/* clistsettings.c */
ClcCacheEntry* (*pfnGetCacheEntry)(MCONTACT hContact);
@@ -373,11 +373,11 @@ struct CLIST_INTERFACE #define GCDNF_NOMYHANDLE 1 // will never return the user's custom name
#define GCDNF_NOCACHE 4 // will not use the cache
- WCHAR* (*pfnGetContactDisplayName)(MCONTACT hContact, int mode);
+ wchar_t* (*pfnGetContactDisplayName)(MCONTACT hContact, int mode);
void (*pfnInvalidateDisplayNameCacheEntry)(MCONTACT hContact);
/* clisttray.c */
- void (*pfnTrayIconUpdateWithImageList)(int iImage, const WCHAR *szNewTip, char *szPreferredProto);
+ void (*pfnTrayIconUpdateWithImageList)(int iImage, const wchar_t *szNewTip, char *szPreferredProto);
void (*pfnTrayIconUpdateBase)(const char *szChangedProto);
void (*pfnTrayIconSetToBase)(char *szPreferredProto);
void (*pfnTrayIconIconsChanged)(void);
@@ -454,7 +454,7 @@ struct CLIST_INTERFACE int shellVersion;
UINT_PTR cycleTimerId;
int cycleStep;
- WCHAR* szTip;
+ wchar_t* szTip;
BOOL bTrayMenuOnScreen;
HICON (*pfnGetIconFromStatusMode)(MCONTACT hContact, const char *szProto, int status);
@@ -465,11 +465,11 @@ struct CLIST_INTERFACE int (*pfnTrayIconAdd)(HWND hwnd, const char *szProto, const char *szIconProto, int status);
int (*pfnTrayIconDestroy)(HWND hwnd);
int (*pfnTrayIconInit)(HWND hwnd);
- WCHAR* (*pfnTrayIconMakeTooltip)(const WCHAR *szPrefix, const char *szProto);
+ wchar_t* (*pfnTrayIconMakeTooltip)(const wchar_t *szPrefix, const char *szProto);
void (*pfnTrayIconRemove)(HWND hwnd, const char *szProto);
int (*pfnTrayIconSetBaseInfo)(HICON hIcon, const char *szPreferredProto);
void (*pfnTrayIconTaskbarCreated)(HWND hwnd);
- int (*pfnTrayIconUpdate)(HICON hNewIcon, const WCHAR *szNewTip, const char *szPreferredProto, int isBase);
+ int (*pfnTrayIconUpdate)(HICON hNewIcon, const wchar_t *szNewTip, const char *szPreferredProto, int isBase);
VOID (CALLBACK *pfnTrayCycleTimerProc)(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime);
diff --git a/include/m_contacts.h b/include/m_contacts.h index 388cf11b43..6eaf877a31 100644 --- a/include/m_contacts.h +++ b/include/m_contacts.h @@ -74,7 +74,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Returns NULL on failure to retrieve the info or a string on success.
// If successful, this string must be freed using mir_free
-EXTERN_C MIR_APP_DLL(TCHAR*) Contact_GetInfo(
+EXTERN_C MIR_APP_DLL(wchar_t*) Contact_GetInfo(
int type, // one of the CNF_* constants
MCONTACT hContact, // contact id or NULL for the global data
const char *szProto = NULL); // protocol for global data. if skipped, grabbed from hContact
diff --git a/include/m_core.h b/include/m_core.h index 353eba25fa..5557623e5a 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -153,7 +153,7 @@ typedef struct tagIconItem typedef struct tagIconItemT
{
- TCHAR *tszDescr;
+ wchar_t *tszDescr;
char *szName;
int defIconID, size;
HANDLE hIcolib;
@@ -162,10 +162,10 @@ typedef struct tagIconItemT #if defined( __cplusplus )
MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char* szSection, IconItem* pIcons, size_t iCount, char *prefix = NULL, int = hLangpack);
-MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const TCHAR* szSection, IconItemT* pIcons, size_t iCount, char *prefix = NULL, int = hLangpack);
+MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const wchar_t* szSection, IconItemT* pIcons, size_t iCount, char *prefix = NULL, int = hLangpack);
#else
MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char* szSection, IconItem* pIcons, size_t iCount, char *prefix, int hLangpack);
-MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const TCHAR* szSection, IconItemT* pIcons, size_t iCount, char *prefix, int hLangpack);
+MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const wchar_t* szSection, IconItemT* pIcons, size_t iCount, char *prefix, int hLangpack);
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -232,7 +232,7 @@ MIR_CORE_DLL(void) List_ObjCopy(SortedList* s, SortedList* d, size_t item ///////////////////////////////////////////////////////////////////////////////
// logging functions
-MIR_CORE_DLL(HANDLE) mir_createLog(const char *pszName, const TCHAR *ptszDescr, const TCHAR *ptszFile, unsigned options);
+MIR_CORE_DLL(HANDLE) mir_createLog(const char *pszName, const wchar_t *ptszDescr, const wchar_t *ptszFile, unsigned options);
MIR_CORE_DLL(void) mir_closeLog(HANDLE hLogger);
MIR_C_CORE_DLL(int) mir_writeLogA(HANDLE hLogger, const char *format, ...);
@@ -320,20 +320,20 @@ MIR_APP_DLL(INT_PTR) ProtoBroadcastAck(LPCSTR szModule, MCONTACT hContact, int t // avatar support functions
// returns image extension by a PA_* constant or empty string for PA_FORMAT_UNKNOWN
-MIR_APP_DLL(const TCHAR*) ProtoGetAvatarExtension(int format);
+MIR_APP_DLL(const wchar_t*) ProtoGetAvatarExtension(int format);
// detects image format by extension
-MIR_APP_DLL(int) ProtoGetAvatarFormat(const TCHAR *ptszFileName);
+MIR_APP_DLL(int) ProtoGetAvatarFormat(const wchar_t *ptszFileName);
// detects image format by its contents
-MIR_APP_DLL(int) ProtoGetAvatarFileFormat(const TCHAR *ptszFileName);
+MIR_APP_DLL(int) ProtoGetAvatarFileFormat(const wchar_t *ptszFileName);
// returns the image format and extension by the first bytes of picture
// ptszExtension might be NULL
#if defined( __cplusplus )
- MIR_APP_DLL(int) ProtoGetBufferFormat(const void *buf, const TCHAR **ptszExtension = NULL);
+ MIR_APP_DLL(int) ProtoGetBufferFormat(const void *buf, const wchar_t **ptszExtension = NULL);
#else
- MIR_APP_DLL(int) ProtoGetBufferFormat(const void *buf, const TCHAR **ptszExtension);
+ MIR_APP_DLL(int) ProtoGetBufferFormat(const void *buf, const wchar_t **ptszExtension);
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -529,7 +529,7 @@ MIR_CORE_DLL(BOOL) IsFullScreen(); MIR_CORE_DLL(BOOL) IsWorkstationLocked();
MIR_CORE_DLL(BOOL) IsScreenSaverRunning();
-MIR_CORE_DLL(BOOL) GetOSDisplayString(TCHAR *buf, size_t bufSize);
+MIR_CORE_DLL(BOOL) GetOSDisplayString(wchar_t *buf, size_t bufSize);
/////////////////////////////////////////////////////////////////////////////////////////
// retrieves the hLangpack of a plugin by its HINSTANCE
diff --git a/include/m_crypto.h b/include/m_crypto.h index 427925d56b..3b4d72339a 100644 --- a/include/m_crypto.h +++ b/include/m_crypto.h @@ -71,8 +71,8 @@ typedef struct tagCRYPTOPROVIDER char *pszName; // unique id
union {
char *pszDescr; // description
- TCHAR *ptszDescr; // auto translated by core
- WCHAR *pwszDescr;
+ wchar_t *ptszDescr; // auto translated by core
+ wchar_t *pwszDescr;
};
pfnCryptoProviderFactory pFactory;
diff --git a/include/m_database.h b/include/m_database.h index fa0dcc74f3..99762e4e92 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -72,7 +72,7 @@ typedef struct struct {
union {
char *pszVal;
- TCHAR *ptszVal;
+ wchar_t *ptszVal;
wchar_t *pwszVal;
};
WORD cchVal; //only used for db/contact/getsettingstatic
@@ -356,7 +356,7 @@ Returns 0 on success or nonzero otherwise /* DB/SetDefaultProfile service
Sets the default profile name programmatically
Analog of Database/DefaultProfile in mirandaboot.ini
- wParam = (WPARAM)(TCHAR*)ptszProfileName
+ wParam = (WPARAM)(wchar_t*)ptszProfileName
lParam = 0 (unused)
*/
@@ -365,7 +365,7 @@ Analog of Database/DefaultProfile in mirandaboot.ini /* DB/CheckProfile service
Checks the specified profile like dbtool did.
Implemented in the dbchecker plugins, thus it might not exist
- wParam = (WPARAM)(TCHAR*)ptszProfileName
+ wParam = (WPARAM)(wchar_t*)ptszProfileName
lParam = (BOOL)bConversionMode
*/
@@ -526,10 +526,10 @@ __forceinline char* DbGetEventTextA(DBEVENTINFO* dbei, int codepage) return (char*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp);
}
-__forceinline WCHAR* DbGetEventTextW(DBEVENTINFO* dbei, int codepage)
+__forceinline wchar_t* DbGetEventTextW(DBEVENTINFO* dbei, int codepage)
{
DBEVENTGETTEXT temp = { dbei, DBVT_WCHAR, codepage };
- return (WCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp);
+ return (wchar_t*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp);
}
/* DB/Event/GetIcon (0.7.0.1+)
@@ -549,18 +549,18 @@ same parameters MS_DB_EVENT_GETICON does. #define MS_DB_EVENT_GETICON "DB/Event/GetIcon"
/* DB/Event/GetString (0.9.0+)
-Converts the event's string to TCHAR* depending on the event's format
+Converts the event's string to wchar_t* depending on the event's format
wParam = (LPARAM)(DBEVENTINFO*)dbei
lParam = (WPARAM)(char*)str - string to be converted
- returns TCHAR* - the converted string
+ returns wchar_t* - the converted string
Caller must free the result using mir_free
*/
#define MS_DB_EVENT_GETSTRINGT "DB/Event/GetStringT"
-__forceinline TCHAR* DbGetEventStringT(DBEVENTINFO* dbei, const char* str)
+__forceinline wchar_t* DbGetEventStringT(DBEVENTINFO* dbei, const char* str)
{
- return (TCHAR*)CallService(MS_DB_EVENT_GETSTRINGT, (WPARAM)dbei, (LPARAM)str);
+ return (wchar_t*)CallService(MS_DB_EVENT_GETSTRINGT, (WPARAM)dbei, (LPARAM)str);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_db_int.h b/include/m_db_int.h index c4b8d1351f..d33b465ccb 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -144,7 +144,7 @@ struct DBCHeckCallback HANDLE hOutFile;
int bCheckOnly, bBackup, bAggressive, bEraseHistory, bMarkRead, bConvertUtf;
- void (*pfnAddLogMessage)(int type, const TCHAR* ptszFormat, ...);
+ void (*pfnAddLogMessage)(int type, const wchar_t* ptszFormat, ...);
};
interface MIDatabaseChecker
@@ -176,7 +176,7 @@ struct DATABASELINK {
int cbSize;
char* szShortName; // uniqie short database name
- TCHAR* szFullName; // in English, auto-translated by the core
+ wchar_t* szFullName; // in English, auto-translated by the core
/*
profile: pointer to a string which contains full path + name
@@ -184,7 +184,7 @@ struct DATABASELINK the time of this call, profile will be C:\..\<name>.dat
Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_*
*/
- int (*makeDatabase)(const TCHAR *profile);
+ int (*makeDatabase)(const wchar_t *profile);
/*
profile: [in] a null terminated string to file path of selected profile
@@ -196,14 +196,14 @@ struct DATABASELINK etc.
Returns: 0 on success, non zero on failure
*/
- int (*grokHeader)(const TCHAR *profile);
+ int (*grokHeader)(const wchar_t *profile);
/*
Affect: Tell the database to create all services/hooks that a 3.xx legacy database might support into link,
which is a PLUGINLINK structure
Returns: 0 on success, nonzero on failure
*/
- MIDatabase* (*Load)(const TCHAR *profile, BOOL bReadOnly);
+ MIDatabase* (*Load)(const wchar_t *profile, BOOL bReadOnly);
/*
Affect: The database plugin should shutdown, unloading things from the core and freeing internal structures
@@ -216,7 +216,7 @@ struct DATABASELINK Returns a pointer to the database checker or NULL if a database doesn't support checking
When you don't need this object aanymore, call its Destroy() method
*/
- MIDatabaseChecker* (*CheckDB)(const TCHAR *profile, int *error);
+ MIDatabaseChecker* (*CheckDB)(const wchar_t *profile, int *error);
};
///////////////////////////////////////////////////////////////////////////////
@@ -248,12 +248,12 @@ __forceinline void RegisterDatabasePlugin(DATABASELINK* pDescr) // MS_DB_FIND_PLUGIN : looks for a database plugin suitable to open this file
// wParam : 0 (unused)
-// lParam : const TCHAR* = name of the database file
+// lParam : const wchar_t* = name of the database file
// returns DATABASELINK* of the required plugin or NULL on error
#define MS_DB_FIND_PLUGIN "DB/FindPlugin"
-__forceinline DATABASELINK* FindDatabasePlugin(const TCHAR* ptszFileName)
+__forceinline DATABASELINK* FindDatabasePlugin(const wchar_t* ptszFileName)
{ return (DATABASELINK*)CallService(MS_DB_FIND_PLUGIN, 0, (LPARAM)ptszFileName);
}
diff --git a/include/m_file.h b/include/m_file.h index 55338dd6ee..806cfdb1b3 100644 --- a/include/m_file.h +++ b/include/m_file.h @@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MS_FILE_SENDSPECIFICFILES "SRFile/SendSpecificFiles"
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(const TCHAR**)ppFiles
+// lParam = (LPARAM)(const wchar_t**)ppFiles
// returns file selection dialog's handle or 0 on error
// returns immediately, without waiting for the send
#define MS_FILE_SENDSPECIFICFILEST "SRFile/SendSpecificFilesT"
diff --git a/include/m_genmenu.h b/include/m_genmenu.h index aa442e6ae3..e8174e822e 100644 --- a/include/m_genmenu.h +++ b/include/m_genmenu.h @@ -164,7 +164,7 @@ EXTERN_C MIR_APP_DLL(BOOL) Menu_MeasureItem(MEASUREITEMSTRUCT *mis); // modify an existing menu item
// returns 0 on success, nonzero on failure
-EXTERN_C MIR_APP_DLL(int) Menu_ModifyItem(HGENMENU hMenuItem, const WCHAR *ptszName, HANDLE hIcon = INVALID_HANDLE_VALUE, int iFlags = -1);
+EXTERN_C MIR_APP_DLL(int) Menu_ModifyItem(HGENMENU hMenuItem, const wchar_t *ptszName, HANDLE hIcon = INVALID_HANDLE_VALUE, int iFlags = -1);
/////////////////////////////////////////////////////////////////////////////////////////
// Tries to process a keystroke
diff --git a/include/m_gui.h b/include/m_gui.h index c37b37bd8b..980774a28b 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -302,8 +302,8 @@ public: virtual DWORD LoadInt() = 0;
virtual void SaveInt(DWORD value) = 0;
- virtual TCHAR* LoadText() = 0;
- virtual void SaveText(TCHAR *value) = 0;
+ virtual wchar_t* LoadText() = 0;
+ virtual void SaveText(wchar_t *value) = 0;
};
class MIR_CORE_EXPORT CDbLink : public CDataLink
@@ -313,20 +313,20 @@ class MIR_CORE_EXPORT CDbLink : public CDataLink bool m_bSigned;
DWORD m_iDefault;
- TCHAR *m_szDefault;
+ wchar_t *m_szDefault;
DBVARIANT dbv;
public:
CDbLink(const char *szModule, const char *szSetting, BYTE type, DWORD iValue);
- CDbLink(const char *szModule, const char *szSetting, BYTE type, TCHAR *szValue);
+ CDbLink(const char *szModule, const char *szSetting, BYTE type, wchar_t *szValue);
~CDbLink();
DWORD LoadInt();
void SaveInt(DWORD value);
- TCHAR* LoadText();
- void SaveText(TCHAR *value);
+ wchar_t* LoadText();
+ void SaveText(wchar_t *value);
};
template<class T>
@@ -343,15 +343,15 @@ public: __forceinline DWORD LoadInt() { return (DWORD)(T)*m_option; }
__forceinline void SaveInt(DWORD value) { *m_option = (T)value; }
- __forceinline TCHAR* LoadText() { return NULL; }
- __forceinline void SaveText(TCHAR*) {}
+ __forceinline wchar_t* LoadText() { return NULL; }
+ __forceinline void SaveText(wchar_t*) {}
};
template<>
-class CMOptionLink<TCHAR*> : public CDataLink
+class CMOptionLink<wchar_t*> : public CDataLink
{
private:
- typedef TCHAR *T;
+ typedef wchar_t *T;
CMOption<T> *m_option;
public:
@@ -362,8 +362,8 @@ public: __forceinline DWORD LoadInt() { return 0; }
__forceinline void SaveInt(DWORD) { }
- __forceinline TCHAR* LoadText() { return *m_option; }
- __forceinline void SaveText(TCHAR *value) { *m_option = value; }
+ __forceinline wchar_t* LoadText() { return *m_option; }
+ __forceinline void SaveText(wchar_t *value) { *m_option = value; }
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -383,7 +383,7 @@ public: void Show(int nCmdShow = SW_SHOW);
int DoModal();
- void SetCaption(const TCHAR *ptszCaption);
+ void SetCaption(const wchar_t *ptszCaption);
void NotifyChange(void); // sends a notification to a parent window
__forceinline HINSTANCE GetInst() const { return m_hInst; }
@@ -464,14 +464,14 @@ public: LRESULT SendMsg(UINT Msg, WPARAM wParam, LPARAM lParam);
- void SetText(const TCHAR *text);
+ void SetText(const wchar_t *text);
void SetTextA(const char *text);
void SetInt(int value);
- TCHAR *GetText();
+ wchar_t *GetText();
char *GetTextA();
- TCHAR *GetText(TCHAR *buf, int size);
+ wchar_t *GetText(wchar_t *buf, int size);
char *GetTextA(char *buf, int size);
int GetInt();
@@ -650,7 +650,7 @@ public: virtual ~CCtrlData();
void CreateDbLink(const char* szModuleName, const char* szSetting, BYTE type, DWORD iValue);
- void CreateDbLink(const char* szModuleName, const char* szSetting, TCHAR* szValue);
+ void CreateDbLink(const char* szModuleName, const char* szSetting, wchar_t* szValue);
void CreateDbLink(CDataLink *link) { m_dbLink = link; }
virtual void OnInit();
@@ -661,8 +661,8 @@ protected: __inline BYTE GetDataType() { return m_dbLink ? m_dbLink->GetDataType() : DBVT_DELETED; }
__inline DWORD LoadInt() { return m_dbLink ? m_dbLink->LoadInt() : 0; }
__inline void SaveInt(DWORD value) { if (m_dbLink) m_dbLink->SaveInt(value); }
- __inline const TCHAR *LoadText() { return m_dbLink ? m_dbLink->LoadText() : L""; }
- __inline void SaveText(TCHAR *value) { if (m_dbLink) m_dbLink->SaveText(value); }
+ __inline const wchar_t *LoadText() { return m_dbLink ? m_dbLink->LoadText() : L""; }
+ __inline void SaveText(wchar_t *value) { if (m_dbLink) m_dbLink->SaveText(value); }
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -708,21 +708,21 @@ class MIR_CORE_EXPORT CCtrlListBox : public CCtrlBase public:
CCtrlListBox(CDlgBase *dlg, int ctrlId);
- int AddString(TCHAR *text, LPARAM data=0);
+ int AddString(wchar_t *text, LPARAM data=0);
void DeleteString(int index);
- int FindString(TCHAR *str, int index = -1, bool exact = false);
+ int FindString(wchar_t *str, int index = -1, bool exact = false);
int GetCount();
int GetCurSel();
LPARAM GetItemData(int index);
- TCHAR* GetItemText(int index);
- TCHAR* GetItemText(int index, TCHAR *buf, int size);
+ wchar_t* GetItemText(int index);
+ wchar_t* GetItemText(int index, wchar_t *buf, int size);
bool GetSel(int index);
int GetSelCount();
int* GetSelItems(int *items, int count);
int* GetSelItems();
- int InsertString(TCHAR *text, int pos, LPARAM data=0);
+ int InsertString(wchar_t *text, int pos, LPARAM data=0);
void ResetContent();
- int SelectString(TCHAR *str);
+ int SelectString(wchar_t *str);
int SetCurSel(int index);
void SetItemData(int index, LPARAM data);
void SetSel(int index, bool sel=true);
@@ -752,20 +752,20 @@ public: virtual void OnReset();
// Control interface
- int AddString(const TCHAR *text, LPARAM data = 0);
+ int AddString(const wchar_t *text, LPARAM data = 0);
int AddStringA(const char *text, LPARAM data = 0);
void DeleteString(int index);
- int FindString(const TCHAR *str, int index = -1, bool exact = false);
+ int FindString(const wchar_t *str, int index = -1, bool exact = false);
int FindStringA(const char *str, int index = -1, bool exact = false);
int GetCount();
int GetCurSel();
bool GetDroppedState();
LPARAM GetItemData(int index);
- TCHAR* GetItemText(int index);
- TCHAR* GetItemText(int index, TCHAR *buf, int size);
- int InsertString(TCHAR *text, int pos, LPARAM data=0);
+ wchar_t* GetItemText(int index);
+ wchar_t* GetItemText(int index, wchar_t *buf, int size);
+ int InsertString(wchar_t *text, int pos, LPARAM data=0);
void ResetContent();
- int SelectString(TCHAR *str);
+ int SelectString(wchar_t *str);
int SetCurSel(int index);
void SetItemData(int index, LPARAM data);
void ShowDropdown(bool show = true);
@@ -890,7 +890,7 @@ public: BOOL SetItemPosition(int i, int x, int y);
void SetItemPosition32(int iItem, int x, int y);
void SetItemState(int i, UINT state, UINT mask);
- void SetItemText(int i, int iSubItem, TCHAR *pszText);
+ void SetItemText(int i, int iSubItem, wchar_t *pszText);
COLORREF SetOutlineColor(COLORREF color);
void SetSelectedColumn(int iCol);
INT SetSelectionMark(INT iIndex);
@@ -911,10 +911,10 @@ public: // Additional APIs
HIMAGELIST CreateImageList(int iImageList);
- void AddColumn(int iSubItem, TCHAR *name, int cx);
- void AddGroup(int iGroupId, TCHAR *name);
- int AddItem(TCHAR *text, int iIcon, LPARAM lParam = 0, int iGroupId = -1);
- void SetItem(int iItem, int iSubItem, TCHAR *text, int iIcon = -1);
+ void AddColumn(int iSubItem, wchar_t *name, int cx);
+ void AddGroup(int iGroupId, wchar_t *name);
+ int AddItem(wchar_t *text, int iIcon, LPARAM lParam = 0, int iGroupId = -1);
+ void SetItem(int iItem, int iSubItem, wchar_t *text, int iIcon = -1);
LPARAM GetItemData(int iItem);
// Events
@@ -1042,9 +1042,9 @@ public: // Additional stuff
void TranslateItem(HTREEITEM hItem);
void TranslateTree();
- HTREEITEM FindNamedItem(HTREEITEM hItem, const TCHAR *name);
+ HTREEITEM FindNamedItem(HTREEITEM hItem, const wchar_t *name);
void GetItem(HTREEITEM hItem, TVITEMEX *tvi);
- void GetItem(HTREEITEM hItem, TVITEMEX *tvi, TCHAR *szText, int iTextLength);
+ void GetItem(HTREEITEM hItem, TVITEMEX *tvi, wchar_t *szText, int iTextLength);
void InvertCheck(HTREEITEM hItem);
bool IsSelected(HTREEITEM hItem);
@@ -1123,7 +1123,7 @@ class MIR_CORE_EXPORT CCtrlPages : public CCtrlBase public:
CCtrlPages(CDlgBase *dlg, int ctrlId);
- void AddPage(TCHAR *ptszName, HICON hIcon, CDlgBase *pDlg);
+ void AddPage(wchar_t *ptszName, HICON hIcon, CDlgBase *pDlg);
void ActivatePage(int iPage);
protected:
@@ -1252,7 +1252,7 @@ public: CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog, bool show_label = true);
void CreateLink(CCtrlData& ctrl, char *szSetting, BYTE type, DWORD iValue);
- void CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue);
+ void CreateLink(CCtrlData& ctrl, const char *szSetting, wchar_t *szValue);
template<class T>
__inline void CreateLink(CCtrlData& ctrl, CMOption<T> &option)
@@ -1262,7 +1262,7 @@ public: __inline PROTO_INTERFACE *GetProtoInterface() { return m_proto_interface; }
- void SetStatusText(const TCHAR *statusText);
+ void SetStatusText(const wchar_t *statusText);
protected:
PROTO_INTERFACE *m_proto_interface;
@@ -1276,7 +1276,7 @@ protected: virtual void OnProtoCheckOnline(WPARAM, LPARAM);
private:
- void UpdateProtoTitle(const TCHAR *szText = NULL);
+ void UpdateProtoTitle(const wchar_t *szText = NULL);
void UpdateStatusBar();
};
@@ -1308,7 +1308,7 @@ public: {
ctrl.CreateDbLink(m_szModule, szSetting, type, iValue);
}
- void CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue)
+ void CreateLink(CCtrlData& ctrl, const char *szSetting, wchar_t *szValue)
{
ctrl.CreateDbLink(m_szModule, szSetting, szValue);
}
diff --git a/include/m_iconheader.h b/include/m_iconheader.h index d577f00bd6..19b5916cdf 100644 --- a/include/m_iconheader.h +++ b/include/m_iconheader.h @@ -48,10 +48,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct {
HICON hIcon;
union {
- TCHAR *tcsName;
- TCHAR *lptzName;
+ wchar_t *tcsName;
+ wchar_t *lptzName;
char *lpzName;
- WCHAR *lpwzName;
+ wchar_t *lpwzName;
};
DWORD flag;
LPARAM data;
@@ -66,7 +66,7 @@ typedef struct { #define MIcoTab_GetItemData(hwnd, idx) \
(SendMessage((hwnd), ITCM_GETITEMDATA, (idx), 0))
-static __forceinline void MIcoTab_AddItem(HWND hwnd, TCHAR *lptzName, HICON hIcon, LPARAM data, BOOL bSharedIcon)
+static __forceinline void MIcoTab_AddItem(HWND hwnd, wchar_t *lptzName, HICON hIcon, LPARAM data, BOOL bSharedIcon)
{
MIcoTab mit = {0};
mit.flag = (bSharedIcon?MITCF_SHAREDICON:0)| MITCF_UNICODE;
diff --git a/include/m_imgsrvc.h b/include/m_imgsrvc.h index 005eb67422..00d08060c4 100644 --- a/include/m_imgsrvc.h +++ b/include/m_imgsrvc.h @@ -428,7 +428,7 @@ typedef struct _tagIMGSRVC_INFO { union {
char *szName;
wchar_t *wszName;
- TCHAR *tszName;
+ wchar_t *tszName;
};
HBITMAP hbm;
FIBITMAP *dib;
diff --git a/include/m_jabber.h b/include/m_jabber.h index 917a475a67..847b422bb4 100644 --- a/include/m_jabber.h +++ b/include/m_jabber.h @@ -193,7 +193,7 @@ Returns FALSE if all is Ok, and TRUE otherwise. /*
A hook to be called during extensions list's creation
-wParam = (WPARAM)(LIST<TCHAR>*) - extensions list to be populated;
+wParam = (WPARAM)(LIST<wchar_t>*) - extensions list to be populated;
lParam = (LPARAM)(IJabberInterface*).
Returns FALSE if all is Ok, and TRUE otherwise.
*/
diff --git a/include/m_json.h b/include/m_json.h index c9d649e54a..bd5d5ffdc8 100644 --- a/include/m_json.h +++ b/include/m_json.h @@ -51,7 +51,7 @@ LIBJSON_DLL(void) json_free(void *str); LIBJSON_DLL(void) json_delete(JSONNode *node);
LIBJSON_DLL(JSONNode*) json_parse(const char *json);
-LIBJSON_DLL(TCHAR*) json_strip_white_space(const char *json);
+LIBJSON_DLL(wchar_t*) json_strip_white_space(const char *json);
#ifdef JSON_VALIDATE
LIBJSON_DLL(JSONNode*) json_validate(const char *json);
@@ -84,15 +84,15 @@ LIBJSON_DLL(const char*) json_name(const JSONNode *node); #ifdef JSON_COMMENTS
LIBJSON_DLL(char * json_get_comment(const JSONNode *node);
#endif
-LIBJSON_DLL(TCHAR*) json_as_string(const JSONNode *node);
+LIBJSON_DLL(wchar_t*) json_as_string(const JSONNode *node);
LIBJSON_DLL(long) json_as_int(const JSONNode *node);
LIBJSON_DLL(double) json_as_float(const JSONNode *node);
LIBJSON_DLL(int) json_as_bool(const JSONNode *node);
LIBJSON_DLL(JSONNode*) json_as_node(const JSONNode *node);
LIBJSON_DLL(JSONNode*) json_as_array(const JSONNode *node);
-LIBJSON_DLL(TCHAR*) json_write(const JSONNode *node);
-LIBJSON_DLL(TCHAR*) json_write_formatted(const JSONNode *node);
+LIBJSON_DLL(wchar_t*) json_write(const JSONNode *node);
+LIBJSON_DLL(wchar_t*) json_write_formatted(const JSONNode *node);
//modifiers
LIBJSON_DLL(void) json_set_name(JSONNode *node, const char *name);
diff --git a/include/m_langpack.h b/include/m_langpack.h index 3262c62bc5..e234f67084 100644 --- a/include/m_langpack.h +++ b/include/m_langpack.h @@ -42,8 +42,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. EXTERN_C MIR_CORE_DLL(void) Langpack_SortDuplicates(void);
EXTERN_C MIR_CORE_DLL(int) LoadLangPackModule(void);
-EXTERN_C MIR_CORE_DLL(int) LoadLangPack(const TCHAR *szLangPack);
-EXTERN_C MIR_CORE_DLL(void) ReloadLangpack(TCHAR *pszStr);
+EXTERN_C MIR_CORE_DLL(int) LoadLangPack(const wchar_t *szLangPack);
+EXTERN_C MIR_CORE_DLL(void) ReloadLangpack(wchar_t *pszStr);
EXTERN_C MIR_CORE_DLL(char*) TranslateA_LP(const char *str, int hLang);
EXTERN_C MIR_CORE_DLL(wchar_t*) TranslateW_LP(const wchar_t *str, int hLang);
@@ -86,10 +86,10 @@ EXTERN_C MIR_CORE_DLL(int) Langpack_GetDefaultLocale(void); /////////////////////////////////////////////////////////////////////////////////////////
// returns the strdup/wcsdup of lparam according to the langpack
-// returns a string converted from char* to TCHAR* using the langpack codepage.
+// returns a string converted from char* to wchar_t* using the langpack codepage.
// This string should be freed using mir_free() then
-EXTERN_C MIR_CORE_DLL(TCHAR*) Langpack_PcharToTchar(const char *pszStr);
+EXTERN_C MIR_CORE_DLL(wchar_t*) Langpack_PcharToTchar(const char *pszStr);
/////////////////////////////////////////////////////////////////////////////////////////
// initializes the plugin-specific translation context v0.10.0+
@@ -100,7 +100,7 @@ EXTERN_C MIR_CORE_DLL(void) mir_getLP(const PLUGININFOEX *pInfo, int *_hLang = & /////////////////////////////////////////////////////////////////////////////////////////
// reloads langpack
// wParam = 0 (ignored)
-// lParam = (LPARAM)(TCHAR*)langpack file name or NULL to reload the current one
+// lParam = (LPARAM)(wchar_t*)langpack file name or NULL to reload the current one
// always returns 0
#define MS_LANGPACK_RELOAD "LangPack/Reload"
diff --git a/include/m_message.h b/include/m_message.h index 5c68940eaa..8d4678daca 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -69,7 +69,7 @@ typedef struct { typedef struct {
int cbSize;
HICON hIcon;
- TCHAR tszText[100];
+ wchar_t tszText[100];
} StatusTextData;
//wparam = (MCONTACT)hContact
@@ -168,7 +168,7 @@ typedef struct { int flags; // bitwize OR of MBF_* flags above
union {
char *szTooltip; // controlled by MBF_UNICODE
- TCHAR *tszTooltip;
+ wchar_t *tszTooltip;
wchar_t *wszTooltip;
};
} StatusIconData;
diff --git a/include/m_modernopt.h b/include/m_modernopt.h index af1d13aede..be61d89e61 100644 --- a/include/m_modernopt.h +++ b/include/m_modernopt.h @@ -77,9 +77,9 @@ struct MODERNOPTOBJECT HICON hIcon;
union {
- TCHAR *lptzSubsection;
+ wchar_t *lptzSubsection;
char *lpzSubsection;
- WCHAR *lpwzSubsection;
+ wchar_t *lpwzSubsection;
};
// Generic dialog page
diff --git a/include/m_netlib.h b/include/m_netlib.h index e5dbc7ca00..36d9d9aea5 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -70,7 +70,7 @@ typedef struct { char *szSettingsModule; // used for db settings and log
union {
char *szDescriptiveName; // used in options dialog, already translated
- TCHAR *ptszDescriptiveName;
+ wchar_t *ptszDescriptiveName;
};
DWORD flags;
char *szHttpGatewayHello;
@@ -831,15 +831,15 @@ static __inline HANDLE Netlib_InitSecurityProvider(char* szProviderName) typedef struct {
size_t cbSize;
- const TCHAR* szProviderName;
- const TCHAR* szPrincipal;
+ const wchar_t* szProviderName;
+ const wchar_t* szPrincipal;
unsigned flags;
}
NETLIBNTLMINIT2;
#define MS_NETLIB_INITSECURITYPROVIDER2 "Netlib/InitSecurityProvider2"
-static __inline HANDLE Netlib_InitSecurityProvider2(const TCHAR* szProviderName, const TCHAR* szPrincipal)
+static __inline HANDLE Netlib_InitSecurityProvider2(const wchar_t* szProviderName, const wchar_t* szPrincipal)
{
NETLIBNTLMINIT2 temp = { sizeof(temp), szProviderName, szPrincipal, NNR_TCHAR };
return (HANDLE)CallService(MS_NETLIB_INITSECURITYPROVIDER2, 0, (LPARAM)&temp);
@@ -877,8 +877,8 @@ typedef struct { typedef struct {
size_t cbSize;
const char* szChallenge;
- const TCHAR* szUserName;
- const TCHAR* szPassword;
+ const wchar_t* szUserName;
+ const wchar_t* szPassword;
unsigned complete;
unsigned flags;
}
@@ -886,7 +886,7 @@ typedef struct { #define MS_NETLIB_NTLMCREATERESPONSE2 "Netlib/NtlmCreateResponse2"
-static __inline char* Netlib_NtlmCreateResponse2(HANDLE hProvider, char* szChallenge, TCHAR* szLogin, TCHAR* szPass, unsigned *complete)
+static __inline char* Netlib_NtlmCreateResponse2(HANDLE hProvider, char* szChallenge, wchar_t* szLogin, wchar_t* szPass, unsigned *complete)
{
NETLIBNTLMREQUEST2 temp = { sizeof(temp), szChallenge, szLogin, szPass, *complete, NNR_TCHAR };
char* res = (char*)CallService(MS_NETLIB_NTLMCREATERESPONSE2, (WPARAM)hProvider, (LPARAM)&temp);
diff --git a/include/m_options.h b/include/m_options.h index 3e0f4243b6..5223ab88f4 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -88,7 +88,7 @@ typedef struct { OPTIONSDIALOGPAGE;
#define ODPF_BOLDGROUPS 4 // give group box titles a bold font
-#define ODPF_UNICODE 8 // string fields in OPTIONSDIALOGPAGE are WCHAR*
+#define ODPF_UNICODE 8 // string fields in OPTIONSDIALOGPAGE are wchar_t*
#define ODPF_USERINFOTAB 16 // options page is tabbed
#define ODPF_DONTTRANSLATE 32 // do not translate option page title
diff --git a/include/m_pluginupdater.h b/include/m_pluginupdater.h index feb55d1a2c..443c0ab9f2 100644 --- a/include/m_pluginupdater.h +++ b/include/m_pluginupdater.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define M_PLUGINUPDATER_H__ 1
typedef struct {
- TCHAR *m_fileName;
+ wchar_t *m_fileName;
DWORD m_zipCrc;
char m_hash[32+1];
}
@@ -37,8 +37,8 @@ typedef struct { //it expands to 32 or 64 depending on a Miranda's platform. For example,
// http://miranda-ng.org/distr/stable/x%platform%
//
-//wParam = (TCHAR*)ptszUrl = url of hashes.zip
-//lParam = (TCHAR[260])ptszBaseUrl = decoded base url
+//wParam = (wchar_t*)ptszUrl = url of hashes.zip
+//lParam = (wchar_t[260])ptszBaseUrl = decoded base url
//return = (HANDLE)array of hash items or NULL on error
#define MS_PU_PARSEHASHES "PluginUpdater/ParseHashes"
diff --git a/include/m_popup.h b/include/m_popup.h index d19054520f..1c1342295e 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -83,14 +83,14 @@ typedef struct union
{
char *lpzTitle;
- WCHAR *lpwzTitle;
- TCHAR *lptzTitle;
+ wchar_t *lpwzTitle;
+ wchar_t *lptzTitle;
};
union
{
char *lpzText;
- WCHAR *lpwzText;
- TCHAR *lptzText;
+ wchar_t *lpwzText;
+ wchar_t *lptzText;
};
char *lpzSkin;
@@ -129,13 +129,13 @@ typedef struct HICON lchIcon;
union
{
- WCHAR lptzContactName[MAX_CONTACTNAME];
- WCHAR lpwzContactName[MAX_CONTACTNAME];
+ wchar_t lptzContactName[MAX_CONTACTNAME];
+ wchar_t lpwzContactName[MAX_CONTACTNAME];
};
union
{
- WCHAR lptzText[MAX_SECONDLINE];
- WCHAR lpwzText[MAX_SECONDLINE];
+ wchar_t lptzText[MAX_SECONDLINE];
+ wchar_t lpwzText[MAX_SECONDLINE];
};
COLORREF colorBack;
COLORREF colorText;
@@ -186,13 +186,13 @@ typedef struct HICON lchIcon;
union
{
- TCHAR lptzContactName[MAX_CONTACTNAME];
- WCHAR lpwzContactName[MAX_CONTACTNAME];
+ wchar_t lptzContactName[MAX_CONTACTNAME];
+ wchar_t lpwzContactName[MAX_CONTACTNAME];
};
union
{
- TCHAR lptzText[MAX_SECONDLINE];
- WCHAR lpwzText[MAX_SECONDLINE];
+ wchar_t lptzText[MAX_SECONDLINE];
+ wchar_t lpwzText[MAX_SECONDLINE];
};
COLORREF colorBack;
COLORREF colorText;
@@ -384,8 +384,8 @@ wParam = Modification type lParam = value of type defined by wParam
*/
-#define CPT_TEXTW 2 // lParam = (WCHAR *)text
-#define CPT_TITLEW 4 // lParam = (WCHAR *)title
+#define CPT_TEXTW 2 // lParam = (wchar_t *)text
+#define CPT_TITLEW 4 // lParam = (wchar_t *)title
#define CPT_DATAW 7 // lParam = (POPUPDATAW *)data
#define CPT_DATA2 8 // lParam = (POPUPDATA2 *)data -- see m_popup2.h for details
@@ -638,7 +638,7 @@ typedef struct { union {
char *pszDescription;
wchar_t *pwszDescription;
- TCHAR *ptszDescription;
+ wchar_t *ptszDescription;
};
HICON hIcon;
diff --git a/include/m_protocols.h b/include/m_protocols.h index cc19e7e8b1..90f7558f45 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -114,8 +114,8 @@ typedef struct tagPROTOFILETRANSFERSTATUS union {
char **pszFiles;
- TCHAR **ptszFiles;
- WCHAR **pwszFiles;
+ wchar_t **ptszFiles;
+ wchar_t **pwszFiles;
};
int totalFiles;
@@ -125,14 +125,14 @@ typedef struct tagPROTOFILETRANSFERSTATUS union {
char *szWorkingDir;
- TCHAR *tszWorkingDir;
- WCHAR *wszWorkingDir;
+ wchar_t *tszWorkingDir;
+ wchar_t *wszWorkingDir;
};
union {
char *szCurrentFile;
- TCHAR *tszCurrentFile;
- WCHAR *wszCurrentFile;
+ wchar_t *tszCurrentFile;
+ wchar_t *wszCurrentFile;
};
unsigned __int64 currentFileSize;
@@ -161,7 +161,7 @@ typedef struct tagPROTOFILETRANSFERSTATUS #define PROTOTYPE_OTHER 10000 // avoid using this if at all possible
// initializes an empty account
-typedef struct PROTO_INTERFACE* (*pfnInitProto)(const char* szModuleName, const TCHAR* szUserName);
+typedef struct PROTO_INTERFACE* (*pfnInitProto)(const char* szModuleName, const wchar_t* szUserName);
// deallocates an account instance
typedef int (*pfnUninitProto)(PROTO_INTERFACE*);
@@ -270,7 +270,7 @@ typedef struct tagACCOUNT {
int cbSize; // sizeof this structure
char* szModuleName; // unique physical account name (matches database module name)
- TCHAR* tszAccountName; // user-defined account name
+ wchar_t* tszAccountName; // user-defined account name
char* szProtoName; // physical protocol name
bool bIsEnabled; // is account enabled?
bool bIsVisible; // is account visible?
@@ -305,7 +305,7 @@ typedef struct tagACC_CREATE {
const char *pszBaseProto;
const char *pszInternal;
- const TCHAR *ptszAccountName;
+ const wchar_t *ptszAccountName;
} ACC_CREATE;
__forceinline PROTOACCOUNT* ProtoCreateAccount(ACC_CREATE *pAccountDef)
@@ -411,7 +411,7 @@ ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDAT typedef struct {
MCONTACT hContact; // this might have to be set by the caller too
int format; // PA_FORMAT_*
- WCHAR filename[MAX_PATH]; // full path to filename which contains the avatar
+ wchar_t filename[MAX_PATH]; // full path to filename which contains the avatar
} PROTO_AVATAR_INFORMATION;
#define GAIF_FORCE 1 // force an update of the avatar if there is none
diff --git a/include/m_protoint.h b/include/m_protoint.h index 5bf7092524..7735f52a14 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -54,7 +54,7 @@ typedef enum struct PROTO_INTERFACE;
// Call it in the very beginning of your proto's constructor
-EXTERN_C MIR_APP_DLL(void) ProtoConstructor(PROTO_INTERFACE *pThis, const char *pszModuleName, const TCHAR *ptszUserName);
+EXTERN_C MIR_APP_DLL(void) ProtoConstructor(PROTO_INTERFACE *pThis, const char *pszModuleName, const wchar_t *ptszUserName);
// Call it in the very end of your proto's destructor
EXTERN_C MIR_APP_DLL(void) ProtoDestructor(PROTO_INTERFACE *pThis);
@@ -89,7 +89,7 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject m_iDesiredStatus, // status to be set after logging in
m_iXStatus, // extanded status
m_iVersion; // version 2 or higher designate support of Unicode services
- TCHAR* m_tszUserName; // human readable protocol's name
+ wchar_t* m_tszUserName; // human readable protocol's name
char* m_szModuleName; // internal protocol name, also its database module name
HANDLE m_hProtoIcon; // icon to be displayed in the account manager
HANDLE m_hNetlibUser; // network agent
@@ -162,9 +162,9 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject __forceinline char* getStringA(MCONTACT hContact, const char *name) {
return db_get_sa(hContact, m_szModuleName, name); }
- __forceinline WCHAR* getWStringA(const char *name) {
+ __forceinline wchar_t* getWStringA(const char *name) {
return db_get_wsa(NULL, m_szModuleName, name); }
- __forceinline WCHAR* getWStringA(MCONTACT hContact, const char *name) {
+ __forceinline wchar_t* getWStringA(MCONTACT hContact, const char *name) {
return db_get_wsa(hContact, m_szModuleName, name); }
__forceinline void setByte(const char *name, BYTE value) { db_set_b(NULL, m_szModuleName, name, value); }
@@ -179,8 +179,8 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject __forceinline void setString(const char *name, const char* value) { db_set_s(NULL, m_szModuleName, name, value); }
__forceinline void setString(MCONTACT hContact, const char *name, const char* value) { db_set_s(hContact, m_szModuleName, name, value); }
- __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); }
+ __forceinline void setWString(const char *name, const wchar_t* value) { db_set_ws(NULL, m_szModuleName, name, value); }
+ __forceinline void setWString(MCONTACT hContact, const char *name, const wchar_t* value) { db_set_ws(hContact, m_szModuleName, name, value); }
//////////////////////////////////////////////////////////////////////////////////////
// Virtual functions
@@ -189,21 +189,21 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR* szReason);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const wchar_t* szReason);
virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const wchar_t* szMessage);
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath);
virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
- virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
- virtual HANDLE __cdecl SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName);
+ virtual HANDLE __cdecl SearchBasic(const wchar_t* id);
+ virtual HANDLE __cdecl SearchByEmail(const wchar_t* email);
+ virtual HANDLE __cdecl SearchByName(const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName);
virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
@@ -213,7 +213,7 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
@@ -222,7 +222,7 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
- virtual int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const wchar_t* msg);
virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
@@ -234,7 +234,7 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject template<class T> struct PROTO : public PROTO_INTERFACE
{
- __forceinline PROTO(const char *szProto, const TCHAR *tszUserName) {
+ __forceinline PROTO(const char *szProto, const wchar_t *tszUserName) {
::ProtoConstructor(this, szProto, tszUserName); }
__forceinline ~PROTO() {
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 86708741e9..c1b8d1376b 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -258,7 +258,7 @@ static __inline unsigned long Proto_Status2Flag(int status) ///////////////////////////////////////////////////////////////////////////////
// Sets the status-mode specific message for yourself
// wParam = status mode
-// lParam = (LPARAM)(const TCHAR*)szMessage
+// lParam = (LPARAM)(const wchar_t*)szMessage
// Returns 0 on success, nonzero on failure
// Note that this service will not be available unless PF1_MODEMSGSEND is set
// and PF1_INDIVMODEMSG is *not* set.
@@ -293,7 +293,7 @@ static __inline unsigned long Proto_Status2Flag(int status) ///////////////////////////////////////////////////////////////////////////////
// Deny an authorisation request
// wParam = (WPARAM)(HANDLE)hDbEvent
-// lParam = (LPARAM)(const TCHAR*)szReason
+// lParam = (LPARAM)(const wchar_t*)szReason
// Returns 0 on success, nonzero on failure
// Protocol modules must be able to cope with szReason = NULL
@@ -320,7 +320,7 @@ static __inline unsigned long Proto_Status2Flag(int status) ///////////////////////////////////////////////////////////////////////////////
// Send a basic search request
// wParam = 0
-// lParam = (LPARAM)(const TCHAR*)szId
+// lParam = (LPARAM)(const wchar_t*)szId
// Returns a handle for the search, or zero on failure
// All protocols identify users uniquely by a single field. This service will
// search by that field.
@@ -353,7 +353,7 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////////
// Search for users by e-mail address
// wParam = 0
-// lParam = (LPARAM)(TCHAR*)szEmail
+// lParam = (LPARAM)(wchar_t*)szEmail
// Returns a HANDLE to the search, or NULL on failure
// Results are returned as for PS_BASICSEARCH.
// This function is only available if the PF1_SEARCHBYEMAIL capability is set
@@ -372,9 +372,9 @@ typedef struct { // This function is only available if the PF1_SEARCHBYNAME capability is set
typedef struct {
- TCHAR *pszNick;
- TCHAR *pszFirstName;
- TCHAR *pszLastName;
+ wchar_t *pszNick;
+ wchar_t *pszFirstName;
+ wchar_t *pszLastName;
} PROTOSEARCHBYNAME;
#define PS_SEARCHBYNAME "/SearchByName"
@@ -408,7 +408,7 @@ typedef struct { typedef struct {
size_t nSize;
int nFieldCount;
- TCHAR **pszFields;
+ wchar_t **pszFields;
PROTOSEARCHRESULT psr;
} CUSTOMSEARCHRESULTS;
@@ -467,7 +467,7 @@ typedef struct { typedef struct {
int action; // a FILERESUME_ flag
- const TCHAR *szFilename; // full path. Only valid if action == FILERESUME_RENAME
+ const wchar_t *szFilename; // full path. Only valid if action == FILERESUME_RENAME
} PROTOFILERESUME;
#define PS_FILERESUME "/FileResume"
@@ -548,7 +548,7 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////////
// Sets the WAYD message for the user
// wParam = (WPARAM)WAYD_xxx
-// lParam = (LPARAM)(WCHAR * or char *)The message
+// lParam = (LPARAM)(wchar_t * or char *)The message
// Returns 0 on success, nonzero on failure
#define PS_SETMYWAYD "/SetMyWAYD"
@@ -649,7 +649,7 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////////
// Allows a file transfer to begin
// wParam = (WPARAM)(HANDLE)hTransfer
-// lParam = (LPARAM)(const TCHAR*)szPath
+// lParam = (LPARAM)(const wchar_t*)szPath
// Returns a new handle to the transfer, to be used from now on
// If szPath does not point to a directory then:
// if a single file is being transferred and the protocol supports file
@@ -666,7 +666,7 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////////
// Refuses a file transfer request
// wParam = (WPARAM)(HANDLE)hTransfer
-// lParam = (LPARAM)(const TCHAR*)szReason
+// lParam = (LPARAM)(const wchar_t*)szReason
// Returns 0 on success, nonzero on failure
#define PSS_FILEDENY "/FileDeny"
@@ -681,8 +681,8 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////////
// Initiate a file send
-// wParam = (WPARAM)(const TCHAR*)szDescription
-// lParam = (LPARAM)(TCHAR **)ppszFiles
+// wParam = (WPARAM)(const wchar_t*)szDescription
+// lParam = (LPARAM)(wchar_t **)ppszFiles
// Returns a transfer handle on success, NULL on failure
// All notification is done through acks, with type = ACKTYPE_FILE
// If result = ACKRESULT_FAILED then lParam = (LPARAM)(const char*)szReason
@@ -704,7 +704,7 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////////
// Send an auth request
// wParam = 0
-// lParam = (const TCHAR *)szMessage
+// lParam = (const wchar_t *)szMessage
// Returns 0 on success, nonzero on failure
#define PSS_AUTHREQUEST "/AuthRequest"
diff --git a/include/m_system.h b/include/m_system.h index ef0191ce48..4d5757c593 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -62,7 +62,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //restarts miranda (0.8+)
//wParam = 0 or 1. 1 - restart with current profile, 0 - restart in default profile or profile manager
-//lParam = (TCHAR*)path to a new miranda32.exe binary or NULL to use current
+//lParam = (wchar_t*)path to a new miranda32.exe binary or NULL to use current
#define MS_SYSTEM_RESTART "Miranda/System/Restart"
//miranda/system/oktoexit event
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index e595583b9d..9a33d2a712 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -96,16 +96,16 @@ public: }
};
-class pass_ptrW : public mir_ptr<WCHAR>
+class pass_ptrW : public mir_ptr<wchar_t>
{
public:
__inline explicit pass_ptrW() : mir_ptr(){}
- __inline explicit pass_ptrW(WCHAR* _p) : mir_ptr(_p) {}
+ __inline explicit pass_ptrW(wchar_t* _p) : mir_ptr(_p) {}
__inline ~pass_ptrW() { zero(); }
- __inline WCHAR* operator = (WCHAR *_p){ zero(); return mir_ptr::operator=(_p); }
+ __inline wchar_t* operator = (wchar_t *_p){ zero(); return mir_ptr::operator=(_p); }
__inline void zero()
{
- if (data) SecureZeroMemory(data, mir_wstrlen(data)*sizeof(WCHAR));
+ if (data) SecureZeroMemory(data, mir_wstrlen(data)*sizeof(wchar_t));
}
};
diff --git a/include/m_utils.h b/include/m_utils.h index c8e4cac76f..65f2bd2dbe 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -239,8 +239,8 @@ EXTERN_C MIR_CORE_DLL(int) Utils_AssertInsideScreen(RECT *rc); // An 'All Bitmaps' item is always first and 'All Files' is last.
// The returned string is already translated.
-EXTERN_C MIR_CORE_DLL(HBITMAP) Bitmap_Load(const TCHAR *ptszFileName);
-EXTERN_C MIR_CORE_DLL(void) Bitmap_GetFilter(TCHAR *dest, size_t destLen);
+EXTERN_C MIR_CORE_DLL(HBITMAP) Bitmap_Load(const wchar_t *ptszFileName);
+EXTERN_C MIR_CORE_DLL(void) Bitmap_GetFilter(wchar_t *dest, size_t destLen);
/////////////////////////////////////////////////////////////////////////////////////////
// Converts a path to a relative path
@@ -315,7 +315,7 @@ EXTERN_C MIR_CORE_DLL(void) Utils_GetRandom(void *pszDest, size_t cbLen); /////////////////////////////////////////////////////////////////////////////////////////
// Replace variables in text
-// wParam = (char*/TCHAR*/WCHAR*)string (depends on RVF_UNICODE/RVF_TCHAR flag)
+// wParam = (char*/wchar_t*/wchar_t*)string (depends on RVF_UNICODE/RVF_TCHAR flag)
// lParam = (REPLACEVARSDATA *) data about variables, item with key = 0 terminates the list
// returns new string, use mir_free to destroy
diff --git a/include/m_xstatus.h b/include/m_xstatus.h index 89d34aee27..1d3dc76ccb 100644 --- a/include/m_xstatus.h +++ b/include/m_xstatus.h @@ -44,13 +44,13 @@ typedef struct { int *status; // custom status id
union {
char *pszName; // buffer for custom status name
- TCHAR *ptszName;
- WCHAR *pwszName;
+ wchar_t *ptszName;
+ wchar_t *pwszName;
};
union {
char *pszMessage; // buffer for custom status message
- TCHAR *ptszMessage;
- WCHAR *pwszMessage;
+ wchar_t *ptszMessage;
+ wchar_t *pwszMessage;
};
WPARAM *wParam; // extra params, see flags
LPARAM *lParam;
diff --git a/include/msapi/richedit5.h b/include/msapi/richedit5.h index af75057c86..6eb3980abf 100644 --- a/include/msapi/richedit5.h +++ b/include/msapi/richedit5.h @@ -445,7 +445,7 @@ typedef struct _tableCellParms #define EM_CALLAUTOCORRECTPROC (WM_USER + 255)
// AutoCorrect callback
-typedef int (WINAPI *AutoCorrectProc)(LANGID langid, const WCHAR *pszBefore, WCHAR *pszAfter, LONG cchAfter, LONG *pcchReplaced);
+typedef int (WINAPI *AutoCorrectProc)(LANGID langid, const wchar_t *pszBefore, wchar_t *pszAfter, LONG cchAfter, LONG *pcchReplaced);
#define ATP_NOCHANGE 0
#define ATP_CHANGE 1
@@ -680,7 +680,7 @@ typedef struct _charformatw COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
- WCHAR szFaceName[LF_FACESIZE];
+ wchar_t szFaceName[LF_FACESIZE];
} CHARFORMATW;
#if (_RICHEDIT_VER >= 0x0200)
@@ -759,7 +759,7 @@ typedef struct _charformat2w COLORREF crTextColor;
BYTE bCharSet;
BYTE bPitchAndFamily;
- WCHAR szFaceName[LF_FACESIZE];
+ wchar_t szFaceName[LF_FACESIZE];
WORD wWeight; // Font weight (LOGFONT value)
SHORT sSpacing; // Amount to space between letters
COLORREF crBackColor; // Background color
@@ -1563,7 +1563,7 @@ typedef struct _bidioptions // UNICODE embedding character
#ifndef WCH_EMBEDDING
-#define WCH_EMBEDDING (WCHAR)0xFFFC
+#define WCH_EMBEDDING (wchar_t)0xFFFC
#endif // WCH_EMBEDDING
// khyph - Kind of hyphenation
@@ -1583,16 +1583,16 @@ typedef struct hyphresult {
KHYPH khyph; // Kind of hyphenation
long ichHyph; // Character which was hyphenated
- WCHAR chHyph; // Depending on hyphenation type, character added, changed, etc.
+ wchar_t chHyph; // Depending on hyphenation type, character added, changed, etc.
} HYPHRESULT;
-void WINAPI HyphenateProc(_In_ WCHAR *pszWord, LANGID langid, long ichExceed, HYPHRESULT *phyphresult);
+void WINAPI HyphenateProc(_In_ wchar_t *pszWord, LANGID langid, long ichExceed, HYPHRESULT *phyphresult);
typedef struct tagHyphenateInfo
{
SHORT cbSize; // Size of HYPHENATEINFO structure
SHORT dxHyphenateZone; // If a space character is closer to the margin
// than this value, don't hyphenate (in TWIPs)
- void (WINAPI* pfnHyphenate)(WCHAR*, LANGID, long, HYPHRESULT*);
+ void (WINAPI* pfnHyphenate)(wchar_t*, LANGID, long, HYPHRESULT*);
} HYPHENATEINFO;
#ifdef _WIN32
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 4951bac756..0394838b5a 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -39,12 +39,10 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) {
MCONTACT hContact = wParam;
DBEVENTINFO *dbei = (DBEVENTINFO *)lParam;
- char *msgblob;
char protoOption[256] = {0};
int buflen = MAX_BUFFER_LENGTH;
wchar_t buf[MAX_BUFFER_LENGTH];
- wchar_t *message = NULL, *challengeW = NULL, *tmpW = NULL;
- wchar_t *whitelist = NULL, *ptok;
+ wchar_t *challengeW = NULL, *tmpW = NULL;
wchar_t mexpr[64];
int maxmsglen = 0, a, b, i;
BOOL bayesEnabled = _getOptB("BayesEnabled", defaultBayesEnabled);
@@ -66,7 +64,6 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) last_queue_check = time(NULL);
}
-
/*** Check for conditional and unconditional approval ***/
// Pass-through if protocol is not enabled
@@ -115,31 +112,34 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) db_set_b(hContact, "CList", "Hidden", 1);
// Fetch the incoming message body
+ char *msgblob;
if (dbei->eventType == EVENTTYPE_MESSAGE) {
msgblob = (char *)dbei->pBlob;
- } else if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
+ }
+ else if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
msgblob = (char *)(dbei->pBlob + sizeof(DWORD) + sizeof(HANDLE));
- for(a=4;a>0;a--)
+ for(a = 4; a > 0; a--)
msgblob += mir_strlen(msgblob)+1;
}
+ else msgblob = NULL;
+ wchar_t *message = NULL;
if (dbei->flags & DBEF_UTF)
message = mir_utf8decodeW(msgblob);
else
message = mir_a2u(msgblob);
-
/*** Check for words in white-list ***/
-
if (_getOptB("ApproveOnMsgIn", defaultApproveOnMsgIn)) {
- whitelist = (wchar_t*)malloc(2048 * sizeof(wchar_t));
+ wchar_t *whitelist = (wchar_t*)malloc(2048 * sizeof(wchar_t));
if (whitelist != NULL) {
_getOptS(whitelist, 2048, "ApproveOnMsgInWordlist", defaultApproveOnMsgInWordlist);
if (_isregex(whitelist)) {
if (_regmatch(message, whitelist))
bCorrectResponse = TRUE;
- } else {
- ptok = wcstok(whitelist, L" ");
+ }
+ else {
+ wchar_t *ptok = wcstok(whitelist, L" ");
while (ptok != NULL) {
if (wcsstr(message, ptok)) {
bCorrectResponse = TRUE;
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index 25e0258bd5..8b502d2fb9 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -1552,7 +1552,7 @@ int CMLan::FileResume(int cid, PROTOFILERESUME* pfr) case FILERESUME_RENAME: conn->m_state = TFileConnection::FCS_RENAME; delete[] conn->m_szRenamedFile; - conn->m_szRenamedFile = _strdup(pfr->szFilename); + conn->m_szRenamedFile = _strdup((char*)pfr->szFilename); break; case FILERESUME_SKIP: conn->m_state = TFileConnection::FCS_SKIP; diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index d2d559f7da..db8aa0e0c4 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -132,7 +132,7 @@ static INT_PTR icqSearchByName(WPARAM, LPARAM lParam) PROTOSEARCHBYNAME *psbn = (PROTOSEARCHBYNAME*)lParam;
T("[ ] search by name\n");
- icq.startSearch(1, 0, psbn->pszNick, 0);
+ icq.startSearch(1, 0, (char*)psbn->pszNick, 0);
return 1;
}
@@ -443,7 +443,7 @@ static INT_PTR icqFileResume(WPARAM wParam, LPARAM lParam) ICQTransfer *t = (ICQTransfer *)wParam;
T("[ ] send file resume\n");
- t->resume(pfr->action, pfr->szFilename);
+ t->resume(pfr->action, (char*)pfr->szFilename);
return 0;
}
|