diff options
author | 1989-04-26 11:46:33 +0000 | |
---|---|---|
committer | 1989-04-26 11:46:33 +0000 | |
commit | 45b1ef37bd89eed9206d510beace5b2dce7ad520 (patch) | |
tree | acc2f19fe66afbdbde5adcdefb5a1f5d5a46ef8a | |
parent | 626430c054eaa3bc43bd8e8328acfba0432bc2c9 (diff) |
#ifdef X11 changes
-rw-r--r-- | lib/ZLocations.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ZLocations.c b/lib/ZLocations.c index 30590ec..197d2a7 100644 --- a/lib/ZLocations.c +++ b/lib/ZLocations.c @@ -62,7 +62,10 @@ Z_SendLocation(class, opcode, auth, format) long ourtime; ZNotice_t notice, retnotice; char *bptr[3]; - char *display, *ttyp; +#ifdef X11 + char *display; +#endif /* X11 */ + char *ttyp; struct hostent *hent; short wg_port = ZGetWGPort(); int gotone = 0; @@ -96,10 +99,12 @@ Z_SendLocation(class, opcode, auth, format) else (void) strcpy(host, hent->h_name); bptr[0] = host; +#ifdef X11 if ((display = getenv("DISPLAY")) && *display) { (void) strcpy(mytty, display); bptr[2] = mytty; } else { +#endif /* X11 */ ttyp = ttyname(0); bptr[2] = rindex(ttyp, '/'); if (bptr[2]) @@ -107,7 +112,9 @@ Z_SendLocation(class, opcode, auth, format) else bptr[2] = ttyp; (void) strcpy(mytty, bptr[2]); +#ifdef X11 } +#endif /* X11 */ reenter = 1; } else { bptr[0] = host; |