]> git.pond.sub.org Git - empserver/commitdiff
Windows cleanup: include proper headers, remove unused variables, fix
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 16 Feb 2004 17:44:38 +0000 (17:44 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 16 Feb 2004 17:44:38 +0000 (17:44 +0000)
type of signal handler.  Mostly from Ron Koenderink.

src/client/host.c
src/client/main.c
src/client/servcmd.c
src/client/serverio.c
src/client/termio.c
src/client/termlib.c

index 00c91cebb054564ec7bfe296d9e573855819b229..6900a937d20538cf4fc41557e9009319153cd57c 100644 (file)
@@ -43,6 +43,7 @@
 #include <netdb.h>
 #include <unistd.h>
 #else
+#include <io.h>
 #include <winsock.h>
 #endif
 #include <ctype.h>
index 72a991772d5b7084dbb5dc8e06e0274b61120af0..5da18dc19313213619462373c8a93e19ce5c1a5b 100644 (file)
@@ -60,6 +60,7 @@
 #include <windows.h>
 #include <winsock.h>
 #include <conio.h>
+#include <io.h>
 #endif
 
 #ifdef _WIN32
@@ -85,6 +86,8 @@ int serverio();
 void servercmd();
 void ioq_drain();
 
+static void intr(int sig);
+
 
 int
 main(ac, av)
@@ -96,16 +99,12 @@ s_char *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;
@@ -113,8 +112,8 @@ s_char *av[];
     s_char *auxout_fname;
     FILE *auxout_fp;
 #ifndef _WIN32
+    fd_set savemask;
     struct passwd *pwd;
-    void intr();
 #endif
     struct sockaddr_in sin;
     int n;
@@ -302,12 +301,8 @@ s_char *av[];
     return 0;                  /* Shut the compiler up */
 }
 
-void
-#ifdef _WIN32
-intr(void)
-#else
-intr()
-#endif
+static void
+intr(int sig)
 {
     interrupt++;
 #ifdef hpux
index 3bc04c56d9496921634a71020a55f1d1be988be1..60cbb1664ed2e7c85c78e758257609d3c531427d 100644 (file)
@@ -44,6 +44,8 @@
 #include <fcntl.h>
 #if !defined(_WIN32)
 #include <unistd.h>
+#else
+#include <io.h>
 #endif
 
 extern s_char *gettag();
index 29b79b8ed066fce206d9616621a9e79923af7a94..57d69936487d5a822bbd623b2d4a196f78f82d42 100644 (file)
@@ -44,6 +44,7 @@
 
 #ifdef _WIN32
 #include <winsock.h>
+#include <io.h>
 #endif
 
 void ioq_write();
index 1076070677e93bbeb1777895492ab36484615e2a..a5646c0ea90f5c0ef2acb9983784eb0616f3c1b5 100644 (file)
@@ -46,6 +46,7 @@
 #include <sgtty.h>
 #else
 #include <winsock.h>
+#include <io.h>
 #endif /* _WIN32 */
 #endif
 #include "misc.h"
index 86ff0c37084925b1b5ff60930cfde7aa7bda4b60..f5083feadf1772c802a4ef827c8cd73fb6e18611 100644 (file)
@@ -68,13 +68,11 @@ getsose()
 {
 #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) {