diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/aim.h | 4 | ||||
-rw-r--r-- | protocols/IRCG/irc.h | 11 | ||||
-rw-r--r-- | protocols/JabberG/jabber.h | 3 | ||||
-rw-r--r-- | protocols/MSN/msn_global.h | 19 | ||||
-rw-r--r-- | protocols/Yahoo/yahoo.h | 13 |
5 files changed, 18 insertions, 32 deletions
diff --git a/protocols/AimOscar/aim.h b/protocols/AimOscar/aim.h index b986fa280d..a6d7e737e7 100644 --- a/protocols/AimOscar/aim.h +++ b/protocols/AimOscar/aim.h @@ -333,10 +333,6 @@ extern char AIM_CAP_MIRANDA[]; //Miranda cap EXTERN extern HINSTANCE hInstance; //plugin dll instance
-#define NEWSTR_ALLOCA(A) ((A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A))
-#define NEWWSTR_ALLOCA(A) ((A==NULL)?NULL:wcscpy((wchar_t*)alloca(sizeof(wchar_t)*(wcslen(A)+1)),A))
-#define NEWTSTR_ALLOCA(A) ((A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A))
-
#define _strlens(a) (a ? strlen(a) : 0)
#define _strcmps(a,b) (a != b && (!a || !b || strcmp(a, b)))
diff --git a/protocols/IRCG/irc.h b/protocols/IRCG/irc.h index 41591b388a..4580243385 100644 --- a/protocols/IRCG/irc.h +++ b/protocols/IRCG/irc.h @@ -407,7 +407,7 @@ struct CIrcProto : public PROTO_INTERFACE, public CCallocBase CWhoisDlg* m_whoisDlg;
CQuickDlg* m_quickDlg;
CIgnorePrefsDlg* m_ignoreDlg;
-
+
int m_noOfChannels, m_manualWhoisCount;
String sChannelModes, sUserModes;
CMString sChannelPrefixes, sUserModePrefixes, WhoisAwayReply;
@@ -424,7 +424,7 @@ struct CIrcProto : public PROTO_INTERFACE, public CCallocBase BOOL CList_AddDCCChat(const CMString& name, const CMString& hostmask, unsigned long adr, int port) ;
//commandmonitor.cpp
- UINT_PTR IdentTimer, InitTimer, KeepAliveTimer, OnlineNotifTimer, OnlineNotifTimer3;
+ UINT_PTR IdentTimer, InitTimer, KeepAliveTimer, OnlineNotifTimer, OnlineNotifTimer3;
int AddOutgoingMessageToDB(HANDLE hContact, TCHAR* msg);
bool DoOnConnect(const CIrcMessage *pmsg);
@@ -561,14 +561,14 @@ struct CIrcProto : public PROTO_INTERFACE, public CCallocBase void AddDCCSession(DCCINFO* pdci, CDccSession* dcc);
void RemoveDCCSession(HANDLE hContact);
void RemoveDCCSession(DCCINFO* pdci);
-
+
CDccSession* FindDCCSession(HANDLE hContact);
CDccSession* FindDCCSession(DCCINFO* pdci);
CDccSession* FindDCCSendByPort(int iPort);
CDccSession* FindDCCRecvByPortAndName(int iPort, const TCHAR* szName);
CDccSession* FindPassiveDCCSend(int iToken);
CDccSession* FindPassiveDCCRecv(CMString sName, CMString sToken);
-
+
void DisconnectAllDCCSessions(bool Shutdown);
void CheckDCCTimeout(void);
@@ -731,9 +731,6 @@ TCHAR* __stdcall DoColorCodes (const TCHAR* text, bool bStrip, bool bRepla String& __stdcall ReplaceString (String& text, const char* replaceme, const char* newword);
String __stdcall GetWord(const char* text, int index);
-#define NEWSTR_ALLOCA(A) (A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A)
-#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
-
#pragma comment(lib,"comctl32.lib")
#endif
diff --git a/protocols/JabberG/jabber.h b/protocols/JabberG/jabber.h index 3958213fdd..4fd50d6d78 100644 --- a/protocols/JabberG/jabber.h +++ b/protocols/JabberG/jabber.h @@ -32,9 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_stdhdr.h"
-#define NEWSTR_ALLOCA(A) (A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A)
-#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
-
#define LISTFOREACH(var__, obj__, list__) \
for (int var__ = 0; (var__ = obj__->ListFindNext(list__, var__)) >= 0; ++var__)
#define LISTFOREACH_NODEF(var__, obj__, list__) \
diff --git a/protocols/MSN/msn_global.h b/protocols/MSN/msn_global.h index 2b2ef91a70..1c446112f6 100644 --- a/protocols/MSN/msn_global.h +++ b/protocols/MSN/msn_global.h @@ -150,9 +150,6 @@ extern const char sttVoidUid[]; struct CMsnProto;
-#define NEWSTR_ALLOCA(A) (A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A)
-#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
-
#define MSN_ALLOW_MSGBOX 1
#define MSN_ALLOW_ENTER 2
#define MSN_HOTMAIL_POPUP 4
@@ -245,12 +242,12 @@ struct STRLIST : public LIST<char> {
static int compare(const char* p1, const char* p2)
{ return _stricmp(p1, p2); }
-
+
STRLIST() : LIST<char>(2, compare) {}
~STRLIST() { destroy(); }
void destroy( void )
- {
+ {
for (int i=0; i < count; i++)
mir_free(items[i]);
@@ -258,7 +255,7 @@ struct STRLIST : public LIST<char> }
int insertn(const char* p) { return insert(mir_strdup(p)); }
-
+
int remove(int idx)
{
mir_free(items[idx]);
@@ -360,7 +357,7 @@ struct filetransfer bool bCanceled; // flag to interrupt a transfer
bool bCompleted; // was a FT ever completed?
bool bAccepted; // was a FT ever completed?
-
+
int fileId; // handle of file being transferring (r/w)
HANDLE hLockHandle;
@@ -422,7 +419,7 @@ struct directconnection typedef struct _tag_HFileContext
{
- unsigned len;
+ unsigned len;
unsigned ver;
unsigned __int64 dwSize;
unsigned type;
@@ -457,7 +454,7 @@ struct P2P_Header : P2PB_Header char* parseMsg(char *buf) { memcpy(&mSessionID, buf, 48); return buf + 48; }
char* createMsg(char *buf, const char* wlid, CMsnProto *ppro);
- bool isV2Hdr(void) { return false; }
+ bool isV2Hdr(void) { return false; }
void logHeader(CMsnProto *ppro);
} ;
@@ -478,7 +475,7 @@ struct P2PV2_Header : P2PB_Header char* parseMsg(char *buf);
char* createMsg(char *buf, const char* wlid, CMsnProto *ppro);
- bool isV2Hdr(void) { return true; }
+ bool isV2Hdr(void) { return true; }
void logHeader(CMsnProto *ppro);
};
@@ -878,7 +875,7 @@ struct InviteChatParam TCHAR* id;
HANDLE hContact;
CMsnProto* ppro;
-
+
InviteChatParam(const TCHAR* id, HANDLE hContact, CMsnProto* ppro)
: id(mir_tstrdup(id)), hContact(hContact), ppro(ppro) {}
diff --git a/protocols/Yahoo/yahoo.h b/protocols/Yahoo/yahoo.h index efe3b9cf2f..ed90bf8756 100644 --- a/protocols/Yahoo/yahoo.h +++ b/protocols/Yahoo/yahoo.h @@ -1,9 +1,9 @@ /*
* $Id: yahoo.h 14085 2012-02-13 10:55:56Z george.hazan $
*
- * myYahoo Miranda Plugin
+ * myYahoo Miranda Plugin
*
- * Authors: Gennady Feldman (aka Gena01)
+ * Authors: Gennady Feldman (aka Gena01)
* Laurent Marechal (aka Peorth)
*
* This code is under GPL and is based on AIM, MSN and Miranda source code.
@@ -27,7 +27,7 @@ #include <windows.h>
-/*
+/*
* Yahoo Services
*/
#define USE_STRUCT_CALLBACKS
@@ -69,8 +69,8 @@ extern "C" #define YAHOO_CHECKMAIL "CheckMail"
#define YAHOO_CUSTSTATDB "CustomStat"
#define YAHOO_DEFAULT_PORT 5050
-#define YAHOO_DEFAULT_LOGIN_SERVER "mcs.msg.yahoo.com"
-#define YAHOO_DEFAULT_JAPAN_LOGIN_SERVER "cs.yahoo.co.jp"
+#define YAHOO_DEFAULT_LOGIN_SERVER "mcs.msg.yahoo.com"
+#define YAHOO_DEFAULT_JAPAN_LOGIN_SERVER "cs.yahoo.co.jp"
#define YAHOO_CUSTOM_STATUS 99
#define YAHOO_DEBUGLOG DebugLog
@@ -81,7 +81,7 @@ extern int do_yahoo_debug; YAHOO_DEBUGLOG x; \
YAHOO_DEBUGLOG(" ");}
-#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand"
+#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand"
#define YAHOO_EDIT_MY_PROFILE "/YahooEditMyProfileCommand"
#define YAHOO_SHOW_PROFILE "/YahooShowProfileCommand"
#define YAHOO_SHOW_MY_PROFILE "/YahooShowMyProfileCommand"
@@ -95,7 +95,6 @@ extern int do_yahoo_debug; #define STYLE_DEFAULTBGCOLOUR RGB(173,206,247)
#define LocalEventUnhook(hook) if(hook) UnhookEvent(hook)
-#define NEWSTR_ALLOCA(A) (A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A)
struct _conn {
unsigned int tag;
|