src/dialogs.c

changeset 231
226935a5dd1b
parent 230
5afbb3468f11
child 234
100138758e8d
equal deleted inserted replaced
230:5afbb3468f11 231:226935a5dd1b
2054 sprintf( path, "%s/.gaimbdcache_%s", file, g_screenname ); 2054 sprintf( path, "%s/.gaimbdcache_%s", file, g_screenname );
2055 else 2055 else
2056 return; 2056 return;
2057 } 2057 }
2058 if ((f = fopen(path,"w"))) { 2058 if ((f = fopen(path,"w"))) {
2059 toc_build_config(buf, 1024 - 1); 2059 toc_build_config(buf, 8192 - 1);
2060 fprintf(f, "%s\n", buf); 2060 fprintf(f, "%s\n", buf);
2061 fclose(f); 2061 fclose(f);
2062 chmod(buf, S_IRUSR | S_IWUSR); 2062 chmod(buf, S_IRUSR | S_IWUSR);
2063 } else if ( show_dialog == 1 ) { 2063 } else if ( show_dialog == 1 ) {
2064 g_snprintf(buf, BUF_LONG / 2, "Error writing file %s", file); 2064 g_snprintf(buf, BUF_LONG / 2, "Error writing file %s", file);
2153 g_free(first); 2153 g_free(first);
2154 fclose( f ); 2154 fclose( f );
2155 return; 2155 return;
2156 } else if (buf[0] == 'm') { 2156 } else if (buf[0] == 'm') {
2157 buf2 = buf; 2157 buf2 = buf;
2158 buf = g_malloc(1025); 2158 buf = g_malloc(8193);
2159 g_snprintf(buf, 1024, "toc_set_config {%s}\n", buf2); 2159 g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2);
2160 g_free(buf2); 2160 g_free(buf2);
2161 } 2161 }
2162 2162
2163 2163
2164 fseek(f, 0, SEEK_SET); 2164 fseek(f, 0, SEEK_SET);

mercurial