Mercurial > pidgin.yaz
diff src/gaimrc.c @ 1051:713b0e14e0a9
[gaim-migrate @ 1061]
user_info only in aim_user (saves 2k per connection); mem leak fixes in dialogs.c and multi.c; and proto_opt in aim_user (so prpls can have their own saved information per user). no way to draw protocol option selection window thingy yet, so prpls will either have to do that on their own or something. i don't know. we'll figure it out.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 02 Nov 2000 22:29:51 +0000 |
parents | ece2d1543b20 |
children | d50d3abb9eb7 |
line wrap: on
line diff
--- a/src/gaimrc.c Thu Nov 02 00:25:58 2000 +0000 +++ b/src/gaimrc.c Thu Nov 02 22:29:51 2000 +0000 @@ -428,6 +428,7 @@ { struct parse *p; struct aim_user *u; + int i; char buf[4096]; if (!fgets(buf, sizeof(buf), f)) @@ -482,6 +483,20 @@ u->options = atoi(p->value[0]); u->protocol = atoi(p->value[1]); + if (!fgets(buf, sizeof(buf), f)) + return u; + + if (!strcmp(buf, "\t}")) + return u; + + p = parse_line(buf); + + if (strcmp(p->option, "proto_opts")) + return u; + + for (i = 0; i < 6; i++) + g_snprintf(u->proto_opt[i], sizeof u->proto_opt[i], "%s", p->value[i]); + return u; } @@ -489,7 +504,7 @@ static void gaimrc_write_user(FILE *f, struct aim_user *u) { char *c; - int nl = 1;; + int nl = 1, i; if (u->options & OPT_USR_REM_PASS) fprintf(f, "\t\tident { %s } { %s }\n", u->username, u->password); else @@ -513,7 +528,10 @@ } fprintf(f, "\n\t\t}\n"); fprintf(f, "\t\tuser_opts { %d } { %d }\n", u->options, u->protocol); - + fprintf(f, "\t\tproto_opts"); + for (i = 0; i < 6; i++) + fprintf(f, " { %s }", u->proto_opt[i]); + fprintf(f, "\n"); }