type of signal handler. Mostly from Ron Koenderink.
#include <netdb.h>
#include <unistd.h>
#else
+#include <io.h>
#include <winsock.h>
#endif
#include <ctype.h>
#include <windows.h>
#include <winsock.h>
#include <conio.h>
+#include <io.h>
#endif
#ifdef _WIN32
void servercmd();
void ioq_drain();
+static void intr(int sig);
+
int
main(ac, av)
int err;
fd_set readfds;
struct timeval tm;
- INPUT_RECORD InpBuffer[10];
- DWORD numevents;
DWORD stdinmode;
SECURITY_ATTRIBUTES security;
- void intr(void);
#endif
extern s_char empireport[];
extern s_char empirehost[];
fd_set mask;
- fd_set savemask;
struct ioqueue server;
s_char *argv[128];
int i, j;
s_char *auxout_fname;
FILE *auxout_fp;
#ifndef _WIN32
+ fd_set savemask;
struct passwd *pwd;
- void intr();
#endif
struct sockaddr_in sin;
int n;
return 0; /* Shut the compiler up */
}
-void
-#ifdef _WIN32
-intr(void)
-#else
-intr()
-#endif
+static void
+intr(int sig)
{
interrupt++;
#ifdef hpux
#include <fcntl.h>
#if !defined(_WIN32)
#include <unistd.h>
+#else
+#include <io.h>
#endif
extern s_char *gettag();
#ifdef _WIN32
#include <winsock.h>
+#include <io.h>
#endif
void ioq_write();
#include <sgtty.h>
#else
#include <winsock.h>
+#include <io.h>
#endif /* _WIN32 */
#endif
#include "misc.h"
{
#ifndef _WIN32
extern s_char *tgetstr();
-#endif
- static s_char tbuf[1024];
- static s_char cbuf[20];
s_char *cp;
s_char *term;
+ static s_char tbuf[1024];
+ static s_char cbuf[20];
-#ifndef _WIN32
memset((s_char *)&cbuf[0], 0, 20);
term = getenv("TERM");
if (term == 0) {