diff options
author | B. Watson <yalhcru@gmail.com> | 2015-02-20 09:43:56 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-02-20 09:43:56 +0700 |
commit | 5ea3db7bec2830a9ec0f7dd011ea077ae748c6cc (patch) | |
tree | e191766bbd5a5b44ef53cae579dd92fee5a59795 /games/adl/compilefixes.diff | |
parent | db2ba2f0b34a84949844e5f4e4fa7b97a6805ee4 (diff) | |
download | slackbuilds-5ea3db7bec2830a9ec0f7dd011ea077ae748c6cc.tar.gz |
games/adl: Added (compiler and runtime).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/adl/compilefixes.diff')
-rw-r--r-- | games/adl/compilefixes.diff | 272 |
1 files changed, 272 insertions, 0 deletions
diff --git a/games/adl/compilefixes.diff b/games/adl/compilefixes.diff new file mode 100644 index 0000000000..13b87cf52e --- /dev/null +++ b/games/adl/compilefixes.diff @@ -0,0 +1,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/adlrun"' + + # 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 + |