Index: tests/check.c
===================================================================
--- tests/check.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -8,9 +8,10 @@
 #include "testsuite.h"
 
-global_t global;	/* Against global namespace pollution */
+global_t global;        /* Against global namespace pollution */
 
 gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2)
 {
 	int sock[2];
+
 	if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX, sock) < 0) {
 		perror("socketpair");
@@ -27,6 +28,8 @@
 	irc_t *irc;
 	GIOChannel *ch1, *ch2;
-	if (!g_io_channel_pair(&ch1, &ch2))
+
+	if (!g_io_channel_pair(&ch1, &ch2)) {
 		return NULL;
+	}
 	irc = irc_new(g_io_channel_unix_get_fd(ch1));
 	return irc;
@@ -37,6 +40,6 @@
 	struct timeval time[1];
 
-	gettimeofday( time, 0 );
-	return( (double) time->tv_sec + (double) time->tv_usec / 1000000 );
+	gettimeofday(time, 0);
+	return((double) time->tv_sec + (double) time->tv_usec / 1000000);
 }
 
@@ -71,5 +74,5 @@
 Suite *jabber_util_suite(void);
 
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int nf;
@@ -79,6 +82,6 @@
 	gboolean verbose = FALSE;
 	GOptionEntry options[] = {
-		{"no-fork", 'n', 0, G_OPTION_ARG_NONE, &no_fork, "Don't fork" },
-		{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL },
+		{ "no-fork", 'n', 0, G_OPTION_ARG_NONE, &no_fork, "Don't fork" },
+		{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL },
 		{ NULL }
 	};
@@ -87,6 +90,7 @@
 	g_option_context_add_main_entries(pc, options, NULL);
 
-	if(!g_option_context_parse(pc, &argc, &argv, NULL))
+	if (!g_option_context_parse(pc, &argc, &argv, NULL)) {
 		return 1;
+	}
 
 	g_option_context_free(pc);
@@ -97,13 +101,13 @@
 
 	if (verbose) {
-		log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE );
+		log_link(LOGLVL_ERROR, LOGOUTPUT_CONSOLE);
 #ifdef DEBUG
-		log_link( LOGLVL_DEBUG, LOGOUTPUT_CONSOLE );
+		log_link(LOGLVL_DEBUG, LOGOUTPUT_CONSOLE);
 #endif
-		log_link( LOGLVL_INFO, LOGOUTPUT_CONSOLE );
-		log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE );
+		log_link(LOGLVL_INFO, LOGOUTPUT_CONSOLE);
+		log_link(LOGLVL_WARNING, LOGOUTPUT_CONSOLE);
 	}
 
-	global.conf = conf_load( 0, NULL);
+	global.conf = conf_load(0, NULL);
 	global.conf->runmode = RUNMODE_DAEMON;
 
@@ -118,7 +122,8 @@
 	srunner_add_suite(sr, jabber_sasl_suite());
 	srunner_add_suite(sr, jabber_util_suite());
-	if (no_fork)
+	if (no_fork) {
 		srunner_set_fork_status(sr, CK_NOFORK);
-	srunner_run_all (sr, verbose?CK_VERBOSE:CK_NORMAL);
+	}
+	srunner_run_all(sr, verbose ? CK_VERBOSE : CK_NORMAL);
 	nf = srunner_ntests_failed(sr);
 	srunner_free(sr);
Index: tests/check_arc.c
===================================================================
--- tests/check_arc.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_arc.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -21,25 +21,23 @@
 {
 	int i;
-	
-	for( i = 0; clear_tests[i]; i++ )
-	{
-  		tcase_fn_start (clear_tests[i], __FILE__, __LINE__);
+
+	for (i = 0; clear_tests[i]; i++) {
+		tcase_fn_start(clear_tests[i], __FILE__, __LINE__);
 		unsigned char *crypted;
 		char *decrypted;
 		int len;
-		
-		len = arc_encode( clear_tests[i], 0, &crypted, password, 12 );
-		len = arc_decode( crypted, len, &decrypted, password );
-		
-		fail_if( strcmp( clear_tests[i], decrypted ) != 0,
-		         "%s didn't decrypt back properly", clear_tests[i] );
-		
-		g_free( crypted );
-		g_free( decrypted );
+
+		len = arc_encode(clear_tests[i], 0, &crypted, password, 12);
+		len = arc_decode(crypted, len, &decrypted, password);
+
+		fail_if(strcmp(clear_tests[i], decrypted) != 0,
+		        "%s didn't decrypt back properly", clear_tests[i]);
+
+		g_free(crypted);
+		g_free(decrypted);
 	}
 }
 
-struct
-{
+struct {
 	unsigned char crypted[30];
 	int len;
@@ -53,5 +51,5 @@
 		}, 18, "short pass"
 	},
-	
+
 	/* Two blocks with padding. */
 	{
@@ -78,30 +76,30 @@
 {
 	int i;
-	
-	for( i = 0; decrypt_tests[i].len; i++ )
-	{
-  		tcase_fn_start (decrypt_tests[i].decrypted, __FILE__, __LINE__);
+
+	for (i = 0; decrypt_tests[i].len; i++) {
+		tcase_fn_start(decrypt_tests[i].decrypted, __FILE__, __LINE__);
 		char *decrypted;
 		int len;
-		
-		len = arc_decode( decrypt_tests[i].crypted, decrypt_tests[i].len,
-		                  &decrypted, password );
-		
-		fail_if( len == -1, 
-                 "`%s' didn't decrypt properly", decrypt_tests[i].decrypted );
-		fail_if( strcmp( decrypt_tests[i].decrypted, decrypted ) != 0,
-		         "`%s' didn't decrypt properly", decrypt_tests[i].decrypted );
-		
-		g_free( decrypted );
+
+		len = arc_decode(decrypt_tests[i].crypted, decrypt_tests[i].len,
+		                 &decrypted, password);
+
+		fail_if(len == -1,
+		        "`%s' didn't decrypt properly", decrypt_tests[i].decrypted);
+		fail_if(strcmp(decrypt_tests[i].decrypted, decrypted) != 0,
+		        "`%s' didn't decrypt properly", decrypt_tests[i].decrypted);
+
+		g_free(decrypted);
 	}
 }
 
-Suite *arc_suite (void)
+Suite *arc_suite(void)
 {
 	Suite *s = suite_create("ArcFour");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, check_codec);
-	tcase_add_test (tc_core, check_decod);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, check_codec);
+	tcase_add_test(tc_core, check_decod);
 	return s;
 }
Index: tests/check_help.c
===================================================================
--- tests/check_help.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_help.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -8,27 +8,28 @@
 
 START_TEST(test_help_initfree)
-	help_t *h, *r;
-	r = help_init(&h, "/dev/null");
-	fail_if(r == NULL);
-	fail_if(r != h);
+help_t * h, *r;
+r = help_init(&h, "/dev/null");
+fail_if(r == NULL);
+fail_if(r != h);
 
-	help_free(&h);
-	fail_if(h != NULL);
+help_free(&h);
+fail_if(h != NULL);
 END_TEST
 
 START_TEST(test_help_nonexistent)
-	help_t *h, *r;
-	r = help_init(&h, "/dev/null");
-	fail_unless(help_get(&h, "nonexistent") == NULL);
-	fail_if(r == NULL);
+help_t * h, *r;
+r = help_init(&h, "/dev/null");
+fail_unless(help_get(&h, "nonexistent") == NULL);
+fail_if(r == NULL);
 END_TEST
 
-Suite *help_suite (void)
+Suite *help_suite(void)
 {
 	Suite *s = suite_create("Help");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, test_help_initfree);
-	tcase_add_test (tc_core, test_help_nonexistent);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, test_help_initfree);
+	tcase_add_test(tc_core, test_help_nonexistent);
 	return s;
 }
Index: tests/check_irc.c
===================================================================
--- tests/check_irc.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_irc.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -9,56 +9,57 @@
 
 START_TEST(test_connect)
-	GIOChannel *ch1, *ch2;
-	irc_t *irc;
-	char *raw;
-	fail_unless(g_io_channel_pair(&ch1, &ch2));
+GIOChannel * ch1, *ch2;
+irc_t *irc;
+char *raw;
+fail_unless(g_io_channel_pair(&ch1, &ch2));
 
-	irc = irc_new(g_io_channel_unix_get_fd(ch1));
+irc = irc_new(g_io_channel_unix_get_fd(ch1));
 
-	irc_free(irc);
+irc_free(irc);
 
-	fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL);
-	
-	fail_if(strcmp(raw, "") != 0);
+fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL);
 
-	g_free(raw);
+fail_if(strcmp(raw, "") != 0);
+
+g_free(raw);
 END_TEST
 
 START_TEST(test_login)
-	GIOChannel *ch1, *ch2;
-	irc_t *irc;
-	char *raw;
-	fail_unless(g_io_channel_pair(&ch1, &ch2));
+GIOChannel * ch1, *ch2;
+irc_t *irc;
+char *raw;
+fail_unless(g_io_channel_pair(&ch1, &ch2));
 
-	g_io_channel_set_flags(ch1, G_IO_FLAG_NONBLOCK, NULL);
-	g_io_channel_set_flags(ch2, G_IO_FLAG_NONBLOCK, NULL);
+g_io_channel_set_flags(ch1, G_IO_FLAG_NONBLOCK, NULL);
+g_io_channel_set_flags(ch2, G_IO_FLAG_NONBLOCK, NULL);
 
-	irc = irc_new(g_io_channel_unix_get_fd(ch1));
+irc = irc_new(g_io_channel_unix_get_fd(ch1));
 
-	fail_unless(g_io_channel_write_chars(ch2, "NICK bla\r\r\n"
-			"USER a a a a\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL);
-	fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL);
+fail_unless(g_io_channel_write_chars(ch2, "NICK bla\r\r\n"
+                                     "USER a a a a\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL);
+fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL);
 
-	g_main_iteration(FALSE);
-	irc_free(irc);
+g_main_iteration(FALSE);
+irc_free(irc);
 
-	fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL);
-	
-	fail_unless(strstr(raw, "001") != NULL);
-	fail_unless(strstr(raw, "002") != NULL);
-	fail_unless(strstr(raw, "003") != NULL);
-	fail_unless(strstr(raw, "004") != NULL);
-	fail_unless(strstr(raw, "005") != NULL);
+fail_unless(g_io_channel_read_to_end(ch2, &raw, NULL, NULL) == G_IO_STATUS_NORMAL);
 
-	g_free(raw);
+fail_unless(strstr(raw, "001") != NULL);
+fail_unless(strstr(raw, "002") != NULL);
+fail_unless(strstr(raw, "003") != NULL);
+fail_unless(strstr(raw, "004") != NULL);
+fail_unless(strstr(raw, "005") != NULL);
+
+g_free(raw);
 END_TEST
 
-Suite *irc_suite (void)
+Suite *irc_suite(void)
 {
 	Suite *s = suite_create("IRC");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, test_connect);
-	tcase_add_test (tc_core, test_login);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, test_connect);
+	tcase_add_test(tc_core, test_login);
 	return s;
 }
Index: tests/check_jabber_sasl.c
===================================================================
--- tests/check_jabber_sasl.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_jabber_sasl.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -6,15 +6,14 @@
 #include <stdio.h>
 
-char *sasl_get_part( char *data, char *field );
+char *sasl_get_part(char *data, char *field);
 
 #define challenge1 "nonce=\"1669585310\",qop=\"auth\",charset=utf-8,algorithm=md5-sess," \
-                   "something=\"Not \\\"standardized\\\"\""
+	"something=\"Not \\\"standardized\\\"\""
 #define challenge2 "realm=\"quadpoint.org\", nonce=\"NPotlQpQf9RNYodOwierkQ==\", " \
-                   "qop=\"auth, auth-int\", charset=utf-8, algorithm=md5-sess"
+	"qop=\"auth, auth-int\", charset=utf-8, algorithm=md5-sess"
 #define challenge3 ", realm=\"localhost\", nonce=\"LlBV2txnO8RbB5hgs3KgiQ==\", " \
-                   "qop=\"auth, auth-int, \", ,\n, charset=utf-8, algorithm=md5-sess,"
+	"qop=\"auth, auth-int, \", ,\n, charset=utf-8, algorithm=md5-sess,"
 
-struct
-{
+struct {
 	char *challenge;
 	char *key;
@@ -82,34 +81,35 @@
 {
 	int i;
-	
-	for( i = 0; get_part_tests[i].key; i++ )
-	{
-  		tcase_fn_start( get_part_tests[i].key, __FILE__, i );
+
+	for (i = 0; get_part_tests[i].key; i++) {
+		tcase_fn_start(get_part_tests[i].key, __FILE__, i);
 		char *res;
-		
-		res = sasl_get_part( get_part_tests[i].challenge,
-		                     get_part_tests[i].key );
-		
-		if( get_part_tests[i].value == NULL )
-			fail_if( res != NULL, "Found key %s in %s while it shouldn't be there!",
-			         get_part_tests[i].key, get_part_tests[i].challenge );
-		else if( res )
-			fail_unless( strcmp( res, get_part_tests[i].value ) == 0,
-			             "Incorrect value for key %s in %s: %s",
-			             get_part_tests[i].key, get_part_tests[i].challenge, res );
-		else
-			fail( "Could not find key %s in %s",
-			      get_part_tests[i].key, get_part_tests[i].challenge );
-		
-		g_free( res );
+
+		res = sasl_get_part(get_part_tests[i].challenge,
+		                    get_part_tests[i].key);
+
+		if (get_part_tests[i].value == NULL) {
+			fail_if(res != NULL, "Found key %s in %s while it shouldn't be there!",
+			        get_part_tests[i].key, get_part_tests[i].challenge);
+		} else if (res) {
+			fail_unless(strcmp(res, get_part_tests[i].value) == 0,
+			            "Incorrect value for key %s in %s: %s",
+			            get_part_tests[i].key, get_part_tests[i].challenge, res);
+		} else {
+			fail("Could not find key %s in %s",
+			     get_part_tests[i].key, get_part_tests[i].challenge);
+		}
+
+		g_free(res);
 	}
 }
 
-Suite *jabber_sasl_suite (void)
+Suite *jabber_sasl_suite(void)
 {
 	Suite *s = suite_create("jabber/sasl");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, check_get_part);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, check_get_part);
 	return s;
 }
Index: tests/check_jabber_util.c
===================================================================
--- tests/check_jabber_util.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_jabber_util.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -12,67 +12,67 @@
 {
 	struct jabber_buddy *budw1, *budw2, *budw3, *budn, *bud;
-	
-	budw1 = jabber_buddy_add( ic, "wilmer@gaast.net/BitlBee" );
-	budw1->last_msg = time( NULL ) - 100;
-	budw2 = jabber_buddy_add( ic, "WILMER@gaast.net/Telepathy" );
+
+	budw1 = jabber_buddy_add(ic, "wilmer@gaast.net/BitlBee");
+	budw1->last_msg = time(NULL) - 100;
+	budw2 = jabber_buddy_add(ic, "WILMER@gaast.net/Telepathy");
 	budw2->priority = 2;
-	budw2->last_msg = time( NULL );
-	budw3 = jabber_buddy_add( ic, "wilmer@GAAST.NET/bitlbee" );
-	budw3->last_msg = time( NULL ) - 200;
+	budw2->last_msg = time(NULL);
+	budw3 = jabber_buddy_add(ic, "wilmer@GAAST.NET/bitlbee");
+	budw3->last_msg = time(NULL) - 200;
 	budw3->priority = 4;
 	/* TODO(wilmer): Shouldn't this just return budw3? */
-	fail_if( jabber_buddy_add( ic, "wilmer@gaast.net/Telepathy" ) != NULL );
-	
-	budn = jabber_buddy_add( ic, "nekkid@lamejab.net" );
+	fail_if(jabber_buddy_add(ic, "wilmer@gaast.net/Telepathy") != NULL);
+
+	budn = jabber_buddy_add(ic, "nekkid@lamejab.net");
 	/* Shouldn't be allowed if there's already a bare JID. */
-	fail_if( jabber_buddy_add( ic, "nekkid@lamejab.net/Illegal" ) );
-	
+	fail_if(jabber_buddy_add(ic, "nekkid@lamejab.net/Illegal"));
+
 	/* Case sensitivity: Case only matters after the / */
-	fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net/BitlBee", 0 ) ==
-	         jabber_buddy_by_jid( ic, "wilmer@gaast.net/bitlbee", 0 ) );
-	fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net/telepathy", 0 ) );
-	
-	fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net/BitlBee", 0 ) == budw1 );
-	fail_unless( jabber_buddy_by_jid( ic, "WILMER@GAAST.NET/BitlBee", GET_BUDDY_EXACT ) == budw1 );
-	fail_unless( jabber_buddy_by_jid( ic, "wilmer@GAAST.NET/BitlBee", GET_BUDDY_CREAT ) == budw1 );
+	fail_if(jabber_buddy_by_jid(ic, "wilmer@gaast.net/BitlBee", 0) ==
+	        jabber_buddy_by_jid(ic, "wilmer@gaast.net/bitlbee", 0));
+	fail_if(jabber_buddy_by_jid(ic, "wilmer@gaast.net/telepathy", 0));
 
-	fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_EXACT ) );
-	fail_unless( jabber_buddy_by_jid( ic, "WILMER@gaast.net", 0 ) == budw3 );
+	fail_unless(jabber_buddy_by_jid(ic, "wilmer@gaast.net/BitlBee", 0) == budw1);
+	fail_unless(jabber_buddy_by_jid(ic, "WILMER@GAAST.NET/BitlBee", GET_BUDDY_EXACT) == budw1);
+	fail_unless(jabber_buddy_by_jid(ic, "wilmer@GAAST.NET/BitlBee", GET_BUDDY_CREAT) == budw1);
+
+	fail_if(jabber_buddy_by_jid(ic, "wilmer@gaast.net", GET_BUDDY_EXACT));
+	fail_unless(jabber_buddy_by_jid(ic, "WILMER@gaast.net", 0) == budw3);
 
 	/* Check O_FIRST and see if it's indeed the first item from the list. */
-	fail_unless( ( bud = jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_FIRST ) ) == budw1 );
-	fail_unless( bud->next == budw2 && bud->next->next == budw3 && bud->next->next->next == NULL );
-	
+	fail_unless((bud = jabber_buddy_by_jid(ic, "wilmer@gaast.net", GET_BUDDY_FIRST)) == budw1);
+	fail_unless(bud->next == budw2 && bud->next->next == budw3 && bud->next->next->next == NULL);
+
 	/* Change the resource_select setting, now we should get a different resource. */
-	set_setstr( &ic->acc->set, "resource_select", "activity" );
-	fail_unless( jabber_buddy_by_jid( ic, "wilmer@GAAST.NET", 0 ) == budw2 );
-	
+	set_setstr(&ic->acc->set, "resource_select", "activity");
+	fail_unless(jabber_buddy_by_jid(ic, "wilmer@GAAST.NET", 0) == budw2);
+
 	/* Some testing of bare JID handling (which is horrible). */
-	fail_if( jabber_buddy_by_jid( ic, "nekkid@lamejab.net/Illegal", 0 ) );
-	fail_if( jabber_buddy_by_jid( ic, "NEKKID@LAMEJAB.NET/Illegal", GET_BUDDY_CREAT ) );
-	fail_unless( jabber_buddy_by_jid( ic, "nekkid@lamejab.net", 0 ) == budn );
-	fail_unless( jabber_buddy_by_jid( ic, "NEKKID@lamejab.net", GET_BUDDY_EXACT ) == budn );
-	fail_unless( jabber_buddy_by_jid( ic, "nekkid@LAMEJAB.NET", GET_BUDDY_CREAT ) == budn );
-	
+	fail_if(jabber_buddy_by_jid(ic, "nekkid@lamejab.net/Illegal", 0));
+	fail_if(jabber_buddy_by_jid(ic, "NEKKID@LAMEJAB.NET/Illegal", GET_BUDDY_CREAT));
+	fail_unless(jabber_buddy_by_jid(ic, "nekkid@lamejab.net", 0) == budn);
+	fail_unless(jabber_buddy_by_jid(ic, "NEKKID@lamejab.net", GET_BUDDY_EXACT) == budn);
+	fail_unless(jabber_buddy_by_jid(ic, "nekkid@LAMEJAB.NET", GET_BUDDY_CREAT) == budn);
+
 	/* More case sensitivity testing, and see if remove works properly. */
-	fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net/telepathy" ) );
-	fail_if( jabber_buddy_by_jid( ic, "wilmer@GAAST.NET/telepathy", GET_BUDDY_CREAT ) == budw2 );
-	fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/Telepathy" ) );
-	fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/telepathy" ) );
-	
+	fail_if(jabber_buddy_remove(ic, "wilmer@gaast.net/telepathy"));
+	fail_if(jabber_buddy_by_jid(ic, "wilmer@GAAST.NET/telepathy", GET_BUDDY_CREAT) == budw2);
+	fail_unless(jabber_buddy_remove(ic, "wilmer@gaast.net/Telepathy"));
+	fail_unless(jabber_buddy_remove(ic, "wilmer@gaast.net/telepathy"));
+
 	/* Test activity_timeout and GET_BUDDY_BARE_OK. */
-	fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) == budw1 );
+	fail_unless(jabber_buddy_by_jid(ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK) == budw1);
 	budw1->last_msg -= 50;
-	fail_unless( ( bud = jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) ) != NULL );
-	fail_unless( strcmp( bud->full_jid, "wilmer@gaast.net" ) == 0 );
-	
-	fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );
-	fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 );
-	
-	fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );
-	fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/bitlbee" ) );
-	fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/BitlBee" ) );
-	fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) );
-	
+	fail_unless((bud = jabber_buddy_by_jid(ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK)) != NULL);
+	fail_unless(strcmp(bud->full_jid, "wilmer@gaast.net") == 0);
+
+	fail_if(jabber_buddy_remove(ic, "wilmer@gaast.net"));
+	fail_unless(jabber_buddy_by_jid(ic, "wilmer@gaast.net", 0) == budw1);
+
+	fail_if(jabber_buddy_remove(ic, "wilmer@gaast.net"));
+	fail_unless(jabber_buddy_remove(ic, "wilmer@gaast.net/bitlbee"));
+	fail_unless(jabber_buddy_remove(ic, "wilmer@gaast.net/BitlBee"));
+	fail_if(jabber_buddy_by_jid(ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK));
+
 	/* Check if remove_bare() indeed gets rid of all. */
 	/* disable this one for now.
@@ -81,44 +81,44 @@
 	*/
 
-	fail_if( jabber_buddy_remove( ic, "nekkid@lamejab.net/Illegal" ) );
-	fail_unless( jabber_buddy_remove( ic, "nekkid@lamejab.net" ) );
-	fail_if( jabber_buddy_by_jid( ic, "nekkid@lamejab.net", 0 ) );
-	
+	fail_if(jabber_buddy_remove(ic, "nekkid@lamejab.net/Illegal"));
+	fail_unless(jabber_buddy_remove(ic, "nekkid@lamejab.net"));
+	fail_if(jabber_buddy_by_jid(ic, "nekkid@lamejab.net", 0));
+
 	/* Fixing a bug in this branch that caused information to get lost when
 	   removing the first full JID from a list. */
-	jabber_buddy_add( ic, "bugtest@google.com/A" );
-	jabber_buddy_add( ic, "bugtest@google.com/B" );
-	jabber_buddy_add( ic, "bugtest@google.com/C" );
-	fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/A" ) );
-	fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/B" ) );
-	fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/C" ) );
+	jabber_buddy_add(ic, "bugtest@google.com/A");
+	jabber_buddy_add(ic, "bugtest@google.com/B");
+	jabber_buddy_add(ic, "bugtest@google.com/C");
+	fail_unless(jabber_buddy_remove(ic, "bugtest@google.com/A"));
+	fail_unless(jabber_buddy_remove(ic, "bugtest@google.com/B"));
+	fail_unless(jabber_buddy_remove(ic, "bugtest@google.com/C"));
 }
 
 static void check_compareJID(int l)
 {
-	fail_unless( jabber_compare_jid( "bugtest@google.com/B", "bugtest@google.com/A" ) );
-	fail_if( jabber_compare_jid( "bugtest1@google.com/B", "bugtest@google.com/A" ) );
-	fail_if( jabber_compare_jid( "bugtest@google.com/B", "bugtest1@google.com/A" ) );
-	fail_if( jabber_compare_jid( "bugtest1@google.com/B", "bugtest2@google.com/A" ) );
-	fail_unless( jabber_compare_jid( "bugtest@google.com/A", "bugtest@google.com/A" ) );
-	fail_if( jabber_compare_jid( "", "bugtest@google.com/A" ) );
+	fail_unless(jabber_compare_jid("bugtest@google.com/B", "bugtest@google.com/A"));
+	fail_if(jabber_compare_jid("bugtest1@google.com/B", "bugtest@google.com/A"));
+	fail_if(jabber_compare_jid("bugtest@google.com/B", "bugtest1@google.com/A"));
+	fail_if(jabber_compare_jid("bugtest1@google.com/B", "bugtest2@google.com/A"));
+	fail_unless(jabber_compare_jid("bugtest@google.com/A", "bugtest@google.com/A"));
+	fail_if(jabber_compare_jid("", "bugtest@google.com/A"));
 }
 
-Suite *jabber_util_suite (void)
+Suite *jabber_util_suite(void)
 {
 	Suite *s = suite_create("jabber/util");
 	TCase *tc_core = tcase_create("Buddy");
 	struct jabber_data *jd;
-	
-	ic = g_new0( struct im_connection, 1 );
-	ic->acc = g_new0( account_t, 1 );
-	ic->proto_data = jd = g_new0( struct jabber_data, 1 );
-	jd->buddies = g_hash_table_new( g_str_hash, g_str_equal );
-	set_add( &ic->acc->set, "resource_select", "priority", NULL, ic->acc );
-	set_add( &ic->acc->set, "activity_timeout", "120", NULL, ic->acc );
-	
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, check_buddy_add);
-	tcase_add_test (tc_core, check_compareJID);
+
+	ic = g_new0(struct im_connection, 1);
+	ic->acc = g_new0(account_t, 1);
+	ic->proto_data = jd = g_new0(struct jabber_data, 1);
+	jd->buddies = g_hash_table_new(g_str_hash, g_str_equal);
+	set_add(&ic->acc->set, "resource_select", "priority", NULL, ic->acc);
+	set_add(&ic->acc->set, "activity_timeout", "120", NULL, ic->acc);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, check_buddy_add);
+	tcase_add_test(tc_core, check_compareJID);
 	return s;
 }
Index: tests/check_md5.c
===================================================================
--- tests/check_md5.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_md5.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -12,18 +12,18 @@
 	md5_byte_t expected[16];
 } tests[] = {
-	{ "", 
-		{ 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } },
+	{ "",
+	  { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } },
 	{ "a",
-		{ 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } },
-	{ "abc", 
-		{ 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } },
-	{ "message digest", 
-		{ 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } },
-	{ "abcdefghijklmnopqrstuvwxyz", 
-		{ 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } },
+	  { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } },
+	{ "abc",
+	  { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } },
+	{ "message digest",
+	  { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } },
+	{ "abcdefghijklmnopqrstuvwxyz",
+	  { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } },
 	{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
-	    { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } },
-	{ "12345678901234567890123456789012345678901234567890123456789012345678901234567890", 
-		{ 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } },
+	  { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } },
+	{ "12345678901234567890123456789012345678901234567890123456789012345678901234567890",
+	  { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } },
 
 	{ NULL },
@@ -33,11 +33,12 @@
 {
 	int i;
+
 	for (i = 0; tests[i].str; i++) {
 		md5_byte_t sum[16];
-  		tcase_fn_start (tests[i].str, __FILE__, __LINE__);
+		tcase_fn_start(tests[i].str, __FILE__, __LINE__);
 		md5_state_t state;
 
 		md5_init(&state);
-		md5_append(&state, (const md5_byte_t *)tests[i].str, strlen(tests[i].str));
+		md5_append(&state, (const md5_byte_t *) tests[i].str, strlen(tests[i].str));
 		md5_finish(&state, sum);
 
@@ -46,10 +47,11 @@
 }
 
-Suite *md5_suite (void)
+Suite *md5_suite(void)
 {
 	Suite *s = suite_create("MD5");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, check_sums);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, check_sums);
 	return s;
 }
Index: tests/check_nick.c
===================================================================
--- tests/check_nick.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_nick.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -9,23 +9,22 @@
 #include "bitlbee.h"
 
-START_TEST(test_nick_strip)
-{
+START_TEST(test_nick_strip){
 	int i;
-	const char *get[] = { "test:", "test", "test\n", 
-		"thisisaveryveryveryverylongnick", 
-		"thisisave:ryveryveryverylongnick",
-		"t::::est",
-		"test123",
-		"123test",
-		"123",
-		NULL };
-	const char *expected[] = { "test", "test", "test", 
-		"thisisaveryveryveryveryl", 
-		"thisisaveryveryveryveryl", 
-		"test",
-		"test123",
-		"_123test",
-		"_123",
-		NULL };
+	const char *get[] = { "test:", "test", "test\n",
+		              "thisisaveryveryveryverylongnick",
+		              "thisisave:ryveryveryverylongnick",
+		              "t::::est",
+		              "test123",
+		              "123test",
+		              "123",
+		              NULL };
+	const char *expected[] = { "test", "test", "test",
+		                   "thisisaveryveryveryveryl",
+		                   "thisisaveryveryveryveryl",
+		                   "test",
+		                   "test123",
+		                   "_123test",
+		                   "_123",
+		                   NULL };
 
 	for (i = 0; get[i]; i++) {
@@ -33,7 +32,7 @@
 		strcpy(copy, get[i]);
 		nick_strip(NULL, copy);
-		fail_unless (strcmp(copy, expected[i]) == 0, 
-					 "(%d) nick_strip broken: %s -> %s (expected: %s)", 
-					 i, get[i], copy, expected[i]);
+		fail_unless(strcmp(copy, expected[i]) == 0,
+		            "(%d) nick_strip broken: %s -> %s (expected: %s)",
+		            i, get[i], copy, expected[i]);
 	}
 }
@@ -43,10 +42,10 @@
 {
 	const char *nicks[] = { "foo", "bar123", "bla[", "blie]", "BreEZaH",
-	                        "\\od^~", "_123", "_123test", NULL };
+		                "\\od^~", "_123", "_123test", NULL };
 	int i;
 
 	for (i = 0; nicks[i]; i++) {
-		fail_unless (nick_ok(NULL, nicks[i]) == 1,
-					 "nick_ok() failed: %s", nicks[i]);
+		fail_unless(nick_ok(NULL, nicks[i]) == 1,
+		            "nick_ok() failed: %s", nicks[i]);
 	}
 }
@@ -56,22 +55,23 @@
 {
 	const char *nicks[] = { "thisisaveryveryveryveryveryveryverylongnick",
-		                    "\nillegalchar", "", "nick%", "123test", NULL };
+		                "\nillegalchar", "", "nick%", "123test", NULL };
 	int i;
 
 	for (i = 0; nicks[i]; i++) {
-		fail_unless (nick_ok(NULL, nicks[i]) == 0,
-					 "nick_ok() succeeded for invalid: %s", nicks[i]);
+		fail_unless(nick_ok(NULL, nicks[i]) == 0,
+		            "nick_ok() succeeded for invalid: %s", nicks[i]);
 	}
 }
 END_TEST
 
-Suite *nick_suite (void)
+Suite *nick_suite(void)
 {
 	Suite *s = suite_create("Nick");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, test_nick_ok_ok);
-	tcase_add_test (tc_core, test_nick_ok_notok);
-	tcase_add_test (tc_core, test_nick_strip);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, test_nick_ok_ok);
+	tcase_add_test(tc_core, test_nick_ok_notok);
+	tcase_add_test(tc_core, test_nick_strip);
 	return s;
 }
Index: tests/check_set.c
===================================================================
--- tests/check_set.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_set.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -8,115 +8,116 @@
 
 START_TEST(test_set_add)
-	void *data = "data";
-	set_t *s = NULL, *t;
-	t = set_add(&s, "name", "default", NULL, data);
-	fail_unless(s == t);
-	fail_unless(t->data == data);
-	fail_unless(strcmp(t->def, "default") == 0);
+void *data = "data";
+set_t *s = NULL, *t;
+t = set_add(&s, "name", "default", NULL, data);
+fail_unless(s == t);
+fail_unless(t->data == data);
+fail_unless(strcmp(t->def, "default") == 0);
 END_TEST
 
 START_TEST(test_set_add_existing)
-	void *data = "data";
-	set_t *s = NULL, *t;
-	t = set_add(&s, "name", "default", NULL, data);
-	t = set_add(&s, "name", "newdefault", NULL, data);
-	fail_unless(s == t);
-	fail_unless(strcmp(t->def, "newdefault") == 0);
+void *data = "data";
+set_t *s = NULL, *t;
+t = set_add(&s, "name", "default", NULL, data);
+t = set_add(&s, "name", "newdefault", NULL, data);
+fail_unless(s == t);
+fail_unless(strcmp(t->def, "newdefault") == 0);
 END_TEST
 
 START_TEST(test_set_find_unknown)
-	set_t *s = NULL;
-	fail_unless (set_find(&s, "foo") == NULL);
+set_t * s = NULL;
+fail_unless(set_find(&s, "foo") == NULL);
 END_TEST
 
 START_TEST(test_set_find)
-	void *data = "data";
-	set_t *s = NULL, *t;
-	t = set_add(&s, "name", "default", NULL, data);
-	fail_unless(s == t);
-	fail_unless(set_find(&s, "name") == t);
+void *data = "data";
+set_t *s = NULL, *t;
+t = set_add(&s, "name", "default", NULL, data);
+fail_unless(s == t);
+fail_unless(set_find(&s, "name") == t);
 END_TEST
 
 START_TEST(test_set_get_str_default)
-	void *data = "data";
-	set_t *s = NULL, *t;
-	t = set_add(&s, "name", "default", NULL, data);
-	fail_unless(s == t);
-	fail_unless(strcmp(set_getstr(&s, "name"), "default") == 0);
+void *data = "data";
+set_t *s = NULL, *t;
+t = set_add(&s, "name", "default", NULL, data);
+fail_unless(s == t);
+fail_unless(strcmp(set_getstr(&s, "name"), "default") == 0);
 END_TEST
 
 START_TEST(test_set_get_bool_default)
-	void *data = "data";
-	set_t *s = NULL, *t;
-	t = set_add(&s, "name", "true", NULL, data);
-	fail_unless(s == t);
-	fail_unless(set_getbool(&s, "name"));
+void *data = "data";
+set_t *s = NULL, *t;
+t = set_add(&s, "name", "true", NULL, data);
+fail_unless(s == t);
+fail_unless(set_getbool(&s, "name"));
 END_TEST
 
 START_TEST(test_set_get_bool_integer)
-	void *data = "data";
-	set_t *s = NULL, *t;
-	t = set_add(&s, "name", "3", NULL, data);
-	fail_unless(s == t);
-	fail_unless(set_getbool(&s, "name") == 3);
+void *data = "data";
+set_t *s = NULL, *t;
+t = set_add(&s, "name", "3", NULL, data);
+fail_unless(s == t);
+fail_unless(set_getbool(&s, "name") == 3);
 END_TEST
 
 START_TEST(test_set_get_bool_unknown)
-	set_t *s = NULL;
-	fail_unless(set_getbool(&s, "name") == 0);
+set_t * s = NULL;
+fail_unless(set_getbool(&s, "name") == 0);
 END_TEST
 
 START_TEST(test_set_get_str_value)
-	void *data = "data";
-	set_t *s = NULL;
-	set_add(&s, "name", "default", NULL, data);
-	set_setstr(&s, "name", "foo");
-	fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0);
+void *data = "data";
+set_t *s = NULL;
+set_add(&s, "name", "default", NULL, data);
+set_setstr(&s, "name", "foo");
+fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0);
 END_TEST
 
 START_TEST(test_set_get_str_unknown)
-	set_t *s = NULL;
-	fail_unless(set_getstr(&s, "name") == NULL);
+set_t * s = NULL;
+fail_unless(set_getstr(&s, "name") == NULL);
 END_TEST
 
 START_TEST(test_setint)
-	void *data = "data";
-	set_t *s = NULL;
-	set_add(&s, "name", "10", NULL, data);
-	set_setint(&s, "name", 3);
-	fail_unless(set_getint(&s, "name") == 3);
+void *data = "data";
+set_t *s = NULL;
+set_add(&s, "name", "10", NULL, data);
+set_setint(&s, "name", 3);
+fail_unless(set_getint(&s, "name") == 3);
 END_TEST
 
 START_TEST(test_setstr)
-	void *data = "data";
-	set_t *s = NULL;
-	set_add(&s, "name", "foo", NULL, data);
-	set_setstr(&s, "name", "bloe");
-	fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0);
+void *data = "data";
+set_t *s = NULL;
+set_add(&s, "name", "foo", NULL, data);
+set_setstr(&s, "name", "bloe");
+fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0);
 END_TEST
 
 START_TEST(test_set_get_int_unknown)
-	set_t *s = NULL;
-	fail_unless(set_getint(&s, "foo") == 0);
+set_t * s = NULL;
+fail_unless(set_getint(&s, "foo") == 0);
 END_TEST
 
-Suite *set_suite (void)
+Suite *set_suite(void)
 {
 	Suite *s = suite_create("Set");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, test_set_add);
-	tcase_add_test (tc_core, test_set_add_existing);
-	tcase_add_test (tc_core, test_set_find_unknown);
-	tcase_add_test (tc_core, test_set_find);
-	tcase_add_test (tc_core, test_set_get_str_default);
-	tcase_add_test (tc_core, test_set_get_str_value);
-	tcase_add_test (tc_core, test_set_get_str_unknown);
-	tcase_add_test (tc_core, test_set_get_bool_default);
-	tcase_add_test (tc_core, test_set_get_bool_integer);
-	tcase_add_test (tc_core, test_set_get_bool_unknown);
-	tcase_add_test (tc_core, test_set_get_int_unknown);
-	tcase_add_test (tc_core, test_setint);
-	tcase_add_test (tc_core, test_setstr);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, test_set_add);
+	tcase_add_test(tc_core, test_set_add_existing);
+	tcase_add_test(tc_core, test_set_find_unknown);
+	tcase_add_test(tc_core, test_set_find);
+	tcase_add_test(tc_core, test_set_get_str_default);
+	tcase_add_test(tc_core, test_set_get_str_value);
+	tcase_add_test(tc_core, test_set_get_str_unknown);
+	tcase_add_test(tc_core, test_set_get_bool_default);
+	tcase_add_test(tc_core, test_set_get_bool_integer);
+	tcase_add_test(tc_core, test_set_get_bool_unknown);
+	tcase_add_test(tc_core, test_set_get_int_unknown);
+	tcase_add_test(tc_core, test_setint);
+	tcase_add_test(tc_core, test_setstr);
 	return s;
 }
Index: tests/check_user.c
===================================================================
--- tests/check_user.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_user.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -9,68 +9,69 @@
 #if 0
 START_TEST(test_user_add)
-	irc_t *irc = torture_irc();
-	user_t *user;
-	user = user_add(irc, "foo");
-	fail_if(user == NULL);
-	fail_if(strcmp(user->nick, "foo") != 0);
-	fail_unless(user_find(irc, "foo") == user);
+irc_t * irc = torture_irc();
+user_t *user;
+user = user_add(irc, "foo");
+fail_if(user == NULL);
+fail_if(strcmp(user->nick, "foo") != 0);
+fail_unless(user_find(irc, "foo") == user);
 END_TEST
 
 START_TEST(test_user_add_exists)
-	irc_t *irc = torture_irc();
-	user_t *user;
-	user = user_add(irc, "foo");
-	fail_if(user == NULL);
-	user = user_add(irc, "foo");
-	fail_unless(user == NULL);
+irc_t * irc = torture_irc();
+user_t *user;
+user = user_add(irc, "foo");
+fail_if(user == NULL);
+user = user_add(irc, "foo");
+fail_unless(user == NULL);
 END_TEST
 
 START_TEST(test_user_add_invalid)
-	irc_t *irc = torture_irc();
-	user_t *user;
-	user = user_add(irc, ":foo");
-	fail_unless(user == NULL);
+irc_t * irc = torture_irc();
+user_t *user;
+user = user_add(irc, ":foo");
+fail_unless(user == NULL);
 END_TEST
 
 START_TEST(test_user_del_invalid)
-	irc_t *irc = torture_irc();
-	fail_unless(user_del(irc, ":foo") == 0);
+irc_t * irc = torture_irc();
+fail_unless(user_del(irc, ":foo") == 0);
 END_TEST
 
 START_TEST(test_user_del)
-	irc_t *irc = torture_irc();
-	user_t *user;
-	user = user_add(irc, "foo");
-	fail_unless(user_del(irc, "foo") == 1);
-	fail_unless(user_find(irc, "foo") == NULL);
+irc_t * irc = torture_irc();
+user_t *user;
+user = user_add(irc, "foo");
+fail_unless(user_del(irc, "foo") == 1);
+fail_unless(user_find(irc, "foo") == NULL);
 END_TEST
 
 START_TEST(test_user_del_nonexistant)
-	irc_t *irc = torture_irc();
-	fail_unless(user_del(irc, "foo") == 0);
+irc_t * irc = torture_irc();
+fail_unless(user_del(irc, "foo") == 0);
 END_TEST
 
 START_TEST(test_user_rename)
-	irc_t *irc = torture_irc();
-	user_t *user;
-	user = user_add(irc, "foo");
-	user_rename(irc, "foo", "bar");
-	fail_unless(user_find(irc, "foo") == NULL);
-	fail_if(user_find(irc, "bar") == NULL);
+irc_t * irc = torture_irc();
+user_t *user;
+user = user_add(irc, "foo");
+user_rename(irc, "foo", "bar");
+fail_unless(user_find(irc, "foo") == NULL);
+fail_if(user_find(irc, "bar") == NULL);
 END_TEST
 #endif
-Suite *user_suite (void)
+Suite *user_suite(void)
 {
 	Suite *s = suite_create("User");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
+
+	suite_add_tcase(s, tc_core);
 #if 0
-	tcase_add_test (tc_core, test_user_add);
-	tcase_add_test (tc_core, test_user_add_invalid);
-	tcase_add_test (tc_core, test_user_add_exists);
-	tcase_add_test (tc_core, test_user_del_invalid);
-	tcase_add_test (tc_core, test_user_del_nonexistant);
-	tcase_add_test (tc_core, test_user_del);
-	tcase_add_test (tc_core, test_user_rename);
+	tcase_add_test(tc_core, test_user_add);
+	tcase_add_test(tc_core, test_user_add_invalid);
+	tcase_add_test(tc_core, test_user_add_exists);
+	tcase_add_test(tc_core, test_user_del_invalid);
+	tcase_add_test(tc_core, test_user_del_nonexistant);
+	tcase_add_test(tc_core, test_user_del);
+	tcase_add_test(tc_core, test_user_rename);
 #endif
 	return s;
Index: tests/check_util.c
===================================================================
--- tests/check_util.c	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/check_util.c	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -9,6 +9,5 @@
 #include "url.h"
 
-START_TEST(test_strip_linefeed)
-{
+START_TEST(test_strip_linefeed){
 	int i;
 	const char *get[] = { "Test", "Test\r", "Test\rX\r", NULL };
@@ -19,7 +18,7 @@
 		strcpy(copy, get[i]);
 		strip_linefeed(copy);
-		fail_unless (strcmp(copy, expected[i]) == 0, 
-					 "(%d) strip_linefeed broken: %s -> %s (expected: %s)", 
-					 i, get[i], copy, expected[i]);
+		fail_unless(strcmp(copy, expected[i]) == 0,
+		            "(%d) strip_linefeed broken: %s -> %s (expected: %s)",
+		            i, get[i], copy, expected[i]);
 	}
 }
@@ -36,8 +35,8 @@
 		strcpy(copy, get[i]);
 		ret = strip_newlines(copy);
-		fail_unless (strcmp(copy, expected[i]) == 0, 
-					 "(%d) strip_newlines broken: %s -> %s (expected: %s)", 
-					 i, get[i], copy, expected[i]);
-		fail_unless (copy == ret, "Original string not returned"); 
+		fail_unless(strcmp(copy, expected[i]) == 0,
+		            "(%d) strip_newlines broken: %s -> %s (expected: %s)",
+		            i, get[i], copy, expected[i]);
+		fail_unless(copy == ret, "Original string not returned");
 	}
 }
@@ -45,65 +44,64 @@
 
 START_TEST(test_set_url_http)
-	url_t url;
-	
-	fail_if (0 == url_set(&url, "http://host/"));
-	fail_unless (!strcmp(url.host, "host"));
-	fail_unless (!strcmp(url.file, "/"));
-	fail_unless (!strcmp(url.user, ""));
-	fail_unless (!strcmp(url.pass, ""));
-	fail_unless (url.proto == PROTO_HTTP);
-	fail_unless (url.port == 80);
+url_t url;
+
+fail_if(0 == url_set(&url, "http://host/"));
+fail_unless(!strcmp(url.host, "host"));
+fail_unless(!strcmp(url.file, "/"));
+fail_unless(!strcmp(url.user, ""));
+fail_unless(!strcmp(url.pass, ""));
+fail_unless(url.proto == PROTO_HTTP);
+fail_unless(url.port == 80);
 END_TEST
 
 START_TEST(test_set_url_https)
-	url_t url;
-	
-	fail_if (0 == url_set(&url, "https://ahost/AimeeMann"));
-	fail_unless (!strcmp(url.host, "ahost"));
-	fail_unless (!strcmp(url.file, "/AimeeMann"));
-	fail_unless (!strcmp(url.user, ""));
-	fail_unless (!strcmp(url.pass, ""));
-	fail_unless (url.proto == PROTO_HTTPS);
-	fail_unless (url.port == 443);
+url_t url;
+
+fail_if(0 == url_set(&url, "https://ahost/AimeeMann"));
+fail_unless(!strcmp(url.host, "ahost"));
+fail_unless(!strcmp(url.file, "/AimeeMann"));
+fail_unless(!strcmp(url.user, ""));
+fail_unless(!strcmp(url.pass, ""));
+fail_unless(url.proto == PROTO_HTTPS);
+fail_unless(url.port == 443);
 END_TEST
 
 START_TEST(test_set_url_port)
-	url_t url;
-	
-	fail_if (0 == url_set(&url, "https://ahost:200/Lost/In/Space"));
-	fail_unless (!strcmp(url.host, "ahost"));
-	fail_unless (!strcmp(url.file, "/Lost/In/Space"));
-	fail_unless (!strcmp(url.user, ""));
-	fail_unless (!strcmp(url.pass, ""));
-	fail_unless (url.proto == PROTO_HTTPS);
-	fail_unless (url.port == 200);
+url_t url;
+
+fail_if(0 == url_set(&url, "https://ahost:200/Lost/In/Space"));
+fail_unless(!strcmp(url.host, "ahost"));
+fail_unless(!strcmp(url.file, "/Lost/In/Space"));
+fail_unless(!strcmp(url.user, ""));
+fail_unless(!strcmp(url.pass, ""));
+fail_unless(url.proto == PROTO_HTTPS);
+fail_unless(url.port == 200);
 END_TEST
 
 START_TEST(test_set_url_username)
-	url_t url;
-	
-	fail_if (0 == url_set(&url, "socks4://user@ahost/Space"));
-	fail_unless (!strcmp(url.host, "ahost"));
-	fail_unless (!strcmp(url.file, "/Space"));
-	fail_unless (!strcmp(url.user, "user"));
-	fail_unless (!strcmp(url.pass, ""));
-	fail_unless (url.proto == PROTO_SOCKS4);
-	fail_unless (url.port == 1080);
+url_t url;
+
+fail_if(0 == url_set(&url, "socks4://user@ahost/Space"));
+fail_unless(!strcmp(url.host, "ahost"));
+fail_unless(!strcmp(url.file, "/Space"));
+fail_unless(!strcmp(url.user, "user"));
+fail_unless(!strcmp(url.pass, ""));
+fail_unless(url.proto == PROTO_SOCKS4);
+fail_unless(url.port == 1080);
 END_TEST
 
 START_TEST(test_set_url_username_pwd)
-	url_t url;
-	
-	fail_if (0 == url_set(&url, "socks5://user:pass@ahost/"));
-	fail_unless (!strcmp(url.host, "ahost"));
-	fail_unless (!strcmp(url.file, "/"));
-	fail_unless (!strcmp(url.user, "user"));
-	fail_unless (!strcmp(url.pass, "pass"));
-	fail_unless (url.proto == PROTO_SOCKS5);
-	fail_unless (url.port == 1080);
-END_TEST
-
-struct
-{
+url_t url;
+
+fail_if(0 == url_set(&url, "socks5://user:pass@ahost/"));
+fail_unless(!strcmp(url.host, "ahost"));
+fail_unless(!strcmp(url.file, "/"));
+fail_unless(!strcmp(url.user, "user"));
+fail_unless(!strcmp(url.pass, "pass"));
+fail_unless(url.proto == PROTO_SOCKS5);
+fail_unless(url.port == 1080);
+END_TEST
+
+struct {
 	char *orig;
 	int line_len;
@@ -146,25 +144,24 @@
 
 START_TEST(test_word_wrap)
-	int i;
-	
-	for( i = 0; word_wrap_tests[i].orig && *word_wrap_tests[i].orig; i ++ )
-	{
-		char *wrapped = word_wrap( word_wrap_tests[i].orig, word_wrap_tests[i].line_len );
-		
-		fail_unless( strcmp( word_wrap_tests[i].wrapped, wrapped ) == 0,
-		             "%s (line_len = %d) should wrap to `%s', not to `%s'",
-		             word_wrap_tests[i].orig, word_wrap_tests[i].line_len,
-		             word_wrap_tests[i].wrapped, wrapped );
-		
-		g_free( wrapped );
-	}
+int i;
+
+for (i = 0; word_wrap_tests[i].orig && *word_wrap_tests[i].orig; i++) {
+	char *wrapped = word_wrap(word_wrap_tests[i].orig, word_wrap_tests[i].line_len);
+
+	fail_unless(strcmp(word_wrap_tests[i].wrapped, wrapped) == 0,
+	            "%s (line_len = %d) should wrap to `%s', not to `%s'",
+	            word_wrap_tests[i].orig, word_wrap_tests[i].line_len,
+	            word_wrap_tests[i].wrapped, wrapped);
+
+	g_free(wrapped);
+}
 END_TEST
 
 START_TEST(test_http_encode)
-	char s[80];
-	
-	strcpy( s, "ee\xc3""\xab""ee!!..." );
-	http_encode( s );
-	fail_unless( strcmp( s, "ee%C3%ABee%21%21..." ) == 0 );
+char s[80];
+
+strcpy(s, "ee\xc3" "\xab" "ee!!...");
+http_encode(s);
+fail_unless(strcmp(s, "ee%C3%ABee%21%21...") == 0);
 END_TEST
 
@@ -172,60 +169,61 @@
 	int limit;
 	char *command;
-	char *expected[IRC_MAX_ARGS+1];
+	char *expected[IRC_MAX_ARGS + 1];
 } split_tests[] = {
 	{
 		0, "account add etc \"user name with spaces\" 'pass\\ word'",
-		{"account", "add", "etc", "user name with spaces", "pass\\ word", NULL},
+		{ "account", "add", "etc", "user name with spaces", "pass\\ word", NULL },
 	},
 	{
 		0, "channel set group Close\\ friends",
-		{"channel", "set", "group", "Close friends", NULL},
+		{ "channel", "set", "group", "Close friends", NULL },
 	},
 	{
 		2, "reply wilmer \"testing in C is a PITA\", you said.",
-		{"reply", "wilmer", "\"testing in C is a PITA\", you said.", NULL},
+		{ "reply", "wilmer", "\"testing in C is a PITA\", you said.", NULL },
 	},
 	{
 		4, "one space  two  spaces  limit  limit",
-		{"one", "space", "two", "spaces", "limit  limit", NULL},
+		{ "one", "space", "two", "spaces", "limit  limit", NULL },
 	},
 	{
 		0, NULL,
-		{NULL}
+		{ NULL }
 	},
 };
 
 START_TEST(test_split_command_parts)
-	int i;
-	for (i = 0; split_tests[i].command; i++) {
-		char *cmd = g_strdup(split_tests[i].command);
-		char **split = split_command_parts(cmd, split_tests[i].limit);
-		char **expected = split_tests[i].expected;
-
-		int j;
-		for (j = 0; split[j] && expected[j]; j++) {
-			fail_unless (strcmp(split[j], expected[j]) == 0,
-				"(%d) split_command_parts broken: split(\"%s\")[%d] -> %s (expected: %s)",
-				i, split_tests[i].command, j, split[j], expected[j]);
-		}
-		g_free(cmd);
-	}
-END_TEST
-
-Suite *util_suite (void)
+int i;
+for (i = 0; split_tests[i].command; i++) {
+	char *cmd = g_strdup(split_tests[i].command);
+	char **split = split_command_parts(cmd, split_tests[i].limit);
+	char **expected = split_tests[i].expected;
+
+	int j;
+	for (j = 0; split[j] && expected[j]; j++) {
+		fail_unless(strcmp(split[j], expected[j]) == 0,
+		            "(%d) split_command_parts broken: split(\"%s\")[%d] -> %s (expected: %s)",
+		            i, split_tests[i].command, j, split[j], expected[j]);
+	}
+	g_free(cmd);
+}
+END_TEST
+
+Suite *util_suite(void)
 {
 	Suite *s = suite_create("Util");
 	TCase *tc_core = tcase_create("Core");
-	suite_add_tcase (s, tc_core);
-	tcase_add_test (tc_core, test_strip_linefeed);
-	tcase_add_test (tc_core, test_strip_newlines);
-	tcase_add_test (tc_core, test_set_url_http);
-	tcase_add_test (tc_core, test_set_url_https);
-	tcase_add_test (tc_core, test_set_url_port);
-	tcase_add_test (tc_core, test_set_url_username);
-	tcase_add_test (tc_core, test_set_url_username_pwd);
-	tcase_add_test (tc_core, test_word_wrap);
-	tcase_add_test (tc_core, test_http_encode);
-	tcase_add_test (tc_core, test_split_command_parts);
+
+	suite_add_tcase(s, tc_core);
+	tcase_add_test(tc_core, test_strip_linefeed);
+	tcase_add_test(tc_core, test_strip_newlines);
+	tcase_add_test(tc_core, test_set_url_http);
+	tcase_add_test(tc_core, test_set_url_https);
+	tcase_add_test(tc_core, test_set_url_port);
+	tcase_add_test(tc_core, test_set_url_username);
+	tcase_add_test(tc_core, test_set_url_username_pwd);
+	tcase_add_test(tc_core, test_word_wrap);
+	tcase_add_test(tc_core, test_http_encode);
+	tcase_add_test(tc_core, test_split_command_parts);
 	return s;
 }
Index: tests/testsuite.h
===================================================================
--- tests/testsuite.h	(revision 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5)
+++ tests/testsuite.h	(revision f3af614c28f7eefb0cba6a41c74339a92ed96f5f)
@@ -1,4 +1,4 @@
 #ifndef __BITLBEE_CHECK_H__
-#define __BITLBEE_CHECK_H__ 
+#define __BITLBEE_CHECK_H__
 
 #include "irc.h"
