shaunc@gold.gvg.tek.com (Shaun Case) (04/20/91)
Change to townmaze.h for Borland C++ 2.0 compilation My apologies for not using a diff program. // Shaun // Btw, loved your program, Kent. ------------------------------- Key: : old + new --- cut here --- cut here --- :** Define RAND48 in the makefile to use the srand48() and lrand48() :** functions instead of the srandom() and random() functions. :*/ : :#define PROGRESS 0 :#define SHOWSTART 0 :#define SHOWEND 0 :#define HEADER 1 : :#ifdef RAND48 :#include <math.h> :#define RANDOM lrand48 :#define SEEDRANDOM srand48 :#else :#define RANDOM random :#define SEEDRANDOM srandom :#endif + +#ifdef __BORLANDC__ +#include <stdlib.h> +#undef RANDOM +#define RANDOM rand +#undef SEEDRANDOM +#define SEEDRANDOM srand +#endif : :/* :** Control for defintion (allocation) of globals in main only, :** declaration only elsewhere. :*/ --- cut here --- cut here ---
shaunc@gold.gvg.tek.com (Shaun Case) (04/20/91)
# makefile Borland C++ 2.0 by Shaun Case derived work from townmake.lmk # Kent Paul Dolan retains copyright # # townmake.lmk Copyright 1991 by Kent Paul Dolan, # Mountain View, CA, USA, 94039-0755 # May be freely used in any non-commercial venture. # Copyrighted only to prevent patenting of the ideas # contained herein by others. # # BSD 4.3 Unix make file for use with "make -f townmaze.lmk" command # Amiga Lattice C 5.05 make file for use with "lmk -f townmzae.lmk" command; # (after minor edits) -- needs townmaze.with for blink command. # #------------ # C filenames truncated to 8.3 format when moving to MS-DOS. # To resolve truncation resulting in identical filenames, I renamed 2 # files: # # FROM TO ACTUAL # showlistdet.c showdetlist.c SHOWDETL.C # showlistsum.c showsumlist.c SHOWSUML.C # # Shaun Case, atman%ecst.csuchico.edu@RELAY.CS.NET #------------ # C files: # # cleanupmap.c # closedoors.c # closegates.c # connectst.c # filllist.c # fillmaze.c # finishalleys.c # freespace.c # getargs.c # interiorcell.c # makecourts.c # makegates.c # makestreet.c # makespace.c # makeunused.c # movefromto.c # nhbrexists.c # nhbris.c # showdbmaze.c # showlistdet.c # showlistsum.c # showmaze.c # townmain.c # usage.c # # townmaze.h # townproto.h # # pick a compile command # # Amiga Lattice C 5.05: # #CC = lc -dRAND48 # # or BSD 4.3 Unix oldstyle cc: # #CC = cc -c # or Borland C++ 2.0 CC = bccx -P-c -c -H # # The link command is too complex to just define up here; it will need # changes in the body of the makefile where "townmaze" is created. # HEADERS = townmaze.h \ townproto.h SOURCES = cleanupmap.c \ closedoors.c \ closegates.c \ connectst.c \ filllist.c \ fillmaze.c \ finishalleys.c \ freespace.c \ getargs.c \ interiorcell.c \ makecourts.c \ makegates.c \ makestreet.c \ makespace.c \ makeunused.c \ movefromto.c \ nhbrexists.c \ nhbris.c \ showdbmaze.c \ showdetl.c \ showsuml.c \ showmaze.c \ townmain.c \ usage.c OBJECTS = cleanupmap.obj \ closedoors.obj \ closegates.obj \ connectst.obj \ filllist.obj \ fillmaze.obj \ finishalleys.obj \ freespace.obj \ getargs.obj \ interiorcell.obj \ makegates.obj \ makecourts.obj \ makespace.obj \ makestreet.obj \ makeunused.obj \ movefromto.obj \ nhbrexists.obj \ nhbris.obj \ showdbmaze.obj \ showdetl.obj \ showsuml.obj \ showmaze.obj \ townmain.obj \ usage.obj # # Pick a link command # # Amiga Lattice C 5.05: # #townmaze: $(OBJECTS) # blink with townmaze.with # # or BSD 4.3 Unix old style cc: # # #townmaze: $(OBJECTS) # cc -o townmaze ${OBJECTS} # # or Borland C++ 2.0 townmaze: $(OBJECTS) tlink /c @&&! c0s $(OBJECTS) $* $* emu.lib maths.lib cs.lib ! # # cleanupmap.obj: $(HEADERS) cleanupmap.c $(CC) cleanupmap.c closedoors.obj: $(HEADERS) closedoors.c $(CC) closedoors.c closegates.obj: $(HEADERS) closegates.c $(CC) closegates.c connectst.obj: $(HEADERS) connectst.c $(CC) connectst.c filllist.obj: $(HEADERS) filllist.c $(CC) filllist.c fillmaze.obj: $(HEADERS) fillmaze.c $(CC) fillmaze.c finishalleys.obj: $(HEADERS) finishalleys.c $(CC) finishalleys.c freespace.obj: $(HEADERS) freespace.c $(CC) freespace.c getargs.obj: $(HEADERS) getargs.c $(CC) getargs.c interiorcell.obj: $(HEADERS) interiorcell.c $(CC) interiorcell.c makecourts.obj: $(HEADERS) makecourts.c $(CC) makecourts.c makegates.obj: $(HEADERS) makegates.c $(CC) makegates.c makespace.obj: $(HEADERS) makespace.c $(CC) makespace.c makestreet.obj: $(HEADERS) makestreet.c $(CC) makestreet.c makeunused.obj: $(HEADERS) makeunused.c $(CC) makeunused.c movefromto.obj: $(HEADERS) movefromto.c $(CC) movefromto.c nhbrexists.obj: $(HEADERS) nhbrexists.c $(CC) nhbrexists.c nhbris.obj: $(HEADERS) nhbris.c $(CC) nhbris.c showdbmaze.obj: $(HEADERS) showdbmaze.c $(CC) showdbmaze.c showdetl.obj: $(HEADERS) showdetl.c $(CC) showdetl.c showsuml.obj: $(HEADERS) showsuml.c $(CC) showsuml.c showmaze.obj: $(HEADERS) showmaze.c $(CC) showmaze.c townmain.obj: $(HEADERS) townmain.c $(CC) townmain.c usage.obj: $(HEADERS) usage.c $(CC) usage.c