comparison libpurple/protocols/zephyr/ZGetWGPort.c @ 31534:a8cc50c2279f

Remove trailing whitespace
author Richard Laager <rlaager@wiktel.com>
date Tue, 04 Jan 2011 06:55:30 +0000
parents 5fe8042783c1
children
comparison
equal deleted inserted replaced
31533:44f53d3fc54f 31534:a8cc50c2279f
3 * 3 *
4 * Created by: Robert French 4 * Created by: Robert French
5 * 5 *
6 * Copyright (c) 1987 by the Massachusetts Institute of Technology. 6 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, see the file 7 * For copying and distribution information, see the file
8 * "mit-copyright.h". 8 * "mit-copyright.h".
9 */ 9 */
10 10
11 #include "internal.h" 11 #include "internal.h"
12 12
13 int ZGetWGPort() 13 int ZGetWGPort()
16 FILE *fp; 16 FILE *fp;
17 int wgport; 17 int wgport;
18 #ifdef WIN32 18 #ifdef WIN32
19 long int buffsize= 128; 19 long int buffsize= 128;
20 char tempdir[buffsize]; 20 char tempdir[buffsize];
21 #endif 21 #endif
22 envptr = getenv("WGFILE"); 22 envptr = getenv("WGFILE");
23 if (!envptr) { 23 if (!envptr) {
24 #ifdef WIN32 24 #ifdef WIN32
25 GetTempPath(buffsize,tempdir); 25 GetTempPath(buffsize,tempdir);
26 GetTempFileName(tempdir,"wg.",0,name); 26 GetTempFileName(tempdir,"wg.",0,name);
27 #else 27 #else
28 (void) sprintf(name, "/tmp/wg.%d", getuid()); 28 (void) sprintf(name, "/tmp/wg.%d", getuid());
29 #endif 29 #endif
30 envptr = name; 30 envptr = name;
31 } 31 }
32 if (!(fp = fopen(envptr, "r"))) 32 if (!(fp = 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)