diff src/gaimrc.c @ 1250:b5783215b245

[gaim-migrate @ 1260] decklin's clean up of the account editor, much needed. indent -kr -i8 -l105 -ncs -cp7 -npcs -T GtkWidget -T gpointer -T AppletCallbackFunc -T GtkFunction -T gaim_plugin_remove -T name -T FILE -T gchar -T user_opts -T GdkEvent -T GtkObject ... did about.c, aim.c, away.c, browser.c, buddy_chat.c, gaimrc.c, html.c, idle.c, multi.c. Need to do buddy.c, conversation.c, dialogs.c, oscar.c, perl.c, plugins.c, prefs.c, proxy.c, prpl.c, rvous.c, server.c, sound.c, toc.c, util.c. not doing gtkhtml.c because it's a piece of crap anyway, or *ticker.c because they're syd's. got rid of debug_buff, just debug_printf now. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 13 Dec 2000 20:18:35 +0000
parents dcf9242241ee
children 9da444224f0e
line wrap: on
line diff
--- a/src/gaimrc.c	Wed Dec 13 06:39:24 2000 +0000
+++ b/src/gaimrc.c	Wed Dec 13 20:18:35 2000 +0000
@@ -51,78 +51,77 @@
 char sound_cmd[2048];
 
 struct parse {
-        char option[256];
-        char value[MAX_VALUES][256];
+	char option[256];
+	char value[MAX_VALUES][256];
 };
 
 static struct parse *parse_line(char *line)
 {
-        char *c = line;
-        int inopt = 1, inval = 0, curval = -1;
-        int optlen = 0, vallen = 0;
-        static struct parse p;
-        int x;
+	char *c = line;
+	int inopt = 1, inval = 0, curval = -1;
+	int optlen = 0, vallen = 0;
+	static struct parse p;
+	int x;
 
 	for (x = 0; x < MAX_VALUES; x++) {
 		p.value[x][0] = 0;
 	}
-	
-	
-        while(*c) {
-                if (*c == '\t') {
-                        c++;
-                        continue;
-                }
-                if (inopt) {
-                     //   if ((*c < 'a' || *c > 'z') && *c != '_') {
-			  if ((*c < 'a' || *c > 'z') && *c != '_' && (*c < 'A' || *c > 'Z')) {
-                                inopt = 0;
-                                p.option[optlen] = 0;
-                                c++;
-                                continue;
-                        }
+
 
-                        p.option[optlen] = *c;
-                        optlen++;
-                        c++;
-                        continue;
-                } else if (inval) {
-                if ( (*c == '}') ) {
-                                if (*(c-1) == '\\') {
-                                        p.value[curval][vallen - 1] = *c;
-                                        c++;
-                                        continue;
-                                } else {
-                                        p.value[curval][vallen - 1] = 0;
-                                        inval = 0;
-                                        c++;
-                                        continue;
-                                }
-                        } else {
-                        p.value[curval][vallen] = *c;
-                        vallen++;
-                        c++;
-                        continue; }
-                } else if (*c == '{') {
-			if (*(c-1) == '\\') {
-				p.value[curval][vallen-1] = *c;
+	while (*c) {
+		if (*c == '\t') {
+			c++;
+			continue;
+		}
+		if (inopt) {
+			//   if ((*c < 'a' || *c > 'z') && *c != '_') {
+			if ((*c < 'a' || *c > 'z') && *c != '_' && (*c < 'A' || *c > 'Z')) {
+				inopt = 0;
+				p.option[optlen] = 0;
 				c++;
 				continue;
 			}
-			else
-			{
-                        	curval++;
-                        	vallen = 0;
-                        	inval = 1;
-                        	c++;
-                        	c++;
-                        	continue;
+
+			p.option[optlen] = *c;
+			optlen++;
+			c++;
+			continue;
+		} else if (inval) {
+			if ((*c == '}')) {
+				if (*(c - 1) == '\\') {
+					p.value[curval][vallen - 1] = *c;
+					c++;
+					continue;
+				} else {
+					p.value[curval][vallen - 1] = 0;
+					inval = 0;
+					c++;
+					continue;
+				}
+			} else {
+				p.value[curval][vallen] = *c;
+				vallen++;
+				c++;
+				continue;
 			}
-                }
-                c++;
-        }
+		} else if (*c == '{') {
+			if (*(c - 1) == '\\') {
+				p.value[curval][vallen - 1] = *c;
+				c++;
+				continue;
+			} else {
+				curval++;
+				vallen = 0;
+				inval = 1;
+				c++;
+				c++;
+				continue;
+			}
+		}
+		c++;
+	}
 
-        return &p;
+	return &p;
 }
 
 
@@ -161,28 +160,26 @@
 
 void filter_break(char *msg)
 {
-        char *c;
-        int mc;
+	char *c;
+	int mc;
 	int cc;
-	
-        c = g_malloc(strlen(msg)+1);
+
+	c = g_malloc(strlen(msg) + 1);
 	strcpy(c, msg);
 
-        mc = 0;
+	mc = 0;
 	cc = 0;
-        while (c[cc] != '\0')
-        {
-                if (c[cc] == '\\') {
-                        cc++;
-                        msg[mc] = c[cc]; 
-                }       
-                else {
-                        msg[mc] = c[cc];
-                }
-                mc++;
-                cc++;
-        }
-        msg[mc] = 0;
+	while (c[cc] != '\0') {
+		if (c[cc] == '\\') {
+			cc++;
+			msg[mc] = c[cc];
+		} else {
+			msg[mc] = c[cc];
+		}
+		mc++;
+		cc++;
+	}
+	msg[mc] = 0;
 	g_free(c);
 }
 
@@ -194,28 +191,25 @@
 	struct away_message *a;
 
 	buf[0] = 0;
-	
-	while (buf[0] != '}')
-	{
+
+	while (buf[0] != '}') {
 		if (!fgets(buf, sizeof(buf), f))
 			return;
-		
+
 		if (buf[0] == '}')
 			return;
 
 		p = parse_line(buf);
-		if (!strcmp(p->option, "message"))
-		{
+		if (!strcmp(p->option, "message")) {
 			a = g_new0(struct away_message, 1);
 
-			g_snprintf(a->name, sizeof(a->name),  "%s", p->value[0]);
+			g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]);
 			g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]);
 			filter_break(a->message);
 			away_messages = g_slist_insert_sorted(away_messages, a, sort_awaymsg_list);
 		}
 		/* auto { time } { default message } */
-		else if (!strcmp(p->option, "auto"))
-		{
+		else if (!strcmp(p->option, "auto")) {
 			auto_away = atoi(p->value[0]);
 			default_away = atoi(p->value[1]);
 		}
@@ -229,8 +223,7 @@
 
 	fprintf(f, "away {\n");
 
-	if (awy)
-	{
+	if (awy) {
 		while (awy) {
 			char *str1, *str2;
 
@@ -238,19 +231,17 @@
 
 			str1 = escape_text2(a->name);
 			str2 = escape_text2(a->message);
-	
+
 			fprintf(f, "\tmessage { %s } { %s }\n", str1, str2);
 
 			/* escape_text2 uses malloc(), so we don't want to g_free these */
 			free(str1);
 			free(str2);
-	
+
 			awy = g_slist_next(awy);
 		}
 		fprintf(f, "\tauto { %d } { %d }\n", auto_away, default_away);
-	}
-	else
-	{
+	} else {
 		fprintf(f, "\tmessage { boring default } { %s }\n", BORING_DEFAULT_AWAY_MSG);
 		fprintf(f, "\tauto { 0 } { 0 }\n");
 	}
@@ -265,21 +256,19 @@
 	struct buddy_pounce *b;
 
 	buf[0] = 0;
-	
-	while (buf[0] != '}')
-	{
+
+	while (buf[0] != '}') {
 		if (!fgets(buf, sizeof(buf), f))
 			return;
-		
+
 		if (buf[0] == '}')
 			return;
 
 		p = parse_line(buf);
-		if (!strcmp(p->option, "entry"))
-		{
+		if (!strcmp(p->option, "entry")) {
 			b = g_new0(struct buddy_pounce, 1);
 
-			g_snprintf(b->name, sizeof(b->name),  "%s", p->value[0]);
+			g_snprintf(b->name, sizeof(b->name), "%s", p->value[0]);
 			g_snprintf(b->message, sizeof(b->message), "%s", p->value[1]);
 			g_snprintf(b->command, sizeof(b->command), "%s", p->value[2]);
 
@@ -321,9 +310,7 @@
 		}
 
 		fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %s } { %d }\n",
-				str1, str2, str3,
-				b->options,
-				b->pouncer, b->protocol);
+			str1, str2, str3, b->options, b->pouncer, b->protocol);
 
 		/* escape_text2 uses malloc(), so we don't want to g_free these */
 		free(str1);
@@ -343,24 +330,22 @@
 	struct chat_room *b;
 
 	buf[0] = 0;
-	
-	while (buf[0] != '}')
-	{
+
+	while (buf[0] != '}') {
 		if (!fgets(buf, sizeof(buf), f))
 			return;
-		
+
 		if (buf[0] == '}')
 			return;
 
 		p = parse_line(buf);
-		if (!strcmp(p->option, "entry"))
-		{
+		if (!strcmp(p->option, "entry")) {
 			b = g_new0(struct chat_room, 1);
 
-			g_snprintf(b->name, sizeof(b->name),  "%s", p->value[0]);
+			g_snprintf(b->name, sizeof(b->name), "%s", p->value[0]);
 
 			b->exchange = atoi(p->value[1]);
-		
+
 			chat_rooms = g_list_append(chat_rooms, b);
 		}
 	}
@@ -373,8 +358,7 @@
 
 	fprintf(f, "chat {\n");
 
-	if (pnc)
-	{
+	if (pnc) {
 		while (pnc) {
 			char *str1;
 
@@ -386,7 +370,7 @@
 
 			/* escape_text2 uses malloc(), so we don't want to g_free these */
 			free(str1);
-	
+
 			pnc = pnc->next;
 		}
 	}
@@ -426,18 +410,16 @@
 	GSList *load = NULL;
 
 	buf[0] = 0;
-	
-	while (buf[0] != '}')
-	{
+
+	while (buf[0] != '}') {
 		if (!fgets(buf, sizeof(buf), f))
 			break;
-		
+
 		if (buf[0] == '}')
 			break;
 
 		p = parse_line(buf);
-		if (!strcmp(p->option, "plugin"))
-		{
+		if (!strcmp(p->option, "plugin")) {
 			load = g_slist_append(load, g_strdup(p->value[0]));
 		}
 	}
@@ -454,46 +436,46 @@
 
 static struct aim_user *gaimrc_read_user(FILE *f)
 {
-        struct parse *p;
-        struct aim_user *u;
+	struct parse *p;
+	struct aim_user *u;
 	int i;
-        char buf[4096];
+	char buf[4096];
 
-        if (!fgets(buf, sizeof(buf), f))
-                return NULL;
+	if (!fgets(buf, sizeof(buf), f))
+		return NULL;
 
-        p = parse_line(buf);
+	p = parse_line(buf);
 
-        if (strcmp(p->option, "ident"))
-                return NULL;
-        
-        u = g_new0(struct aim_user, 1);
+	if (strcmp(p->option, "ident"))
+		return NULL;
+
+	u = g_new0(struct aim_user, 1);
 
-        strcpy(u->username, p->value[0]);
-        strcpy(u->password, p->value[1]);
+	strcpy(u->username, p->value[0]);
+	strcpy(u->password, p->value[1]);
 
-        u->user_info[0] = 0;
+	u->user_info[0] = 0;
 	u->options = OPT_USR_REM_PASS;
-	u->protocol = 0; /* PROTO_TOC */
+	u->protocol = 0;	/* PROTO_TOC */
 
-        if (!fgets(buf, sizeof(buf), f))
-                return u;
+	if (!fgets(buf, sizeof(buf), f))
+		return u;
 
-        if (strcmp(buf, "\t\tuser_info {\n")) {
-                return u;
-        }
+	if (strcmp(buf, "\t\tuser_info {\n")) {
+		return u;
+	}
 
-        if (!fgets(buf, sizeof(buf), f))
-                return u;
+	if (!fgets(buf, sizeof(buf), f))
+		return u;
 
-        while (strncmp(buf, "\t\t}", 3)) {
-                if (strlen(buf) > 3)
-                        strcat(u->user_info, &buf[3]);
+	while (strncmp(buf, "\t\t}", 3)) {
+		if (strlen(buf) > 3)
+			strcat(u->user_info, &buf[3]);
 
-                if (!fgets(buf, sizeof(buf), f)) {
-                        return u;
-                }
-        }
+		if (!fgets(buf, sizeof(buf), f)) {
+			return u;
+		}
+	}
 
 	if (!fgets(buf, sizeof(buf), f)) {
 		return u;
@@ -525,38 +507,38 @@
 	for (i = 0; i < 6; i++)
 		g_snprintf(u->proto_opt[i], sizeof u->proto_opt[i], "%s", p->value[i]);
 
-        return u;
-        
+	return u;
+
 }
 
 static void gaimrc_write_user(FILE *f, struct aim_user *u)
 {
-        char *c;
-        int nl = 1, i;
+	char *c;
+	int nl = 1, i;
 	if (u->options & OPT_USR_REM_PASS)
-	        fprintf(f, "\t\tident { %s } { %s }\n", u->username, u->password);
+		fprintf(f, "\t\tident { %s } { %s }\n", u->username, u->password);
 	else
 		fprintf(f, "\t\tident { %s } {  }\n", u->username);
-        fprintf(f, "\t\tuser_info {");
-        c = u->user_info;
-        while(*c) {
-                /* This is not as silly as it looks. */
-                if (*c == '\n') {
-                        nl++;
-                } else {
-                        if (nl) {
-                                while(nl) {
-                                        fprintf(f, "\n\t\t\t");
-                                        nl--;
-                                }
-                        }
-                        fprintf(f, "%c", *c);
-                }
-                c++;
-        }
-        fprintf(f, "\n\t\t}\n");
+	fprintf(f, "\t\tuser_info {");
+	c = u->user_info;
+	while (*c) {
+		/* This is not as silly as it looks. */
+		if (*c == '\n') {
+			nl++;
+		} else {
+			if (nl) {
+				while (nl) {
+					fprintf(f, "\n\t\t\t");
+					nl--;
+				}
+			}
+			fprintf(f, "%c", *c);
+		}
+		c++;
+	}
+	fprintf(f, "\n\t\t}\n");
 	fprintf(f, "\t\tuser_opts { %d } { %d }\n", u->options, u->protocol);
-        fprintf(f, "\t\tproto_opts");
+	fprintf(f, "\t\tproto_opts");
 	for (i = 0; i < 6; i++)
 		fprintf(f, " { %s }", u->proto_opt[i]);
 	fprintf(f, "\n");
@@ -566,31 +548,31 @@
 static void gaimrc_read_users(FILE *f)
 {
 	char buf[2048];
-        struct aim_user *u;
-        struct parse *p;
+	struct aim_user *u;
+	struct parse *p;
 
 	buf[0] = 0;
 
 	while (buf[0] != '}') {
 		if (buf[0] == '#')
 			continue;
-		
+
 		if (!fgets(buf, sizeof(buf), f))
 			return;
 
 
-                
-                p = parse_line(buf);
+
+		p = parse_line(buf);
 
-                if (!strcmp(p->option, "current_user")) {
-                } else if (strcmp(p->option, "user")) {
-                        continue;
-                } else {
+		if (!strcmp(p->option, "current_user")) {
+		} else if (strcmp(p->option, "user")) {
+			continue;
+		} else {
 		}
 
-                u = gaimrc_read_user(f);
+		u = gaimrc_read_user(f);
 
-                aim_users = g_list_append(aim_users, u);
+		aim_users = g_list_append(aim_users, u);
 	}
 }
 
@@ -600,16 +582,16 @@
 	struct aim_user *u;
 
 	fprintf(f, "users {\n");
-	
-	while(usr) {
-                u = (struct aim_user *)usr->data;
-                fprintf(f, "\tuser {\n");
-                gaimrc_write_user(f, u);
 
-                fprintf(f, "\t}\n");
-                
+	while (usr) {
+		u = (struct aim_user *)usr->data;
+		fprintf(f, "\tuser {\n");
+		gaimrc_write_user(f, u);
+
+		fprintf(f, "\t}\n");
+
 		usr = usr->next;
-        }
+	}
 
 	fprintf(f, "}\n");
 }
@@ -620,30 +602,30 @@
 static void gaimrc_read_options(FILE *f)
 {
 	char buf[2048];
-        struct parse *p;
+	struct parse *p;
 
-        buf[0] = 0;
-        
+	buf[0] = 0;
+
 	while (buf[0] != '}') {
 		if (buf[0] == '#')
 			continue;
-		
+
 		if (!fgets(buf, sizeof(buf), f))
 			return;
 
-                p = parse_line(buf);
-                
-                if (!strcmp(p->option, "general_options")) {
-                        general_options = atoi(p->value[0]);
-                } else if (!strcmp(p->option, "display_options")) {
-                        display_options = atoi(p->value[0]);
-                } else if (!strcmp(p->option, "sound_options")) {
-                        sound_options = atoi(p->value[0]);
+		p = parse_line(buf);
+
+		if (!strcmp(p->option, "general_options")) {
+			general_options = atoi(p->value[0]);
+		} else if (!strcmp(p->option, "display_options")) {
+			display_options = atoi(p->value[0]);
+		} else if (!strcmp(p->option, "sound_options")) {
+			sound_options = atoi(p->value[0]);
 		} else if (!strcmp(p->option, "font_options")) {
 			font_options = atoi(p->value[0]);
 		} else if (!strcmp(p->option, "font_face")) {
 			if (p->value[0] != NULL)
-					g_snprintf(fontface, sizeof(fontface), "%s", p->value[0]);
+				g_snprintf(fontface, sizeof(fontface), "%s", p->value[0]);
 		} else if (!strcmp(p->option, "foreground")) {
 			fgcolor.red = atoi(p->value[0]);
 			fgcolor.green = atoi(p->value[1]);
@@ -652,22 +634,22 @@
 			bgcolor.red = atoi(p->value[0]);
 			bgcolor.green = atoi(p->value[1]);
 			bgcolor.blue = atoi(p->value[2]);
-                } else if (!strcmp(p->option, "report_idle")) {
-                        report_idle = atoi(p->value[0]);
-                } else if (!strcmp(p->option, "web_browser")) {
-                        web_browser = atoi(p->value[0]);
-                } else if (!strcmp(p->option, "web_command")) {
-                        strcpy(web_command, p->value[0]);
-                } else if (!strcmp(p->option, "blist_pos")) {
-                        blist_pos.x = atoi(p->value[0]);
-                        blist_pos.y = atoi(p->value[1]);
-                        blist_pos.width = atoi(p->value[2]);
-                        blist_pos.height = atoi(p->value[3]);
-                        blist_pos.xoff = atoi(p->value[4]);
-                        blist_pos.yoff = atoi(p->value[5]);
+		} else if (!strcmp(p->option, "report_idle")) {
+			report_idle = atoi(p->value[0]);
+		} else if (!strcmp(p->option, "web_browser")) {
+			web_browser = atoi(p->value[0]);
+		} else if (!strcmp(p->option, "web_command")) {
+			strcpy(web_command, p->value[0]);
+		} else if (!strcmp(p->option, "blist_pos")) {
+			blist_pos.x = atoi(p->value[0]);
+			blist_pos.y = atoi(p->value[1]);
+			blist_pos.width = atoi(p->value[2]);
+			blist_pos.height = atoi(p->value[3]);
+			blist_pos.xoff = atoi(p->value[4]);
+			blist_pos.yoff = atoi(p->value[5]);
 		}
 
-        }
+	}
 
 }
 
@@ -675,20 +657,20 @@
 {
 
 	fprintf(f, "options {\n");
-        fprintf(f, "\tgeneral_options { %d }\n", general_options);
-        fprintf(f, "\tdisplay_options { %d }\n", display_options);
-        fprintf(f, "\tsound_options { %d }\n", sound_options);
+	fprintf(f, "\tgeneral_options { %d }\n", general_options);
+	fprintf(f, "\tdisplay_options { %d }\n", display_options);
+	fprintf(f, "\tsound_options { %d }\n", sound_options);
 	fprintf(f, "\tfont_options { %d }\n", font_options);
 	if (fontface)
 		fprintf(f, "\tfont_face { %s }\n", fontface);
 	fprintf(f, "\tforeground { %d } { %d } { %d }\n", fgcolor.red, fgcolor.green, fgcolor.blue);
 	fprintf(f, "\tbackground { %d } { %d } { %d }\n", bgcolor.red, bgcolor.green, bgcolor.blue);
-        fprintf(f, "\treport_idle { %d }\n", report_idle);
-        fprintf(f, "\tweb_browser { %d }\n", web_browser);
-        fprintf(f, "\tweb_command { %s }\n", web_command);
-        fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d } { %d } { %d }\n",
-                blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height,
-                blist_pos.xoff, blist_pos.yoff);
+	fprintf(f, "\treport_idle { %d }\n", report_idle);
+	fprintf(f, "\tweb_browser { %d }\n", web_browser);
+	fprintf(f, "\tweb_command { %s }\n", web_command);
+	fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d } { %d } { %d }\n",
+		blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height,
+		blist_pos.xoff, blist_pos.yoff);
 	fprintf(f, "}\n");
 }
 
@@ -697,29 +679,29 @@
 {
 	int i;
 	char buf[2048];
-        struct parse *p;
+	struct parse *p;
 
-        buf[0] = 0;
+	buf[0] = 0;
 
 	for (i = 0; i < NUM_SOUNDS; i++)
 		sound_file[i] = NULL;
 	sound_cmd[0] = 0;
-        
+
 	while (buf[0] != '}') {
 		if (buf[0] == '#')
 			continue;
-		
+
 		if (!fgets(buf, sizeof(buf), f))
 			return;
 
-                p = parse_line(buf);
-                
+		p = parse_line(buf);
+
 		if (!strcmp(p->option, "sound_cmd")) {
 			g_snprintf(sound_cmd, sizeof(sound_cmd), "%s", p->value[0]);
 		} else if (!strncmp(p->option, "sound", strlen("sound"))) {
 			sscanf(p->option, "sound%c", (char *)&i);
 			i -= 'A';
-			
+
 			if (p->value[0][0])
 				sound_file[i] = g_strdup(p->value[0]);
 		}
@@ -742,64 +724,62 @@
 
 void set_defaults(int saveinfo)
 {
-	if (!saveinfo)
-	{	
-        	if (aim_users)
-        	{
-        		g_list_free(aim_users);
-        		aim_users = NULL;
-       	 	}
-       	 	if (away_messages)
-       	 	{
-       	 		g_slist_free(away_messages);
-        		away_messages = NULL;
-        	}
+	if (!saveinfo) {
+		if (aim_users) {
+			g_list_free(aim_users);
+			aim_users = NULL;
+		}
+		if (away_messages) {
+			g_slist_free(away_messages);
+			away_messages = NULL;
+		}
 	}
 
-        general_options =
-                OPT_GEN_SEND_LINKS |
-                OPT_GEN_ENTER_SENDS |
-                OPT_GEN_SAVED_WINDOWS |
-                /* OPT_GEN_REMEMBER_PASS | */
-		OPT_GEN_REGISTERED |
-		OPT_GEN_NEAR_APPLET |
-		OPT_GEN_CTL_SMILEYS |
-		OPT_GEN_CTL_CHARS; 
+	general_options =
+	    OPT_GEN_SEND_LINKS |
+	    OPT_GEN_ENTER_SENDS |
+	    OPT_GEN_SAVED_WINDOWS |
+	    /* OPT_GEN_REMEMBER_PASS | */
+	    OPT_GEN_REGISTERED |
+	    OPT_GEN_NEAR_APPLET |
+	    OPT_GEN_CTL_SMILEYS |
+	    OPT_GEN_CTL_CHARS;
 
-        display_options =
-                OPT_DISP_SHOW_IDLETIME |
-                OPT_DISP_SHOW_TIME |
-                OPT_DISP_SHOW_PIXMAPS |
-                OPT_DISP_SHOW_BUDDYTICKER |
-                OPT_DISP_SHOW_BUTTON_XPM |
-		OPT_DISP_SHOW_SMILEY |
-		OPT_DISP_COOL_LOOK |
-		OPT_DISP_CONV_BIG_ENTRY |
-		OPT_DISP_CHAT_BIG_ENTRY |
-		OPT_DISP_CONV_BUTTON_XPM | 
-		OPT_DISP_CONV_BUTTON_TEXT |
-		OPT_DISP_CHAT_BUTTON_XPM | 
-		OPT_DISP_CHAT_BUTTON_TEXT;
+	display_options =
+	    OPT_DISP_SHOW_IDLETIME |
+	    OPT_DISP_SHOW_TIME |
+	    OPT_DISP_SHOW_PIXMAPS |
+	    OPT_DISP_SHOW_BUDDYTICKER |
+	    OPT_DISP_SHOW_BUTTON_XPM |
+	    OPT_DISP_SHOW_SMILEY |
+	    OPT_DISP_COOL_LOOK |
+	    OPT_DISP_CONV_BIG_ENTRY |
+	    OPT_DISP_CONV_BUTTON_XPM |
+	    OPT_DISP_CHAT_BUTTON_TEXT;
 
-	if (!saveinfo)
-	{
+	if (!saveinfo) {
 		int i;
 		for (i = 0; i < 7; i++)
 			sound_file[i] = NULL;
-		font_options = 0; 
-        	sound_options = OPT_SOUND_LOGIN | OPT_SOUND_LOGOUT | OPT_SOUND_RECV | OPT_SOUND_SEND | OPT_SOUND_SILENT_SIGNON;
-        	report_idle = IDLE_SCREENSAVER;
-        	web_browser = BROWSER_NETSCAPE;
+		font_options = 0;
+		sound_options =
+		    OPT_SOUND_LOGIN |
+		    OPT_SOUND_LOGOUT |
+		    OPT_SOUND_RECV |
+		    OPT_SOUND_SEND |
+		    OPT_SOUND_SILENT_SIGNON;
+		report_idle = IDLE_SCREENSAVER;
+		web_browser = BROWSER_NETSCAPE;
 		auto_away = 10;
 		default_away = 0;
-        
-        	g_snprintf(web_command, sizeof(web_command), "xterm -e lynx %%s");
-        	blist_pos.width = 0;
-        	blist_pos.height = 0;
-        	blist_pos.x = 0;
-        	blist_pos.y = 0;
-        	blist_pos.xoff = 0;
-        	blist_pos.yoff = 0;
+
+		g_snprintf(web_command, sizeof(web_command), "xterm -e lynx %%s");
+		blist_pos.width = 0;
+		blist_pos.height = 0;
+		blist_pos.x = 0;
+		blist_pos.y = 0;
+		blist_pos.xoff = 0;
+		blist_pos.yoff = 0;
 	}
 }
 
@@ -810,33 +790,33 @@
 	char buf[1024];
 	int ver = 0;
 
-        if (getenv("HOME")) {
-                g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME"));
-		if ((f = fopen(buf,"r"))) {
+	if (getenv("HOME")) {
+		g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME"));
+		if ((f = fopen(buf, "r"))) {
 			fgets(buf, sizeof(buf), f);
 			sscanf(buf, "# .gaimrc v%d", &ver);
-			if ( (ver <= 1) || (buf[0] != '#')) {
-                                fclose(f);
+			if ((ver <= 1) || (buf[0] != '#')) {
+				fclose(f);
 				set_defaults(FALSE);
 				save_prefs();
 				load_prefs();
-                                return;
+				return;
 			}
-			
-			while(!feof(f)) {
-				switch(gaimrc_parse_tag(f)) {
+
+			while (!feof(f)) {
+				switch (gaimrc_parse_tag(f)) {
 				case -1:
-					/* Let the loop end, EOF*/
+					/* Let the loop end, EOF */
 					break;
 				case 0:
 					gaimrc_read_users(f);
 					break;
 				case 1:
 					gaimrc_read_options(f);
-                                        break;
-                                case 2:
-                                        gaimrc_read_away(f);
-                                        break;
+					break;
+				case 2:
+					gaimrc_read_away(f);
+					break;
 #ifdef GAIM_PLUGINS
 				case 3:
 					gaimrc_read_plugins(f);
@@ -860,7 +840,7 @@
 		}
 	}
 
-	if ( (ver == 2) || (buf[0] != '#')) {
+	if ((ver == 2) || (buf[0] != '#')) {
 		set_defaults(TRUE);
 	}
 }
@@ -872,7 +852,7 @@
 
 	if (getenv("HOME")) {
 		g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME"));
-		if ((f = fopen(buf,"w"))) {
+		if ((f = fopen(buf, "w"))) {
 			fprintf(f, "# .gaimrc v%d\n", 4);
 			gaimrc_write_users(f);
 			gaimrc_write_options(f);
@@ -897,12 +877,12 @@
 
 gint sort_awaymsg_list(gconstpointer a, gconstpointer b)
 {
-	  struct away_message *msg_a;
-	  struct away_message *msg_b;
-	
-	  msg_a = (struct away_message *)a;
-	  msg_b = (struct away_message *)b;
-	
-	  return (strcmp(msg_a->name, msg_b->name));
-	
+	struct away_message *msg_a;
+	struct away_message *msg_b;
+
+	msg_a = (struct away_message *)a;
+	msg_b = (struct away_message *)b;
+
+	return (strcmp(msg_a->name, msg_b->name));
+
 }