comparison src/protocols/zephyr/zephyr.c @ 10589:0f7452b1f777

[gaim-migrate @ 11994] Use GLib 2.6's gstdio functions. This should fix gaim not liking non-ascii filenames in win32. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 11 Feb 2005 05:10:40 +0000
parents 3e4ecbdf8d0a
children 5c6326fe4190
comparison
equal deleted inserted replaced
10588:529111933c9c 10589:0f7452b1f777
1325 FILE *f; 1325 FILE *f;
1326 gchar *fname; 1326 gchar *fname;
1327 gchar buff[BUFSIZ]; 1327 gchar buff[BUFSIZ];
1328 1328
1329 fname = g_strdup_printf("%s/.zephyr.subs", gaim_home_dir()); 1329 fname = g_strdup_printf("%s/.zephyr.subs", gaim_home_dir());
1330 f = fopen(fname, "r"); 1330 f = g_fopen(fname, "r");
1331 if (f) { 1331 if (f) {
1332 char **triple; 1332 char **triple;
1333 char *recip; 1333 char *recip;
1334 char *z_class; 1334 char *z_class;
1335 char *z_instance; 1335 char *z_instance;
1421 g = gaim_group_new(_("Anyone")); 1421 g = gaim_group_new(_("Anyone"));
1422 gaim_blist_add_group(g, NULL); 1422 gaim_blist_add_group(g, NULL);
1423 } 1423 }
1424 1424
1425 filename = g_strconcat(gaim_home_dir(), "/.anyone", NULL); 1425 filename = g_strconcat(gaim_home_dir(), "/.anyone", NULL);
1426 if ((fd = fopen(filename, "r")) != NULL) { 1426 if ((fd = g_fopen(filename, "r")) != NULL) {
1427 while (fgets(buff, BUFSIZ, fd)) { 1427 while (fgets(buff, BUFSIZ, fd)) {
1428 strip_comments(buff); 1428 strip_comments(buff);
1429 if (buff[0]) { 1429 if (buff[0]) {
1430 if (!(b = gaim_find_buddy(gc->account, buff))) { 1430 if (!(b = gaim_find_buddy(gc->account, buff))) {
1431 char *stripped_user = zephyr_strip_local_realm(gc->proto_data,buff); 1431 char *stripped_user = zephyr_strip_local_realm(gc->proto_data,buff);
1775 char *fname; 1775 char *fname;
1776 1776
1777 char **triple; 1777 char **triple;
1778 1778
1779 fname = g_strdup_printf("%s/.zephyr.subs", gaim_home_dir()); 1779 fname = g_strdup_printf("%s/.zephyr.subs", gaim_home_dir());
1780 fd = fopen(fname, "w"); 1780 fd = g_fopen(fname, "w");
1781 1781
1782 if (!fd) { 1782 if (!fd) {
1783 g_free(fname); 1783 g_free(fname);
1784 return; 1784 return;
1785 } 1785 }
1837 GaimBuddy *b; 1837 GaimBuddy *b;
1838 char *fname; 1838 char *fname;
1839 FILE *fd; 1839 FILE *fd;
1840 zephyr_account* zephyr = gc->proto_data; 1840 zephyr_account* zephyr = gc->proto_data;
1841 fname = g_strdup_printf("%s/.anyone", gaim_home_dir()); 1841 fname = g_strdup_printf("%s/.anyone", gaim_home_dir());
1842 fd = fopen(fname, "w"); 1842 fd = g_fopen(fname, "w");
1843 if (!fd) { 1843 if (!fd) {
1844 g_free(fname); 1844 g_free(fname);
1845 return; 1845 return;
1846 } 1846 }
1847 1847