comparison src/dialogs.c @ 1399:51620cc6ec4b

[gaim-migrate @ 1409] switched the arguments for fread and had it read twice as much committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 10 Jan 2001 02:54:05 +0000
parents d2799e0672ee
children 00b3d02a2168
comparison
equal deleted inserted replaced
1398:f6b0cf1f4c3b 1399:51620cc6ec4b
2917 /* if gc is non-NULL, then import from ~/.gaim/gc->username.blist, else let user 2917 /* if gc is non-NULL, then import from ~/.gaim/gc->username.blist, else let user
2918 choose */ 2918 choose */
2919 2919
2920 void do_import(GtkWidget *w, struct gaim_connection *gc) 2920 void do_import(GtkWidget *w, struct gaim_connection *gc)
2921 { 2921 {
2922 char *buf = g_malloc(BUF_LONG); 2922 char *buf = g_malloc(BUF_LONG * 2);
2923 char *buf2; 2923 char *buf2;
2924 char *first = g_malloc(64); 2924 char *first = g_malloc(64);
2925 char *file; 2925 char *file;
2926 char path[PATHSIZE]; 2926 char path[PATHSIZE];
2927 char *g_screenname; 2927 char *g_screenname;
2928 int i; 2928 int i;
2929 int len;
2929 FILE *f; 2930 FILE *f;
2930 gboolean from_dialog = FALSE; 2931 gboolean from_dialog = FALSE;
2931 2932
2932 if ( !gc ) { 2933 if ( !gc ) {
2933 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(importdialog)); 2934 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(importdialog));
2991 g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2); 2992 g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2);
2992 g_free(buf2); 2993 g_free(buf2);
2993 /* GAIM buddy list - no translation */ 2994 /* GAIM buddy list - no translation */
2994 } else if (first[0] == 'm') { 2995 } else if (first[0] == 'm') {
2995 rewind(f); 2996 rewind(f);
2996 fread(buf, BUF_LONG, 1, f); 2997 len = fread(buf, 1, BUF_LONG * 2, f);
2998 buf[len] = '\0';
2997 buf2 = buf; 2999 buf2 = buf;
2998 buf = g_malloc(8193); 3000 buf = g_malloc(8193);
2999 g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2); 3001 g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2);
3000 g_free(buf2); 3002 g_free(buf2);
3001 /* Something else */ 3003 /* Something else */