diff -rN -u old-netrek-client-cow/config.h.in new-netrek-client-cow/config.h.in
--- old-netrek-client-cow/config.h.in	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/config.h.in	2008-07-31 17:47:05.000000000 +1000
@@ -347,16 +347,11 @@
 #define INC_SYS_FCNTL   NULLFILE
 #endif
 
-#ifndef VMS
 #ifdef HAVE_FCNTL_H
 #define INC_FCNTL       <fcntl.h>
 #else
 #define INC_FCNTL       NULLFILE
 #endif
-#else
-#define INC_FCNTL 	<file.h>
-#endif
-
 
 /* Some systems don't include <sys/time.h> in <time.h>  */
 #if defined(TM_IN_SYS_TIME) || defined(NEED_SYS_TIME_H)
@@ -485,16 +480,6 @@
 #endif
 #endif
 
-#ifdef VMS
-#define  R_OK  04
-typedef unsigned short int ushort;
-#define Sin sinetable
-#define Cos cosinetable
-#define strncasecmp strncmp
-#include <socket.h>    /* for struct timeval */
-#include "vmsutils.h"  /* for typedef fd_set & FD_ macros */
-#endif
-
 /*
    Some systems, most notably SunOS 4.1.3, don't include function definitions
    in the libraries.  This results in some warning we don't want.
diff -rN -u old-netrek-client-cow/config.h.vms new-netrek-client-cow/config.h.vms
--- old-netrek-client-cow/config.h.vms	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/config.h.vms	1970-01-01 10:00:00.000000000 +1000
@@ -1,781 +0,0 @@
-/*
-        Netrek Configuration file       -              by Kurt Siegl
-*/
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/* 
-################################################################################
-        Type of code (select in configure.in)    
-################################################################################
-*/
-
-#define COW
-#undef SERVER
-
-/* 
-################################################################################
-        All The fun defines      
-################################################################################
-*/
-
-/*
-   Defines
-      Some possible values:
-   NOTE: Only NON-system specific defines belong here
-*/
-
-/* 
-   ------------------------------------------------------------
-                Common defines
-   ------------------------------------------------------------
-*/
-
-
-/*      RSA                     - New RSA reserved packets stuff                */
-/* #define RSA                  - Defined in the Makefile                       */
-
-#define RCD                     /* RCD             - Support Reciever variable
-                                                     distresses */
-
-                                /* PING            - Ping statistics */
-#define PING
-
-                                /* SHORT_PACKETS   - Reduce Network load */
-#define SHORT_PACKETS
-
-                                /* SPEEDUP         - Misc improvements to make
-                                                     the code faster */
-#define SPEEDUP
-
-                                /* FEATURE_PACKETS - feature packets */
-#define FEATURE_PACKETS
-
-                                /* DEBUG           - Various useful debugging 
-                                                     stuff.  No signal trap */
-/*#undef  DEBUG*/
-
-/* 
-   ------------------------------------------------------------
-                COW only defines
-   ------------------------------------------------------------
-*/
-#ifdef COW
-
-/*      THREADED                - Multi-threaded input handling                 */
-#undef THREADED
-
-/*      NBT                     - Nick trown's macro code                       */
-#define NBT
-
-/*      MAXPLAYER               - Maximal number of players + observers         */
-#define MAXPLAYER 36
-
-/*      CORRUPTED_PACKETS       - prevents some seg faults but verbose output   */
-#define CORRUPTED_PACKETS
-
-/*      EXPIRE=#                - number of days this version will work for     */
-/*#define EXPIRE 365*/
-
-/*      ARMY_SLIDER             - some sort of funky status window thing        */
-#define ARMY_SLIDER
-
-/*      META                    - show active servers via metaserver - NBT      */
-#define META
-
-/*      PACKET_LOG              - log packets to stdout (for bandwith measurement) */
-#define PACKET_LOG
-
-/*      NEWMACRO                - newmacro language                             */
-#define NEWMACRO 
-
-/*      SMARTMACRO              - macro extension (needs NEWMACRO)              */
-#define SMARTMACRO
-
-/*      MULTILINE_MACROS        - enables multiline macros                      */
-#define MULTILINE_MACROS
-
-/*      XTREKRC_HELP            - Hadley's xtrekrc window (stolden by KP)       */
-#define XTREKRC_HELP
-
-/*      TOOLS                   - Various tools, like shell escape, ...         */
-#define TOOLS
-
-/*      SOUND                   - support of external sound players             */
-#undef SOUND
-
-/*      HOCKEY_LINES            - allow showing of hockey lines                 */
-#define HOCKEY_LINES
-
-/*      SMALL_SCREEN            - for 800x600 resolution screens                */
-/* #define SMALL_SCREEN */
-
-/*      BEEPLITE                - player and planets highlighting               */
-#define BEEPLITE
-
-/*      VSHIELD_BITMAPS         - damage dependent shields (hull)               */
-#define VSHIELD_BITMAPS
-#define VARY_HULL 
-
-/*      WARP_DEAD               - Use death detection
-*/
-#undef  WARP_DEAD
-
-/*    RCM                       - Receiver configurable Server messages         */
-#define RCM
-
-/*      RACE_COLORS             - additional bitplane for race colors           */
-#define RACE_COLORS
-
-
-#define PLIST1 
-#define PLIST 
-#define CONTROL_KEY
-#define BRMH 
-#define DOC_WIN
-#define RABBIT_EARS 
-#define ROTATERACE
-
-/* client options */
-#undef IGNORE_SIGNALS_SEGV_BUS
-#define NEW_DASHBOARD_2
-#define MOUSE_AS_SHIFT
-#define SHIFTED_MOUSE
-#define TNG_FED_BITMAPS
-#define MOTION_MOUSE
-#define DIST_KEY_NAME
-#define XTRA_MESSAGE_UI
-#define PHASER_STATS
-
-#endif          /* COW */
-
-
-/* 
-   ------------------------------------------------------------
-                SERVER only defines
-   ------------------------------------------------------------
-*/
-#ifdef SERVER
-
-                                /*  AUTOMOTD       - Updates your MOTD every
-                                                     12 hours */
-#undef AUTOMOTD
-
-                                /*  CHAIN_REACTION - Don't give credit for
-                                                     chain reactions */
-#if !defined (sgi) && !defined(Solaris)
-#define CHAIN_REACTION
-#endif
-
-                                /*  CHECKMESG      - Check for god messages
-                                                     and/or log all messages */
-#define CHECKMESG
-
-                                /*  ERIKPLAGUE     - Define for Erik's
-                                                     Plagueing */
-#define ERIKPLAGUE
-
-                                /*  FEATURES       - Server/client
-                                                     communication */
-#define FEATURES
-
-                                /*  FULL_HOSTNAMES - Show entire player
-                                                     location (domain) */
-#define FULL_HOSTNAMES
-
-                                /*  INL_RESOURCES  - Use INL resources */
-#define INL_RESOURCES
-
-                                /*  INL_POP        - Use INL style planet
-                                                     popping scheme */
-#define INL_POP
-
-                                /*  NO_PLANET_PLAGUE -Define for plagueing
-                                                     (Don't use with
-                                                     ERIKPLAGUE) */
-#undef  NO_PLANET_PLAGUE
-
-                                /* NO_UNWARRING_BOMBING -No 3rd space bombing */
-#define NO_UNWARRING_BOMBING
-
-                                /* SHOW_RSA        - Display the client type
-                                                     at login */
-#define SHOW_RSA
-
-                                /* RESETGALAXY     - Reset the galaxy after
-                                                     each conquer */
-#define RESETGALAXY
-
-                                /* RESTRICT_BOMB   - No bombing out of t-mode */
-#define RESTRICT_BOMB
-
-                                /* SELF_RESET      - Galaxy will reset if the
-                                                     daemon dies */
-#define SELF_RESET
-
-                                /* SHORT_THRESHOLD - For Short Packets */
-#define SHORT_THRESHOLD
-
-                                /* SURRENDER_SHORT - Cut surrender time in
-                                                     half */
-#undef  SURRENDER_SHORT
-
-                                /* TWO_RACE        - Conquer only a 1/4 of the
-                                                     galaxy for reset */
-#define TWO_RACE
-
-                                /* SENDFLAGS       - Print flags set in MOTD */
-#undef  SENDFLAGS
-
-                                /* CHECK_ENV       - Check environment variable                                                     NTSERV_PATH for location
-                                                     of system files */
-#undef  CHECK_ENV
-
-                                /* GPPRINT         - Print which path is being
-                                                     used to find the system
-                                                     files */
-#undef  GPPRINT
-
-                                /* ONCHECK         - support for trekon player
-                                                     check */
-#define  ONCHECK
-
-                                /* NBR             - Leave in for server. It
-                                                     tells programs like xsg
-                                                     that it is this code. */
-#define NBR
-
-                                /* DS              - Daemon Sychronization -
-                                                     Tedd Hadley */
-#define DS
-
-
-                                /* NEED_EXIT       - For systems that need exit                                                     defined */
-#define NEED_EXIT
-                                /* NEWMASK         - New tournament selection
-                                                     code. Less rigid than
-                                                     older code. */
-#define NEWMASK
-
-                                /* SB_TRANSWARP    - starbase transwarp */
-#define SB_TRANSWARP
-
-                                /* FLAT_BONUS      - 3x bonus for killing last
-                                                     army on a planet */
-#undef FLAT_BONUS
-
-                                /* BASEPRACTICE    - trainingserver support */
-#define BASEPRACTICE
-
-                                /* NEW_CREDIT      - give 1 planet for
-                                                     destroying, two planets
-                                                     for taking */
-#undef NEW_CREDIT
-
-                                /* FASTER_SB_MAXUPDATES - allow 10 ups/sec for
-                                                           SB's */
-#define FASTER_SB_MAXUPDATES
-
-                                /* SBFUEL_FIX      - fix starbase re-fueling */
-#define SBFUEL_FIX
-
-                                /* NEW_ETEMP       - Wreck's etemp fix */
-#undef NEW_ETEMP
-
-                                /* DOGFIGHT        - .sysdef interface
-                                                   for dogfight robot */
-#define DOGFIGHT
-
-                                /* OBSERVERS       - allow players to watch */
-#define OBSERVERS
-
-                                /* VOTING          - allow voting mode */
-#define VOTING
-
-                                /* ALLOW_EJECT     - define to allow players to                                                     eject others*/
-#ifdef VOTING
-#undef ALLOW_EJECT
-#endif
-
-                                /* NO_BRUTALITY    - disallow fighting between
-                                                     waiting players in the
-                                                     dogfighting mode */
-#ifdef DOGFIGHT
-#define NO_BRUTALITY
-#endif
-
-                                /* AS_CLOAK        - gives cloaked AS's more
-                                                     randomness in their
-                                                     apparent positions */
-#undef AS_CLOAK
-
-                                /* GENO_COUNT      - keep track of a player's
-                                                     winning genocides */
-#undef GENO_COUNT
-
-#ifdef VOTING
-                                /* AUTO_INL        - starts up INL robot
-                                                     by majority vote   */
-#define AUTO_INL
-                                /* AUTO_PRACTICE   - starts up PRACTICE robot
-                                                     by majority vote   */
-#ifdef BASEPRACTICE
-#define AUTO_PRACTICE
-#endif
-                                /* AUTO_HOCKEY     - starts up HOCKEY robot
-                                                     by majority vote   */
-#define AUTO_HOCKEY
-                                /* AUTO_DOGFIGHT   - starts up DOGFIGHT robot
-                                                     by majority vote   */
-#ifdef DOGFIGHT
-#define AUTO_DOGFIGHT
-#endif
-
-                                /* TRIPLE_PLANET_MAYHEM - enable voting
-                                for the three planet cool server idea
-                                by felix@coop.com */
-#define TRIPLE_PLANET_MAYHEM
-#endif
-                                /* MESSAGES_ALL_TIME - allow messaging during
-                                freezes like twarp, refit, and war decl.  */
-#undef MESSAGES_ALL_TIME
-
-
-#endif          /* SERVER */
-
-
-/*
-##############################################################################
-       All system dependencies should be defined here 
-##############################################################################
-*/
-
-#define NEED_EXIT
-
-/* Automatic generated system dependend defines                         */
-
-#undef _ALL_SOURCES
-#undef BSD_SIGNALS 
-#undef SYSV_SIGNALS 
-#undef POSIX_SIGNALS
-#undef RESTARTABLE_SYSCALLS  
-#undef NEED_MEMORY_H 
-#define STDC_HEADERS 1          /* 13/01/94 omit hosed index [007] */
-#undef HAVE_WAIT3 
-#undef NEED_SYS_SELECT_H 
-#undef NO_FD_SET                /* Guess we suck badly if that happens :( */
-#undef HAVE_UNISTD_H 
-#undef HAVE_SYS_TIMEB_H
-#undef TM_IN_SYS_TIME 
-#undef TIME_WITH_SYS_TIME
-#define NEED_SYS_TIME_H 
-#undef HAVE_SYS_PTYIO_H 
-#undef HAVE_SYS_FCNTL_H
-#undef HAVE_FCNTL_H
-#undef HAVE_CTYPE_H
-#undef HAVE_MACHINE_ENDIAN_H
-#undef HAVE_SYS_RESOURCE_H
-#undef HAVE_SYS_WAIT_H
-#undef HAVE_NETINET_IN_H
-#undef NO_U_INT 
-#undef SIZEOF_LONG
-#undef HAVE_USLEEP 
-#undef HAVE_SETSTATE
-#undef HAVE_RANDOM
-#undef HAVE_FTIME
-#undef STRFTIME
-#define HAVE_NINT
-#define NEED_RINT_DEC
-#define RETSIGTYPE void
-#undef pid_t 
-#undef uid_t 
-#undef gid_t
-#undef size_t 
-#undef vfork 
-#define NO_PATH_MAX
-#define inline
-
-#ifdef SERVER
-#define LIBDIR "/usr/local/lib/netrek"
-
-/* System dependend programs */
-#define UPTIME "/usr/ucb/uptime"
-#define NETSTAT "/bin/true"
-
-/*  UDP connection timeout fix for SYSV machines */
-#ifdef HAVE_UNISTD_H
-#define UDP_FIX
-#endif
-#endif
-
-/* System dependend macros                                              */
-
-/* SYSV signal handling */
-#ifdef SYSV_SIGNALS
-#include <signal.h>
-#define SIGNAL(x,y)   sigset(x,y)
-#define PAUSE(x)      sigpause(x)
-#define SIGSETMASK(x) { }
-#else
-#define SIGNAL(x,y)   signal(x,y)
-#define PAUSE(x)      pause()
-#define SIGSETMASK(x) sigsetmask(x)
-#endif
-
-#ifdef POSIX_SIGNALS
-#define HANDLE_SIG(s,h) signal(s,h)
-#else
-#define HANDLE_SIG(s,h) {}
-#endif
-
-#ifdef STDC_HEADERS
-#define INC_STRINGS     <string.h>
-#else
-#define INC_STRINGS     <strings.h>
-#endif
-
-#ifdef STDC_HEADERS
-#define MCMP(x,y,z)     memcmp(x,y,z)
-#define MCOPY(b1,b2,l)  memcpy(b2,b1,l)
-#define MZERO(b1,l)     memset(b1,0,l)
-#define INDEX(s,c)      strchr(s,c)
-#define RINDEX(s,c)     strrchr(s,c)
-#else
-#define INDEX(s,c)      index(s,c)
-#define RINDEX(s,c)     rindex(s,c) 
-#define MCMP(x,y,z)     bcmp(x,y,z)
-#define MCOPY(b1,b2,l)  bcopy(b1,b2,l)
-#define MZERO(b1,l)     bzero(b1,l)
-#endif
-
-#ifdef SPEEDUP          /* strncpy is terrible slow */
-#ifdef NEED_MEMORY_H
-#include <memory.h>
-#else
-#include <string.h>
-#endif
-/* #define STRNCPY(x,y,z)       memcpy(x,y,z) */
-#define STRNCPY(x,y,z)  memccpy(x,y,'\0',z) 
-#else
-#define STRNCPY(x,y,z)  strncpy(x,y,z)
-#endif
-
-#ifndef HAVE_WAIT3
-#define WAIT3(x,y,z)  waitpid(-1, x, y ) 
-#else
-#define WAIT3(x,y,z)  wait3(x, y, z)
-#endif
-
-#if (defined(HAVE_RANDOM) && defined(HAVE_SETSTATE)) || !defined(HAVE_RANDOM)
-#define RANDOM()        random()
-#define SRANDOM(x)      srandom(x)
-#else
-#define RANDOM()        rrandom()
-#define SRANDOM(x)      ssrandom(x)
-extern void ssrandom ();
-extern long rrandom ();
-#endif
-
-#if !defined(HAVE_RANDOM)
-extern void srandom ();
-extern long random ();
-#endif
-
-#if (SIZEOF_LONG == 8)
-#define _64BIT
-#define LONG int
-#define U_LONG u_int
-#else
-#define LONG long
-#define U_LONG u_long
-#endif
-
-/*      Some Server specific programs */
-#ifdef SERVER
-
-#include <sys/types.h>
-/* SYSV Types */
-#ifdef NO_U_INT
-#define u_char unchar
-#define u_int uint
-#define u_long ulong
-#define u_short ushort
-#endif
-
-#ifdef HAVE_UNISTD_H
-#if defined (hpux)
-#define SETPGRP()       setsid()
-#else
-#if defined (linux) || defined(sgi)
-#define SETPGRP()       setpgrp()
-#else
-#define SETPGRP()       setpgrp (0, 0)
-#endif
-#endif
-#else
-#define SETPGRP()       setpgrp (0, getpid())
-#endif
-
-#ifdef _SEQUENT_
-#define PERMS O_RDWR | O_NOCTTY
-#else
-#define PERMS O_RDWR
-#endif
-
-#if defined(HAVE_UNISTD_H) && defined(TIOCTTY)
-#define IOCTL(i) \
-        int zero = 0;                           \
-        (void) ioctl (i, TIOCTTY, &zero);
-#else
-#if defined(TIOCNOTTY)
-#define IOCTL(i) \
-        (void) ioctl (i, TIOCNOTTY, (char *) 0);
-#else
-#define IOCTL(i)
-#endif
-#endif
-
-#define DETACH {\
-    int i;                                                      \
-    if ((i = open("/dev/tty", PERMS, 0)) >=0) {                 \
-        IOCTL(i)                                                \
-        (void) close (i);                                       \
-    }                                                           \
-    SETPGRP();                                                  \
-    }
-
-#ifdef HAVE_USLEEP
-#define USLEEP(x)       usleep(x)
-#else
-#define USLEEP(x)       microsleep(x)           /* from util.c */
-#endif
-
-#if defined (SunOS)            /*  this core dumps with SIGSEGV on a sparc-10 */
-#define LONGJMP(x,y)    return;
-#else
-#define LONGJMP(x,y)    longjmp(x,y);
-#endif
-
-#if defined (hpux)
-#define PCLOSE(x)       fclose(x)
-#else
-#define PCLOSE(x)       pclose(x)
-#endif
-
-#if defined (__sequent__)
-#define WAIT_TYPE    union wait
-#define WSTOPSIG(foo)   0
-#else
-#define WAIT_TYPE int
-#endif
-
-#endif          /* SERVER programs */
-
-
-/*  System dependend Include files */
-
-#ifdef SERVER
-#define NULLFILE                "../null"
-#else
-#define NULLFILE                "null"
-#endif
-
-
-#ifdef NEED_SYS_SELECT_H
-#define INC_SYS_SELECT  <sys/select.h>
-#ifdef SERVER
-/* fd_set is used in data.h of the server */
-#include <sys/select.h>
-#endif
-#else
-#define INC_SYS_SELECT  NULLFILE
-#endif
-
-#ifdef HAVE_UNISTD_H
-#define INC_UNISTD      <unistd.h>
-#else
-#define INC_UNISTD      NULLFILE
-#endif
-
-#ifdef HAVE_SYS_FCNTL_H
-#define INC_SYS_FCNTL   <sys/fcntl.h>
-#else
-#define INC_SYS_FCNTL   NULLFILE
-#endif
-
-#ifndef VMS
-#ifdef HAVE_FCNTL_H
-#define INC_FCNTL       <fcntl.h>
-#else
-#define INC_FCNTL       NULLFILE
-#endif
-#else
-#define INC_FCNTL       <file.h>
-#endif
-
-
-/* Some systems don't include <sys/time.h> in <time.h>  */
-#if defined(TM_IN_SYS_TIME) || defined(NEED_SYS_TIME_H)
-#define INC_SYS_TIME    <sys/time.h>
-#else
-#define INC_SYS_TIME    NULLFILE
-#endif
-
-#ifdef HAVE_SYS_PTYIO_H
-#define INC_SYS_PTYIO   <sys/ptyio.h>
-#else
-#define INC_SYS_PTYIO   NULLFILE
-#endif
-
-#ifdef HAVE_CTYPE_H
-#define INC_CTYPE       <ctype.h>
-#else
-#define INC_CTYPE       NULLFILE
-#endif
-
-#ifdef HAVE_MACHINE_ENDIAN_H
-#define INC_MACHINE_ENDIAN <machine/endian.h>
-#else
-#define INC_MACHINE_ENDIAN NULLFILE
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-#define INC_SYS_RESOURCE <sys/resource.h>
-#else
-#define INC_SYS_RESOURCE NULLFILE
-#endif
-
-#ifdef HAVE_SYS_WAIT_H
-#define INC_SYS_WAIT    <sys/wait.h>
-#else
-#define INC_SYS_WAIT    NULLFILE
-#endif
- 
-#if HAVE_NETINET_IN_H
-#define INC_NETINET_IN  <netinet/in.h>
-#else
-#define INC_NETINET_IN  NULLFILE
-#endif 
-
-/* Replace outdated ftime with gettimeofday */
-#if defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME)
-#define INC_SYS_TIMEB   <sys/timeb.h>
-#else
-#define NOTIMEB
-#define INC_SYS_TIMEB   <sys/time.h>
-#endif
-
-#ifdef NO_PATH_MAX
-#define PATH_MAX 255
-#define INC_LIMITS      NULLFILE
-#else
-#define INC_LIMITS      <limits.h>
-#endif
-
-/* Unchecked machine dependencies */
-
-#ifdef linux
-/* #define SIGBUS       SIGUNUSED       Not required anymore */
-#define SIGSYS          SIGUSR2
-#endif
-
-#ifdef linux
-#define SHMFLAG         sizeof(struct memory)
-#else
-#define SHMFLAG         0
-#endif
-
-#ifdef sun3
-#define INC_STDLIB      NULLFILE
-#else
-#define INC_STDLIB      <stdlib.h>
-#endif
-
-#ifndef sun4
-#ifdef HAVE_NINT
-#define INC_MATH        <math.h>
-#else
-#ifdef NEED_RINT_DEC
-extern double rint(double);
-#define INC_MATH        NULLFILE
-#else
-#define INC_MATH        <math.h>
-#endif
-#define  nint(x) ((int)(x))
-#endif
-#endif
-
-#ifdef VMS
-#define Sin sinetable
-#define Cos cosinetable
-#define INC_SYS_SELECT  <socket.h>
-#define INC_UNISTD      <unistd.h>
-#if __VMS_VER < 70000000
-struct passwd {
-    char    *pw_name;
-};
-#define STRNCPY(x,y,z)  strncpy(x,y,z)
-#define strncasecmp strncmp
-#define SELECT vms_select
-#endif
-#endif
-
-#ifdef WIN32
-typedef unsigned short int ushort;
-#define strncasecmp strncmp
-#ifdef THREADED
-#define THREAD(fn) { DWORD junk; CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)fn, 0, 0, &junk); }
-#define ENDTHREAD ExitThread(0);
-typedef unsigned long int SEMAPHORE;
-#define CREATE_SEMAPHORE(initstate) CreateEvent(NULL, 1, initstate, NULL)
-#define SET_SEMAPHORE(sem) SetEvent((HANDLE)sem)
-#define RESET_SEMAPHORE(sem) ResetEvent((HANDLE)sem)
-#endif
-#endif
-
-#ifdef _MSC_VER
-/* winnt.h stuff... */
-#define VOID void
-typedef char CHAR;
-typedef short SHORT;
-/* winnt.h */
-#undef  INC_STRINGS
-#define INC_STRINGS     <ntstring.h>
-/* Since either strings.h or memory.h is already included... -SAC */
-#include <ntstring.h>
-/* For math.h, really */
-#define hypot _hypot
-#undef  INC_IO
-#define INC_IO          <ntio.h>
-#else
-#define INC_IO       NULLFILE
-#endif
-
-/*
-   Some systems, most notably SunOS 4.1.3, don't include function definitions
-   in the libraries.  This results in some warning we don't want.
-   This header defines the type for all these functions.
-*/
-
-#ifdef sun4
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int close(int);
-int connect(int, struct sockaddr *, int);
-int fprintf(FILE *, const char *, ...);
-int fputs(char *, FILE *);
-char *memccpy(char *, char *, int, int);
-int perror(char *);
-int socket(int, int, int);
-int sscanf(char *, char *, ...);
-char *strdup(char *arg);
-
-char _filbuf(FILE *);
-int _flsbuf(unsigned char, FILE *);
-
-#endif /* defined sun4 */
-
-#endif  /* __CONFIG_H */
diff -rN -u old-netrek-client-cow/descrip.mms new-netrek-client-cow/descrip.mms
--- old-netrek-client-cow/descrip.mms	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/descrip.mms	1970-01-01 10:00:00.000000000 +1000
@@ -1,181 +0,0 @@
-!
-!   DESCRIP.MMS
-!
-!   Make file for OpenVMS for use with MMS or MMK.
-!
-!   Build COW for OpenVMS with DEC TCP/IP Services for OpenVMS
-!
-!   Written by James Cameron, (cameron@stl.dec.com), Digital Equipment
-!   Corporation, CSS Sydney Engineering, on 16-Jan-1998.
-!
-
-cflags = /prefix=all/decc/nowarnings/define=VMS
-arch = OpenVMS
-cwho = "cameron@stl.dec.com"
-
-.first
-	copy config.h_vms config.h
-	open/write null null.h
-	close null
-
-objects = main, newwin, stats, pingstats, getname, cflags, defaults, socket,-
-check, x11window, dmessage, reserved, enter, helpwin, macrowin, findslot,-
-colors, input, vmsutils, getship, util, distress, ping, short, inform, redraw,-
-beeplite, lagmeter, smessage, parsemeta, netstatopt, netstat, option,-
-planetlist, playerlist, senddist, ranklist, rotate, interface, defwin, docwin,-
-spopt, strdup, udpopt, death, war, warning, dashboard, tools, data, -
-sintab, vmsio, feature, censor, cowmain, local, dashboard3, map, string_util
-
-cow.exe : cow.olb($(objects)), cow.opt
-	$(link)$(linkflags) cow.opt/options
-
-cflags.c : mkcflags.exe
-	mkcflags = "$sys$disk:[]mkcflags"
-	define/user_mode sys$output cflags.c
-	mkcflags "$(CC) $(CFLAGS)" "$(ARCH)"
-	open/append cflags cflags.c
-	write cflags "char cwho[]="$(CWHO)";"
-	close cflags
-
-mkcflags.exe : mkcflags.obj cow.olb(vmsutils)
-	link mkcflags, cow/library
-
-mkcflags.obj : mkcflags.c config.h version.h patchlevel.h
-
-!
-! Manually prepared header dependencies; OpenVMS/VAX does not have makedepend,
-! but this can be derived from makedepend running on a system that does have it.!
-
-audio.obj : config.h audio.h
-
-beeplite.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-cflags.obj : config.h
-
-check.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h
-
-colors.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h
-
-dashboard.obj : dashboard.c config.h copyright.h Wlib.h defs.h struct.h data.h
-
-data.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-death.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-defaults.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h
-
-defwin.obj : config.h Wlib.h defs.h struct.h data.h
-
-distress.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-dmessage.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-version.h patchlevel.h
-
-docwin.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-enter.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-feature.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-findslot.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h
-
-getname.obj : config.h copyright2.h vmsutils.h Wlib.h defs.h -
-struct.h data.h
-
-getship.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-helpwin.obj : config.h Wlib.h defs.h struct.h data.h
-
-inform.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-input.obj : config.h copyright.h vmsutils.h Wlib.h defs.h struct.h -
-data.h packets.h
-
-interface.obj : config.h copyright.h Wlib.h defs.h struct.h -
-data.h packets.h
-
-lagmeter.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-macrowin.obj : config.h Wlib.h defs.h struct.h data.h
-
-main.obj : config.h copyright.h Wlib.h defs.h struct.h data.h packets.h -
-version.h patchlevel.h
-
-mkcflags.obj : config.h version.h patchlevel.h
-
-mkkey.obj : config.h defs.h
-
-name.obj : version.h patchlevel.h
-
-netstat.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-netstatopt.obj : config.h copyright.h Wlib.h defs.h struct.h -
-data.h packets.h
-
-newwin.obj : config.h copyright.h vmsutils.h Wlib.h defs.h struct.h -
-data.h bitmaps.h moobitmaps.h rabbitbitmaps.h tngbitmaps.h hullbitmaps.h -
-oldbitmaps.h packets.h
-
-option.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-parsemeta.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-vmsutils.h
-
-ping.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h packets.h
-
-pingstats.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-planetlist.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-playerlist.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-randomize.obj : config.h
-
-ranklist.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h
-
-redraw.obj : config.h copyright.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-reserved.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-rotate.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h -
-packets.h
-
-senddist.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-short.obj : config.h Wlib.h defs.h struct.h data.h packets.h wtext.h
-
-sintab.obj : config.h copyright.h
-
-smessage.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-socket.obj : config.h copyright2.h Wlib.h defs.h struct.h data.h -
-packets.h wtext.h vmsutils.h
-
-sound.obj : config.h copyright.h Wlib.h defs.h struct.h data.h audio.h
-
-spopt.obj : config.h copyright.h Wlib.h defs.h struct.h data.h packets.h
-
-stats.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-tools.obj : config.h Wlib.h defs.h struct.h data.h
-
-udpopt.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-util.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-vmsutils.obj : vmsutils.h
-
-war.obj : config.h copyright.h Wlib.h defs.h struct.h data.h packets.h
-
-warning.obj : config.h copyright.h Wlib.h defs.h struct.h data.h
-
-x11window.obj : config.h vmsutils.h Wlib.h defs.h struct.h data.h -
-teams.bitmap mapcursor.bitmap localcursor.bitmap
-
diff -rN -u old-netrek-client-cow/manifest new-netrek-client-cow/manifest
--- old-netrek-client-cow/manifest	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/manifest	2008-07-31 17:47:05.000000000 +1000
@@ -133,9 +133,6 @@
 util.h
 usleep.c
 version.h
-vmsio.c
-vmsutils.c
-vmsutils.h
 war.c
 warning.c
 warning.h
@@ -172,9 +169,7 @@
 configure
 config.sub
 config.guess
-config.h.vms
 cow.opt
-descrip.mms
 localcursor.bitmap
 manifest
 mapcursor.bitmap
diff -rN -u old-netrek-client-cow/tools.c new-netrek-client-cow/tools.c
--- old-netrek-client-cow/tools.c	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/tools.c	2008-07-31 17:47:05.000000000 +1000
@@ -51,8 +51,6 @@
     showToolsWin();
 
 #ifndef WIN32
-
-#ifndef VMS
   SIGNAL(SIGCHLD, SIG_DFL);
   if (shelltools && (pipefp = popen(str, "r")) != NULL)
     {
@@ -69,8 +67,6 @@
   else
 #endif
 
-#endif
-
     W_WriteText(toolsWin, 0, 0, textColor, str, strlen(str), W_RegularFont);
 }
 
diff -rN -u old-netrek-client-cow/vmsio.c new-netrek-client-cow/vmsio.c
--- old-netrek-client-cow/vmsio.c	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/vmsio.c	1970-01-01 10:00:00.000000000 +1000
@@ -1,247 +0,0 @@
-/*
-**  OpenVMS does not provide the "hack" that UNIX provides that allows one to
-**  obtain the file descriptor of the X connection and include it in a select()
-**  call, so as to wait for either network activity or X events.
-**  
-**  Instead, we have to ask the OpenVMS X implementation to signal us when an
-**  event arrives, set a flag, and then detect that in a replacement select()
-**  function.
-**  
-**  cameron@stl.dec.com 16-Jan-1998 
-*/
-#include "config.h"
-#include "copyright.h"
-
-#include <stdio.h>
-#include <time.h>
-#include <timeb.h>
-#include <ssdef.h>
-#include <jpidef.h>
-#include <iodef.h>
-
-#include "Wlib.h"
-#include "defs.h"
-#include "struct.h"
-#include "data.h"
-
-/*
-**  Event stuff
-*/
-
-/*
-**  Event flag number for use by vms_select()
-**  
-**  (The VMS event flag is reset by vms_select(), and set by any of the AST
-**  routines that are executed when data becomes available)
-*/
-static char efns;
-
-/*
-**  Message received flags; set to 1 when a message is received
-*/
-static unsigned char tim = 0;   /* timer expiry         */
-static unsigned char win = 0;   /* x window event       */
-static unsigned char tcp = 0;   /* tcp socket to server */
-static unsigned char udp = 0;   /* udp socket to server */
-
-void vms_event ( unsigned char *flag )
-{
-    sys$setef ( efns );
-    *flag = 1;
-}
-
-void vms_event_window(void)
-{
-    sys$setef ( efns );
-    win = 1;
-}
-
-void vms_event_window_done(void)
-{
-    win = 0;
-}
-
-void vms_queue_socket_read_attention
-( int socket, void *(routine(void)), unsigned char *parameter )
-{
-    unsigned int status;
-    
-    status = sys$qiow (
-        0,		           /* event flag number */
-        vaxc$get_sdc(socket),      /* channel */
-        IO$_SETMODE|IO$M_READATTN, /* function code */
-        0,                         /* iosb */
-        0,                         /* astadr */
-        0,		           /* astprm */
-        routine,                   /* p1 - ast routine */
-        parameter,                 /* p2 - ast parameter */
-        0,                         /* p3 - ast access mode */
-        0,                         /* p4 - not used */
-        0,                         /* p5 - not used */
-        0                          /* p6 - not used */
-    );
-
-    /* check status and report err */
-    if ( ( status & 1 ) != 1 )
-    {
-        lib$signal ( status );
-    }
-}
-
-/*
-**  Replacement for select()
-**  
-**  Given a bitmask of the sockets to be checked for unread data,
-**  return a bitmask of those sockets that *have* unread data.
-**  
-**  If the timeout argument is a NULL pointer, stall until at least one
-**  socket has unread data.
-**  
-**  If the timeout argument points to a zero timeout structure, do not
-**  stall; return immediately.  (i.e. imagine immediate timeout).
-**  
-**  If the timeout argument points to a non-zero timeout structure, stall
-**  until the time specified has elapsed.
-**  
-**  (This routine does not handle write or exception sockets).
-*/
-int
-vms_select
-( int ndfs, int *readfds, int *writefds, int *exceptfds, struct timeval *tm )
-{
-    int mask;
-    int swin;
-    unsigned int status;
-    
-    /* read attention queued flags per ip socket */
-    static unsigned char tcpraqd = 0;
-    static unsigned char udpraqd = 0;
-    
-    /* obtain the socket understood to be the X socket */
-    swin = W_Socket();
-    
-    /*
-    **  Ensure that the read attention ASTs are requeued if they had fired
-    **  since the last call to us, or if this is the first call.
-    **  
-    **  We assume that the AST will be called immediately if the socket has
-    **  unread data on it, even if a prior AST had indicated that such data
-    **  has arrived.  [Check this?]
-    */
-    if ( ! tcpraqd )
-    {
-        vms_queue_socket_read_attention ( sock, vms_event, &tcp );
-        tcpraqd = 1;
-    }
-
-    if ( ! udpraqd )
-    {
-        if ( udpSock >= 0 )
-        {
-            vms_queue_socket_read_attention ( udpSock, vms_event, &udp );
-            udpraqd = 1;
-        }
-    }
-    
-    mask = 0;
-    tim = 0;
-    
-    /* if timeout specified and non zero, queue a timer */
-    if ( tm != NULL )
-        if ( tm->tv_sec != 0 || tm->tv_usec != 0 )
-        {
-            unsigned int delay[2];
-            
-            /* calculate delay; loss of significance; 7 minutes maximum wait */
-            delay[0] = 0 - ( tm->tv_sec * 1000000 + tm->tv_usec ) * 10;
-            delay[1] = -1;
-            
-            /* set a timer for the delay period, which will set the event flag
-               (twice) and set the timer flag to 1 */
-            status = sys$setimr ( efns, &delay, vms_event, &tim, 0 );
-            if ( ( status & 1 ) != 1 ) lib$signal ( status );
-        }
-        else
-        {
-            /* timeout period zero; force immediate timeout */
-            tim = 1;
-        }
-
-#ifdef TRACE1
-    printf ( "?" );
-    if (FD_ISSET(swin, readfds)) printf ( "x" );
-    if (FD_ISSET(sock, readfds)) printf ( "t" );
-    if (udpSock >= 0 && FD_ISSET(udpSock, readfds)) printf ( "u" );
-#endif
-
-    while ( mask == 0 )
-    {
-        /* turn off interrupts during check */
-        status = sys$setast(0);
-        if ( ( status & 1 ) != 1 ) lib$signal ( status );
-        
-        /* detect tcp/ip and udp/ip socket input */
-        if ( *readfds & ( 1 << sock ) )
-            if ( tcp != 0 )
-                { tcp = 0; tcpraqd = 0; mask |= ( 1<<sock ); }
-
-        if ( *readfds & ( 1 << udpSock ) )
-            if ( udp != 0 )
-                { udp = 0; udpraqd = 0; mask |= ( 1<<udpSock ); }
-        
-        /* detect window input */
-        if ( *readfds & ( 1 << swin ) )
-            if ( win != 0 )
-                { mask |= ( 1<<swin ); }
-
-        /* if timeout, stop checking */
-        if ( tim == 1 ) break;
-        
-        /* if any of the requested sockets are active, return */
-        if ( mask & *readfds ) break;
-        
-        /* nothing that set the event flag was what we are waiting for */
-        /* so reset it */
-        status = sys$clref ( efns );
-        if ( ( status & 1 ) != 1 ) lib$signal ( status );
-        
-        /* enable interrupts again */
-        status = sys$setast(1);
-        if ( ( status & 1 ) != 1 ) lib$signal ( status );
-        
-        /* sleep until woken by either unread data or timeout */
-        status = sys$waitfr ( efns );
-        if ( ( status & 1 ) != 1 ) lib$signal ( status );
-    }
-
-    /* enable interrupts again */
-    status = sys$setast(1);
-    if ( ( status & 1 ) != 1 ) lib$signal ( status );
-        
-    /* cancel the timeout if it didn't expire */
-    if ( tm != NULL )
-        if ( tim == 0 && ( tm->tv_sec != 0 || tm->tv_usec != 0 ) )
-        {
-            status = sys$cantim ( &tim, 0 );
-            if ( ( status & 1 ) != 1 ) lib$signal ( status );
-        }
-
-    /* set return status according to whether activity is detected */
-    if ( *readfds & mask )
-    {
-        status = 1;
-    }
-    else
-    {
-        status = 0;
-    }
-    
-    *readfds = mask;
-#ifdef TRACE2
-    printf ( "-" );
-    if (FD_ISSET(swin, readfds)) printf ( "x" );
-    if (FD_ISSET(sock, readfds)) printf ( "t" );
-    if (udpSock >= 0 && FD_ISSET(udpSock, readfds)) printf ( "u" );
-#endif
-    return ( status );
-}
diff -rN -u old-netrek-client-cow/vmsutils.c new-netrek-client-cow/vmsutils.c
--- old-netrek-client-cow/vmsutils.c	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/vmsutils.c	1970-01-01 10:00:00.000000000 +1000
@@ -1,119 +0,0 @@
-#include "config.h"
-
-#include <stdio.h>
-#include <time.h>
-#include <timeb.h>
-#include <ssdef.h>
-#include <jpidef.h>
-#include <iodef.h>
-
-typedef struct itmlst_str {
-  short buffer_length;
-  short item_code;
-  long buffer_address;
-  long retlen_address;
-} Itmlst;
-
-long random(void) {
-  long rand();
-  return (rand());
-}
-
-void srandom(int seed) {
-  srand(seed);
-}
-
-char *crypt(char *cryptstr, char *key) {
-  return (cryptstr);                         /* not really crypted */
-}
-
-bcopy(char *from_str, char *to_str, int length) {
-  int i;
-  for (i=0; i<length; i++)
-    to_str[i] = from_str[i];
-}
-bzero( char *str, int length) {
-  int i;
-  for (i=0; i<length; i++)
-    str[i] = '\0';
-}
-
-char *index(char *str, char c) {
-  while (*str != '\0') {
-    if (*str == c)
-      return (str);
-    else
-      str++;
-  }
-  return ((char *) 0);
-}
-
-char *rindex(char *str, char c) {
-  char *firstc = str;
-
-  str += strlen(str);       /* go to the end of the string  */
-  while (str >= str) {      /* while not over the beginning */
-    if (*str == c)
-      return (str);
-    else
-      str--;
-  }
-  return ((char *) 0);
-}
-
-int bcmp(char *b1, char *b2, int length) {
-  int i;
-
-  for (i=0; i<length; i++) {
-    if (b1[i] != b2[i])
-      return (-1);  /* strings aren't alike */
-  }
-  return (0);   /* strings are alike */
-}
-
-struct passwd *getpwuid(int not_used) {
-  struct passwd *passwd= (struct passwd *) malloc(sizeof(struct passwd));
-  short retlen;
-  char *cptr  = malloc(20*sizeof(char));
-  Itmlst itmlst;
-  unsigned int status;
-
-  itmlst.buffer_length = 19;
-  itmlst.item_code = JPI$_USERNAME;
-  itmlst.buffer_address = (long)cptr;
-  itmlst.retlen_address = (long)&retlen;
-  
-  passwd->pw_name = cptr;
-
-  status = sys$getjpiw(NULL, NULL, NULL, &itmlst, NULL, NULL, NULL);
-  if ( ( status && 1 ) == 1 ) {
-    passwd->pw_name[retlen] = '\0';
-    while (*cptr) {          /* find first whitespace and terminate there */
-      if (*cptr == ' ') {
-        *cptr = '\0';
-      }
-      cptr++;
-    }
-    return (passwd);
-  } else {
-    printf ( "vmsutils: getpwuid(): sys$getjpiw returned %08.8x\n", status );
-    strcpy(passwd->pw_name, "VMS-nousername");
-    return (passwd);
-  }
-}
-
-struct tv {
-    long tv_sec;
-    long tv_usec;
-};
-
-gettimeofday ( struct tv *tv, struct tv *tz )
-{
-    /* ignore tz */
-    struct timeb tb;
-
-    ftime (&tb);
-    tv->tv_sec = (long) tb.time;
-    tv->tv_usec = (long) tb.millitm;
-}
-
diff -rN -u old-netrek-client-cow/vmsutils.h new-netrek-client-cow/vmsutils.h
--- old-netrek-client-cow/vmsutils.h	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/vmsutils.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,13 +0,0 @@
-#ifndef VMSUTILS_H
-#define VMSUTILS_H
-
-typedef long fd_set;
-typedef int uid_t;
-
-void exit();
-
-#define FD_ZERO(fdl)         ((*fdl)=0L)
-#define FD_SET(fd, fdl)     ((*fdl) |= (1<<(fd)))
-#define FD_ISSET(fd, fdl)   ((*fdl) & (1<<(fd)))
-
-#endif VMSUTILS_H
diff -rN -u old-netrek-client-cow/x11window.c new-netrek-client-cow/x11window.c
--- old-netrek-client-cow/x11window.c	2008-07-31 17:47:05.000000000 +1000
+++ new-netrek-client-cow/x11window.c	2008-07-31 17:47:05.000000000 +1000
@@ -36,10 +36,6 @@
 #include "x11sprite.h"
 #include "camera.h"
 
-#ifdef VMS
-void    vms_event_window(void);
-#endif
-
 extern void terminate(int error);
 
 /* XFIX speedup */
@@ -1039,10 +1035,6 @@
     if (checkMapped(name))
       W_MapWindow(W_Window2Void(newwin));
 
-#ifdef VMS
-  XSelectAsyncInput(W_Display, newwin->window, attrs.event_mask, vms_event_window, 0);
-#endif
-
 #if DEBUG > 0
   printf("New graphics window %d, child of %d\n", newwin, parent);
 #endif
@@ -1303,10 +1295,6 @@
     {
       XNextEvent(W_Display, &event);
 
-#ifdef VMS
-      vms_event_window_done();
-#endif
-
 #if DEBUG > 1
       printf(", read type=%d\n", event.type);
 #endif
@@ -2034,10 +2022,6 @@
     if (checkMapped(name))
       W_MapWindow(W_Window2Void(newwin));
 
-#ifdef VMS
-  XSelectAsyncInput(W_Display, newwin->window, attrs.event_mask, vms_event_window, 0);
-#endif
-
 #if DEBUG > 0
   printf("New text window %d, child of %d\n", newwin, parent);
 #endif
@@ -2181,10 +2165,6 @@
     if (checkMapped(name))
       W_MapWindow(W_Window2Void(newwin));
 
-#ifdef VMS
-  XSelectAsyncInput(W_Display, newwin->window, attrs.event_mask, vms_event_window, 0);
-#endif
-
 #if DEBUG > 0
   printf("New scroll window %d, child of %d\n", newwin, parent);
 #endif
@@ -2467,10 +2447,6 @@
     if (checkMapped(name))
       W_MapWindow(W_Window2Void(newwin));
 
-#ifdef VMS
-  XSelectAsyncInput(W_Display, newwin->window, attrs.event_mask, vms_event_window, 0);
-#endif
-
 #if DEBUG > 0
   printf("New menu window %d, child of %d\n", newwin, parent);
 #endif
@@ -3032,12 +3008,7 @@
 int
         W_Socket(void)
 {
-
-#if VMS
-  return 0;
-#else
   return ConnectionNumber(W_Display);
-#endif
 }
 
 void

