home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1994 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1994.iso
/
compsrcs
/
games
/
vmsnet
/
ldb
/
patch1
< prev
next >
Wrap
Internet Message Format
|
1993-04-13
|
16KB
Path: uunet!wupost!zaphod.mps.ohio-state.edu!swrinde!network.ucsd.edu!mvb.saic.com!dayton.saic.com!dayvd.dayton.saic.com!ake
From: ake@dayvd.dayton.saic.com (Earle Ake)
Newsgroups: vmsnet.sources.games
Subject: Re: Long Distance Backgammon help (new makefile and makeldb.com)
Date: 14 Apr 93 20:01:19 EST
Organization: Science Applications Intl Corp - Dayton, OH
Lines: 434
Message-ID: <1993Apr14.200119.1@dayvd.dayton.saic.com>
References: <1993Apr13.171458.1@pembvax1.pembroke.edu> <1993Apr14.095937.6806@msuvx2.memst.edu>
NNTP-Posting-Host: dayvd.dayton.saic.com
Xref: uunet vmsnet.sources.games:684
In article <1993Apr14.095937.6806@msuvx2.memst.edu>, flowers@msuvx2.memst.edu (Harry Flowers) writes:
> In article <1993Apr13.171458.1@pembvax1.pembroke.edu>,
> rennie@pembvax1.pembroke.edu writes:
>> When I try to compile the game (module main.c to be specific), it says it can't
>> INPUTFILE.C. The file isn't in the directory so was this file accidently left
>> out?
>
> My guess is you've got a logical called MAIN. I've got one called UTIL, and
> every package that does "cc ...,util,..." gives me the same error. Just
> deassign the MAIN logical (if it's yours; if it's a system logical, re-define
> it as a process logical to "main.c". Chances are good you'll have to define
> it as "main.obj" to get the link to work, too. Some later packages I've
> gotten nicely put the ".c"'s on the compile and ".obj"'s on the link to
> avoid such problems.
I re-did the makefile and makeldb.com so it specifies the full
filename for both the C files and OBJ's. This should help out. Let me know
either way please.
Earle
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 8.3
$! On 14-APR-1993 19:47:44.60 By user AKE (Earle Ake <ake@dayton.saic.com>)
$!
$! The VMS_SHARE software that created this archive
$! was written by Andy Harper, Kings College London UK
$! -- December 1992
$!
$! Credit is due to these people for their original ideas:
$! James Gray, Michael Bednarek
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$! 1. MAKELDB.COM;4
$! 2. MAKEFILE.;11
$! 3. MAKEFILE.VMS;5
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID"))
$e="write sys$error ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack: subroutine ! P1=filename, P2=checksum, P3=attributes
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking file ", P1
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;
PROCEDURE SkipPartsep LOOP EXITIF MARK(NONE)=END_OF(b);EXITIF INDEX(ERASE_LINE,
"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;PROCEDURE ProcessLine LOCAL c,s,l,b,
n,p;c := ERASE_CHARACTER(1);s := ERASE_LINE;IF c = "X" THEN SPLIT_LINE; ENDIF;
MOVE_HORIZONTAL(-1);l := LENGTH(s);p := 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);
p := p+1;CASE c FROM ' ' TO '`' ['`']: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[
' ']: p:=p+1;[INRANGE,OUTRANGE]: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;
PROCEDURE Decode POSITION(BEGINNING_OF(b));LOOP EXITIF MARK(NONE)=END_OF(b);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");b:=CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,GET_INFO(
COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl=&f &f-1 &P1
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X$`20ccopts`20:=`20"/nodebug"
X$`20set`20verify
X$`20assign`20"sys$library"`20vaxc$include
X$`20cc/nolist'ccopts'`20board.c
X$`20cc/nolist'ccopts'`20check.c
X$`20cc/nolist'ccopts'`20control.c
X$`20cc/nolist'ccopts'`20dohelp.c
X$`20cc/nolist'ccopts'`20dostats.c
X$`20cc/nolist'ccopts'`20fe_curses.c
X$`20cc/nolist'ccopts'`20flist_vms.c
X$`20cc/nolist'ccopts'`20game.c
X$`20cc/nolist'ccopts'`20lock.c
X$`20cc/nolist'ccopts'`20main.c
X$`20cc/nolist'ccopts'`20misc.c
X$`20cc/nolist'ccopts'`20move.c
X$`20cc/nolist'ccopts'`20process.c
X$`20cc/nolist'ccopts'`20r_xrand.c
X$`20cc/nolist'ccopts'`20rcvop.c
X$`20cc/nolist'ccopts'`20readmail.c
X$`20cc/nolist'ccopts'`20save.c
X$`20cc/nolist'ccopts'`20t_email.c
X$`20cc/nolist'ccopts'`20vars.c
X$`20link/exe=ldb/nodebug/notrace`20-
Xboard.obj,check.obj,control.obj,dohelp.obj,dostats.obj,fe_curses.obj,-
Xflist_vms.obj,game.obj,lock.obj,main.obj,misc.obj,move.obj,process.obj,-
Xr_xrand.obj,rcvop.obj,readmail.obj,save.obj,t_email.obj,vars.obj,-
Xsys$share:vaxccurse.olb/library,-
Xsys$disk:`5B`5Dldb.opt/option
X$`20set`20noverify
X$`20exit
$ call unpack MAKELDB.COM;4 222773752 ""
$!
$ create 'f'
X#`20Makefile`20for`20ldb`20under`20vms`095/1/92
X#
X#`20Copyright`201992`20`20Earle`20F.`20Ake
X#
X#`20Permission`20to`20use,`20copy,`20modify,`20and`20distribute`20this`20softw
Vare`20and`20its
X#`20documentation`20without`20fee`20is`20hereby`20granted,`20subject`20to`20th
Ve`20restrictions
X#`20detailed`20in`20the`20README`20file,`20which`20is`20included`20here`20by
V`20reference.
X#`20Any`20other`20use`20requires`20written`20permission`20from`20the`20author.
V`20`20This`20software
X#`20is`20distributed`20"as`20is"`20without`20any`20warranty,`20including`20any
V`20implied
X#`20warranties`20of`20merchantability`20or`20fitness`20for`20a`20particular
V`20purpose.
X#`20The`20author`20shall`20not`20be`20liable`20for`20any`20damages`20resulting
V`20from`20the
X#`20use`20of`20this`20software.`20`20By`20using`20this`20software,`20the`20use
Vr`20agrees
X#`20to`20these`20terms.
X
X#`20This`20makefile`20is`20for`20the`20vms`20make`20program`20written`20by`20T
Vodd`20Aven`20and
X#`20used`20by`20DECUS`20UUCP.`20`20This`20file`20should`20be`20renamed`20to
V`20makefile.
X#`20before`20it`20is`20used.`20`20If`20you`20do`20not`20have`20make`20on`20you
Vr`20system,`20you
X#`20can`20compile`20ldb`20with`20@makeldb.com.`20`20If`20you`20use`20this`20fi
Vle,`20you
X#`20shouldn't`20need`20to`20modify`20any`20of`20the`20installation`20options
V`20below.
X
X###`20INSTALLATION`20OPTIONS`20###
X#`20If`20your`20host`20uses`20an`20ancient`20version`20of`20curses`20(e.g.`20V
VAX-C,`20Sequent),
X#`20uncomment`20the`20following`20line.`20`20To`20tell`20if`20you`20need`20thi
Vs`20option,
X#`20first`20try`20compiling`20without`20it`20and`20see`20if`20your`20linker
V`20complains
X#`20about`20cbreak()`20and`20nocbreak()`20not`20being`20defined.`20`20If`20it
V`20does,
X#`20you`20need`20this`20option.
X#OLDCURSES=
X#OLDCURSES=-DOLD_CURSES
X
X#`20If`20your`20libc`20doesn't`20have`20a`20rename`20function,`20uncomment`20t
Vhe
X#`20following`20to`20use`20the`20one`20that's`20included.`20`20DO`20NOT`20use
V`20this
X#`20rename`20if`20your`20system`20already`20has`20one.
X#RENAME=
X#RENAME=rename.o
X
X#`20Uncomment`20the`20following`20lines`20only`20if`20you`20are`20using`20Euni
Vce.
X#`20If`20you`20don't`20know`20what`20it`20is,`20believe`20me,`20you're`20not
V`20using`20it.
X#UNIXTOVMS=true
X#VMSTOUNIX=true
X#`20UNIXTOVMS=unixtovms
X#`20VMSTOUNIX=vmstounix
X
X#`20Put`20the`20name`20of`20the`20front-end`20you`20want`20to`20compile`20in
V`20here.
X#`20NOTE:`20there`20is`20currently`20only`20one`20available`20front-end`20(cur
Vses).
XFE_FILE=fe_curses
X
X#`20Put`20the`20name`20of`20the`20transport`20you`20want`20to`20compile`20in
V`20here.
X#`20NOTE:`20there`20is`20currently`20only`20one`20available`20transport`20(ema
Vil).
XT_FILE=t_email
X
X#`20Put`20the`20name`20of`20the`20dice`20roller`20you`20want`20to`20compile
V`20in`20here.
X#`20If`20you`20want`20to`20write`20your`20own`20dice`20roller,`20you`20can.
V`20`20I`20would
X#`20prefer`20people`20all`20used`20the`20same`20one,`20since`20that`20is`20mor
Ve`20fair,
X#`20but`20as`20long`20as`20it`20is`20really`20a`20random`20number`20generator,
V`20you're`20ok.
X#`20If`20you`20put`20in`20a`20fake`20dice`20roller`20(e.g.`20one`20that`20asks
V`20you`20what
X#`20roll`20you`20want),`20you`20are`20in`20violation`20of`20the`20copyright.
V`20`20Read
X#`20the`20README`20file`20for`20more`20information.
XR_FILE=r_xrand
X
X#`20Put`20compiler`20flags`20here.
XCFLAGS=/nolist
X#LIBS=-lcurses`20-ltermcap
X
X#`20use`20these`202`20lines`20for`20SCO`20XENIX`20(also`20SCO`20UNIX?)
X#CFLAGS=`20-O`20-Mle`20-LARGE`20-Zi`20-DM_TERMCAP`20$(OLDCURSES)
X#LIBS=-lx`20-ltcap`20-ltermlib
X#LINTFLAGS=
X
X#`20Name`20of`20ldb`20executable.
X#LDB=ldb
XLDB=ldb.exe
X
X#`20Page`20length`20to`20format`20manual`20with.`20`2062`20for`20VMS`20or`20Eu
Vnice,`2066`20for`20most`20others.
X#PAGELEN=66
X
X#CC=cc
X
X###`20END`20OF`20INSTALLATION`20OPTIONS`20###
X
X*.obj`20:`09*.c
X`09write`20sys$output`20"Compiling`20$*"
X`09cc`20$(CFLAGS)`20$*.c
X`09purge/nolog`20$*.obj
X`09rename`20$*.obj`20*.*;1
X
Xldb`20:`09$(LDB)
X`09write`20sys$output`20"ldb`20Build`20finished."
X
Xldb_objs`20=`20board.obj,game.obj,main.obj,misc.obj,move.obj,process.obj,`5C
X`09rcvop.obj,control.obj,`5C
X`09check.obj,readmail.obj,save.obj,vars.obj,$(FE_FILE).obj,`5C
X`09$(T_FILE).obj,$(R_FILE).obj,`5C
X`09dohelp.obj,dostats.obj,flist_vms.obj,lock.obj
X
X#
X#`09Include`20all`20the`20sources`20necessary`20to`20build`20under`20VMS`20or
V`20unix
X#
X
XSHARFILES=readme.,todo.,ldb.doc,ldb.man,ldb.ps,makefile.*,ldb.opt,makeldb.com,
V*.c,*.h,ldbstarter.csh,ldb.tex
X
X$(LDB)`20:`20$(ldb_objs)
X`09write`20sys$output`20"Linking`20$(LDB)"
X`20`09link/exe=$(LDB)/notrace/nodebug/nomap`20$(ldb_objs),`5C
X`09sys$share:vaxccurse.olb/library,`5C
X`09sys$disk:`5B`5Dldb.opt/options
X
X$(ldb_objs)`20:`20ldb.h`20patchlevel.h
X
Xvms_share`20:`20$(SHARFILES)
X`09vms_share`20$(SHARFILES)`20ldb_src
$ call unpack MAKEFILE.;11 1031224860 ""
$!
$ create 'f'
X#`20Makefile`20for`20ldb`20under`20vms`095/1/92
X#
X#`20Copyright`201992`20`20Earle`20F.`20Ake
X#
X#`20Permission`20to`20use,`20copy,`20modify,`20and`20distribute`20this`20softw
Vare`20and`20its
X#`20documentation`20without`20fee`20is`20hereby`20granted,`20subject`20to`20th
Ve`20restrictions
X#`20detailed`20in`20the`20README`20file,`20which`20is`20included`20here`20by
V`20reference.
X#`20Any`20other`20use`20requires`20written`20permission`20from`20the`20author.
V`20`20This`20software
X#`20is`20distributed`20"as`20is"`20without`20any`20warranty,`20including`20any
V`20implied
X#`20warranties`20of`20merchantability`20or`20fitness`20for`20a`20particular
V`20purpose.
X#`20The`20author`20shall`20not`20be`20liable`20for`20any`20damages`20resulting
V`20from`20the
X#`20use`20of`20this`20software.`20`20By`20using`20this`20software,`20the`20use
Vr`20agrees
X#`20to`20these`20terms.
X
X#`20This`20makefile`20is`20for`20the`20vms`20make`20program`20written`20by`20T
Vodd`20Aven`20and
X#`20used`20by`20DECUS`20UUCP.`20`20This`20file`20should`20be`20renamed`20to
V`20makefile.
X#`20before`20it`20is`20used.`20`20If`20you`20do`20not`20have`20make`20on`20you
Vr`20system,`20you
X#`20can`20compile`20ldb`20with`20@makeldb.com.`20`20If`20you`20use`20this`20fi
Vle,`20you
X#`20shouldn't`20need`20to`20modify`20any`20of`20the`20installation`20options
V`20below.
X
X###`20INSTALLATION`20OPTIONS`20###
X#`20If`20your`20host`20uses`20an`20ancient`20version`20of`20curses`20(e.g.`20V
VAX-C,`20Sequent),
X#`20uncomment`20the`20following`20line.`20`20To`20tell`20if`20you`20need`20thi
Vs`20option,
X#`20first`20try`20compiling`20without`20it`20and`20see`20if`20your`20linker
V`20complains
X#`20about`20cbreak()`20and`20nocbreak()`20not`20being`20defined.`20`20If`20it
V`20does,
X#`20you`20need`20this`20option.
X#OLDCURSES=
X#OLDCURSES=-DOLD_CURSES
X
X#`20If`20your`20libc`20doesn't`20have`20a`20rename`20function,`20uncomment`20t
Vhe
X#`20following`20to`20use`20the`20one`20that's`20included.`20`20DO`20NOT`20use
V`20this
X#`20rename`20if`20your`20system`20already`20has`20one.
X#RENAME=
X#RENAME=rename.o
X
X#`20Uncomment`20the`20following`20lines`20only`20if`20you`20are`20using`20Euni
Vce.
X#`20If`20you`20don't`20know`20what`20it`20is,`20believe`20me,`20you're`20not
V`20using`20it.
X#UNIXTOVMS=true
X#VMSTOUNIX=true
X#`20UNIXTOVMS=unixtovms
X#`20VMSTOUNIX=vmstounix
X
X#`20Put`20the`20name`20of`20the`20front-end`20you`20want`20to`20compile`20in
V`20here.
X#`20NOTE:`20there`20is`20currently`20only`20one`20available`20front-end`20(cur
Vses).
XFE_FILE=fe_curses
X
X#`20Put`20the`20name`20of`20the`20transport`20you`20want`20to`20compile`20in
V`20here.
X#`20NOTE:`20there`20is`20currently`20only`20one`20available`20transport`20(ema
Vil).
XT_FILE=t_email
X
X#`20Put`20the`20name`20of`20the`20dice`20roller`20you`20want`20to`20compile
V`20in`20here.
X#`20If`20you`20want`20to`20write`20your`20own`20dice`20roller,`20you`20can.
V`20`20I`20would
X#`20prefer`20people`20all`20used`20the`20same`20one,`20since`20that`20is`20mor
Ve`20fair,
X#`20but`20as`20long`20as`20it`20is`20really`20a`20random`20number`20generator,
V`20you're`20ok.
X#`20If`20you`20put`20in`20a`20fake`20dice`20roller`20(e.g.`20one`20that`20asks
V`20you`20what
X#`20roll`20you`20want),`20you`20are`20in`20violation`20of`20the`20copyright.
V`20`20Read
X#`20the`20README`20file`20for`20more`20information.
XR_FILE=r_xrand
X
X#`20Put`20compiler`20flags`20here.
XCFLAGS=/nolist
X#LIBS=-lcurses`20-ltermcap
X
X#`20use`20these`202`20lines`20for`20SCO`20XENIX`20(also`20SCO`20UNIX?)
X#CFLAGS=`20-O`20-Mle`20-LARGE`20-Zi`20-DM_TERMCAP`20$(OLDCURSES)
X#LIBS=-lx`20-ltcap`20-ltermlib
X#LINTFLAGS=
X
X#`20Name`20of`20ldb`20executable.
X#LDB=ldb
XLDB=ldb.exe
X
X#`20Page`20length`20to`20format`20manual`20with.`20`2062`20for`20VMS`20or`20Eu
Vnice,`2066`20for`20most`20others.
X#PAGELEN=66
X
X#CC=cc
X
X###`20END`20OF`20INSTALLATION`20OPTIONS`20###
X
X*.obj`20:`09*.c
X`09write`20sys$output`20"Compiling`20$*"
X`09cc`20$(CFLAGS)`20$*.c
X`09purge/nolog`20$*.obj
X`09rename`20$*.obj`20*.*;1
X
Xldb`20:`09$(LDB)
X`09write`20sys$output`20"ldb`20Build`20finished."
X
Xldb_objs`20=`20board.obj,game.obj,main.obj,misc.obj,move.obj,process.obj,`5C
X`09rcvop.obj,control.obj,`5C
X`09check.obj,readmail.obj,save.obj,vars.obj,$(FE_FILE).obj,`5C
X`09$(T_FILE).obj,$(R_FILE).obj,`5C
X`09dohelp.obj,dostats.obj,flist_vms.obj,lock.obj
X
X#
X#`09Include`20all`20the`20sources`20necessary`20to`20build`20under`20VMS`20or
V`20unix
X#
X
XSHARFILES=readme.,todo.,ldb.doc,ldb.man,ldb.ps,makefile.*,ldb.opt,makeldb.com,
V*.c,*.h,ldbstarter.csh,ldb.tex
X
X$(LDB)`20:`20$(ldb_objs)
X`09write`20sys$output`20"Linking`20$(LDB)"
X`20`09link/exe=$(LDB)/notrace/nodebug/nomap`20$(ldb_objs),`5C
X`09sys$share:vaxccurse.olb/library,`5C
X`09sys$disk:`5B`5Dldb.opt/options
X
X$(ldb_objs)`20:`20ldb.h`20patchlevel.h
X
Xvms_share`20:`20$(SHARFILES)
X`09vms_share`20$(SHARFILES)`20ldb_src
$ call unpack MAKEFILE.VMS;5 1031224860 ""
$ v=f$verify(v)
$ exit