Mercurial > pidgin
comparison libpurple/protocols/myspace/message.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 | f41db253c1af |
children | d0be4366e876 |
comparison
equal
deleted
inserted
replaced
18894:daedc9647341 | 18895:f732d072b118 |
---|---|
23 #define _MYSPACE_MESSAGE_H | 23 #define _MYSPACE_MESSAGE_H |
24 | 24 |
25 #include <glib.h> | 25 #include <glib.h> |
26 | 26 |
27 /* Types */ | 27 /* Types */ |
28 #define MsimMessage GList /* #define instead of typedef to avoid casting */ | 28 #define MsimMessage GList /* #define instead of typedef to avoid casting */ |
29 typedef struct _MsimMessageElement | 29 typedef struct _MsimMessageElement |
30 { | 30 { |
31 const gchar *name; /**< Textual name of element. */ | 31 const gchar *name; /**< Textual name of element. */ |
32 guint type; /**< MSIM_TYPE_* code. */ | 32 guint type; /**< MSIM_TYPE_* code. */ |
33 gpointer data; /**< Pointer to data, or GUINT_TO_POINTER for int/bool. */ | 33 gpointer data; /**< Pointer to data, or GUINT_TO_POINTER for int/bool. */ |
34 } MsimMessageElement; | 34 } MsimMessageElement; |
35 | 35 |
36 typedef gchar MsimMessageType; | 36 typedef gchar MsimMessageType; |
37 | 37 |
38 /* Protocol field types */ | 38 /* Protocol field types */ |
39 #define MSIM_TYPE_RAW '-' | 39 #define MSIM_TYPE_RAW '-' |
40 #define MSIM_TYPE_INTEGER 'i' | 40 #define MSIM_TYPE_INTEGER 'i' |
41 #define MSIM_TYPE_STRING 's' | 41 #define MSIM_TYPE_STRING 's' |
42 #define MSIM_TYPE_BINARY 'b' | 42 #define MSIM_TYPE_BINARY 'b' |
43 #define MSIM_TYPE_BOOLEAN 'f' | 43 #define MSIM_TYPE_BOOLEAN 'f' |
44 #define MSIM_TYPE_DICTIONARY 'd' | 44 #define MSIM_TYPE_DICTIONARY 'd' |
45 #define MSIM_TYPE_LIST 'l' | 45 #define MSIM_TYPE_LIST 'l' |
46 | 46 |
47 gchar *msim_escape(const gchar *msg); | 47 gchar *msim_escape(const gchar *msg); |
48 gchar *msim_unescape(const gchar *msg); | 48 gchar *msim_unescape(const gchar *msg); |
49 | 49 |
50 MsimMessage *msim_msg_new(gboolean not_empty, ...); | 50 MsimMessage *msim_msg_new(gboolean not_empty, ...); |
74 #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) | 74 #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) |
75 #define FORMAT_ATTR(pos) __attribute__ ((__format__ (__printf__, pos, pos+1))) | 75 #define FORMAT_ATTR(pos) __attribute__ ((__format__ (__printf__, pos, pos+1))) |
76 #define NORETURN_ATTR __attribute__ ((__noreturn__)) | 76 #define NORETURN_ATTR __attribute__ ((__noreturn__)) |
77 /* __sentinel__ attribute was introduced in gcc 3.5 */ | 77 /* __sentinel__ attribute was introduced in gcc 3.5 */ |
78 #if (GCC_VERSION >= 3005) | 78 #if (GCC_VERSION >= 3005) |
79 #define SENTINEL_ATTR __attribute__ ((__sentinel__(0))) | 79 #define SENTINEL_ATTR __attribute__ ((__sentinel__(0))) |
80 #else | 80 #else |
81 #define SENTINEL_ATTR | 81 #define SENTINEL_ATTR |
82 #endif /* gcc >= 3.5 */ | 82 #endif /* gcc >= 3.5 */ |
83 #else | 83 #else |
84 #define FORMAT_ATTR(pos) | 84 #define FORMAT_ATTR(pos) |
85 #define NORETURN_ATTR | 85 #define NORETURN_ATTR |
86 #define SENTINEL_ATTR | 86 #define SENTINEL_ATTR |
87 #endif | 87 #endif |
88 | 88 |
89 /* Cause gcc to emit "a missing sentinel in function call" if forgot | 89 /* Cause gcc to emit "a missing sentinel in function call" if forgot |
90 * to write NULL as last, terminating parameter. */ | 90 * to write NULL as last, terminating parameter. */ |
91 gboolean msim_send(struct _MsimSession *session, ...) SENTINEL_ATTR; | 91 gboolean msim_send(struct _MsimSession *session, ...) SENTINEL_ATTR; |