| 53 char *format; |
55 char *format; |
| 54 { |
56 { |
| 55 int retval; |
57 int retval; |
| 56 time_t ourtime; |
58 time_t ourtime; |
| 57 ZNotice_t notice, retnotice; |
59 ZNotice_t notice, retnotice; |
| 58 char *bptr[3], *p; |
60 char *bptr[3]; |
| 59 #ifndef X_DISPLAY_MISSING |
61 #ifndef X_DISPLAY_MISSING |
| 60 char *display; |
62 char *display; |
| 61 #endif |
63 #endif |
| |
64 #ifndef WIN32 |
| 62 char *ttyp; |
65 char *ttyp; |
| |
66 char *p; |
| |
67 #endif |
| 63 struct hostent *hent; |
68 struct hostent *hent; |
| 64 short wg_port = ZGetWGPort(); |
69 short wg_port = ZGetWGPort(); |
| 65 |
70 |
| 66 (void) memset((char *)¬ice, 0, sizeof(notice)); |
71 (void) memset((char *)¬ice, 0, sizeof(notice)); |
| 67 notice.z_kind = ACKED; |
72 notice.z_kind = ACKED; |
| 93 if ((display = getenv("DISPLAY")) && *display) { |
98 if ((display = getenv("DISPLAY")) && *display) { |
| 94 (void) strncpy(mytty, display, sizeof(mytty)); |
99 (void) strncpy(mytty, display, sizeof(mytty)); |
| 95 mytty[sizeof(mytty)-1] = '\0'; |
100 mytty[sizeof(mytty)-1] = '\0'; |
| 96 } else { |
101 } else { |
| 97 #endif |
102 #endif |
| |
103 #ifdef WIN32 |
| |
104 strcpy(mytty,"WinGaim"); |
| |
105 #else |
| 98 ttyp = ttyname(0); |
106 ttyp = ttyname(0); |
| 99 if (ttyp && *ttyp) { |
107 if (ttyp && *ttyp) { |
| 100 p = strchr(ttyp + 1, '/'); |
108 p = strchr(ttyp + 1, '/'); |
| 101 strcpy(mytty, (p) ? p + 1 : ttyp); |
109 strcpy(mytty, (p) ? p + 1 : ttyp); |
| 102 } else { |
110 } else { |
| 103 strcpy(mytty, "unknown"); |
111 strcpy(mytty, "unknown"); |
| 104 } |
112 } |
| |
113 #endif |
| 105 #ifndef X_DISPLAY_MISSING |
114 #ifndef X_DISPLAY_MISSING |
| 106 } |
115 } |
| 107 #endif |
116 #endif |
| 108 reenter = 1; |
117 reenter = 1; |
| 109 } |
118 } |