changeset 17661:38030f1a2e56

Split return type and function name + arguments on to separate lines, to better match Pidgin's coding standards.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sun, 24 Jun 2007 19:32:45 +0000
parents cbda7f26d27d
children 7b890c79aabf
files libpurple/protocols/myspace/message.c libpurple/protocols/myspace/myspace.c
diffstat 2 files changed, 169 insertions(+), 88 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/message.c	Sun Jun 24 19:23:41 2007 +0000
+++ b/libpurple/protocols/myspace/message.c	Sun Jun 24 19:32:45 2007 +0000
@@ -36,7 +36,8 @@
  *
  * See msim_msg_append() documentation for details on types.
  */
-MsimMessage *msim_msg_new(gboolean not_empty, ...)
+MsimMessage *
+msim_msg_new(gboolean not_empty, ...)
 {
 	va_list argp;
 
@@ -55,7 +56,8 @@
  *
  * For internal use - users probably want msim_msg_new() or msim_send().
  */
-static MsimMessage *msim_msg_new_v(va_list argp)
+static MsimMessage *
+msim_msg_new_v(va_list argp)
 {
 	gchar *key, *value;
 	MsimMessageType type;
@@ -117,7 +119,8 @@
  * @param data MsimMessageElement * to clone.
  * @param user_data Pointer to MsimMessage * to add cloned element to.
  */
-static void msim_msg_clone_element(gpointer data, gpointer user_data)
+static void 
+msim_msg_clone_element(gpointer data, gpointer user_data)
 {
 	MsimMessageElement *elem;
 	MsimMessage **new;
@@ -162,7 +165,8 @@
  *
  * @return Cloned message; caller should free with msim_msg_free().
  */
-MsimMessage *msim_msg_clone(MsimMessage *old)
+MsimMessage *
+msim_msg_clone(MsimMessage *old)
 {
 	MsimMessage *new;
 
@@ -181,7 +185,8 @@
  * @param data MsimMessageElement * to free.
  * @param user_data Not used; required to match g_list_foreach() callback prototype.
  */
-static void msim_msg_free_element(gpointer data, gpointer user_data)
+static void 
+msim_msg_free_element(gpointer data, gpointer user_data)
 {
 	MsimMessageElement *elem;
 
@@ -224,7 +229,8 @@
 }
 
 /** Free a complete message. */
-void msim_msg_free(MsimMessage *msg)
+void 
+msim_msg_free(MsimMessage *msg)
 {
 	if (!msg)
 	{
@@ -237,7 +243,8 @@
 }
 
 /** Send an existing MsimMessage. */
-gboolean msim_msg_send(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_msg_send(MsimSession *session, MsimMessage *msg)
 {
 	gchar *raw;
 	gboolean success;
@@ -265,7 +272,8 @@
  * IMPORTANT: See msim_msg_append() documentation for details on element types.
  *
  */
-gboolean msim_send(MsimSession *session, ...)
+gboolean 
+msim_send(MsimSession *session, ...)
 {
 	gboolean success;
 	MsimMessage *msg;
@@ -287,7 +295,8 @@
  *
  * For internal use; users probably want msim_msg_append() or msim_msg_insert_before(). 
  */
-static MsimMessageElement *msim_msg_element_new(const gchar *name, MsimMessageType type, gpointer data)
+static MsimMessageElement *
+msim_msg_element_new(const gchar *name, MsimMessageType type, gpointer data)
 {
 	MsimMessageElement *elem;
 
@@ -328,7 +337,9 @@
  * * MSIM_TYPE_LIST: TODO
  *
  * */
-MsimMessage *msim_msg_append(MsimMessage *msg, const gchar *name, MsimMessageType type, gpointer data)
+MsimMessage *
+msim_msg_append(MsimMessage *msg, const gchar *name, 
+		MsimMessageType type, gpointer data)
 {
 	return g_list_append(msg, msim_msg_element_new(name, type, data));
 }
@@ -340,7 +351,9 @@
  *
  * See msim_msg_append() for usage of other parameters, and an important note about return value.
  */
-MsimMessage *msim_msg_insert_before(MsimMessage *msg, const gchar *name_before, const gchar *name, MsimMessageType type, gpointer data)
+MsimMessage *
+msim_msg_insert_before(MsimMessage *msg, const gchar *name_before, 
+		const gchar *name, MsimMessageType type, gpointer data)
 {
 	MsimMessageElement *new_elem;
 	GList *node_before;
@@ -355,7 +368,9 @@
 /** Pack a string using the given GFunc and seperator.
  * Used by msim_msg_dump() and msim_msg_pack().
  */
-gchar *msim_msg_pack_using(MsimMessage *msg, GFunc gf, const gchar *sep, const gchar *begin, const gchar *end)
+gchar *
+msim_msg_pack_using(MsimMessage *msg, GFunc gf, const gchar *sep, 
+		const gchar *begin, const gchar *end)
 {
 	gchar **strings;
 	gchar **strings_tmp;
@@ -390,7 +405,8 @@
  * @param data Pointer to an MsimMessageElement.
  * @param user_data 
  */
-static void msim_msg_debug_string_element(gpointer data, gpointer user_data)
+static void 
+msim_msg_debug_string_element(gpointer data, gpointer user_data)
 {
 	MsimMessageElement *elem;
 	gchar *string;
@@ -450,7 +466,8 @@
  *
  * @param fmt_string A static string, in which '%s' will be replaced.
  */
-void msim_msg_dump(const gchar *fmt_string, MsimMessage *msg)
+void 
+msim_msg_dump(const gchar *fmt_string, MsimMessage *msg)
 {
 	gchar *debug_str;
 
@@ -475,7 +492,8 @@
  * optimal for human consumption. For example, strings are escaped. Use 
  * msim_msg_get_string() if you want a string, which in some cases is same as this.
  */
-static gchar *msim_msg_pack_element_data(MsimMessageElement *elem)
+static gchar *
+msim_msg_pack_element_data(MsimMessageElement *elem)
 {
 	switch (elem->type)
 	{
@@ -527,7 +545,8 @@
  * is responsible for creating array to correct dimensions, and
  * freeing each string element of the array added by this function.
  */
-static void msim_msg_pack_element(gpointer data, gpointer user_data)
+static void 
+msim_msg_pack_element(gpointer data, gpointer user_data)
 {
 	MsimMessageElement *elem;
 	gchar *string, *data_string;
@@ -585,7 +604,8 @@
  *
  * @return A string. Caller must g_free().
  */
-gchar *msim_msg_pack(MsimMessage *msg)
+gchar *
+msim_msg_pack(MsimMessage *msg)
 {
 	g_return_val_if_fail(msg != NULL, NULL);
 
@@ -599,7 +619,8 @@
  *
  * @return MsimMessage *. Caller should msim_msg_free() when done.
  */
-MsimMessage *msim_parse(gchar *raw)
+MsimMessage *
+msim_parse(gchar *raw)
 {
 	MsimMessage *msg;
     gchar *token;
@@ -668,7 +689,8 @@
  *
  * @return Hash table of the keys and values. Must g_hash_table_destroy() when done.
  */
-GHashTable *msim_parse_body(const gchar *body_str)
+GHashTable *
+msim_parse_body(const gchar *body_str)
 {
     GHashTable *table;
     gchar *item;
@@ -735,7 +757,8 @@
  * access the MsimMessageElement *, instead of the GList * container.
  *
  */
-static GList *msim_msg_get_node(MsimMessage *msg, const gchar *name)
+static GList *
+msim_msg_get_node(MsimMessage *msg, const gchar *name)
 {
 	GList *i;
 
@@ -758,8 +781,6 @@
 	return NULL;
 }
 
-
-
 /** Return the first MsimMessageElement * with given name in the MsimMessage *. 
  *
  * @param name Name to search for.
@@ -770,7 +791,8 @@
  * you can access directly. But it is often more convenient to use
  * another msim_msg_get_* that converts the data to what type you want.
  */
-MsimMessageElement *msim_msg_get(MsimMessage *msg, const gchar *name)
+MsimMessageElement *
+msim_msg_get(MsimMessage *msg, const gchar *name)
 {
 	GList *node;
 
@@ -791,7 +813,8 @@
  * for inclusion into a raw protocol string (escaped and everything).
  * This function unescapes the string for you, if needed.
  */
-gchar *msim_msg_get_string(MsimMessage *msg, const gchar *name)
+gchar *
+msim_msg_get_string(MsimMessage *msg, const gchar *name)
 {
 	MsimMessageElement *elem;
 
@@ -830,7 +853,8 @@
  * even if it is not stored as an MSIM_TYPE_INTEGER. MSIM_TYPE_STRING will
  * be converted handled correctly, for example.
  */
-guint msim_msg_get_integer(MsimMessage *msg, const gchar *name)
+guint 
+msim_msg_get_integer(MsimMessage *msg, const gchar *name)
 {
 	MsimMessageElement *elem;
 
@@ -862,7 +886,9 @@
  *
  * @return TRUE if successful, FALSE if not.
  */
-gboolean msim_msg_get_binary(MsimMessage *msg, const gchar *name, gchar **binary_data, gsize *binary_length)
+gboolean 
+msim_msg_get_binary(MsimMessage *msg, const gchar *name, 
+		gchar **binary_data, gsize *binary_length)
 {
 	MsimMessageElement *elem;
 
--- a/libpurple/protocols/myspace/myspace.c	Sun Jun 24 19:23:41 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun Jun 24 19:32:45 2007 +0000
@@ -40,7 +40,8 @@
 /** 
  * Load the plugin.
  */
-gboolean msim_load(PurplePlugin *plugin)
+gboolean 
+msim_load(PurplePlugin *plugin)
 {
 #ifdef MSIM_USE_PURPLE_RC4
 	/* If compiled to use RC4 from libpurple, check if it is really there. */
@@ -63,7 +64,8 @@
  *
  * @return GList of status types.
  */
-GList *msim_status_types(PurpleAccount *acct)
+GList *
+msim_status_types(PurpleAccount *acct)
 {
     GList *types;
     PurpleStatusType *status;
@@ -95,7 +97,8 @@
  *
  * @return The base icon name string.
  */
-const gchar *msim_list_icon(PurpleAccount *acct, PurpleBuddy *buddy)
+const gchar *
+msim_list_icon(PurpleAccount *acct, PurpleBuddy *buddy)
 {
     /* Use a MySpace icon submitted by hbons at
      * http://developer.pidgin.im/wiki/MySpaceIM. */
@@ -115,7 +118,8 @@
  *
  * @return The unescaped or escaped message. Caller must g_free().
  */
-gchar *msim_unescape_or_escape(gchar *msg, gboolean escape)
+gchar *
+msim_unescape_or_escape(gchar *msg, gboolean escape)
 {
 	gchar *tmp, *code, *text;
 	guint i;
@@ -145,12 +149,14 @@
  *
  * @return The escaped message. Caller must g_free().
  */
-gchar *msim_escape(const gchar *msg)
+gchar *
+msim_escape(const gchar *msg)
 {
 	return msim_unescape_or_escape(g_strdup(msg), TRUE);
 }
 
-gchar *msim_unescape(const gchar *msg)
+gchar *
+msim_unescape(const gchar *msg)
 {
 	return msim_unescape_or_escape(g_strdup(msg), FALSE);
 }
@@ -169,7 +175,8 @@
  * http://mail.gnome.org/archives/gtk-app-devel-list/2000-July/msg00201.html
  *
  */
-gchar *str_replace(const gchar *str, const gchar *old, const gchar *new)
+gchar *
+str_replace(const gchar *str, const gchar *old, const gchar *new)
 {
 	gchar **items;
 	gchar *ret;
@@ -180,11 +187,9 @@
 	return ret;
 }
 
-
-
-
 #ifdef MSIM_DEBUG_MSG
-void print_hash_item(gpointer key, gpointer value, gpointer user_data)
+void 
+print_hash_item(gpointer key, gpointer value, gpointer user_data)
 {
     purple_debug_info("msim", "%s=%s\n", (gchar *)key, (gchar *)value);
 }
@@ -199,7 +204,8 @@
  * @return TRUE if succeeded, FALSE if not.
  *
  */
-gboolean msim_send_raw(MsimSession *session, const gchar *msg)
+gboolean 
+msim_send_raw(MsimSession *session, const gchar *msg)
 {
 	purple_debug_info("msim", "msim_send_raw: writing <%s>\n", msg);
 
@@ -222,7 +228,8 @@
  *
  * @return Bytes successfully sent.
  */
-int msim_send_really_raw(PurpleConnection *gc, const char *buf, int total_bytes)
+int 
+msim_send_really_raw(PurpleConnection *gc, const char *buf, int total_bytes)
 {
 	int total_bytes_sent;
 	
@@ -254,7 +261,8 @@
  * 
  * @param acct Account information to use to login.
  */
-void msim_login(PurpleAccount *acct)
+void 
+msim_login(PurpleAccount *acct)
 {
     PurpleConnection *gc;
     const gchar *host;
@@ -298,7 +306,8 @@
  *
  * @return TRUE if successful, FALSE if not
  */
-gboolean msim_login_challenge(MsimSession *session, MsimMessage *msg) 
+gboolean 
+msim_login_challenge(MsimSession *session, MsimMessage *msg) 
 {
     PurpleAccount *account;
     const gchar *response;
@@ -388,7 +397,8 @@
    between calls to crypt_rc4.
 */
 
-void crypt_rc4_init(rc4_state_struct *rc4_state, 
+void 
+crypt_rc4_init(rc4_state_struct *rc4_state, 
 		    const guchar *key, int key_len)
 {
   int ind;
@@ -416,7 +426,8 @@
 
 }
 
-void crypt_rc4(rc4_state_struct *rc4_state, guchar *data, int data_len)
+void 
+crypt_rc4(rc4_state_struct *rc4_state, guchar *data, int data_len)
 {
   guchar *s_box;
   guchar index_i;
@@ -464,7 +475,8 @@
  * @return Binary login challenge response, ready to send to the server. Must be g_free()'d
  *         when finished.
  */
-const gchar *msim_compute_login_response(const gchar nonce[2 * NONCE_SIZE], 
+const gchar *
+msim_compute_login_response(const gchar nonce[2 * NONCE_SIZE], 
 		const gchar *email, const gchar *password, guint *response_len)
 {
     PurpleCipherContext *key_context;
@@ -589,8 +601,9 @@
  * a username or email address is given, the userid must be looked up.
  * This function does that by calling msim_postprocess_outgoing().
  */
-int msim_send_im(PurpleConnection *gc, const gchar *who,
-                            const gchar *message, PurpleMessageFlags flags)
+int 
+msim_send_im(PurpleConnection *gc, const gchar *who, const gchar *message, 
+		PurpleMessageFlags flags)
 {
     MsimSession *session;
     
@@ -636,7 +649,9 @@
  *
  * Buddy messages ('bm') include instant messages, action messages, status messages, etc.
  */
-gboolean msim_send_bm(MsimSession *session, const gchar *who, const gchar *text, int type)
+gboolean 
+msim_send_bm(MsimSession *session, const gchar *who, const gchar *text, 
+		int type)
 {
 	gboolean rc;
 	MsimMessage *msg;
@@ -671,7 +686,8 @@
  *
  * @return TRUE if successful.
  */
-gboolean msim_incoming_im(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_incoming_im(MsimSession *session, MsimMessage *msg)
 {
     gchar *username;
 	gchar *msg_text;
@@ -692,7 +708,8 @@
 /**
  * Handle an unrecognized message.
  */
-void msim_unrecognized(MsimSession *session, MsimMessage *msg, gchar *note)
+void 
+msim_unrecognized(MsimSession *session, MsimMessage *msg, gchar *note)
 {
 	/* TODO: Some more context, outwardly equivalent to a backtrace, for helping figure 
 	 * out what this msg is for. But not too much information so that a user
@@ -721,7 +738,8 @@
  *
  * UNTESTED
  */
-gboolean msim_incoming_action(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_incoming_action(MsimSession *session, MsimMessage *msg)
 {
 	gchar *msg_text, *username;
 	gboolean rc;
@@ -761,7 +779,8 @@
  * @param state PURPLE_TYPING, PURPLE_TYPED, PURPLE_NOT_TYPING
  *
  */
-unsigned int msim_send_typing(PurpleConnection *gc, const gchar *name, PurpleTypingState state)
+unsigned int 
+msim_send_typing(PurpleConnection *gc, const gchar *name, PurpleTypingState state)
 {
 	const gchar *typing_str;
 	MsimSession *session;
@@ -787,7 +806,8 @@
 }
 
 /** Callback for msim_get_info(), for when user info is received. */
-void msim_get_info_cb(MsimSession *session, MsimMessage *user_info_msg, gpointer data)
+void 
+msim_get_info_cb(MsimSession *session, MsimMessage *user_info_msg, gpointer data)
 {
 	GHashTable *body;
 	gchar *body_str;
@@ -860,7 +880,8 @@
 }
 
 /** Retrieve a user's profile. */
-void msim_get_info(PurpleConnection *gc, const gchar *user)
+void 
+msim_get_info(PurpleConnection *gc, const gchar *user)
 {
 	PurpleBuddy *buddy;
 	MsimSession *session;
@@ -915,7 +936,9 @@
  * @param userinfo Response messsage to resolving request.
  * @param data MsimMessage *, the message to attach information to. 
  */
-static void msim_incoming_resolved(MsimSession *session, MsimMessage *userinfo, gpointer data)
+static void 
+msim_incoming_resolved(MsimSession *session, MsimMessage *userinfo, 
+		gpointer data)
 {
 	gchar *body_str;
 	GHashTable *body;
@@ -952,7 +975,8 @@
  *
  * XXX WARNING: UNKNOWN MEMORY CORRUPTION HERE! 
  */
-static const gchar *msim_uid2username_from_blist(MsimSession *session, guint wanted_uid)
+static const gchar *
+msim_uid2username_from_blist(MsimSession *session, guint wanted_uid)
 {
 	GSList *buddies, *buddies_head;
 
@@ -1039,7 +1063,8 @@
  * @param session
  * @param msg MsimMessage *, freed by caller.
  */
-gboolean msim_preprocess_incoming(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_preprocess_incoming(MsimSession *session, MsimMessage *msg)
 {
 	if (msim_msg_get(msg, "bm") && msim_msg_get(msg, "f"))
 	{
@@ -1093,7 +1118,8 @@
  *
  * @return TRUE if successful. FALSE if processing failed.
  */
-gboolean msim_process(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_process(MsimSession *session, MsimMessage *msg)
 {
     g_return_val_if_fail(session != NULL, -1);
     g_return_val_if_fail(msg != NULL, -1);
@@ -1158,7 +1184,8 @@
 }
 
 /** Store an field of information about a buddy. */
-void msim_store_buddy_info_each(gpointer key, gpointer value, gpointer user_data)
+void 
+msim_store_buddy_info_each(gpointer key, gpointer value, gpointer user_data)
 {
 	PurpleBuddy *buddy;
 	gchar *key_str, *value_str;
@@ -1187,7 +1214,8 @@
  *
  * The information is saved to the buddy's blist node, which ends up in blist.xml.
  */
-gboolean msim_store_buddy_info(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_store_buddy_info(MsimSession *session, MsimMessage *msg)
 {
 	GHashTable *body;
 	gchar *username, *body_str, *uid;
@@ -1235,7 +1263,8 @@
  *
  * @return TRUE if successful.
  */
-gboolean msim_process_reply(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_process_reply(MsimSession *session, MsimMessage *msg)
 {
     g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE);
     g_return_val_if_fail(msg != NULL, FALSE);
@@ -1279,7 +1308,8 @@
  *
  * @return TRUE if successfully reported error.
  */
-gboolean msim_error(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_error(MsimSession *session, MsimMessage *msg)
 {
     gchar *errmsg, *full_errmsg;
 	guint err;
@@ -1319,7 +1349,8 @@
  *
  * @return TRUE if successful.
  */
-gboolean msim_status(MsimSession *session, MsimMessage *msg)
+gboolean 
+msim_status(MsimSession *session, MsimMessage *msg)
 {
     PurpleBuddyList *blist;
     PurpleBuddy *buddy;
@@ -1422,7 +1453,8 @@
 }
 
 /** Add a buddy to user's buddy list. */
-void msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
+void 
+msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
 	MsimSession *session;
 	MsimMessage *msg;
@@ -1494,7 +1526,9 @@
  *
  * Does not handle sending, or scheduling userid lookup. For that, see msim_postprocess_outgoing().
  */ 
-MsimMessage *msim_do_postprocessing(MsimMessage *msg, const gchar *uid_before, const gchar *uid_field_name, guint uid)
+MsimMessage *
+msim_do_postprocessing(MsimMessage *msg, const gchar *uid_before, 
+		const gchar *uid_field_name, guint uid)
 {	
 	purple_debug_info("msim", "msim_do_postprocessing called with ufn=%s, ub=%s, uid=%d\n",
 			uid_field_name, uid_before, uid);
@@ -1545,7 +1579,8 @@
  *
  *
 */
-void msim_postprocess_outgoing_cb(MsimSession *session, MsimMessage *userinfo, gpointer data)
+void 
+msim_postprocess_outgoing_cb(MsimSession *session, MsimMessage *userinfo, gpointer data)
 {
 	gchar *body_str;
 	GHashTable *body;
@@ -1596,8 +1631,10 @@
  *
  * @return Postprocessed message.
  */
-gboolean msim_postprocess_outgoing(MsimSession *session, MsimMessage *msg, const gchar *username, 
-	const gchar *uid_field_name, const gchar *uid_before)
+gboolean 
+msim_postprocess_outgoing(MsimSession *session, MsimMessage *msg, 
+		const gchar *username, const gchar *uid_field_name, 
+		const gchar *uid_before)
 {
     PurpleBuddy *buddy;
 	guint uid;
@@ -1653,7 +1690,8 @@
 }
 
 /** Remove a buddy from the user's buddy list. */
-void msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
+void 
+msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
 	MsimSession *session;
 	MsimMessage *delbuddy_msg;
@@ -1709,10 +1747,11 @@
 
 /** Return whether the buddy can be messaged while offline.
  *
- * I always return TRUE, to allow sending to buddies whose status has not yet
- * been received. The protocol _does_ support offline messages, but not this plugin.
+ * The protocol supports offline messages in just the same way as online
+ * messages.
  */
-gboolean msim_offline_message(const PurpleBuddy *buddy)
+gboolean 
+msim_offline_message(const PurpleBuddy *buddy)
 {
 	return TRUE;
 }
@@ -1726,7 +1765,8 @@
  *
  * Reads the input, and calls msim_preprocess_incoming() to handle it.
  */
-void msim_input_cb(gpointer gc_uncasted, gint source, PurpleInputCondition cond)
+void 
+msim_input_cb(gpointer gc_uncasted, gint source, PurpleInputCondition cond)
 {
     PurpleConnection *gc;
     PurpleAccount *account;
@@ -1857,7 +1897,9 @@
  * 1) MSIM_USER_LOOKUP_CB - make it for PERSIST_REPLY, not just user lookup
  * 2) data - make it an MsimMessage?
  */
-guint msim_new_reply_callback(MsimSession *session, MSIM_USER_LOOKUP_CB cb, gpointer data)
+guint 
+msim_new_reply_callback(MsimSession *session, MSIM_USER_LOOKUP_CB cb, 
+		gpointer data)
 {
 	guint rid;
 
@@ -1876,7 +1918,8 @@
  * @param source File descriptor.
  * @param error_message
  */
-void msim_connect_cb(gpointer data, gint source, const gchar *error_message)
+void 
+msim_connect_cb(gpointer data, gint source, const gchar *error_message)
 {
     PurpleConnection *gc;
     MsimSession *session;
@@ -1908,7 +1951,8 @@
  *
  * @return Pointer to a new session. Free with msim_session_destroy.
  */
-MsimSession *msim_session_new(PurpleAccount *acct)
+MsimSession *
+msim_session_new(PurpleAccount *acct)
 {
     MsimSession *session;
 
@@ -1941,7 +1985,8 @@
  *
  * @param session The session to destroy.
  */
-void msim_session_destroy(MsimSession *session)
+void 
+msim_session_destroy(MsimSession *session)
 {
     g_return_if_fail(MSIM_SESSION_VALID(session));
 
@@ -1956,14 +2001,13 @@
     g_free(session);
 }
                  
-
-
 /** 
  * Close the connection.
  * 
  * @param gc The connection.
  */
-void msim_close(PurpleConnection *gc)
+void 
+msim_close(PurpleConnection *gc)
 {
 	MsimSession *session;
 
@@ -1987,7 +2031,8 @@
  *
  * @return TRUE if is userid, FALSE if not.
  */
-gboolean msim_is_userid(const gchar *user)
+gboolean 
+msim_is_userid(const gchar *user)
 {
     g_return_val_if_fail(user != NULL, FALSE);
 
@@ -2006,7 +2051,8 @@
  * between a user represented by an email address from
  * other forms of identification.
  */ 
-gboolean msim_is_email(const gchar *user)
+gboolean 
+msim_is_email(const gchar *user)
 {
     g_return_val_if_fail(user != NULL, FALSE);
 
@@ -2023,7 +2069,9 @@
  * @param data An arbitray data pointer passed to the callback.
  */
 /* TODO: change to not use callbacks */
-void msim_lookup_user(MsimSession *session, const gchar *user, MSIM_USER_LOOKUP_CB cb, gpointer data)
+void 
+msim_lookup_user(MsimSession *session, const gchar *user, 
+		MSIM_USER_LOOKUP_CB cb, gpointer data)
 {
     gchar *field_name;
     guint rid, cmd, dsn, lid;
@@ -2082,7 +2130,8 @@
  * @return Status text, or NULL if error. Caller g_free()'s.
  *
  */
-char *msim_status_text(PurpleBuddy *buddy)
+char *
+msim_status_text(PurpleBuddy *buddy)
 {
     MsimSession *session;
 	const gchar *display_name, *headline;
@@ -2127,7 +2176,9 @@
  * @param full TRUE if should obtain full tooltip text.
  *
  */
-void msim_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full)
+void 
+msim_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, 
+		gboolean full)
 {
     g_return_if_fail(buddy != NULL);
     g_return_if_fail(user_info != NULL);
@@ -2290,7 +2341,8 @@
  * this code for the first time, these functions can be instructive in how
  * msimprpl is architected.
  */
-void msim_test_all(void) __attribute__((__noreturn__()));
+void 
+msim_test_all(void) __attribute__((__noreturn__()));
 {
 	guint failures;
 
@@ -2310,7 +2362,8 @@
 }
 
 /** Test MsimMessage for basic functionality. */
-int msim_test_msg(void)
+int 
+msim_test_msg(void)
 {
 	MsimMessage *msg, *msg_cloned;
 	gchar *packed, *packed_expected, *packed_cloned;
@@ -2362,7 +2415,8 @@
 }
 
 /** Test protocol-level escaping/unescaping. */
-int msim_test_escaping(void)
+int 
+msim_test_escaping(void)
 {
 	guint failures;
 	gchar *raw, *escaped, *unescaped, *expected;
@@ -2397,7 +2451,8 @@
 #endif
 
 /** Initialize plugin. */
-void init_plugin(PurplePlugin *plugin) 
+void 
+init_plugin(PurplePlugin *plugin) 
 {
 	PurpleAccountOption *option;
 #ifdef MSIM_SELF_TEST