summaryrefslogtreecommitdiff
path: root/games/adl/compilefixes93.diff
blob: 5e6ecd58f6fe2b2b11782f57dc123807540eeea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
diff -Naur adl/adlcomp/adlcomp.c adl.patched/adlcomp/adlcomp.c
--- adl/adlcomp/adlcomp.c	1991-05-10 07:17:56.000000000 -0400
+++ adl.patched/adlcomp/adlcomp.c	2015-02-16 17:59:34.000000000 -0500
@@ -55,8 +55,6 @@
 	*outname = "adlcomp.out",	/* Default output file name	*/
 	*dirnames[MAXDIR];		/* -i names			*/
 
-extern	char	*calloc();		/* Memory allocator		*/
-
 struct	pagetab	codetab;		/* Structure for virtual code	*/
 
 int16	NUM_VARS = 64,			/* Default # of ADL variables	*/
@@ -394,7 +392,7 @@
 getfile()
 {
     char *fsave;
-    char msg[ 80 ], nsave[ 512 ], t_in[ 512 ], *sprintf();
+    char msg[ 80 ], nsave[ 512 ], t_in[ 512 ];
     int16 lsave, numsave, i, found;
 
     lexer();				/* Get a token.			*/
diff -Naur adl/adlcomp/compdict.c adl.patched/adlcomp/compdict.c
--- adl/adlcomp/compdict.c	1991-05-10 07:18:03.000000000 -0400
+++ adl.patched/adlcomp/compdict.c	2015-02-16 17:59:34.000000000 -0500
@@ -7,9 +7,6 @@
 
 #define HTSIZE 512		/* Size of a hash table */
 
-char
-    *calloc();
-
 /* Structure of a hash table entry */
 struct hash_entry {
     struct symbol
@@ -187,7 +184,6 @@
 }
 
 
-static
 write_hash( fd, tab, writing )
 int
     fd;
diff -Naur adl/adlcomp/makefile adl.patched/adlcomp/makefile
--- adl/adlcomp/makefile	1991-05-21 16:32:27.000000000 -0400
+++ adl.patched/adlcomp/makefile	2015-02-16 17:59:34.000000000 -0500
@@ -14,7 +14,7 @@
 BIN = /User/stephan/Adventures/adl
 
 # Flags for CC
-CFLAGS = -I${INC} -O '-DADL_NAME="${BIN}/ADLrun"'
+CFLAGS = -I${INC} ${OPTFLAGS} '-DADL_NAME="/usr/games/adlrun93"'
 
 # Flags for lint
 LFLAGS = -DLINT -I${INC} -C
diff -Naur adl/adlrun/adlmacro.c adl.patched/adlrun/adlmacro.c
--- adl/adlrun/adlmacro.c	1991-05-10 07:18:40.000000000 -0400
+++ adl.patched/adlrun/adlmacro.c	2015-02-16 17:59:34.000000000 -0500
@@ -7,9 +7,6 @@
 struct	macro
     *mactab;
 
-extern char
-    *calloc();
-
 define( str1, str2 )
 char
     *str1,
diff -Naur adl/adlrun/adlrun.c adl.patched/adlrun/adlrun.c
--- adl/adlrun/adlrun.c	1991-05-10 07:18:28.000000000 -0400
+++ adl.patched/adlrun/adlrun.c	2015-02-16 17:59:34.000000000 -0500
@@ -83,8 +83,6 @@
 	    *getml();
 #	define calloc( size, num )	getml( (long)(size * num) )
 #else
-	extern char
-	    *calloc();
 #endif
 
 #define	islegal(c)	(c&&(c!=' ')&&(c!='\t')&&(c!='\n')&&(c!='-'))
diff -Naur adl/adlrun/adlscrn.c adl.patched/adlrun/adlscrn.c
--- adl/adlrun/adlscrn.c	1991-05-21 16:15:59.000000000 -0400
+++ adl.patched/adlrun/adlscrn.c	2015-02-16 17:59:34.000000000 -0500
@@ -8,6 +8,8 @@
 #define TERMCAP
 
 #include <stdio.h>
+#include <curses.h>
+#include <term.h>
 
 #include "adltypes.h"
 #include "adlprog.h"
diff -Naur adl/adlrun/adlstr.c adl.patched/adlrun/adlstr.c
--- adl/adlrun/adlstr.c	1991-05-10 07:18:38.000000000 -0400
+++ adl.patched/adlrun/adlstr.c	2015-02-16 17:59:34.000000000 -0500
@@ -7,9 +7,6 @@
 #include "vstring.h"
 #include "adlrun.h"
 
-extern char
-    *malloc();
-
 eqstring()
 {
     char
diff -Naur adl/adlrun/makefile adl.patched/adlrun/makefile
--- adl/adlrun/makefile	1991-05-21 16:18:10.000000000 -0400
+++ adl.patched/adlrun/makefile	2015-02-16 17:59:56.000000000 -0500
@@ -16,7 +16,7 @@
 BIN = /User/stephan/Adventures/adl
 
 # Flags for CC
-CFLAGS = -I${INC} -O
+CFLAGS = -I${INC} ${OPTFLAGS}
 
 # Flags for the linker - you may need to change -lcurses to -ltermcap
 # or -ltermlib.
diff -Naur adl/adlrun/rtdict.c adl.patched/adlrun/rtdict.c
--- adl/adlrun/rtdict.c	1991-05-10 07:18:22.000000000 -0400
+++ adl.patched/adlrun/rtdict.c	2015-02-16 17:59:34.000000000 -0500
@@ -21,9 +21,6 @@
 static struct letter
     *trie;			/* The dictionary */
 
-char
-    *malloc();
-
 	/***************************************************************\
 	*								*
 	*	new_letter( let ) - allocate a new letter for the	*
diff -Naur adl/include/adlrun.h adl.patched/include/adlrun.h
--- adl/include/adlrun.h	1991-05-10 07:15:37.000000000 -0400
+++ adl.patched/include/adlrun.h	2015-02-16 17:59:34.000000000 -0500
@@ -147,7 +147,6 @@
     nummacro();			/* Returns number of macros defined	*/
 
 extern char
-    *malloc(),			/* Memory allocation			*/
     *findone(),			/* Find a symbol.			*/
     *expand();			/* Try to macro-expand a string		*/
 
diff -Naur adl/include/adltypes.h adl.patched/include/adltypes.h
--- adl/include/adltypes.h	1991-05-21 16:40:38.000000000 -0400
+++ adl.patched/include/adltypes.h	2015-02-16 17:59:34.000000000 -0500
@@ -1,3 +1,6 @@
+#include <stdlib.h>
+#include <string.h>
+
 /* Undefine any predefined things */
 #ifdef HPUX
 #	undef HPUX
@@ -100,7 +103,7 @@
    typedef	unsigned short address;
 #  define	SRAND	srand
 #  define	RAND	rand()
-#  define	RB	O_RDWR
+#  define	RB	O_RDONLY
 #  define	WB	(O_RDWR | O_CREAT | O_TRUNC)
 #endif
 
@@ -111,7 +114,7 @@
    typedef	unsigned short		address;
 #  define	SRAND	srandom
 #  define	RAND	random()
-#  define	RB	O_RDWR
+#  define	RB	O_RDONLY
 #  define	WB	(O_RDWR | O_CREAT | O_TRUNC)
 #endif
 
@@ -123,7 +126,7 @@
 #  define	SRAND	srand
 #  define	RAND	rand()
 #  define	time	mytime
-#  define	RB	O_RDWR
+#  define	RB	O_RDONLY
 #  define	WB	(O_RDWR | O_CREAT | O_TRUNC)
 #endif
 
diff -Naur adl/misc/adldebug.c adl.patched/misc/adldebug.c
--- adl/misc/adldebug.c	1991-05-10 07:21:18.000000000 -0400
+++ adl.patched/misc/adldebug.c	2015-02-16 17:59:34.000000000 -0500
@@ -46,9 +46,6 @@
 address			*routspace;	/* Routine indexes		*/
 int32			*str_tab;	/* String table			*/
 
-char
-    *malloc();			/* Memory allocator			*/
-
 main( argc, argv )
 int
     argc;
diff -Naur adl/misc/adltouch.c adl.patched/misc/adltouch.c
--- adl/misc/adltouch.c	1991-05-10 07:21:22.000000000 -0400
+++ adl.patched/misc/adltouch.c	2015-02-16 17:59:34.000000000 -0500
@@ -1,6 +1,7 @@
 /* Adltouch - touch an ADL save file */
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #if MSDOS
 #  define RB "rb+"
diff -Naur adl/misc/makefile adl.patched/misc/makefile
--- adl/misc/makefile	1991-05-21 16:10:15.000000000 -0400
+++ adl.patched/misc/makefile	2015-02-16 18:00:06.000000000 -0500
@@ -5,7 +5,7 @@
 INC = ../include
 
 # Flags for CC
-CFLAGS = -O -I${INC}
+CFLAGS = ${OPTFLAGS} -I${INC}
 
 # Commands for shar
 # AR = shar -c -v
diff -Naur adl/samples/aard/makefile adl.patched/samples/aard/makefile
--- adl/samples/aard/makefile	1991-05-10 07:16:46.000000000 -0400
+++ adl.patched/samples/aard/makefile	2015-02-16 17:59:34.000000000 -0500
@@ -7,7 +7,7 @@
 all		: aard
 
 aard		: *.adl ../../adlcomp/adlcomp ../standard.adl
-	adlcomp aard.adl -w -o aard -i..
+	../../adlcomp/adlcomp aard.adl -w -o aard -i..
 shar		: aard1.shar	aard2.shar
 
 clean		:
diff -Naur adl/samples/demos/makefile adl.patched/samples/demos/makefile
--- adl/samples/demos/makefile	1991-05-10 07:17:08.000000000 -0400
+++ adl.patched/samples/demos/makefile	2015-02-16 17:59:34.000000000 -0500
@@ -19,13 +19,13 @@
 	> ${D}demos.shar )
 
 actdemo		: actdemo.adl ../standard.adl
-	adlcomp actdemo.adl -o actdemo -i ..
+	../../adlcomp/adlcomp actdemo.adl -o actdemo -i ..
 
 baby		: baby.adl ../standard.adl
-	adlcomp baby.adl -i.. -o baby
+	../../adlcomp/adlcomp baby.adl -i.. -o baby
 
 multi		: multi.adl
-	adlcomp multi.adl -o multi
+	../../adlcomp/adlcomp multi.adl -o multi
 
 tiny		: tiny.adl ../standard.adl
-	adlcomp tiny.adl -i.. -o tiny
+	../../adlcomp/adlcomp tiny.adl -i.. -o tiny
diff -Naur adl/samples/mpu/makefile adl.patched/samples/mpu/makefile
--- adl/samples/mpu/makefile	1991-05-10 07:17:32.000000000 -0400
+++ adl.patched/samples/mpu/makefile	2015-02-16 17:59:34.000000000 -0500
@@ -7,7 +7,7 @@
 all		: mpu
 
 mpu		: *.adl ../../adlcomp/adlcomp ../standard.adl
-	adlcomp mpu.adl -i.. -o mpu
+	../../adlcomp/adlcomp mpu.adl -i.. -o mpu
 
 shar		: mpu1.shar	mpu2.shar
 
diff -Naur adl/util/makefile adl.patched/util/makefile
--- adl/util/makefile	1991-05-10 07:15:58.000000000 -0400
+++ adl.patched/util/makefile	2015-02-16 18:00:55.000000000 -0500
@@ -4,8 +4,8 @@
 B = ..
 D = util/
 
-DFLAGS = -O
-CFLAGS = -I${INC} ${DFLAGS}
+DFLAGS =
+CFLAGS = -I${INC} ${DFLAGS} ${OPTFLAGS}
 
 OBJS = vstring.o	virtmem.o 	  mytime.o