comparison src/protocols/zephyr/ZLocations.c @ 10326:72f671a4e153

[gaim-migrate @ 11533] a Zephyr fix from Erik Lee. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 07 Dec 2004 23:25:15 +0000
parents 43d6c08d7e96
children 0e9be9a1d68d
comparison
equal deleted inserted replaced
10325:1657438d537b 10326:72f671a4e153
3 * ZFlushMyLocations functions. 3 * ZFlushMyLocations functions.
4 * 4 *
5 * Created by: Robert French 5 * Created by: Robert French
6 * 6 *
7 * $Source$ 7 * $Source$
8 * $Author: chipx86 $ 8 * $Author: seanegan $
9 * 9 *
10 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology. 10 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.
11 * For copying and distribution information, see the file 11 * For copying and distribution information, see the file
12 * "mit-copyright.h". 12 * "mit-copyright.h".
13 */ 13 */
89 (void) strncpy(host, hent->h_name, sizeof(host)); 89 (void) strncpy(host, hent->h_name, sizeof(host));
90 host[sizeof(host) - 1] = '\0'; 90 host[sizeof(host) - 1] = '\0';
91 } 91 }
92 #ifndef X_DISPLAY_MISSING 92 #ifndef X_DISPLAY_MISSING
93 if ((display = getenv("DISPLAY")) && *display) { 93 if ((display = getenv("DISPLAY")) && *display) {
94 (void) strcpy(mytty, display); 94 (void) strncpy(mytty, sizeof(mytty), display);
95 mytty[sizeof(mytty)-1] = '\0';
95 } else { 96 } else {
96 #endif 97 #endif
97 ttyp = ttyname(0); 98 ttyp = ttyname(0);
98 if (ttyp && *ttyp) { 99 if (ttyp && *ttyp) {
99 p = strchr(ttyp + 1, '/'); 100 p = strchr(ttyp + 1, '/');