# HG changeset patch # User Eric Warmenhoven # Date 976800178 0 # Node ID 9cff8ff01d37416278f8363ee9dc85880a5df838 # Parent aac04affc65d2db22121c4f7ec38601d4ccb5463 [gaim-migrate @ 1277] WHAT THE FUCK. Why do people use goto? It pisses me off. To no end. Let me say right now, if anyone submits a patch that has a goto in it, they'll probably be very ridiculed, possibly publicly, before i put them on my block list and refuse to accept any patches from them. Ever. Even if they don't have gotos in them. You can't excuse a goto. Ever. X-Chat has them all over. Read src/common/inbound.c. It made me do no fewer than three full-body shivers. Oh yeah, and i moved blist files from %s.blist to %d.blist. gaim will take care of moving it for you. committer: Tailor Script diff -r aac04affc65d -r 9cff8ff01d37 src/browser.c --- a/src/browser.c Thu Dec 14 12:26:56 2000 +0000 +++ b/src/browser.c Thu Dec 14 13:22:58 2000 +0000 @@ -398,7 +398,7 @@ /* Print to warn user... */ debug_printf("%s: window 0x%x was destroyed.\n", progname, (unsigned int)window); result = 6; - goto DONE; + done = True; } else if (event->type == GDK_PROPERTY_NOTIFY && event->property.state == GDK_PROPERTY_NEW_VALUE && event->property.window == window && @@ -471,8 +471,6 @@ gdk_event_free(event); } - DONE: - if (new_command) g_free(new_command); diff -r aac04affc65d -r 9cff8ff01d37 src/dialogs.c --- a/src/dialogs.c Thu Dec 14 12:26:56 2000 +0000 +++ b/src/dialogs.c Thu Dec 14 13:22:58 2000 +0000 @@ -2767,12 +2767,21 @@ file = gaim_user_dir(); if ( file != (char *) NULL ) { - sprintf(path, "%s/%s.blist", file, g_screenname); + g_snprintf(path, sizeof path, "%s/%s.%d.blist", file, g_screenname, gc->protocol); if ( !stat(path, &sbuf) ) { debug_printf("%s exists.\n", path); ret = TRUE; } else { + char path2[PATHSIZE]; debug_printf("%s does not exist.\n", path); + g_snprintf(path2, sizeof path2, "%s/%s.blist", file, g_screenname); + if (!stat(path2, &sbuf)) { + debug_printf("%s exists, moving to %s\n", path2, path); + if (rename(path2, path)) + debug_printf("rename didn't work!\n"); + else + ret = TRUE; + } } g_free(file); } @@ -2830,7 +2839,7 @@ for (i = 0; i < strlen(g->username); i++) g_screenname[i] = toupper(g->username[i]); g_screenname[i] = '\0'; - sprintf(path, "%s/%s.blist", file, g_screenname); + sprintf(path, "%s/%s.%d.blist", file, g_screenname, g->protocol); if ((f = fopen(path,"w"))) { debug_printf("writing %s\n", path); toc_build_config(g, buf, 8192 - 1, TRUE); @@ -2907,15 +2916,14 @@ /* FIXME : import buddy list file. moderately important */ gc = connections->data; from_dialog = TRUE; - } - else { + } else { for (i = 0; i < strlen(gc->username); i++) g_screenname[i] = toupper(gc->username[i]); g_screenname[i] = '\0'; file = gaim_user_dir(); if ( file != (char *) NULL ) { - sprintf( path, "%s/%s.blist", file, g_screenname); + sprintf( path, "%s/%s.%d.blist", file, g_screenname, gc->protocol); g_free(file); } else { return;