diff libpurple/protocols/myspace/persist.h @ 18895:f732d072b118

Change all code to better match the style of libpurple - use 8-space tabs for indentation everywhere. Spaces are still used for alignment when needed, as described on http://derkarl.org/why_to_tabs.html (ack for [^\t]\t to ensure tabs are only being used for indentation). Lots of vim regexes made this transformation possible. Also cuddled a few braces that I missed before. This is a big commit, but there are no actual code changes.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 11 Aug 2007 05:53:11 +0000
parents c9acdf96e74e
children 9d921dde9d9f
line wrap: on
line diff
--- a/libpurple/protocols/myspace/persist.h	Sat Aug 11 05:02:23 2007 +0000
+++ b/libpurple/protocols/myspace/persist.h	Sat Aug 11 05:53:11 2007 +0000
@@ -21,69 +21,69 @@
 #define _MYSPACE_PERSIST_H
 
 /** Command codes */
-#define MSIM_CMD_GET			1
-#define MSIM_CMD_PUT			2
-#define MSIM_CMD_DELETE			3
+#define MSIM_CMD_GET               1
+#define MSIM_CMD_PUT               2
+#define MSIM_CMD_DELETE            3
 
 /** Command bit fields */
-#define MSIM_CMD_BIT_CODE		255			/*< Bits specifying command code */
-#define MSIM_CMD_BIT_REPLY		256			/**< 1=reply, 0=request */
-#define MSIM_CMD_BIT_ACTION		512			/**< 1=action, 0=information */
-#define MSIM_CMD_BIT_ERROR		1024		/**< 1=error, 0=normal */
+#define MSIM_CMD_BIT_CODE          255        /*< Bits specifying command code */
+#define MSIM_CMD_BIT_REPLY         256        /**< 1=reply, 0=request */
+#define MSIM_CMD_BIT_ACTION        512        /**< 1=action, 0=information */
+#define MSIM_CMD_BIT_ERROR        1024        /**< 1=error, 0=normal */
 
 /** Macros to read cmd bitfield. */
-#define MSIM_CMD_GET_CODE(x)	 (x & MSIM_CMD_BIT_CODE)
-#define MSIM_CMD_IS_REPLY(x)	 (x & MSIM_CMD_BIT_REPLY)
-#define MSIM_CMD_IS_REQUEST(x)	!(x & MSIM_CMD_BIT_REPLY)
-#define MSIM_CMD_IS_ACTION(x)	 (x & MSIM_CMD_BIT_ACTION)
-#define MSIM_CMD_IS_INFO(x)		!(x & MSIM_CMD_BIT_ACTION)
-#define MSIM_CMD_IS_ERROR(x)	 (x & MSIM_CMD_BIT_ERROR)
-#define MSIM_CMD_IS_NORMAL(x)	!(x & MSIM_CMD_BIT_ERROR)
+#define MSIM_CMD_GET_CODE(x)      (x & MSIM_CMD_BIT_CODE)
+#define MSIM_CMD_IS_REPLY(x)      (x & MSIM_CMD_BIT_REPLY)
+#define MSIM_CMD_IS_REQUEST(x)   !(x & MSIM_CMD_BIT_REPLY)
+#define MSIM_CMD_IS_ACTION(x)     (x & MSIM_CMD_BIT_ACTION)
+#define MSIM_CMD_IS_INFO(x)      !(x & MSIM_CMD_BIT_ACTION)
+#define MSIM_CMD_IS_ERROR(x)      (x & MSIM_CMD_BIT_ERROR)
+#define MSIM_CMD_IS_NORMAL(x)    !(x & MSIM_CMD_BIT_ERROR)
 
 /** Define a set of _DSN and _LID constants for a persistance request. */
-#define MSIM_PERSIST_DSN_LID(name,dsn,lid) 			\
-	const int name##_DSN = dsn;						\
-	const int name##_LID = lid;						
+#define MSIM_PERSIST_DSN_LID(name,dsn,lid)             \
+    const int name##_DSN = dsn;                        \
+    const int name##_LID = lid;                        
 
 /* Can't do this, errors:
- * 	persist.h:51:3: error: '#' is not followed by a macro parameter
+ *     persist.h:51:3: error: '#' is not followed by a macro parameter
  *  In file included from myspace.c:37:
  *  persist.h:56: error: expected ')' before numeric constant
  * So instead, I define const ints above.
-#define MSIM_PERSIST_DSN_LID(name,dsn,lid) 			\
-	#define name##_DSN		dsn						\
-	#define name##_LID		lid
+#define MSIM_PERSIST_DSN_LID(name,dsn,lid)             \
+	#define name##_DSN        dsn                  \
+	#define name##_LID        lid
 #endif
 */
 
 /** Messages to Get information                dsn lid */
-MSIM_PERSIST_DSN_LID(MG_LIST_ALL_CONTACTS, 		0, 1)
-MSIM_PERSIST_DSN_LID(MG_USER_INFO_BY_ID, 		0, 2)
-MSIM_PERSIST_DSN_LID(MG_OWN_IM_INFO,            1, 4)
-MSIM_PERSIST_DSN_LID(MG_IM_INFO_BY_ID, 			1, 17)
-MSIM_PERSIST_DSN_LID(MG_LIST_ALL_GROUPS,		2, 6)
-MSIM_PERSIST_DSN_LID(MG_MYSPACE_INFO_BY_ID, 	4, 3)
-MSIM_PERSIST_DSN_LID(MG_OWN_MYSPACE_INFO,  	    4, 5)
-MSIM_PERSIST_DSN_LID(MG_MYSPACE_INFO_BY_STRING, 5, 7)
-MSIM_PERSIST_DSN_LID(MG_CHECK_MAIL,				7, 18)
-MSIM_PERSIST_DSN_LID(MG_WEB_CHALLENGE,			17, 26)
-MSIM_PERSIST_DSN_LID(MG_USER_SONG,				21, 28)
-MSIM_PERSIST_DSN_LID(MG_SERVER_INFO,			101, 20)
+MSIM_PERSIST_DSN_LID(MG_LIST_ALL_CONTACTS,         0, 1)
+MSIM_PERSIST_DSN_LID(MG_USER_INFO_BY_ID,           0, 2)
+MSIM_PERSIST_DSN_LID(MG_OWN_IM_INFO,               1, 4)
+MSIM_PERSIST_DSN_LID(MG_IM_INFO_BY_ID,             1, 17)
+MSIM_PERSIST_DSN_LID(MG_LIST_ALL_GROUPS,           2, 6)
+MSIM_PERSIST_DSN_LID(MG_MYSPACE_INFO_BY_ID,        4, 3)
+MSIM_PERSIST_DSN_LID(MG_OWN_MYSPACE_INFO,          4, 5)
+MSIM_PERSIST_DSN_LID(MG_MYSPACE_INFO_BY_STRING,    5, 7)
+MSIM_PERSIST_DSN_LID(MG_CHECK_MAIL,                7, 18)
+MSIM_PERSIST_DSN_LID(MG_WEB_CHALLENGE,            17, 26)
+MSIM_PERSIST_DSN_LID(MG_USER_SONG,                21, 28)
+MSIM_PERSIST_DSN_LID(MG_SERVER_INFO,             101, 20)
 
 /** Messages to Change/send information */
-MSIM_PERSIST_DSN_LID(MC_USER_PREFERENCES,		1, 10)
-MSIM_PERSIST_DSN_LID(MC_CONTACT_INFO,			0, 9)
-MSIM_PERSIST_DSN_LID(MC_INVITE,					16, 25)
+MSIM_PERSIST_DSN_LID(MC_USER_PREFERENCES,          1, 10)
+MSIM_PERSIST_DSN_LID(MC_CONTACT_INFO,              0, 9)
+MSIM_PERSIST_DSN_LID(MC_INVITE,                   16, 25)
 
 /** Messages to Delete information */
-MSIM_PERSIST_DSN_LID(MD_DELETE_BUDDY,			0, 8)
+MSIM_PERSIST_DSN_LID(MD_DELETE_BUDDY,              0, 8)
 
 /** Error codes */
-#define MERR_PARSE					1
-#define MERR_NOT_LOGGED_IN			2
-#define MERR_ANOTHER_LOGIN			6
-#define MERR_BAD_EMAIL				259
-#define MERR_BAD_PASSWORD			260
-#define MERR_BAD_UID_IN_PERSISTR	4352
+#define MERR_PARSE                    1
+#define MERR_NOT_LOGGED_IN            2
+#define MERR_ANOTHER_LOGIN            6
+#define MERR_BAD_EMAIL                259
+#define MERR_BAD_PASSWORD             260
+#define MERR_BAD_UID_IN_PERSISTR      4352
 
 #endif /* !_MYSPACE_PERSIST_H */