]> thyrsus.com Git - vms-empire.git/commitdiff
Scrap various ugly portability hacks. They're no longer needed as
authorEric S. Raymond <esr@thyrsus.com>
Tue, 25 Jul 2006 16:51:22 +0000 (16:51 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 25 Jul 2006 16:51:22 +0000 (16:51 +0000)
everyone has ANSI C now.

Makefile
compmove.c
display.c
edit.c
empire.h
game.c
map.c
object.c
term.c

index 2edfdb382c537097f1819ff42cff89190402ec82..b787afdd7eafe34b64c67746a3ddb14232008ed7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,13 +8,6 @@
 
 VERS=$(shell sed <vms-empire.spec -n -e '/Version: \(.*\)/s//\1/p')
 
-# Change the line below for your system.  If you are on a Sun or Vax,
-# you may want BSD.
-
-SYS = LINUX
-#SYS = BSD
-#SYS = SYSV
-
 # Use -g to compile the program for debugging.
 
 #DEBUG = -g -DDEBUG -Wall
@@ -28,7 +21,7 @@ LIBS = -lncurses
 
 # You shouldn't have to modify anything below this line.
 
-CFLAGS = $(DEBUG) $(PROFILE) -D$(SYS)
+CFLAGS = $(DEBUG) $(PROFILE)
 
 FILES = \
        attack.c \
index 52a8dc754461be45f35ada52e435aee82643f627..5ee71bfdc7bc0ff9d9f9a0736ada03abdbb5d891 100644 (file)
@@ -17,12 +17,7 @@ For each move the user wants us to make, we do the following:
     3)  Check to see if the game is over.
 */
 
-#ifdef SYSV
 #include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #include "empire.h"
 #include "extern.h"
 
index 9e46067893d7dd7cf0676f74695e18b3d9766afb..57674c127e50d6a36847a601288f29226b9bd4d1 100644 (file)
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.9 2006/07/25 15:59:54 esr Exp esr $  - (c) Copyright 1987, 1988 Chuck Simmons */
+/* $Id: display.c,v 1.10 2006/07/25 16:43:14 esr Exp esr $  - (c) Copyright 1987, 1988 Chuck Simmons */
 
 /*
  *    Copyright (C) 1987, 1988 Chuck Simmons
@@ -18,12 +18,7 @@ information:
        point of view;
 */
 
-#ifdef SYSV
 #include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #include <curses.h>
 #include "empire.h"
 #include "extern.h"
diff --git a/edit.c b/edit.c
index bcfab5125724258dba1caa30559c076b53ecf5a4..67dbf106a0bb556262310a441ca46bd7fb4f59d6 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -12,12 +12,7 @@ edit.c -- Routines to handle edit mode commands.
 */
 
 #include <stdio.h>
-#ifdef SYSV
 #include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #include <curses.h>
 #include <ctype.h>
 #include "empire.h"
index b7007fad10bb781772f6350229c3b449a12d160b..08ef7d85f64e37724d522fed6bc6027b8194db5f 100644 (file)
--- a/empire.h
+++ b/empire.h
@@ -20,24 +20,6 @@ empire.h -- type and constant declarations
 #define NULL 0
 #endif
 
-/* Redefine some functions for portability. */
-#ifdef LINUX
-#include <string.h>
-#elif SYSV
-char *memset();
-char *memcpy();
-#define bzero(dst,len) memset(dst,0,len)
-#else
-#define memcpy(dst,src,len) bcopy((src),(dst),(len))
-#define strchr(s,c) index(s,c)
-typedef char chtype;
-#define beep() (putchar('\7'))
-#define napms(d) (usleep((d)*1000))
-#endif
-
-
-
-
 typedef unsigned char uchar;
 
 #define ASSERT(x) if (!(x)) assert ("x", __FILE__, __LINE__);
diff --git a/game.c b/game.c
index dd437602ee65ce96dd5a599a5b0d724ddaa6fcbf..f59d4c5611faef38c91ecec2de6c3648b23d6930 100644 (file)
--- a/game.c
+++ b/game.c
 game.c -- Routines to initialize, save, and restore a game.
 */
 
-#ifdef SYSV
 #include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #include <stdio.h>
 #include <ctype.h>
 #include "empire.h"
diff --git a/map.c b/map.c
index 886241f8d512420d7fc5ef46a5f1d48646cde756..c72574cf641f2ac9defa28966eb795ac218db713 100644 (file)
--- a/map.c
+++ b/map.c
@@ -1,4 +1,4 @@
-/* $Id: map.c,v 1.5 2002/04/19 09:17:01 esr Exp esr $  - (c) Copyright 1987, 1988 Chuck Simmons */
+/* $Id: map.c,v 1.6 2006/07/25 15:19:49 esr Exp esr $  - (c) Copyright 1987, 1988 Chuck Simmons */
 
 /*
  *    Copyright (C) 1987, 1988 Chuck Simmons
@@ -14,12 +14,7 @@ This file contains routines for playing around with view_maps,
 real_maps, path_maps, and cont_maps.
 */
 
-#ifdef SYSV
 #include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #include "empire.h"
 #include "extern.h"
 
index e8d3556a53807b8ecc887b311cef5938763a0e19..f7d798be7d71bd03457a4efb0fe3b7fd2d745cc0 100644 (file)
--- a/object.c
+++ b/object.c
 object.c -- routines for manipulating objects.
 */
 
-#ifdef SYSV
 #include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #include <stdio.h>
 #include <ctype.h>
 #include "empire.h"
diff --git a/term.c b/term.c
index 7c380be6c2f05d011ed52cf8b46ac18696e6210e..67a823d6b384b92f6adcb19de80d885f4979e30a 100644 (file)
--- a/term.c
+++ b/term.c
@@ -30,6 +30,7 @@ to read the lines.  The new information is then displayed, and the
 */
 
 #include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 #include <curses.h>
 #include <ctype.h>