comparison src/protocols/zephyr/ZGetWGPort.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 43d6c08d7e96
children d72fffd1b1ad
comparison
equal deleted inserted replaced
10588:529111933c9c 10589:0f7452b1f777
2 * It contains source for the ZGetWGPort function. 2 * It contains source for the ZGetWGPort function.
3 * 3 *
4 * Created by: Robert French 4 * Created by: Robert French
5 * 5 *
6 * $Source$ 6 * $Source$
7 * $Author: chipx86 $ 7 * $Author: datallah $
8 * 8 *
9 * Copyright (c) 1987 by the Massachusetts Institute of Technology. 9 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
10 * For copying and distribution information, see the file 10 * For copying and distribution information, see the file
11 * "mit-copyright.h". 11 * "mit-copyright.h".
12 */ 12 */
27 envptr = getenv("WGFILE"); 27 envptr = getenv("WGFILE");
28 if (!envptr) { 28 if (!envptr) {
29 (void) sprintf(name, "/tmp/wg.%d", getuid()); 29 (void) sprintf(name, "/tmp/wg.%d", getuid());
30 envptr = name; 30 envptr = name;
31 } 31 }
32 if (!(fp = fopen(envptr, "r"))) 32 if (!(fp = g_fopen(envptr, "r")))
33 return (-1); 33 return (-1);
34 34
35 /* if fscanf fails, return -1 via wgport */ 35 /* if fscanf fails, return -1 via wgport */
36 if (fscanf(fp, "%d", &wgport) != 1) 36 if (fscanf(fp, "%d", &wgport) != 1)
37 wgport = -1; 37 wgport = -1;