comparison src/protocols/msn/slplink.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 bcfea6c3d5c9
children f52ab405f1ab
comparison
equal deleted inserted replaced
10588:529111933c9c 10589:0f7452b1f777
44 gsize pload_size; 44 gsize pload_size;
45 45
46 dir = send ? "send" : "recv"; 46 dir = send ? "send" : "recv";
47 c = send ? m_sc++ : m_rc++; 47 c = send ? m_sc++ : m_rc++;
48 tmp = g_strdup_printf("%s/msntest/%s/%03d", g_get_home_dir(), dir, c); 48 tmp = g_strdup_printf("%s/msntest/%s/%03d", g_get_home_dir(), dir, c);
49 tf = fopen(tmp, "wb"); 49 tf = g_fopen(tmp, "wb");
50 pload = msn_message_gen_payload(msg, &pload_size); 50 pload = msn_message_gen_payload(msg, &pload_size);
51 fwrite(pload, 1, pload_size, tf); 51 fwrite(pload, 1, pload_size, tf);
52 fclose(tf); 52 fclose(tf);
53 g_free(tmp); 53 g_free(tmp);
54 } 54 }
500 xfer = slpmsg->slpcall->xfer; 500 xfer = slpmsg->slpcall->xfer;
501 501
502 if (xfer != NULL) 502 if (xfer != NULL)
503 { 503 {
504 slpmsg->fp = 504 slpmsg->fp =
505 fopen(gaim_xfer_get_local_filename(slpmsg->slpcall->xfer), 505 g_fopen(gaim_xfer_get_local_filename(slpmsg->slpcall->xfer),
506 "wb"); 506 "wb");
507 } 507 }
508 } 508 }
509 } 509 }
510 } 510 }
634 gunichar2 *uni = NULL; 634 gunichar2 *uni = NULL;
635 glong currentChar = 0; 635 glong currentChar = 0;
636 glong uni_len = 0; 636 glong uni_len = 0;
637 gsize len; 637 gsize len;
638 638
639 if (stat(file_path, &st) == 0) 639 if (g_stat(file_path, &st) == 0)
640 size = st.st_size; 640 size = st.st_size;
641 641
642 if(!file_name) { 642 if(!file_name) {
643 u8 = gaim_utf8_try_convert(g_basename(file_path)); 643 u8 = gaim_utf8_try_convert(g_basename(file_path));
644 file_name = u8; 644 file_name = u8;