[comp.sources.bugs] dmake 3.6 patch 1

dvadura@watdragon.waterloo.edu (Dennis Vadura) (11/01/90)

#!/bin/sh
# shar:	Shell Archiver  (v1.22)
#
# This is part 1 of a multipart archive                                    
# do not concatenate these parts, unpack them in order with /bin/sh        
#
#	Run the following text with /bin/sh to create:
#	  dm36.p1
#
if test -r s2_seq_.tmp
then echo "Must unpack archives in sequence!"
     next=`cat s2_seq_.tmp`; echo "Please unpack part $next next"
     exit 1; fi
sed 's/^X//' << 'SHAR_EOF' > dm36.p1 &&
X#!/bin/sh
X# dodiff:  Directory tree maintainer (v1.1)
X#
X# DMAKE Version 3.6, patch #1
X# ---------------------------
X# 
X# Severity: Medium
X# 
X# Nature:   Minor teething problems with UNIX, and major problems with MSC
X#           6.0, and TCC 2.0 swapping versions fixed.
X# 
X# Format:   Shar containing new versions of affected files.  With appropriate
X#           patches.  (run the patch file through sh in the source distribution
X#           directory and it will do the rest)
X# 
X#           Also available as pub/src/dmake-3.6-patch1 on watmsg.uwaterloo.edu
X#           (129.97.129.9)
X# 
X#           Archived source on watmsg incorporates this patch.
X# 
X# Prerequisites: dmake version 3.6, patchlevel 1 source distribution
X# 
X# 
X# Description of Fixes:
X# ---------------------
X# 1. Compilation problems with Microsoft compilers, and swapping versions of
X#    dmake.  To the best of my knowledge versions 4.0, 5.0, 5.1 and 6.0 of MSC
X#    now fully compile and generate running binaries both for swapping and non
X#    swapping versions of dmake.
X# 
X# 2. Other fixes include a hack to allow parsing of makefiles shipped over from
X#    DOS that contain cr-lf combinations.  This doesn't seem to impact processing
X#    of normal UNIX makefiles at all.
X# 
X# 3. Changed DOS versions of tempnam.c to use _psp to generate temporary file
X#    names instead of the current time as supplied by time().  The reason for
X#    this is too bizzare to go into here.
X# 
X# 4. Xenix is now a supported make target, as is Atari-ST TOS using GCC.
X# 
X# 5. A number of small tweaks here and there, not serious but might make
X#    compiles on a number of systems cleaner.
X# 
X# 6. Clarification of the documentation in several spots.
X# 
X# 7. Patch to dmake.tf to remove ^G control characters.  NOTE:  This patch
X#    may fail if you never received the ^G characters in the first place.  If
X#    so then please apply the patch by hand.
X# 
X# 8. inferred targets that infer recipes from rules having a .SETDIR attribute
X#    now have the .SETDIR applied prior to making the prerequisites and the
X#    target.
X# 
X# Many thanks to all those that helped find and identify and in some cases
X# provided fixes and/or new code for the above enhancements.
X# 
X# -dennis
X#
X# Remove Obsolete files from distribution
Xrm -f msdos/mscdos/obj60swp.rsp
Xrm -f msdos/mscdos/obj60.rsp
Xrm -f msdos/mscdos/mkswp.bat
Xrm -f msdos/mscdos/mk.bat
Xrm -f msdos/mscdos/lib60swp.rsp
Xrm -f msdos/mscdos/lib60.rsp
X
X# Now use a shar archive to add any new files to the distribution
X# shar:	Shell Archiver  (v1.22)
X#
X#	Run the following text with /bin/sh to create:
X#	  msdos/mscdos/mk40.bat
X#	  msdos/mscdos/mk40swp.bat
X#	  msdos/mscdos/mk50.bat
X#	  msdos/mscdos/mk50swp.bat
X#	  msdos/mscdos/mk51.bat
X#	  msdos/mscdos/mk51swp.bat
X#	  msdos/mscdos/optoff.h
X#	  readme/atari.tos
X#	  readme/patch1
X#	  tos
X#	  tos/arlib.c
X#	  tos/config.h
X#	  tos/config.mk
X#	  tos/dirbrk.c
X#	  tos/make.sh
X#	  tos/rmprq.c
X#	  tos/ruletab.c
X#	  tos/runargv.c
X#	  tos/startup.h
X#	  tos/startup.mk
X#	  tos/sysintf.h
X#
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk40.bat &&
XXmkdir objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  infer.c
XXmv infer.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  make.c
XXmv make.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  stat.c
XXmv stat.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  expand.c
XXmv expand.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  string.c
XXmv string.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  hash.c
XXmv hash.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dag.c
XXmv dag.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dmake.c
XXmv dmake.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  path.c
XXmv path.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  imacs.c
XXmv imacs.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  sysintf.c
XXmv sysintf.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  parse.c
XXmv parse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  getinp.c
XXmv getinp.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  quit.c
XXmv quit.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  basename.c
XXmv basename.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dump.c
XXmv dump.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  macparse.c
XXmv macparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  rulparse.c
XXmv rulparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  percent.c
XXmv percent.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  function.c
XXmv function.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\ruletab.c
XXmv ruletab.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\dirbrk.c
XXmv dirbrk.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\runargv.c
XXmv runargv.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\arlib.c
XXmv arlib.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\_chdir.c
XXmv _chdir.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\switchar.c
XXmv switchar.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\rmprq.c
XXmv rmprq.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\mscdos\tempnam.c
XXmv tempnam.obj objects
XXlink @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
XSHAR_EOF
Xchmod 0640 msdos/mscdos/mk40.bat || echo "restore of msdos/mscdos/mk40.bat fails"
Xset `wc -c msdos/mscdos/mk40.bat`;Sum=$1
Xif test "$Sum" != "3127"
Xthen echo original size 3127, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk40swp.bat &&
XXmkdir objects
XXmasm -t -mx -Dmcompact msdos\exec.asm;
XXmv exec.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  infer.c
XXmv infer.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  make.c
XXmv make.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  stat.c
XXmv stat.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  expand.c
XXmv expand.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  string.c
XXmv string.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  hash.c
XXmv hash.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dag.c
XXmv dag.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dmake.c
XXmv dmake.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  path.c
XXmv path.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  imacs.c
XXmv imacs.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  sysintf.c
XXmv sysintf.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  parse.c
XXmv parse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  getinp.c
XXmv getinp.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  quit.c
XXmv quit.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  basename.c
XXmv basename.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  dump.c
XXmv dump.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  macparse.c
XXmv macparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  rulparse.c
XXmv rulparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  percent.c
XXmv percent.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  function.c
XXmv function.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\ruletab.c
XXmv ruletab.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\dirbrk.c
XXmv dirbrk.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\runargv.c
XXmv runargv.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\arlib.c
XXmv arlib.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\_chdir.c
XXmv _chdir.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\switchar.c
XXmv switchar.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\rmprq.c
XXmv rmprq.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\find.c
XXmv find.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\spawn.c
XXmv spawn.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -mC -DM_I86=1 -D__STDC__=1  msdos\mscdos\tempnam.c
XXmv tempnam.obj objects
XXlink @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
XSHAR_EOF
Xchmod 0640 msdos/mscdos/mk40swp.bat || echo "restore of msdos/mscdos/mk40swp.bat fails"
Xset `wc -c msdos/mscdos/mk40swp.bat`;Sum=$1
Xif test "$Sum" != "3411"
Xthen echo original size 3411, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk50.bat &&
XXmkdir objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs infer.c
XXmv infer.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs make.c
XXmv make.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs stat.c
XXmv stat.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs expand.c
XXmv expand.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs string.c
XXmv string.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs hash.c
XXmv hash.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dag.c
XXmv dag.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dmake.c
XXmv dmake.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs path.c
XXmv path.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs imacs.c
XXmv imacs.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs sysintf.c
XXmv sysintf.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs parse.c
XXmv parse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs getinp.c
XXmv getinp.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs quit.c
XXmv quit.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs basename.c
XXmv basename.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dump.c
XXmv dump.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs macparse.c
XXmv macparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs rulparse.c
XXmv rulparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs percent.c
XXmv percent.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs function.c
XXmv function.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\ruletab.c
XXmv ruletab.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\dirbrk.c
XXmv dirbrk.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\runargv.c
XXmv runargv.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\arlib.c
XXmv arlib.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\_chdir.c
XXmv _chdir.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\switchar.c
XXmv switchar.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\rmprq.c
XXmv rmprq.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\mscdos\tempnam.c
XXmv tempnam.obj objects
XXlink @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
XSHAR_EOF
Xchmod 0640 msdos/mscdos/mk50.bat || echo "restore of msdos/mscdos/mk50.bat fails"
Xset `wc -c msdos/mscdos/mk50.bat`;Sum=$1
Xif test "$Sum" != "3155"
Xthen echo original size 3155, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk50swp.bat &&
XXmkdir objects
XXmasm -t -mx -Dmcompact msdos\exec.asm;
XXmv exec.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs infer.c
XXmv infer.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs make.c
XXmv make.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs stat.c
XXmv stat.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs expand.c
XXmv expand.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs string.c
XXmv string.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs hash.c
XXmv hash.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dag.c
XXmv dag.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dmake.c
XXmv dmake.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs path.c
XXmv path.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs imacs.c
XXmv imacs.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs sysintf.c
XXmv sysintf.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs parse.c
XXmv parse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs getinp.c
XXmv getinp.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs quit.c
XXmv quit.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs basename.c
XXmv basename.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs dump.c
XXmv dump.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs macparse.c
XXmv macparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs rulparse.c
XXmv rulparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs percent.c
XXmv percent.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs function.c
XXmv function.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\ruletab.c
XXmv ruletab.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\dirbrk.c
XXmv dirbrk.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\runargv.c
XXmv runargv.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\arlib.c
XXmv arlib.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\_chdir.c
XXmv _chdir.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\switchar.c
XXmv switchar.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\rmprq.c
XXmv rmprq.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\find.c
XXmv find.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\spawn.c
XXmv spawn.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=500 -Oscl -Gs msdos\mscdos\tempnam.c
XXmv tempnam.obj objects
XXlink @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
XSHAR_EOF
Xchmod 0640 msdos/mscdos/mk50swp.bat || echo "restore of msdos/mscdos/mk50swp.bat fails"
Xset `wc -c msdos/mscdos/mk50swp.bat`;Sum=$1
Xif test "$Sum" != "3441"
Xthen echo original size 3441, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk51.bat &&
XXmkdir objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs infer.c
XXmv infer.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs make.c
XXmv make.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs stat.c
XXmv stat.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs expand.c
XXmv expand.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs string.c
XXmv string.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs hash.c
XXmv hash.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dag.c
XXmv dag.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dmake.c
XXmv dmake.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs path.c
XXmv path.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs imacs.c
XXmv imacs.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs sysintf.c
XXmv sysintf.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs parse.c
XXmv parse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs getinp.c
XXmv getinp.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs quit.c
XXmv quit.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs basename.c
XXmv basename.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dump.c
XXmv dump.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs macparse.c
XXmv macparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs rulparse.c
XXmv rulparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs percent.c
XXmv percent.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs function.c
XXmv function.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
XXmv ruletab.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
XXmv dirbrk.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
XXmv runargv.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
XXmv arlib.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\_chdir.c
XXmv _chdir.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
XXmv switchar.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
XXmv rmprq.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\mscdos\tempnam.c
XXmv tempnam.obj objects
XXlink @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
XSHAR_EOF
Xchmod 0640 msdos/mscdos/mk51.bat || echo "restore of msdos/mscdos/mk51.bat fails"
Xset `wc -c msdos/mscdos/mk51.bat`;Sum=$1
Xif test "$Sum" != "3155"
Xthen echo original size 3155, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/mk51swp.bat &&
XXmkdir objects
XXmasm -t -mx -Dmcompact msdos\exec.asm;
XXmv exec.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs infer.c
XXmv infer.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs make.c
XXmv make.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs stat.c
XXmv stat.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs expand.c
XXmv expand.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs string.c
XXmv string.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs hash.c
XXmv hash.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dag.c
XXmv dag.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dmake.c
XXmv dmake.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs path.c
XXmv path.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs imacs.c
XXmv imacs.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs sysintf.c
XXmv sysintf.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs parse.c
XXmv parse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs getinp.c
XXmv getinp.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs quit.c
XXmv quit.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs basename.c
XXmv basename.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs dump.c
XXmv dump.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs macparse.c
XXmv macparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs rulparse.c
XXmv rulparse.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs percent.c
XXmv percent.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs function.c
XXmv function.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
XXmv ruletab.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
XXmv dirbrk.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
XXmv runargv.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
XXmv arlib.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\_chdir.c
XXmv _chdir.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
XXmv switchar.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
XXmv rmprq.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\find.c
XXmv find.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\spawn.c
XXmv spawn.obj objects
XXcl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D_MSC_VER=510 -Oscl -Gs msdos\mscdos\tempnam.c
XXmv tempnam.obj objects
XXlink @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
XSHAR_EOF
Xchmod 0640 msdos/mscdos/mk51swp.bat || echo "restore of msdos/mscdos/mk51swp.bat fails"
Xset `wc -c msdos/mscdos/mk51swp.bat`;Sum=$1
Xif test "$Sum" != "3441"
Xthen echo original size 3441, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > msdos/mscdos/optoff.h &&
XX#if _MSC_VER < 600
XX# pragma loop_opt(off)
XX#endif
XSHAR_EOF
Xchmod 0640 msdos/mscdos/optoff.h || echo "restore of msdos/mscdos/optoff.h fails"
Xset `wc -c msdos/mscdos/optoff.h`;Sum=$1
Xif test "$Sum" != "49"
Xthen echo original size 49, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > readme/atari.tos &&
XXThis file describes the Atari-tos distribution of dmake.
XX
XXThe code to compile on an Atari-ST using GCC was supplied by Edgar Roeder
XX(roeder@cs.uni-sb.de).  I do not have an ST to verify the distribution sources
XXon but I have no reason to believe them to not work.  If there are any
XXproblems please let Edgar or myself know.
XX
XXI know of no bugs or limitation to the the Atari-ST implementation.  Note that
XXit is similar to the DOS version but it does not swap itself out.  This does
XXnot appear to be as much of a problem on the Atari as it is on MSDOS boxes.
XX
XX-dennis
XSHAR_EOF
Xchmod 0640 readme/atari.tos || echo "restore of readme/atari.tos fails"
Xset `wc -c readme/atari.tos`;Sum=$1
Xif test "$Sum" != "566"
Xthen echo original size 566, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > readme/patch1 &&
XXDMAKE Version 3.6, patch #1
XX---------------------------
XX
XXSeverity: Medium
XX
XXNature:   Minor teething problems with UNIX, and major problems with MSC
XX	  6.0, and TCC 2.0 swapping versions fixed.
XX
XXFormat:   Shar containing new versions of affected files.  With appropriate
XX          patches.  (run the patch file through sh in the source distribution
XX          directory and it will do the rest)
XX
XX          Also available as pub/src/dmake-3.6-patch1 on watmsg.uwaterloo.edu
XX          (129.97.129.9)
XX
XX          Archived source on watmsg incorporates this patch.
XX
XXPrerequisites: dmake version 3.6, patchlevel 1 source distribution
XX
XX
XXDescription of Fixes:
XX---------------------
XX1. Compilation problems with Microsoft compilers, and swapping versions of
XX   dmake.  To the best of my knowledge versions 4.0, 5.0, 5.1 and 6.0 of MSC
XX   now fully compile and generate running binaries both for swapping and non
XX   swapping versions of dmake.
XX
XX2. Other fixes include a hack to allow parsing of makefiles shipped over from
XX   DOS that contain cr-lf combinations.  This doesn't seem to impact processing
XX   of normal UNIX makefiles at all.
XX
XX3. Changed DOS versions of tempnam.c to use _psp to generate temporary file
XX   names instead of the current time as supplied by time().  The reason for
XX   this is too bizzare to go into here.
XX
XX4. Xenix is now a supported make target, as is Atari-ST TOS using GCC.
XX
XX5. A number of small tweaks here and there, not serious but might make
XX   compiles on a number of systems cleaner.
XX
XX6. Clarification of the documentation in several spots.
XX
XX7. Patch to dmake.tf to remove ^G control characters.  NOTE:  This patch
XX   may fail if you never received the ^G characters in the first place.  If
XX   so then please apply the patch by hand.
XX
XX8. inferred targets that infer recipes from rules having a .SETDIR attribute
XX   now have the .SETDIR applied prior to making the prerequisites and the
XX   target.
XX
XXMany thanks to all those that helped find and identify and in some cases
XXprovided fixes and/or new code for the above enhancements.
XX
XX-dennis
XSHAR_EOF
Xchmod 0640 readme/patch1 || echo "restore of readme/patch1 fails"
Xset `wc -c readme/patch1`;Sum=$1
Xif test "$Sum" != "2063"
Xthen echo original size 2063, current size $Sum;fi
Xecho mkdir - tos
Xmkdir tos
Xsed 's/^X//' << 'SHAR_EOF' > tos/arlib.c &&
XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/arlib.c,v 1.1 90/10/06 12:06:53 dvadura Exp $
XX-- SYNOPSIS -- Unix archive manipulation code.
XX-- 
XX-- DESCRIPTION
XX-- 	Originally this code was provided by Eric Gisin of MKS.  I took
XX--	his code and completely rewrote it adding cacheing of lib members
XX--	and other various optimizations.  I kept the overal functional
XX--	idea of the library routines as they are similar to those in GNU
XX--	make and felt it advantageous to maintain a similar interface.
XX--
XX-- AUTHOR
XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX--
XX-- COPYRIGHT
XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX-- 
XX--      This program is free software; you can redistribute it and/or
XX--      modify it under the terms of the GNU General Public License
XX--      (version 1), as published by the Free Software Foundation, and
XX--      found in the file 'LICENSE' included with this distribution.
XX-- 
XX--      This program is distributed in the hope that it will be useful,
XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX--      GNU General Public License for more details.
XX-- 
XX--      You should have received a copy of the GNU General Public License
XX--      along with this program;  if not, write to the Free Software
XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX--
XX-- LOG
XX--     $Log:	arlib.c,v $
XX * Revision 1.1  90/10/06  12:06:53  dvadura
XX * dmake Release, Version 3.6
XX * 
XX*/
XX
XX#include "extern.h"
XX#include "sysintf.h"
XX#include <ar.h>
XX#include <stdio.h>
XX
XX/* By defining the defines below it is possible to configure the library
XX * code for library cacheing/non-cacheing, ASCII archive headers, and a full
XX * decode of the ar_hdr fields in the scan_ar function. */
XX
XX#define ASCARCH			1	/* ASCII time stored in archive	*/
XX#define LC			1	/* Turn on library cacheing	*/
XX#define DECODE_ALL_AR_FIELDS	0	/* decode only fields make needs*/
XX
XX#if LC
XX#  define FOUND_MEMBER	FALSE
XX#else
XX#  define FOUND_MEMBER	TRUE
XX#  define _cache_member(a, b, c)
XX#  define _check_cache(a, b, c, d)	FALSE
XX#endif
XX
XX#define	MAXFNAME	32	/* Longest file name in archive	*/
XX#define	MAXMNAME	8	/* Max module name < MAXFNAME	*/
XX
XX
XX/* This struct is used to pass the library and member information about the
XX * routines that perform the library seeking/cacheing */
XXstruct ar_args {
XX   char   *lib;
XX   char   *member;
XX   time_t time;
XX};
XX
XX
XXtypedef struct AR {
XX   char    ar_name[MAXFNAME+1];      /* File name */
XX   long    ar_size;                  /* Size in bytes */
XX   time_t  ar_time;                  /* Modification time */
XX
XX#ifdef DOS
XX   char    ar_modname[MAXMNAME+1];   /* DOS module name */
XX#endif
XX
XX#if DECODE_ALL_AR_FIELDS
XX   uint16  ar_mode;         	     /* File mode */
XX   uint16  ar_uid;            	     /* File owner */
XX   uint16  ar_gid;                   /* File group owner */
XX#endif
XX} AR, *ARPTR;
XX
XX
XXstatic int ar_scan  ANSI((FILE *,
XX			  int (*) ANSI((FILE *, struct AR *, struct ar_args *)),
XX			  struct ar_args *));
XXstatic int ar_touch ANSI(( FILE *, time_t ));
XXstatic int time_function  ANSI(( FILE *, struct AR *, struct ar_args * ));
XXstatic int touch_function ANSI(( FILE *, struct AR *, struct ar_args * ));
XX
XX#if LC
XXstatic int _cache_member ANSI((char *, char *, time_t));
XXstatic int _check_cache  ANSI((char *, char *, time_t *, int));
XX#endif
XX
XX/* decoded archive header */
XXstatic AR _ar;
XX
XX
XXtime_t
XXseek_arch(name, lib)/*
XX======================
XX   Look for module 'name' inside 'lib'.  If compiled with cacheing then first
XX   check to see if the specified lib is cached.  If so then return that time
XX   stamp instead of looking into the library. */
XXchar    *name;
XXchar 	*lib;
XX{
XX   FILE   *f;
XX   int    rv;
XX   time_t mtime;
XX   struct ar_args args;
XX
XX   /* Check the cache first (if there is a cache) */
XX   if( _check_cache(name, lib, &mtime, FALSE) )  return( mtime );
XX
XX   /* Open the lib file and perform the scan of the members, looking
XX    * for our particular member.  If cacheing is enabled it will be
XX    * taken care of automatically during the scan. */
XX
XX   args.lib    = lib;
XX   args.member = name;
XX   args.time   = (time_t)0L;
XX
XX   if( (f = fopen(lib, "rb")) == NIL(FILE) ) return( (time_t)0L );
XX   rv = ar_scan(f, time_function, &args );
XX   fclose( f );
XX
XX   if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
XX
XX   return( args.time );
XX}
XX
XX
XXint
XXtouch_arch(name, lib)/*
XX=======================
XX   Look for module 'name' inside 'lib'.  If compiled with cacheing then first
XX   check to see if the specified lib is cached.  If so then set that time
XX   stamp and write it into the library.  Returns 0 on success, non-zero
XX   on failure. */
XXchar   *name;
XXchar   *lib;
XX{
XX   FILE   *f;
XX   int    rv;
XX   struct ar_args args;
XX
XX   /* Open the lib file and perform the scan of the members, looking
XX    * for our particular member.  If cacheing is enabled it will be
XX    * taken care of automatically during the scan. */
XX
XX   args.lib    = lib;
XX   args.member = name;
XX   args.time   = (time_t)0L;
XX
XX   if( (f = fopen(lib, "rb+")) == NIL(FILE) ) return( (time_t)1L );
XX   rv = ar_scan(f, touch_function, &args );
XX   fclose( f );
XX
XX   if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
XX
XX   return( 0 );
XX}
XX
XX
XX
XXstatic int
XXtime_function(f, arp, argp)/*
XX=============================
XX   get library member's time, if it matches than return it in argp, if
XX   cacheing is enabled than cache the library members also. */
XXFILE           *f;      /* library file          */
XXstruct AR      *arp;    /* library member header */
XXstruct ar_args *argp;
XX{
XX   int rv = _cache_member( arp->ar_name, argp->lib, arp->ar_time );
XX
XX   if( strcmp(argp->member, arp->ar_name) == 0 ) {
XX      argp->time = arp->ar_time;
XX
XX      if( arp->ar_time == 0 && !(Glob_attr & A_SILENT) )
XX         Warning( "(%s): Can't extract library member timestamp; using EPOCH",
XX	          argp->member);
XX
XX      return( rv );  /* 1 => no cacheing, 0 => cacheing */
XX   }
XX
XX   return( FALSE ); /* continue scan */
XX}
XX
XX
XX
XXstatic int
XXtouch_function(f, arp, argp)/*
XX==============================
XX   Update library member's time stamp, and write new time value into cache
XX   if required. */
XXFILE           *f;      /* library file */
XXstruct AR      *arp;    /* library member header */
XXstruct ar_args *argp;
XX{
XX   extern time_t time ANSI(( time_t * ));
XX   time_t now = time((time_t*) NULL);  /* Current time.		  */
XX
XX   if( strcmp(argp->member, arp->ar_name) == 0 ) {
XX      _check_cache( argp->member, argp->lib, &now, TRUE );
XX      ar_touch(f, now );
XX
XX      return( TRUE );
XX   }
XX
XX   return( FALSE ); /* continue scan */
XX}
XX
XX
XX
XX
XXstatic int
XXar_scan(f, function, arg)/*
XX===========================
XX   Scan the opened archive, and call the given function for each member found.
XX   The function will be called with the file positioned at the beginning of
XX   the member and it can read up to arp->ar_size bytes of the archive member.
XX   If the function returns 1, we stop and return 1.  We return 0 at the end
XX   of the archive, or -1 if the archive has invalid format.  This interface
XX   is more general than required by "make", but it can be used by other
XX   utilities.  */
XXregister FILE *f;
XXint      (*function) ANSI((FILE *, struct AR *, struct ar_args *));
XXstruct ar_args *arg;
XX{
XX   extern long atol ANSI((char *));
XX   register char *p;
XX   struct ar_hdr arhdr;   /* external archive header */
XX   off_t         offset;  /* member seek offset      */
XX
XX#if ASCARCH
XX   char magic[SARMAG];
XX#else
XX   unsigned short word;
XX#endif
XX
XX   fseek( f, 0L, 0 );	/* Start at the beginning of the archive file */
XX
XX#if ASCARCH
XX   fread( magic, sizeof(magic), 1, f );
XX   if( strncmp(magic, ARMAG, SARMAG) != 0 ) return( -1 );
XX#else
XX   fread( (char*)&word, sizeof(word), 1, f );
XX   if( word != ARMAG ) return( -1 );
XX#endif
XX
XX   /* scan the library, calling `function' for each member
XX    */
XX   while( 1 ) {
XX      if( fread((char*) &arhdr, sizeof(arhdr), 1, f) != 1 ) break;
XX      offset = ftell(f);
XX      strncpy(_ar.ar_name, arhdr.ar_name, sizeof(arhdr.ar_name));
XX
XX      for( p = &_ar.ar_name[sizeof(arhdr.ar_name)];
XX           --p >= _ar.ar_name && *p == ' ';);
XX
XX      p[1] = '\0';
XX      if( *p == '/' ) *p = 0; 	/* Only SysV has trailing '/' */
XX
XX#if ASCARCH
XX      if( strncmp(arhdr.ar_fmag, ARFMAG, sizeof(arhdr.ar_fmag)) != 0 )
XX         return( -1 );
XX      _ar.ar_time = atol(arhdr.ar_date);
XX      _ar.ar_size = atol(arhdr.ar_size);
XX#else
XX      _ar.ar_time = arhdr.ar_date;
XX      _ar.ar_size = arhdr.ar_size;
XX#endif
XX
XX
XX#if DECODE_ALL_AR_FIELDS
XX#if ASCARCH
XX      _ar.ar_mode = atoi(arhdr.ar_mode);
XX      _ar.ar_uid  = atoi(arhdr.ar_uid);
XX      _ar.ar_gid  = atoi(arhdr.ar_gid);
XX#else
XX      _ar.ar_mode = arhdr.ar_mode;
XX      _ar.ar_size = arhdr.ar_size;
XX      _ar.ar_uid = arhdr.ar_uid;
XX      _ar.ar_gid = arhdr.ar_gid;
XX#endif
XX#endif
XX
XX      if( (*function)(f, &_ar, arg) ) return( 1 );
XX      fseek( f, offset + (_ar.ar_size+1 & ~1L), 0 );
XX   }
XX
XX   if( !feof(f) ) return( -1 );
XX   return 0;
XX}
XX
XX
XX
XXstatic int
XXar_touch( f, now )/*
XX====================
XX   touch module header timestamp. */
XXFILE   *f;
XXtime_t now;
SHAR_EOF
echo "End of part 1, continue with part 2"
echo "2" > s2_seq_.tmp
exit 0
-- 
--------------------------------------------------------------------------------
"This is almost worth the HIGH blood pressure!" he  |Dennis Vadura
thought as yet another mosquito exploded.-R.Patching|dvadura@dragon.uwaterloo.ca
================================================================================

dvadura@watdragon.waterloo.edu (Dennis Vadura) (11/01/90)

#!/bin/sh
# this is part 2 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file dm36.p1 continued
#
CurArch=2
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> dm36.p1
XX{
XX   struct ar_hdr arhdr;                /* external archive header */
XX
XX   fseek(f, - (off_t) (sizeof(arhdr) - sizeof(arhdr.ar_name)), 1);
XX
XX#if ASCARCH
XX   fprintf(f, "%lu", now);
XX#else
XX   fwrite((char *)now, sizeof(now), 1, f);
XX#endif
XX
XX   return( ferror(f) ? 0 : 1 );
XX}
XX
XX
XX#if LC
XXtypedef struct mem {
XX   time_t	m_time;		/* modify time of member*/
XX   struct mem	*m_next;	/* next member in lib	*/
XX   char		m_valid;	/* valid cache entry    */
XX   char 	m_name[1];	/* lib member name	*/
XX} MEM, *MEMPTR;
XX
XXtypedef struct lib {
XX   struct lib	*lb_next;	/* next library in list */
XX   struct mem	*lb_members;	/* list of lib members	*/
XX   char		lb_valid;	/* valid cache entry    */
XX   char 	*lb_name;	/* library name		*/
XX} LIB, *LIBPTR;
XX
XXstatic LIBPTR _cache = NIL(LIB);
XXstatic MEMPTR _find_member ANSI(( LIBPTR, char * ));
XX
XXstatic int
XX_check_cache( name, lib, pmtime, touch )/*
XX==========================================
XX   Check to see if we have cached member in lib, if so return time in pmtime
XX   and return TRUE, otherwise return FALSE, if touch is TRUE then touch
XX   the archive member instead. */
XXchar   *name;
XXchar   *lib;
XXtime_t *pmtime;
XXint    touch;
XX{
XX   register MEMPTR mp;
XX   register LIBPTR lp;
XX
XX   for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
XX   if( lp == NIL(LIB) ) return( FALSE );
XX
XX   mp = _find_member( lp, name );
XX   if( mp == NIL(MEM) || !mp->m_valid ) return( FALSE );
XX
XX   if( touch == TRUE )
XX   {
XX      mp->m_time = *pmtime;
XX      mp->m_valid = 1;
XX   }
XX   else
XX      *pmtime = mp->m_time;
XX
XX   lp->lb_valid   = 1;
XX   lp->lb_members = mp;
XX
XX   return( TRUE );
XX}
XX
XX
XX
XXstatic int
XX_cache_member( name, lib, mtime )/*
XX===================================
XX   Cache name in lib along with it's time */
XXchar   *name;
XXchar   *lib;
XXtime_t mtime;
XX{
XX   register MEMPTR mp;
XX   register LIBPTR lp;
XX
XX   for( lp=_cache;
XX	lp != NIL(LIB) && lp->lb_name != NIL(char) && lp->lb_name != lib;
XX	lp=lp->lb_next);
XX
XX   if( lp == NIL(LIB) )
XX   {
XX      lp = (LIBPTR) malloc(sizeof(LIB));
XX      if( lp == NIL(LIB) ) No_ram();
XX
XX      lp->lb_name    = lib;
XX      lp->lb_members = NIL(MEM);
XX      lp->lb_next    = _cache;
XX      lp->lb_valid   = 0;
XX      _cache = lp;
XX   }
XX
XX   /* On UNIX ar does not allow multiple copies of the same .o file to live
XX    * in the same AR file.  If this is not TRUE then use the commented out
XX    * version to set the value of mp. */
XX
XX   /*mp = _find_member(lp, name);*/
XX   mp = NIL(MEM);
XX
XX   if( mp == NIL(MEM) )
XX   {
XX      mp = (MEMPTR) malloc(sizeof(char)*offsetof(MEM,m_name[strlen(name)+1]));
XX      if( mp == NIL(MEM) ) No_ram();
XX
XX      strcpy( mp->m_name, name );
XX      mp->m_time     = mtime;
XX
XX      if( lp->lb_members == NIL(MEM) ) {
XX	 mp->m_next     = mp;
XX	 lp->lb_members = mp;
XX      }
XX      else {
XX	 mp->m_next = lp->lb_members->m_next;
XX	 lp->lb_members->m_next = mp;
XX	 lp->lb_members = mp;
XX      }
XX   }
XX   else
XX      mp->m_time = mtime;
XX
XX   mp->m_valid = 1;
XX
XX   return( lp->lb_valid );
XX}
XX
XX
XXstatic MEMPTR
XX_find_member( lp, name )
XXLIBPTR lp;
XXchar   *name;
XX{
XX   register MEMPTR mp = lp->lb_members;
XX
XX   if( mp == NIL(MEM) ) return(mp);
XX
XX   do {
XX      if( !strcmp(mp->m_name, name ) ) return( mp );
XX      mp = mp->m_next;
XX   }
XX   while( mp != lp->lb_members );
XX
XX   return( NIL(MEM) );
XX}
XX#endif
XX
XX
XX
XXvoid
XXvoid_lcache( lib, member )/*
XX============================
XX   Void the library cache for lib.  If member is NIL(char) then nuke all
XX   of the members, if member is NOT NIL(char) then invalidate only that
XX   member. */
XXchar *lib;
XXchar *member;
XX{
XX#if LC
XX   register LIBPTR lp;
XX   register MEMPTR mp;
XX   register MEMPTR tmp;
XX
XX   for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
XX   if( lp == NIL(LIB) ) return;
XX
XX   if( member == NIL(char) ) {
XX      mp = lp->lb_members;
XX      do {
XX	 tmp = mp->m_next;
XX	 (void) free( mp );
XX	 mp = tmp;
XX      } while( mp != lp->lb_members );
XX
XX      lp->lb_valid   = 0;
XX      lp->lb_members = NIL(MEM);
XX      lp->lb_name    = NIL(char);
XX   }
XX   else {
XX      mp=lp->lb_members;
XX      do {
XX	 if( strcmp( member, mp->m_name) == 0 ) {
XX	    lp->lb_members = mp->m_next;
XX	    mp->m_valid = 0;
XX	 }
XX	   
XX	 mp=mp->m_next;
XX      } while( mp != lp->lb_members );
XX   }
XX#endif
XX}
XSHAR_EOF
Xchmod 0640 tos/arlib.c || echo "restore of tos/arlib.c fails"
Xset `wc -c tos/arlib.c`;Sum=$1
Xif test "$Sum" != "13301"
Xthen echo original size 13301, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/config.h &&
XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/sysvr3/RCS/config.h,v 1.1 90/10/06 12:06:39 dvadura Exp $
XX-- SYNOPSIS -- Configurarion include file.
XX-- 
XX-- DESCRIPTION
XX-- 	There is one of these for each specific machine configuration.
XX--	It can be used to further tweek the machine specific sources
XX--	so that they compile.
XX--
XX-- AUTHOR
XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX--
XX-- COPYRIGHT
XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX-- 
XX--      This program is free software; you can redistribute it and/or
XX--      modify it under the terms of the GNU General Public License
XX--      (version 1), as published by the Free Software Foundation, and
XX--      found in the file 'LICENSE' included with this distribution.
XX-- 
XX--      This program is distributed in the hope that it will be useful,
XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX--      GNU General Public License for more details.
XX-- 
XX--      You should have received a copy of the GNU General Public License
XX--      along with this program;  if not, write to the Free Software
XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX--
XX-- LOG
XX--     $Log:	config.h,v $
XX * Revision 1.1  90/10/06  12:06:39  dvadura
XX * dmake Release, Version 3.6
XX * 
XX*/
XX
XX#include <osbind.h>
XX
XX/* define this for configurations that don't have the coreleft function
XX * so that the code compiles.  To my knowledge coreleft exists only on
XX * Turbo C, but it is needed here since the function is used in many debug
XX * macros. */
XX#define coreleft() Malloc(-1L)
XX
XX/* Define the getcwd function that is used in the code, since BSD does
XX * not have getcwd, but call it getwd instead. */
XXextern char *getcwd ANSI((char *, int));
XX
XX/*No parallelism in TOS so don't need to explode the graph. */
XX#define Explode_prq(a,b,c)
XSHAR_EOF
Xchmod 0640 tos/config.h || echo "restore of tos/config.h fails"
Xset `wc -c tos/config.h`;Sum=$1
Xif test "$Sum" != "1974"
Xthen echo original size 1974, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/config.mk &&
XX# This is an OS specific configuration file
XX#	It assumes that OBJDIR, TARGET and DEBUG are previously defined.
XX#	It defines	CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
XX#			PRINTER, PRINTFLAGS
XX#	It augments	SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
XX#
XXPRINTER		= hw
XXPRINTFLAGS	= -P$(PRINTER)
XXSTARTUPFILE	= $(OS)/startup.mk
XXCPPFLAGS 	= $(CFLAGS)
XXLDOBJS		= $(CSTARTUP) $(OBJDIR)/{$(<:f)}
XXLDARGS		= $(LDFLAGS) -o $@ $(OBJDIR)/*$O
XXLDFLAGS	       += -s
XXLD		= $(CC)
XX
XX# Debug flags
XXDB_CFLAGS	= -g -DDBUG
XXDB_LDFLAGS	= -g
XXDB_LDLIBS	=
XX
XX# NO Debug flags
XXNDB_CFLAGS	= -O
XXNDB_LDFLAGS	=
XXNDB_LDLIBS	=
XX
XX# Local configuration modifications for CFLAGS.
XXCFLAGS         += -I$(OS)
XX
XX# Sources that must be defined for each different version
XXOSSRC := arlib.c dirbrk.c rmprq.c ruletab.c runargv.c
XXSRC  += $(OSSRC)
XX.SETDIR=$(OS) : $(OSSRC)
XX
XX# Set source dirs so that we can find files named in this
XX# config file.
XX.SOURCE.h : $(OS)
XX
XX# See if we modify anything in the lower levels.
XX.IF $(OSRELEASE) != $(NULL)
XX   .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
XX.END
XX
XX# Set the proper macros based on whether we are making the debugging version
XX# or not.
XX.IF $(DEBUG)
XX   CFLAGS	+= $(DB_CFLAGS)
XX   LDFLAGS	+= $(DB_LDFLAGS)
XX   LDLIBS	+= $(DB_LDLIBS)
XX
XX   SILENT	:= $(.SILENT)
XX   .SILENT	:= yes
XX   TARGET	:= db$(TARGET)
XX   OBJDIR	:= $(OBJDIR).dbg
XX   .SILENT	:= $(SILENT)
XX
XX    SRC		+= dbug.c malloc.c
XX    HDR		+= db.h 
XX    .SETDIR=common : dbug.c malloc.c
XX.ELSE
XX   CFLAGS	+= $(NDB_CFLAGS)
XX   LDFLAGS	+= $(NDB_LDFLAGS)
XX   LDLIBS	+= $(NDB_LDLIBS)
XX.END
XSHAR_EOF
Xchmod 0640 tos/config.mk || echo "restore of tos/config.mk fails"
Xset `wc -c tos/config.mk`;Sum=$1
Xif test "$Sum" != "1536"
Xthen echo original size 1536, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/dirbrk.c &&
XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/dirbrk.c,v 1.1 90/10/06 12:07:00 dvadura Exp $
XX-- SYNOPSIS -- define the directory separator string.
XX-- 
XX-- DESCRIPTION
XX-- 	Define this string for any character that may appear in a path name
XX--	and can be used as a directory separator.  Also provide a function
XX--	to indicate if a given path begins at the root of the file system.
XX--
XX-- AUTHOR
XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX--
XX-- COPYRIGHT
XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX-- 
XX--      This program is free software; you can redistribute it and/or
XX--      modify it under the terms of the GNU General Public License
XX--      (version 1), as published by the Free Software Foundation, and
XX--      found in the file 'LICENSE' included with this distribution.
XX-- 
XX--      This program is distributed in the hope that it will be useful,
XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX--      GNU General Public License for more details.
XX-- 
XX--      You should have received a copy of the GNU General Public License
XX--      along with this program;  if not, write to the Free Software
XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX--
XX-- LOG
XX--     $Log:	dirbrk.c,v $
XX * Revision 1.1  90/10/06  12:07:00  dvadura
XX * dmake Release, Version 3.6
XX * 
XX*/
XX
XX#include "extern.h"
XX#include <ctype.h>
XX
XX/* tos uses /, \, and : */
XXchar*	DirBrkStr = "/\\:";
XX
XX/*
XX** Return TRUE if the name is the full specification of a path name to a file
XX** starting at the root of the file system, otherwise return FALSE
XX*/
XXint
XXIf_root_path(name)
XXchar *name;
XX{
XX   return( (strchr(DirBrkStr, *name) != NIL(char)) ||
XX           (isalpha(*name) && name[1] == ':') );
XX}
XSHAR_EOF
Xchmod 0640 tos/dirbrk.c || echo "restore of tos/dirbrk.c fails"
Xset `wc -c tos/dirbrk.c`;Sum=$1
Xif test "$Sum" != "1883"
Xthen echo original size 1883, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/make.sh &&
XXmkdir objects
XXgcc -c -DHELP -I. -Icommon -Itos -O infer.c
XXmv infer.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O make.c
XXmv make.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O stat.c
XXmv stat.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O expand.c
XXmv expand.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O string.c
XXmv string.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O hash.c
XXmv hash.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O dag.c
XXmv dag.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O dmake.c
XXmv dmake.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O path.c
XXmv path.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O imacs.c
XXmv imacs.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O sysintf.c
XXmv sysintf.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O parse.c
XXmv parse.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O getinp.c
XXmv getinp.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O quit.c
XXmv quit.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O basename.c
XXmv basename.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O dump.c
XXmv dump.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O macparse.c
XXmv macparse.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O rulparse.c
XXmv rulparse.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O percent.c
XXmv percent.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O function.c
XXmv function.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O tos/arlib.c
XXmv arlib.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O tos/dirbrk.c
XXmv dirbrk.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O tos/rmprq.c
XXmv rmprq.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O tos/ruletab.c
XXmv ruletab.o objects
XXgcc -c -DHELP -I. -Icommon -Itos -O tos/runargv.c
XXmv runargv.o objects
XXgcc -s  -o dmake objects/*.o
XSHAR_EOF
Xchmod 0640 tos/make.sh || echo "restore of tos/make.sh fails"
Xset `wc -c tos/make.sh`;Sum=$1
Xif test "$Sum" != "1670"
Xthen echo original size 1670, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/rmprq.c &&
XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/rmprq.c,v 1.1 90/10/06 12:07:06 dvadura Exp $
XX-- SYNOPSIS -- remove prerequisites code.
XX-- 
XX-- DESCRIPTION
XX--	This code is different for DOS and for UNIX and parallel make
XX--	architectures since the parallel case requires the rm's to be
XX--	run in parallel, whereas DOS guarantees to run them sequentially.
XX-- 
XX-- AUTHOR
XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX--
XX-- COPYRIGHT
XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX-- 
XX--      This program is free software; you can redistribute it and/or
XX--      modify it under the terms of the GNU General Public License
XX--      (version 1), as published by the Free Software Foundation, and
XX--      found in the file 'LICENSE' included with this distribution.
XX-- 
XX--      This program is distributed in the hope that it will be useful,
XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX--      GNU General Public License for more details.
XX-- 
XX--      You should have received a copy of the GNU General Public License
XX--      along with this program;  if not, write to the Free Software
XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX--
XX-- LOG
XX--     $Log:	rmprq.c,v $
XX * Revision 1.1  90/10/06  12:07:06  dvadura
XX * dmake Release, Version 3.6
XX * 
XX*/
XX
XX#include "extern.h"
XX#include "alloc.h"
XX
XXvoid
XXRemove_prq( tcp )
XXCELLPTR tcp;
XX{
XX   tcp->ce_flag         &= ~(F_MADE|F_VISITED);
XX   tcp->CE_HOW->hw_flag &= ~(F_MADE|F_VISITED);
XX   tcp->ce_time          = 0L;
XX
XX   Make( tcp, tcp->CE_HOW, NIL(CELL) );
XX}
XSHAR_EOF
Xchmod 0640 tos/rmprq.c || echo "restore of tos/rmprq.c fails"
Xset `wc -c tos/rmprq.c`;Sum=$1
Xif test "$Sum" != "1718"
Xthen echo original size 1718, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/ruletab.c &&
XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/ruletab.c,v 1.1 90/10/06 12:07:08 dvadura Exp $
XX-- SYNOPSIS -- Default initial configuration of dmake.
XX-- 
XX-- DESCRIPTION
XX-- 	Define here the initial set of rules that are defined before
XX--	dmake performs any processing.
XX--
XX-- AUTHOR
XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX--
XX-- COPYRIGHT
XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX-- 
XX--      This program is free software; you can redistribute it and/or
XX--      modify it under the terms of the GNU General Public License
XX--      (version 1), as published by the Free Software Foundation, and
XX--      found in the file 'LICENSE' included with this distribution.
XX-- 
XX--      This program is distributed in the hope that it will be useful,
XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX--      GNU General Public License for more details.
XX-- 
XX--      You should have received a copy of the GNU General Public License
XX--      along with this program;  if not, write to the Free Software
XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX--
XX-- LOG
XX--     $Log:	ruletab.c,v $
XX * Revision 1.1  90/10/06  12:07:08  dvadura
XX * dmake Release, Version 3.6
XX * 
XX*/
XX
XX/* These are control macros for dmake that MUST be defined at some point
XX * if they are NOT dmake will not work!  These are default definitions.  They
XX * may be overridden inside the .STARTUP makefile, they are here
XX * strictly so that dmake can parse the STARTUP makefile */
XX
XXstatic char *_rules[] = {
XX	"MAXPROCESSLIMIT := 10",
XX	"MAXLINELENGTH := 8190",
XX	".IMPORT .IGNORE: ROOTDIR",
XX	".MAKEFILES : makefile.mk Makefile makefile",
XX	".SOURCE    : .NULL",
XX#include "startup.h"
XX	0 };
XX
XXchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
XSHAR_EOF
Xchmod 0640 tos/ruletab.c || echo "restore of tos/ruletab.c fails"
Xset `wc -c tos/ruletab.c`;Sum=$1
Xif test "$Sum" != "1940"
Xthen echo original size 1940, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/runargv.c &&
XX/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/runargv.c,v 1.1 90/10/06 12:05:30 dvadura Exp $
XX-- SYNOPSIS -- run a sub process.
XX-- 
XX-- DESCRIPTION
XX--	Use spawn to run a subprocess.
XX--
XX-- AUTHOR
XX--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX--
XX-- COPYRIGHT
XX--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX-- 
XX--      This program is free software; you can redistribute it and/or
XX--      modify it under the terms of the GNU General Public License
XX--      (version 1), as published by the Free Software Foundation, and
XX--      found in the file 'LICENSE' included with this distribution.
XX-- 
XX--      This program is distributed in the hope that it will be useful,
XX--      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX--      GNU General Public License for more details.
XX-- 
XX--      You should have received a copy of the GNU General Public License
XX--      along with this program;  if not, write to the Free Software
XX--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX--
XX-- LOG
XX--     $Log:	runargv.c,v $
XX * Revision 1.1  90/10/06  12:05:30  dvadura
XX * dmake Release, Version 3.6
XX * 
XX*/
XX
XX#include "sysintf.h"
XX#include "extern.h"
XX#include <process.h>
XX#include <string.h>
XX#include <errno.h>
XX
XXstatic int  _abort_flg = FALSE;
XXstatic void _add_child ANSI((CELLPTR, HOWPTR, int));
XXstatic void _finished_child ANSI((int));
XX
XXint
XXrunargv(target, how, ignore, group, last, shell, cmd)
XXCELLPTR target;
XXHOWPTR  how;
XXint     ignore;
XXint	group;
XXint	last;
XXint	shell;
XXchar	*cmd;
XX{
XX   int status;
XX   char **argv;
XX
XX   argv = Pack_argv( group, shell, cmd );
XX   _add_child(target, how, ignore);
XX   status = spawnvp(P_WAIT, *argv, argv);
XX   if( status == -1 ) Error("%s: %s", argv[0], strerror(errno));
XX   _finished_child(status);
XX   if( last && !Doing_bang ) Update_time_stamp( target, how );
XX
XX   return( 0 );
XX}
XX
XX
XXvoid
XXClean_up_processes()
XX{
XX   _abort_flg = TRUE;
XX   _finished_child(-1);
XX}
XX
XX
XXint
XXWait_for_child( abort_flg, pid )
XXint abort_flg;
XXint pid;
XX{
XX   return(1);
XX}
XX
XX
XXstatic int     _valid = -1;
XXstatic CELLPTR _tg;
XXstatic HOWPTR  _how;
XXstatic int     _ignore;
XX
XXstatic void
XX_add_child( target, how, ignore )
XXCELLPTR target;
XXHOWPTR  how;
XXint	ignore;
XX{
XX   _tg = target;
XX   _ignore = ignore;
XX   _how    = how;
XX   _valid = 0;
XX
XX   Current_target = NIL(HOW);
XX}
XX
XX
XXstatic void
XX_finished_child(status)
XXint	status;
XX{
XX   if( _valid == -1 ) return;
XX   Unlink_temp_files( _how );
XX   _valid = -1;
XX   Handle_result( status, _ignore, _abort_flg, _tg );
XX}
XSHAR_EOF
Xchmod 0640 tos/runargv.c || echo "restore of tos/runargv.c fails"
Xset `wc -c tos/runargv.c`;Sum=$1
Xif test "$Sum" != "2637"
Xthen echo original size 2637, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/startup.h &&
XX/* This file contains the default value of the MAKESTARTUP variable.
XX * You must set the quoted string below to the default path to the startup
XX * variable, so that it gets compiled in.  LEAVE ROOTDIR at the front of
XX * the path.  This allows the user to customize his environment for dmake
XX * by setting up a new ROOTDIR environment variable. */
XX
XX"MAKESTARTUP := $(ROOTDIR)/etc/startup.mk",
XSHAR_EOF
Xchmod 0640 tos/startup.h || echo "restore of tos/startup.h fails"
Xset `wc -c tos/startup.h`;Sum=$1
Xif test "$Sum" != "392"
Xthen echo original size 392, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/startup.mk &&
XX# Generic UNIX DMAKE startup file.  Customize to suit your needs.
XX# Should work for both SYSV, and BSD 4.3
XX# See the documentation for a description of internally defined macros.
XX#
XX# Disable warnings for macros redefined here that were given
XX# on the command line.
XX__.SILENT := $(.SILENT)
XX.SILENT   := yes
XX
XX# Configuration parameters for DMAKE startup.mk file
XX# Set these to NON-NULL if you wish to turn the parameter on.
XX_HAVE_RCS	:= 		# yes => RCS  is installed.
XX_HAVE_SCCS	:= 		# yes => SCCS is installed.
XX
XX# Applicable suffix definitions
XXA := .olb	# Libraries
XXE :=		# Executables
XXF := .f		# Fortran
XXO := .o		# Objects
XXP := .p		# Pascal
XXS := .s		# Assembler sources
XXV := ,v		# RCS suffix
XX
XX# Recipe execution configurations
XXSHELL		:= /bin/sh
XXSHELLFLAGS	:= 
XXGROUPSHELL	:= $(SHELL)
XXGROUPFLAGS	:= 
XXSHELLMETAS	:= |();&<>?*][$$:\\#`'"
XXGROUPSUFFIX	:= .bat
XXDIVFILE		 = $(TMPFILE)
XX
XX# Standard C-language command names and flags
XX   CPP	   := /gnu/lib/cpp	# C-preprocessor
XX   CC      := gcc		# C-compiler and flags
XX   CFLAGS  +=
XX
XX   AS      := /gnu/lib/as	# Assembler and flags
XX   ASFLAGS += 
XX
XX   LD       = $(CC)		# Loader and flags
XX   LDFLAGS +=
XX   LDLIBS   =
XX
XX# Definition of $(MAKE) macro for recursive makes.
XX   MAKE = $(MAKECMD) $(MFLAGS)
XX
XX# Definition of Print command for this system.
XX   PRINT = lpr
XX
XX# Language and Parser generation Tools and their flags
XX   YACC	  := yacc		# standard yacc
XX   YFLAGS +=
XX   YTAB	  := y.tab		# yacc output files name stem.
XX
XX   LEX	  := lex		# standard lex
XX   LFLAGS +=
XX   LEXYY  := lex.yy		# lex output file
XX
XX# Other Compilers, Tools and their flags
XX   PC	:= pc			# pascal compiler
XX   RC	:= f77			# ratfor compiler
XX   FC	:= f77			# fortran compiler
XX
XX   CO	   := co		# check out for RCS
XX   COFLAGS += -q
XX
XX   AR     := gar		# archiver
XX   ARFLAGS+= ruv
XX
XX   RM	   := /gnu/bin/rm	# remove a file command
XX   RMFLAGS +=
XX
XX# Implicit generation rules for making inferences.
XX# We don't provide .yr or .ye rules here.  They're obsolete.
XX# Rules for making *$O
XX   %$O : %.c ; $(CC) $(CFLAGS) -c $<
XX   %$O : %$P ; $(PC) $(PFLAGS) -c $<
XX   %$O : %$S ; $(AS) $(ASFLAGS) $<
XX   %$O : %.cl ; class -c $<
XX   %$O : %.e %.r %.F %$F
XX	$(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
XX
XX# Executables
XX   %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
XX
XX# lex and yacc rules
XX   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
XX   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
XX
XX# This rule tells how to make *.out from it's immediate list of prerequisites
XX# UNIX only.
XX   %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
XX
XX# RCS support
XX.IF $(_HAVE_RCS)
XX   % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
XX   .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
XX.END
XX
XX# SCCS support
XX.IF $(_HAVE_SCCS)
XX   % : s.% ; get $@
XX   .NOINFER : s.%
XX.END
XX
XX# Recipe to make archive files.
XX%$A :
XX[
XX   $(AR) $(ARFLAGS) $@ $?
XX   $(RM) $(RMFLAGS) $?
XX   ranlib $@
XX]
XX
XX# DMAKE uses this recipe to remove intermediate targets
XX.REMOVE :; $(RM) -f $<
XX
XX# AUGMAKE extensions for SYSV compatibility
XX@B = $(@:b)
XX@D = $(@:d)
XX@F = $(@:f)
XX*B = $(*:b)
XX*D = $(*:d)
XX*F = $(*:f)
XX<B = $(<:b)
XX<D = $(<:d)
XX<F = $(<:f)
XX?B = $(?:b)
XX?F = $(?:f)
XX?D = $(?:d)
XX
XX# Turn warnings back to previous setting.
XX.SILENT := $(__.SILENT)
XX
XX# Local startup file if any
XX.INCLUDE .IGNORE: "_startup.mk"
XSHAR_EOF
Xchmod 0640 tos/startup.mk || echo "restore of tos/startup.mk fails"
Xset `wc -c tos/startup.mk`;Sum=$1
Xif test "$Sum" != "3233"
Xthen echo original size 3233, current size $Sum;fi
Xsed 's/^X//' << 'SHAR_EOF' > tos/sysintf.h &&
XX/*
XX** assorted bits of system interface, for common routines inside dmake.
XX** System specific code can be found in the config.h files for each
XX** of the system specifications.
XX*/
XX#include <sys/stat.h>
XX#include <signal.h>
XX
XX#define STAT stat
XX#define VOID_LCACHE(l,m) (void) void_lcache(l,m)
XX
XX/*
XX** standard C items
XX*/
XX#include "stdmacs.h"
XX
XX/*
XX** DOS interface standard items
XX*/
XX#define	getswitchar()	'-'
XX
XX/*
XX** make parameters
XX*/
XX#define	MAX_PATH_LEN	1024
XSHAR_EOF
Xchmod 0640 tos/sysintf.h || echo "restore of tos/sysintf.h fails"
Xset `wc -c tos/sysintf.h`;Sum=$1
Xif test "$Sum" != "454"
Xthen echo original size 454, current size $Sum;fi
X
X
X# Now create the file of patches and apply patch appropriately
X# shar:	Shell Archiver  (v1.22)
X#
X#	Run the following text with /bin/sh to create:
X#	  _patches
X#
Xsed 's/^X//' << 'SHAR_EOF' > _patches &&
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/unix/sysvr3/config.h	Sat Oct  6 12:06:40 1990
XX--- unix/sysvr3/config.h	Mon Oct 22 18:01:13 1990
XX***************
XX*** 44,51 ****
XX--- 44,55 ----
XX   * not have getcwd, but call it getwd instead. */
XX  extern char *getcwd ANSI((char *, int));
XX  
XX+ #ifdef M_XENIX
XX+ #define PORTAR 1
XX+ #else
XX  /* Define setvbuf, SysV doesn't have one */
XX  #define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
XX+ #endif
XX  
XX  /* NCR Tower's don't define size_t */
XX  #ifdef tower
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/unix/sysintf.h	Sat Oct  6 12:07:12 1990
XX--- unix/sysintf.h	Mon Oct 22 17:08:18 1990
XX***************
XX*** 3,8 ****
XX--- 3,9 ----
XX  ** System specific code can be found in the config.h files for each
XX  ** of the system specifications.
XX  */
XX+ #include <sys/types.h>
XX  #include <sys/stat.h>
XX  #include <signal.h>
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/sysintf.c	Sat Oct  6 12:04:18 1990
XX--- sysintf.c	Sun Oct 28 23:16:20 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/sysintf.c,v 1.1 90/10/06 12:04:17 dvadura Exp $
XX  -- SYNOPSIS -- system independent interface
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/sysintf.c,v 1.1 90/10/06 12:04:17 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- system independent interface
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 69,76 ****
XX  */
XX  
XX  #include <stdio.h>
XX- #include "extern.h"
XX  #include "sysintf.h"
XX  #include "alloc.h"
XX  
XX  /*
XX--- 69,76 ----
XX  */
XX  
XX  #include <stdio.h>
XX  #include "sysintf.h"
XX+ #include "extern.h"
XX  #include "alloc.h"
XX  
XX  /*
XX***************
XX*** 97,103 ****
XX     if( lib != NIL(char) )
XX        return( seek_arch(basename(name), lib) );
XX     else
XX!       return( (STAT(name, &buf) == -1) ? (time_t)0 : buf.st_mtime );
XX  }
XX  
XX  
XX--- 97,103 ----
XX     if( lib != NIL(char) )
XX        return( seek_arch(basename(name), lib) );
XX     else
XX!       return( (STAT(name, &buf) == -1) ? (time_t)0L : (time_t) buf.st_mtime );
XX  }
XX  
XX  
XX***************
XX*** 245,251 ****
XX--- 245,253 ----
XX  Read_env_string(ename)
XX  char *ename;
XX  {
XX+ #if !defined(_MSC_VER) || _MSC_VER < 600
XX     extern char *getenv();
XX+ #endif
XX     return( getenv(ename) );
XX  }
XX  
XX***************
XX*** 277,283 ****
XX--- 279,287 ----
XX  ReadEnvironment()
XX  {
XX     extern char **Rule_tab;
XX+ #if !defined(_MSC_VER)
XX     extern char **environ;
XX+ #endif
XX     char **rsave;
XX  
XX     rsave    = Rule_tab;
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/readme/msdos	Mon Oct  8 13:30:26 1990
XX--- readme/msdos	Mon Oct 29 10:31:02 1990
XX***************
XX*** 1,89 ****
XX! Some notes on the MSDOS implementation of dmake.
XX  
XX! Making the binary:
XX! ------------------
XX  
XX!    Turbo-C:  By default the turbo-C (make tcc) script will make a version
XX! 	     of the binary that is compiled for an 8088 and up cpu.  Once made
XX! 	     you can make a version for a 186 or 286 by modifying
XX! 	     msdos/tccdos/config.mk and setting CFLAGS to contain the right
XX! 	     flags, comments are supplied in the makefile to do so.
XX  
XX! 	     The contents of the default response files
XX! 	     (named in msdos/tccdos/mk*.bat) assume specific locations for
XX! 	     your turbo-C libraries, you may need to edit these before actually
XX! 	     getting a successful binary linked.
XX  
XX!    Microsoft-C 4.0 to 5.1:
XX! 	     Is straight forward, just type 'make msc' and the compile will
XX! 	     chunk along.
XX  
XX!    Microsoft-C 6.0:
XX! 	     Is equally easy, just type 'make msc60' and the compile will
XX! 	     chunk along.  Once made, if you want to use dmake to compile
XX! 	     itself then set the environment variable MSC_VER=6.0, otherwise
XX! 	     the compile flags will not be correct.  You may also supply this
XX! 	     as an option on the dmake command line.
XX  
XX-    Memory Requirements and Swapping:
XX- 	     dmake requires quite a bit of memory to run.  As a result
XX- 	     a swapping version of dmake is made if you issue the command
XX- 	     'make tccswp', 'make mscswp' or 'make msc60swp'.  If you leave
XX- 	     the 'swp' off then corresponding (as described above) non-swapping
XX- 	     versions are made.
XX  
XX! 	     The swapping code currently only swaps to DISK, I have left hooks
XX! 	     in to accomodate XMS and EMS, I have some code that performs the
XX! 	     necessary XMS/EMS accesses but have not incorporated it in yet.
XX! 	     It appears that a ramdisk seems to work just fine.  If anyone
XX! 	     wishes to fill in the hooks please do and I'll be happy to include
XX! 	     them in future distributions.
XX  
XX!    dmake 'makefile.mk' control variables:
XX! 	     Initially dmake is compiled for the compact memory model.
XX! 	     Setting MODEL={s,c,m,l} on the command line will select a different
XX! 	     memory model.  Setting NOSWAP:=1 on the command line
XX! 	     will disable the compile and linking of the swap code.
XX! 	     A summary of the available configuration variables follows:
XX  
XX! 	          MODEL={s,c,m,l}  - Select {small, compact, medium, large}
XX! 		  		     memory model respectively.
XX! 		  NOSWAP:=y	   - If set, do not compile the dmake
XX! 		  		     swapping version of spawnvpe.
XX! 		  MSC_VER:=6.0	   - Must be set if using MSC 6.0 and dmake
XX! 		  		     is used to make a new version of dmake.
XX  
XX!    ^C and stopping a make:
XX! 	     Handling of ^C in the swapping version seems to be somewhat
XX! 	     broken.  I don't know what is wrong and would be happy to hear
XX! 	     of suggestions on how to fix the current mess :-)  If you hit
XX! 	     ^C more than once when dmake is executing a child then I think
XX! 	     it will hang most machines.  If you hit it only once or not at
XX! 	     all then things seem to work fine :-).  I tried to get this right
XX! 	     by looking at other code, and making some assumptions about what
XX! 	     DOS does... NEVER ASSUME ANYTHING ABOUT WHAT DOS DOES :-)
XX  
XX  
XX  Other notes:
XX  ------------
XX! dmake does not care if you are running command.com or some other command
XX! interpretter, you must however specify the proper values of the environment
XX! variables SHELL, SHELLFLAGS, GROUPSHELL, and GROUPFLAGS in order for things
XX! to work correctly.  Read the man page first.
XX  
XX! Group recipes under DOS that use command.com as the command interpretter
XX! require you to set the GROUPSUFFIX macro.
XX  
XX! As shipped the startup.mk files for the DOS version try to figure out what
XX! command interpretter you are using and set things up appropriately.
XX! Two command interpretters are supported in the shipped startup.mk file,
XX! command.com, and the MKS Korn shell.
XX  
XX! dmake does not contain any builtin commands.  It gets all commands it executes
XX! from an external file system.  It is therefore most useful if it is used in
XX! conjunction with an environment similar to that provided by the MKS Tool kit,
XX! or equivalent.
XX  
XX! dmake now supports the MKS argument passing conventions.  The facility is
XX! enabled by setting .MKSARGS:=1 and is set by default in the startup.mk file
XX! if an MKS Korn shell is detected as being the active command interpretter.
XX--- 1,127 ----
XX! Notes on the MSDOS implementation of dmake.
XX  
XX! Bootstrapping the binary:
XX! -------------------------
XX!    A make.bat file is provided to bootstrap the binary.  The file contains
XX!    several targets for bootstrapping and invoking the batch file with no
XX!    arguments lists the possibilities shown below.
XX  
XX!       INDEX:  You must specify one of:
XX! 	 tcc      - Turbo C 2.0, compile.
XX! 	 tccswp   - Turbo C 2.0 compile of swapping dmake.
XX! 	 msc40    - Microsoft C 4.0 compile.
XX! 	 msc50    - Microsoft C 5.0 compile.
XX! 	 msc51    - Microsoft C 5.1 compile.
XX! 	 msc60    - Microsoft C 6.0 compile.
XX! 	 msc40swp - Microsoft C 4.0, MASM 5.1 compile of swapping dmake.
XX! 	 msc50swp - Microsoft C 5.0, MASM 5.1 compile of swapping dmake.
XX! 	 msc51swp - Microsoft C 5.1, MASM 5.1 compile of swapping dmake.
XX! 	 msc60swp - Microsoft C 6.0, MASM 5.1 compile of swapping dmake.
XX  
XX!    Based on the compiler you have installed and the whether or not you
XX!    want the swapping version of dmake, you should select the appropriate
XX!    target and issue 'make.bat target'.
XX  
XX!    The batch file runs a second batch script that comes with the distribution
XX!    which compiles the sources using the appropriate compiler and flags.  The
XX!    MSC Versions of the batch files should not require any further user
XX!    intervention during the compile.  The Turbo-C version, as a final step,
XX!    invokes tlink with two response files.  The second of these response files,
XX!    named in msdos/tccdos/mk*.bat, contains absolute path names to Turbo-C
XX!    libraries.  You may need to edit these before getting a successful binary
XX!    linked.
XX  
XX!    By default the batch files make an executable that will run on an 8088
XX!    cpu and up.  You can change that by making the initial version and then
XX!    editing the config.mk files found in either msdos/tccdos or msdos/mscdos
XX!    (depending on compiler you use), and selecting a diferrent cpu type by
XX!    supplying the appropriate compiler flags.  You then need to remake dmake
XX!    again but this time use dmake itself, see below.
XX  
XX  
XX! Using dmake to Make itself:
XX! ---------------------------
XX!    If you use dmake to make itself you must first set a number of makefile
XX!    control variables, either through the environment or on the command line.
XX  
XX!    The following variables must be set:
XX  
XX! 	OS	       - defines operating system (must be set)
XX! 	OSRELEASE      - particular version of it.
XX! 	OSENVIRNOMENT  - more customization
XX  
XX!    These three variables should be defined in your environment.  Valid values
XX!    for them are listed in the dmake makefile.mk file.  For example, if you
XX!    are using MSDOS, with Turbo-C then the valid settings are:
XX  
XX+ 	set OS=msdos
XX+ 	set OSRELEASE=tccdos
XX+ 	set OSENVIRONMENT=
XX  
XX+    dmake searches for an initial startup file, you should set the environment
XX+    variable MAKESTARTUP to contain the full path to the startup file, eg:
XX+ 
XX+ 	set MAKESTARTUP=d:\usr\lib\startup.mk
XX+ 
XX+    The dmake makefile has several variables that can be user specified and
XX+    default to reasonable values if not set.
XX+ 
XX+ 	MODEL   - defines the model to compile, valid values are
XX+ 		  {s,c,m, or l}, defaults to 'c' (ie. compact) model
XX+ 		  if unspecified.
XX+ 
XX+ 	MSC_VER - defines the version of Microsoft C in use, should be set to
XX+ 		  one of 4.0, 5.0, 5.1 or 6.0; defaults to 6.0.
XX+ 
XX+ 	NOSWAP  - If set to 'y', do not compile the dmake swapping version of
XX+ 		  spawnvpe.  This has the effect of turning off swapping.
XX+ 
XX+ 	DEBUG   - If set to '1' then make the debugging version of dmake, this
XX+ 		  will also set MODEL to 'l'.
XX+ 
XX+    To set the above variables you must specify them on the dmake command line
XX+    or insert them into the makefile.mk script.
XX+ 
XX+ 
XX+ Memory Requirements and Swapping:
XX+ ---------------------------------
XX+    The swapping code currently only swaps to DISK, I have left hooks
XX+    in to accomodate XMS and EMS, I have some code that performs the
XX+    necessary XMS/EMS accesses but have not incorporated it in yet.
XX+    It appears that a ramdisk seems to work just fine.  If anyone
XX+    wishes to fill in the hooks please do and I'll be happy to include
XX+    them in future distributions.
XX+ 
XX+ 
XX+ ^C and stopping a make:
XX+ -----------------------
XX+    Thanks to the efforts of Len Reed, appears to now work.  I have been unable
XX+    to hang my machine if it's swapped out and I hit ^C a couple thousand times.
XX+    It does stop and cleans up nicely.  So I guess it works :-).  Actually, let
XX+    me know if you encounter problems with this and I'll try to duplicate
XX+    them.
XX+ 
XX+ 
XX  Other notes:
XX  ------------
XX!    dmake does not care if you are running command.com or some other command
XX!    interpretter, you must however specify the proper values of the environment
XX!    variables SHELL, SHELLFLAGS, GROUPSHELL, and GROUPFLAGS in order for things
XX!    to work correctly.  Read the man page first.
XX  
XX!    Group recipes under DOS that use command.com as the command interpretter
XX!    require you to set the GROUPSUFFIX macro.
XX  
XX!    As shipped the startup.mk files for the DOS version try to figure out what
XX!    command interpretter you are using and set things up appropriately.
SHAR_EOF
echo "End of part 2, continue with part 3"
echo "3" > s2_seq_.tmp
exit 0
-- 
--------------------------------------------------------------------------------
"This is almost worth the HIGH blood pressure!" he  |Dennis Vadura
thought as yet another mosquito exploded.-R.Patching|dvadura@dragon.uwaterloo.ca
================================================================================

dvadura@watdragon.waterloo.edu (Dennis Vadura) (11/01/90)

#!/bin/sh
# this is part 3 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file dm36.p1 continued
#
CurArch=3
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> dm36.p1
XX!    Two command interpretters are supported in the shipped startup.mk file,
XX!    command.com, and the MKS Korn shell.
XX  
XX!    dmake does not contain any builtin commands.  It gets all commands it
XX!    executes from an external file system.  It is therefore most useful if it
XX!    is used in conjunction with an environment similar to that provided by
XX!    the MKS Tool kit, or equivalent.
XX  
XX!    dmake now supports the MKS argument passing conventions.  The facility is
XX!    enabled by setting .MKSARGS:=1 and is set by default in the startup.mk file
XX!    if an MKS Korn shell is detected as being the active command interpretter.
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/patchlvl.h	Sat Oct  6 12:04:26 1990
XX--- patchlvl.h	Mon Oct 22 17:36:08 1990
XX***************
XX*** 1,3 ****
XX  /* dmake patch level, reset to 1 for each new version release. */
XX  
XX! #define PATCHLEVEL 1
XX--- 1,3 ----
XX  /* dmake patch level, reset to 1 for each new version release. */
XX  
XX! #define PATCHLEVEL 2
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/tempnam.c	Sat Oct  6 12:05:12 1990
XX--- msdos/tccdos/tempnam.c	Sun Oct 28 23:16:19 1990
XX***************
XX*** 2,8 ****
XX  #include <stdio.h>
XX  #include <string.h>
XX  #include <stdlib.h>
XX! #include <time.h>
XX  
XX  #if defined(max)
XX  #   undef  max
XX--- 2,8 ----
XX  #include <stdio.h>
XX  #include <string.h>
XX  #include <stdlib.h>
XX! #include <dos.h>
XX  
XX  #if defined(max)
XX  #   undef  max
XX***************
XX*** 32,38 ****
XX     if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
XX     if( dir != NULL ) dl = strlen(dir);
XX  
XX!    if( (p = malloc((unsigned)(max(max(dl,tl),pl)+12))) == NULL )
XX       return(NULL);
XX  
XX     *p = '\0';
XX--- 32,38 ----
XX     if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
XX     if( dir != NULL ) dl = strlen(dir);
XX  
XX!    if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
XX       return(NULL);
XX  
XX     *p = '\0';
XX***************
XX*** 49,61 ****
XX        (void)strncat(p, prefix, 2);
XX     }
XX  
XX!    sprintf( buf, "%ld", (long) time((time_t *)0) );
XX!    (void)strcat(p, buf+strlen(buf)-6 );
XX!    sprintf( buf, "%03d", count++ );
XX     q=p+strlen(p)-6;
XX!    *q++ = buf[0];
XX!    *q++ = buf[1];
XX!    *q++ = buf[2];
XX  
XX     if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
XX  
XX--- 49,61 ----
XX        (void)strncat(p, prefix, 2);
XX     }
XX  
XX!    sprintf( buf, "%08x", _psp );
XX!    buf[6]='\0';
XX!    (void)strcat(p, buf );
XX!    sprintf( buf, "%04d", count++ );
XX     q=p+strlen(p)-6;
XX!    *q++ = buf[0]; *q++ = buf[1];
XX!    *q++ = buf[2]; *q++ = buf[3];
XX  
XX     if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/startup.mk	Thu Oct  4 09:57:38 1990
XX--- msdos/tccdos/startup.mk	Sun Oct 28 23:16:19 1990
XX***************
XX*** 53,59 ****
XX     SHELLMETAS  := *"?<>|()&][$$\#`'
XX     GROUPSUFFIX := .ksh
XX     .MKSARGS    := yes
XX!    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${DIVSHELL}})
XX     DIVSEP_shell_yes := \\\
XX     DIVSEP_shell_no  := \\
XX  .END
XX--- 53,59 ----
XX     SHELLMETAS  := *"?<>|()&][$$\#`'
XX     GROUPSUFFIX := .ksh
XX     .MKSARGS    := yes
XX!    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
XX     DIVSEP_shell_yes := \\\
XX     DIVSEP_shell_no  := \\
XX  .END
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/objswp.rsp	Thu Oct  4 10:25:38 1990
XX--- msdos/tccdos/objswp.rsp	Tue Oct 30 16:28:47 1990
XX***************
XX*** 1,4 ****
XX! c:\lib.tcc\c0c.obj+
XX  objects\exec.obj+
XX  objects\infer.obj+
XX  objects\make.obj+
XX--- 1,4 ----
XX! c:\cc\tcc\lib\c0c.obj+
XX  objects\exec.obj+
XX  objects\infer.obj+
XX  objects\make.obj+
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/obj.rsp	Thu Oct  4 10:25:24 1990
XX--- msdos/tccdos/obj.rsp	Tue Oct 30 16:27:56 1990
XX***************
XX*** 1,4 ****
XX! c:\lib.tcc\c0c.obj+
XX  objects\infer.obj+
XX  objects\make.obj+
XX  objects\stat.obj+
XX--- 1,4 ----
XX! c:\cc\tcc\lib\c0c.obj+
XX  objects\infer.obj+
XX  objects\make.obj+
XX  objects\stat.obj+
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/libswp.rsp	Thu Oct  4 10:25:38 1990
XX--- msdos/tccdos/libswp.rsp	Tue Oct 30 16:28:48 1990
XX***************
XX*** 1 ****
XX! c:\lib.tcc\cc
XX--- 1 ----
XX! c:\cc\tcc\lib\cc
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/lib.rsp	Thu Oct  4 10:25:24 1990
XX--- msdos/tccdos/lib.rsp	Tue Oct 30 16:27:57 1990
XX***************
XX*** 1 ****
XX! c:\lib.tcc\cc
XX--- 1 ----
XX! c:\cc\tcc\lib\cc
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/tccdos/config.mk	Thu Oct  4 09:27:28 1990
XX--- msdos/tccdos/config.mk	Thu Oct 25 20:08:30 1990
XX***************
XX*** 13,20 ****
XX  .EXPORT : TMPDIR
XX  
XX  # Definition of macros for library, and C startup code.
XX! LDLIBS	        = c:/lib.tcc/c$(MODEL)
XX! CSTARTUP	= c:/lib.tcc/c0$(MODEL).obj
XX  
XX  # The following sources are required for TURBO C 2.0
XX  OSR_SRC = tempnam.c utime.c
XX--- 13,20 ----
XX  .EXPORT : TMPDIR
XX  
XX  # Definition of macros for library, and C startup code.
XX! LDLIBS	        = c:/cc/tcc/lib/c$(MODEL)
XX! CSTARTUP	= c:/cc/tcc/lib/c0$(MODEL).obj
XX  
XX  # The following sources are required for TURBO C 2.0
XX  OSR_SRC = tempnam.c utime.c
XX***************
XX*** 33,38 ****
XX--- 33,42 ----
XX  #CFLAGS += -1
XX  CFLAGS  += -I$(osrdir) -f- -d -O -N- -w-nod $(C_$(MODEL))
XX  ASFLAGS += -t -mx $(S_$(MODEL))
XX+ 
XX+ # Debugging information for Turbo-C
XX+ DB_CFLAGS  += -v
XX+ DB_LDFLAGS += /v
XX  
XX  # See if we modify anything in the lower levels.
XX  .IF $(OSENVIRONMENT) != $(NULL)
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/switchar.c	Sat Oct  6 12:05:32 1990
XX--- msdos/switchar.c	Mon Oct 22 16:52:57 1990
XX***************
XX*** 1,11 ****
XX  /*
XX  ** return switch char
XX  */
XX! #if defined(OS2)
XX  #include <stdlib.h>
XX! #else
XX  #include <dos.h>
XX! #endif /* OS2 */
XX  #include <stdio.h>
XX  #include "stdmacs.h"
XX  
XX--- 1,12 ----
XX  /*
XX  ** return switch char
XX  */
XX! #if defined(OS2) || defined(_MSC_VER)
XX  #include <stdlib.h>
XX! #endif
XX! #if !defined(OS2)
XX  #include <dos.h>
XX! #endif /* !OS2 */
XX  #include <stdio.h>
XX  #include "stdmacs.h"
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/spawn.c	Sat Oct  6 12:05:46 1990
XX--- msdos/spawn.c	Sun Oct 28 23:16:18 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/spawn.c,v 1.1 90/10/06 12:05:46 dvadura Exp $
XX  -- SYNOPSIS -- spawnvpe code to emulate spawnvpe call common to DOS compilers.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/spawn.c,v 1.1 90/10/06 12:05:46 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- spawnvpe code to emulate spawnvpe call common to DOS compilers.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 5,11 ****
XX  --	This implementation is further integrated into dmake in that it
XX  --	determines the program to execute and if it's extension is either
XX  --	.bat or .ksh it executes it using the appropriate shell based on the
XX! --	setting of .MKSARGS.  Additionally if .MKSARGS is set then in addition
XX  --	to the command tail getting built the arguments are also passed in the
XX  --	environment pursuant to the published MKS argument passing conventions.
XX  --	If the variable Swap_on_exec is set and the DOS OS supports it
XX--- 5,11 ----
XX  --	This implementation is further integrated into dmake in that it
XX  --	determines the program to execute and if it's extension is either
XX  --	.bat or .ksh it executes it using the appropriate shell based on the
XX! --	setting of .MKSARGS.  If .MKSARGS is set then in addition
XX  --	to the command tail getting built the arguments are also passed in the
XX  --	environment pursuant to the published MKS argument passing conventions.
XX  --	If the variable Swap_on_exec is set and the DOS OS supports it
XX***************
XX*** 51,57 ****
XX  
XX  #include <stdio.h>
XX  #include <stdlib.h>
XX! #include <process.h>
XX  #include <dos.h>
XX  #include <errno.h>
XX  #include <string.h>
XX--- 51,69 ----
XX  
XX  #include <stdio.h>
XX  #include <stdlib.h>
XX! 
XX! #if defined(_MSC_VER) && _MSC_VER >= 600
XX! 	/* Ignore the MSC 6.0 library's "const"-riddled prototype
XX! 	   for spawnvpe.
XX! 	*/
XX! # define spawnvpe _ignore_msc_spawnvpe
XX! # include <process.h>
XX! # undef spawnvpe
XX!   int spawnvpe(int, char *, char **, char **);
XX! #else
XX! # include <process.h>
XX! #endif
XX! 
XX  #include <dos.h>
XX  #include <errno.h>
XX  #include <string.h>
XX***************
XX*** 61,76 ****
XX  #include "sysintf.h"
XX  #include "extern.h"
XX  
XX- #ifdef DEBUG
XX- static void _dump_blocks();
XX- #endif
XX- 
XX  extern int Interrupted;
XX  
XX  /* variables and functions local to this file */
XX  static char     *_findexec ANSI((char *, int *));
XX  static char    **_getpath ANSI(());
XX- static void      _dos_free  ANSI((char far *));
XX  static char far *_dos_alloc ANSI((uint16));
XX  
XX  static uint16 _swap_mask;
XX--- 73,83 ----
XX***************
XX*** 89,100 ****
XX  /* How to make a long pointer */
XX  #define CF(x) (char far *)x
XX  
XX- #if defined(_MSC60_)
XX- #define CONST const
XX- #else
XX- #define CONST
XX- #endif
XX- 
XX  int
XX  spawnvpe(mode, program, av, ep)/*
XX  =================================
XX--- 96,101 ----
XX***************
XX*** 104,116 ****
XX     path and to invoke the process. */
XX  int  mode;
XX  char *program;
XX! CONST char **av;
XX! CONST char **ep;
XX  {
XX     char **envp = ep;		/* Cause we are going to mess with it. */
XX     char **argv = av;		/* Same with this one.		       */
XX     char cmdtail[129];
XX-    char far *envsave;
XX     char far *environment;
XX     char *tail;
XX     char *swptmp;
XX--- 105,116 ----
XX     path and to invoke the process. */
XX  int  mode;
XX  char *program;
XX! char **av;
XX! char **ep;
XX  {
XX     char **envp = ep;		/* Cause we are going to mess with it. */
XX     char **argv = av;		/* Same with this one.		       */
XX     char cmdtail[129];
XX     char far *environment;
XX     char *tail;
XX     char *swptmp;
XX***************
XX*** 193,199 ****
XX     for(; *envp && **envp == '~'; envp++ );
XX     for(i=0, envsize=_mks_args?cmdsize:1; envp[i] != NIL(char); i++ )
XX        envsize += strlen(envp[i]) + 1;
XX-    envsize += strlen(program)+3;	/* Save space for program name	*/
XX  
XX     /* Set up temporary file for swapping */
XX     swptmp = (doswap=Swap_on_exec&_swap_mask)?tempnam(NIL(char),"mk"):""; 
XX--- 193,198 ----
XX***************
XX*** 203,213 ****
XX      * place in the executable image so that when we swap out the environment
XX      * is still present.  Use
XX      *    _dos_alloc
XX!     *    _dos_free
XX!     * to allocate and free the environment segment */
XX  
XX-    envsave = environment = _dos_alloc( envsize = ((envsize+16)>>4) );
XX- 
XX     /* First copy the arguments preceeded by ~ character if we are using
XX      * MKS style argument passing */
XX     if( _mks_args )
XX--- 202,211 ----
XX      * place in the executable image so that when we swap out the environment
XX      * is still present.  Use
XX      *    _dos_alloc
XX!     * to allocate the environment segment.  The segment is freed by the call
XX!     * to exec. */
XX!    environment = _dos_alloc( envsize = ((envsize+16)>>4) );
XX  
XX     /* First copy the arguments preceeded by ~ character if we are using
XX      * MKS style argument passing */
XX     if( _mks_args )
XX***************
XX*** 223,247 ****
XX        register char *p = *envp;
XX        while( *environment++ = *p++ );		/* Far dest, poss near ptr */
XX     }
XX  
XX-    /* Terminate the environment with a NULL char, and then a word containing
XX-     * the number 1 (why? beats me, but probably has something to do with
XX-     * sticking the program name at the end of the environment, and is possibly
XX-     * headed for an extension to argument passing conventions in future DOS
XX-     * versions.  For now all they have is the name of the program. */
XX-    *environment++ = '\0'; *environment++ = '\0'; *environment++ = '\1';
XX-    {
XX-       register char *p = program;
XX-       while( *environment++ = *p++ );		/* Far dest, poss near ptr */
XX-    }
XX- 
XX     /* Clear the interrupted flag, and exec  */
XX     Interrupted = 0;
XX!    i = exec(doswap,CF(program),CF(cmdtail),FP_SEG(environment),envsize,
XX!             CF(swptmp));
XX  
XX!    /* Now free the environment segment */
XX!    _dos_free( envsave );
XX     if( doswap ) FREE(swptmp);
XX  
XX     /* If swap was interrupted then quit properly from dmake. */
XX--- 221,233 ----
XX        register char *p = *envp;
XX        while( *environment++ = *p++ );		/* Far dest, poss near ptr */
XX     }
XX+    *environment = '\0';
XX  
XX     /* Clear the interrupted flag, and exec  */
XX     Interrupted = 0;
XX!    i = exec(doswap,CF(program),CF(cmdtail),FP_SEG(environment),CF(swptmp));
XX  
XX!    /* Now free the temporary file name */
XX     if( doswap ) FREE(swptmp);
XX  
XX     /* If swap was interrupted then quit properly from dmake. */
XX***************
XX*** 387,398 ****
XX  uint16 size;
XX  {
XX     union REGS r;
XX-    union REGS t;
XX  
XX-    r.x.ax = 0x5801;
XX-    r.x.bx = 0x0002;
XX-    intdos( &r, &r );
XX- 
XX     r.h.ah = 0x48;
XX     r.x.bx = size;
XX  
XX--- 373,379 ----
XX***************
XX*** 399,482 ****
XX     intdos( &r, &r );
XX     if( r.x.cflag ) No_ram();
XX     
XX-    t.x.ax = 0x5801;
XX-    t.x.bx = 0x0000;
XX-    intdos( &t, &t );
XX- 
XX     return( (char far *) MK_FP(r.x.ax, 0) );
XX  }
XX- 
XX- 
XX- #if defined(_MSC60_)
XX- #pragma pack(1)
XX- #endif
XX- typedef struct {
XX-    char 	 mode;
XX-    unsigned int  owner;
XX-    unsigned int  size;
XX- } MB, *MBPTR;
XX- #if defined(_MSC60_)
XX- #pragma pack()
XX- #endif
XX- 
XX- static void
XX- _dos_free( pblock )/*
XX- =====================
XX-    ALERT!!!! Major GROSSNESS HERE!!!!  This routine calls DOS free to free
XX-    a block of memory and then walks the DOS allocation chain from the current
XX-    psp forward and coallesces any free blocks it finds into one large free
XX-    block.  This prevents the No more memory error that was being caused by
XX-    long makes causing fragmentation of DOS memory.  I can probably avoid this
XX-    by using some weird combination of DOS calls, but I would have to figger
XX-    out what calls under DOS cause the coalesce to happen.  Haven't found this
XX-    so far so, for now, I will just go with this.  It work fine on my box :-)*/
XX- char far *pblock;
XX- {
XX-    union REGS r;
XX-    struct SREGS s;
XX-    MB far *p;
XX-    MB far *t;
XX-    int flag = 0;
XX- 
XX-    s.es = FP_SEG(pblock);
XX-    r.h.ah = 0x49;
XX-    intdosx( &r, &r, &s );
XX-    if( r.x.cflag ) Fatal( "FREE SEG" );
XX- 
XX-    p = (MB far *) MK_FP(_psp-1, 0);
XX- 
XX-    while(1) {
XX-       if( p->owner == 0 )
XX-          if( !flag ) {
XX- 	    t = p;
XX- 	    flag++;
XX- 	 }
XX- 	 else if( FP_SEG(t)+t->size+1 == FP_SEG(p) )
XX- 	    t->size += p->size+1;
XX- 
XX-       if( p->mode == 'Z' ) break;
XX-       p = (MB far *) MK_FP(FP_SEG(p)+p->size+1, 0);
XX-    }
XX- 
XX- }
XX- 
XX- 
XX- #ifdef DBUG
XX- static void
XX- _dump_blocks()/*
XX- ================
XX-    Walk DOS memory blocks and dump their headers. */
XX- {
XX-    MB far *p;
XX- 
XX-    p = (MB far *) MK_FP( _psp-1, 0 );
XX- 
XX-    while(1) {
XX-       printf( "%c 0x%04x 0x%04x 0x%04x:%d\n", p->mode, FP_SEG(p), p->owner,
XX-               p->size, p->size );
XX- 
XX-       if( p->mode == 'Z' ) break;
XX-       p = (MB far *) MK_FP( FP_SEG(p)+p->size+1, 0 );
XX-    }
XX- }
XX- #endif
XX--- 380,384 ----
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/runargv.c	Sat Oct  6 12:05:30 1990
XX--- msdos/runargv.c	Mon Oct 22 16:53:11 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/runargv.c,v 1.1 90/10/06 12:05:30 dvadura Exp $
XX  -- SYNOPSIS -- run a sub process.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/runargv.c,v 1.1 90/10/06 12:05:30 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- run a sub process.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 52,58 ****
XX--- 52,60 ----
XX  int	shell;
XX  char	*cmd;
XX  {
XX+ #if ! defined(_MSC_VER)
XX     extern char **environ;
XX+ #endif
XX     int status;
XX     char **argv;
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/mscdos/tempnam.c	Sat Oct  6 12:05:08 1990
XX--- msdos/mscdos/tempnam.c	Sun Oct 28 23:16:18 1990
XX***************
XX*** 2,8 ****
XX  #include <stdio.h>
XX  #include <string.h>
XX  #include <stdlib.h>
XX! #include <time.h>
XX  
XX  #if defined(max)
XX  #   undef  max
XX--- 2,8 ----
XX  #include <stdio.h>
XX  #include <string.h>
XX  #include <stdlib.h>
XX! #include <dos.h>
XX  
XX  #if defined(max)
XX  #   undef  max
XX***************
XX*** 14,20 ****
XX  int _access();
XX  
XX  /* MSC stdio.h defines P_tmpdir, so let's undo it here */
XX! /* Under DOS leave the default tmpdir pointing here!   */
XX  #ifdef P_tmpdir
XX  #undef P_tmpdir
XX  #endif
XX--- 14,20 ----
XX  int _access();
XX  
XX  /* MSC stdio.h defines P_tmpdir, so let's undo it here */
XX! /* Under DOS leave the default tmpdir pointing here!		*/
XX  #ifdef P_tmpdir
XX  #undef P_tmpdir
XX  #endif
XX***************
XX*** 28,34 ****
XX     static         int count = 0;
XX     register char *p, *q, *tmpdir;
XX     int            tl=0, dl=0, pl;
XX-    time_t	  ctm;
XX     char		  buf[30];
XX  
XX     pl = strlen(P_tmpdir);
XX--- 28,33 ----
XX***************
XX*** 36,42 ****
XX     if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
XX     if( dir != NULL ) dl = strlen(dir);
XX  
XX!    if( (p = malloc((unsigned)(max(max(dl,tl),pl)+12))) == NULL )
XX       return(NULL);
XX  
XX     *p = '\0';
XX--- 35,41 ----
XX     if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
XX     if( dir != NULL ) dl = strlen(dir);
XX  
XX!    if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
XX       return(NULL);
XX  
XX     *p = '\0';
XX***************
XX*** 53,65 ****
XX        (void)strncat(p, prefix, 2);
XX     }
XX  
XX!    sprintf( buf, "%ld", (long) time((time_t *)0) );
XX!    (void)strcat(p, buf+strlen(buf)-6 );
XX!    sprintf( buf, "%03d", count++ );
XX     q=p+strlen(p)-6;
XX!    *q++ = buf[0];
XX!    *q++ = buf[1];
XX!    *q++ = buf[2];
XX  
XX     if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
XX  
XX--- 52,64 ----
XX        (void)strncat(p, prefix, 2);
XX     }
XX  
XX!    sprintf( buf, "%08x", _psp );
XX!    buf[6]='\0';
XX!    (void)strcat(p, buf );
XX!    sprintf( buf, "%04d", count++ );
XX     q=p+strlen(p)-6;
XX!    *q++ = buf[0]; *q++ = buf[1];
XX!    *q++ = buf[2]; *q++ = buf[3];
XX  
XX     if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/mscdos/startup.mk	Thu Oct  4 09:56:54 1990
XX--- msdos/mscdos/startup.mk	Sun Oct 28 23:16:17 1990
XX***************
XX*** 53,59 ****
XX     SHELLMETAS  := *"?<>|()&][$$\#`'
XX     GROUPSUFFIX := .ksh
XX     .MKSARGS    := yes
XX!    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${DIVSHELL}})
XX     DIVSEP_shell_yes := \\\
XX     DIVSEP_shell_no  := \\
XX  .END
XX--- 53,59 ----
XX     SHELLMETAS  := *"?<>|()&][$$\#`'
XX     GROUPSUFFIX := .ksh
XX     .MKSARGS    := yes
XX!    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
XX     DIVSEP_shell_yes := \\\
XX     DIVSEP_shell_no  := \\
XX  .END
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/mscdos/mk60swp.bat	Thu Oct  4 10:26:28 1990
XX--- msdos/mscdos/mk60swp.bat	Tue Oct 30 16:33:07 1990
XX***************
XX*** 1,64 ****
XX  mkdir objects
XX  masm -t -mx -Dmcompact msdos\exec.asm;
XX  mv exec.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ infer.c
XX  mv infer.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ make.c
XX  mv make.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ stat.c
XX  mv stat.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ expand.c
XX  mv expand.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ string.c
XX  mv string.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ hash.c
XX  mv hash.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ dag.c
XX  mv dag.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ dmake.c
XX  mv dmake.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ path.c
XX  mv path.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ imacs.c
XX  mv imacs.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ sysintf.c
XX  mv sysintf.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ parse.c
XX  mv parse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ getinp.c
XX  mv getinp.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ quit.c
XX  mv quit.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ basename.c
XX  mv basename.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ dump.c
XX  mv dump.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ macparse.c
XX  mv macparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ rulparse.c
XX  mv rulparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ percent.c
XX  mv percent.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ function.c
XX  mv function.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\ruletab.c
XX  mv ruletab.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\dirbrk.c
XX  mv dirbrk.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\runargv.c
XX  mv runargv.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\arlib.c
XX  mv arlib.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\_chdir.c
XX  mv _chdir.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\switchar.c
XX  mv switchar.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\rmprq.c
XX  mv rmprq.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\find.c
XX  mv find.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\spawn.c
XX  mv spawn.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\mscdos\tempnam.c
XX  mv tempnam.obj objects
XX! link @msdos\mscdos\obj60swp.rsp,dmake.exe,NUL.MAP;
XX--- 1,64 ----
XX  mkdir objects
XX  masm -t -mx -Dmcompact msdos\exec.asm;
XX  mv exec.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs infer.c
XX  mv infer.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs make.c
XX  mv make.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs stat.c
XX  mv stat.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs expand.c
XX  mv expand.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs string.c
XX  mv string.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs hash.c
XX  mv hash.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs dag.c
XX  mv dag.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs dmake.c
XX  mv dmake.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs path.c
XX  mv path.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs imacs.c
XX  mv imacs.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs sysintf.c
XX  mv sysintf.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs parse.c
XX  mv parse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs getinp.c
XX  mv getinp.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs quit.c
XX  mv quit.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs basename.c
XX  mv basename.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs dump.c
XX  mv dump.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs macparse.c
XX  mv macparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs rulparse.c
XX  mv rulparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs percent.c
XX  mv percent.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs function.c
XX  mv function.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\ruletab.c
XX  mv ruletab.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\dirbrk.c
XX  mv dirbrk.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\runargv.c
XX  mv runargv.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\arlib.c
XX  mv arlib.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\_chdir.c
XX  mv _chdir.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\switchar.c
XX  mv switchar.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\rmprq.c
XX  mv rmprq.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\find.c
XX  mv find.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\spawn.c
XX  mv spawn.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\mscdos\tempnam.c
XX  mv tempnam.obj objects
XX! link @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/mscdos/mk60.bat	Thu Oct  4 10:26:00 1990
XX--- msdos/mscdos/mk60.bat	Tue Oct 30 16:32:40 1990
XX***************
XX*** 1,58 ****
XX  mkdir objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ infer.c
XX  mv infer.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ make.c
XX  mv make.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ stat.c
XX  mv stat.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ expand.c
XX  mv expand.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ string.c
XX  mv string.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ hash.c
XX  mv hash.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ dag.c
XX  mv dag.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ dmake.c
XX  mv dmake.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ path.c
XX  mv path.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ imacs.c
XX  mv imacs.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ sysintf.c
XX  mv sysintf.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ parse.c
XX  mv parse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ getinp.c
XX  mv getinp.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ quit.c
XX  mv quit.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ basename.c
XX  mv basename.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ dump.c
XX  mv dump.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ macparse.c
XX  mv macparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ rulparse.c
XX  mv rulparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ percent.c
XX  mv percent.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ function.c
XX  mv function.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\ruletab.c
XX  mv ruletab.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\dirbrk.c
XX  mv dirbrk.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\runargv.c
XX  mv runargv.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\arlib.c
XX  mv arlib.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\_chdir.c
XX  mv _chdir.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\switchar.c
XX  mv switchar.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\rmprq.c
XX  mv rmprq.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -D__STDC__=1 -DM_I86=1 -mc -Osecgle -Gs -D_MSC60_ msdos\mscdos\tempnam.c
XX  mv tempnam.obj objects
XX! link @msdos\mscdos\obj60.rsp,dmake.exe,NUL.MAP;
XX--- 1,58 ----
XX  mkdir objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs infer.c
XX  mv infer.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs make.c
XX  mv make.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs stat.c
XX  mv stat.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs expand.c
XX  mv expand.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs string.c
XX  mv string.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs hash.c
XX  mv hash.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs dag.c
XX  mv dag.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs dmake.c
XX  mv dmake.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs path.c
XX  mv path.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs imacs.c
XX  mv imacs.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs sysintf.c
XX  mv sysintf.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs parse.c
XX  mv parse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs getinp.c
XX  mv getinp.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs quit.c
XX  mv quit.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs basename.c
XX  mv basename.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs dump.c
XX  mv dump.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs macparse.c
XX  mv macparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs rulparse.c
XX  mv rulparse.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs percent.c
XX  mv percent.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs function.c
XX  mv function.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\ruletab.c
XX  mv ruletab.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\dirbrk.c
XX  mv dirbrk.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\runargv.c
XX  mv runargv.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\arlib.c
XX  mv arlib.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\_chdir.c
XX  mv _chdir.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\switchar.c
XX  mv switchar.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\rmprq.c
XX  mv rmprq.obj objects
XX! cl -c -DHELP -I. -Icommon -Imsdos -Imsdos\mscdos -AC -D__STDC__=1 -Osecgl -Gs msdos\mscdos\tempnam.c
XX  mv tempnam.obj objects
XX! link @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/mscdos/config.mk	Thu Oct  4 09:27:58 1990
XX--- msdos/mscdos/config.mk	Mon Oct 29 14:45:10 1990
XX***************
XX*** 20,52 ****
XX  SRC += $(OSR_SRC)
XX  .SOURCE.h : $(osrdir)
XX  
XX! # Local configuration modifications for CFLAGS, there's local BSD includes
XX! # too.
XX  # If you have a 286, you can use -G2 or appropriate to get better code, 
XX! # in that case uncomment the line below.
XX  #CFLAGS += -G2
XX- CFLAGS += -I$(osrdir) -D__STDC__=1 -DM_I86=1 $(C_$(MODEL))
XX  ASFLAGS += -t -mx $(S_$(MODEL))
XX  
XX  # Redefine this, it isn't needed!
XX  LDTAIL = ;
XX  
XX! # Debugging Flags
XX! DB_CFLAGS     += -Zi
XX! DB_LDFLAGS    += /co /li /map
XX! DB_LDLIBS     +=
XX  
XX! # NO Debug flags, MSC 6.0 flags, set the environment variable MSC_VER to be
XX! # 6.0 to get these by default when you make dmake using 'dmake'.
XX  .IMPORT .IGNORE : MSC_VER
XX! .IF $(MSC_VER) == 6.0
XX!    NDB_CFLAGS    += -Osecgle -Gs -D_MSC60_
XX!    DB_CFLAGS     += -D_MSC60_
XX!    NDB_LDFLAGS   += /exe /packc /batch
XX!    NDB_LDLIBS    +=
XX  .ELSE
XX!    NDB_CFLAGS    += -Zp
XX!    DB_CFLAGS     += -Zp
XX  .END
XX  
XX  # See if we modify anything in the lower levels.
XX--- 20,69 ----
XX  SRC += $(OSR_SRC)
XX  .SOURCE.h : $(osrdir)
XX  
XX! # Local configuration modifications for CFLAGS 
XX  # If you have a 286, you can use -G2 or appropriate to get better code, 
XX! # in that case uncomment the line below.  (You can also simply set
XX! # it in the CL environment variable.)
XX  #CFLAGS += -G2
XX  ASFLAGS += -t -mx $(S_$(MODEL))
XX  
XX  # Redefine this, it isn't needed!
XX  LDTAIL = ;
XX  
XX! # Debugging libraries
XX! DB_LDFLAGS += /co /li /map
XX! DB_LDLIBS  +=
XX  
XX! # NO Debug MSC flags:
XX! # Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
XX! # to get these by default when you make dmake using 'dmake'.
XX! #
XX! # Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
XX! # and sets the flags appropriately.
XX! 
XX  .IMPORT .IGNORE : MSC_VER
XX! MSC_VER *= 6.0			  # If unset, assume 6.0 by default.
XX! 
XX! .IF $(MSC_VER) == 4.0
XX!    CFLAGS      += -I$(osrdir) $(C_$(MODEL):s/A/m/)
XX!    CFLAGS      += -DM_I86=1	  # 5.0+ define this automatically
XX!    CFLAGS      += -D__STDC__=1    # 5.0, 5.1, but not 6.0 do this automatically
XX!    NDB_CFLAGS  +=
XX!    DB_CFLAGS   += -Zi
XX  .ELSE
XX!    DB_CFLAGS   += -Zi
XX!    CFLAGS      += -I$(osrdir) $(C_$(MODEL))
XX!    .IF $(MSC_VER) != 6.0
XX!       # For 5.0 and 5.1, we define _MSC_VER=500 or 510
XX!       CFLAGS      += -D_MSC_VER=$(MSC_VER:s,.,,)0
XX!       NDB_CFLAGS  += -Oscl -Gs
XX!    .ELSE
XX!       # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
XX!       CFLAGS      += -D__STDC__=1 # incredibly not auto done by 6.0
XX!       NDB_CFLAGS  += -Osecgl -Gs
XX!    .END
XX!    NDB_LDFLAGS += /exe /packc /batch
XX!    NDB_LDLIBS  +=
XX  .END
XX  
XX  # See if we modify anything in the lower levels.
XX***************
XX*** 55,63 ****
XX  .END
XX  
XX  C_s =
XX! C_m = -mm
XX! C_c = -mc
XX! C_l = -ml
XX  
XX  S_s = -Dmsmall
XX  S_m = -Dmmedium
XX--- 72,80 ----
XX  .END
XX  
XX  C_s =
XX! C_m = -AM
XX! C_c = -AC
XX! C_l = -AL
XX  
XX  S_s = -Dmsmall
XX  S_m = -Dmmedium
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/mscdos/config.h	Sat Oct  6 12:05:06 1990
XX--- msdos/mscdos/config.h	Mon Oct 22 17:13:51 1990
SHAR_EOF
echo "End of part 3, continue with part 4"
echo "4" > s2_seq_.tmp
exit 0
-- 
--------------------------------------------------------------------------------
"This is almost worth the HIGH blood pressure!" he  |Dennis Vadura
thought as yet another mosquito exploded.-R.Patching|dvadura@dragon.uwaterloo.ca
================================================================================

dvadura@watdragon.waterloo.edu (Dennis Vadura) (11/01/90)

#!/bin/sh
# this is part 4 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file dm36.p1 continued
#
CurArch=4
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> dm36.p1
XX***************
XX*** 34,39 ****
XX--- 34,46 ----
XX   * 
XX  */
XX  
XX+ #if defined (_MSC_VER)
XX+ # if _MSC_VER < 500
XX+ 	Force a compile-time blowup.
XX+ 	Do not define define _MSC_VER for MSC compilers ealier than 5.0.
XX+ # endif
XX+ #endif
XX+ 
XX  /* define this for configurations that don't have the coreleft function
XX   * so that the code compiles.  To my knowledge coreleft exists only on
XX   * Turbo C, but it is needed here since the function is used in many debug
XX***************
XX*** 48,57 ****
XX  #   define SIGTERM SIGINT
XX  #endif
XX  
XX! /* Fixes unimplemented line buffering for MSC
XX   * MSC _IOLBF is the same as _IOFBF
XX-  * This redefinition causes the following warning, but ignore it
XX-  * c:/usr/include/stdio.h(129) : warning C4005: '_IOLBF' : macro redefinition
XX   */
XX  #if defined(MSDOS) && defined (_MSC_VER)
XX  #   undef  _IOLBF
XX--- 55,62 ----
XX  #   define SIGTERM SIGINT
XX  #endif
XX  
XX! /* Fixes unimplemented line buffering for MSC 5.x and 6.0.
XX   * MSC _IOLBF is the same as _IOFBF
XX   */
XX  #if defined(MSDOS) && defined (_MSC_VER)
XX  #   undef  _IOLBF
XX***************
XX*** 59,65 ****
XX  #endif
XX  
XX  /* in alloc.h: size_t is redefined
XX!  * defined in stdio.h which is included alloc.h
XX   */
XX  #if defined(MSDOS) && defined (_MSC_VER)
XX  #   define _TYPES_
XX--- 64,70 ----
XX  #endif
XX  
XX  /* in alloc.h: size_t is redefined
XX!  * defined in stdio.h which is included by alloc.h
XX   */
XX  #if defined(MSDOS) && defined (_MSC_VER)
XX  #   define _TYPES_
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/exec.h	Sat Oct  6 12:05:40 1990
XX--- msdos/exec.h	Sun Oct 28 23:16:16 1990
XX***************
XX*** 9,16 ****
XX  #endif
XX  #endif
XX  
XX! extern int  exec ANSI((int, char far *, char far *, unsigned int,
XX! 		       unsigned int, char far *));
XX  
XX  #ifndef MK_FP
XX  #define MK_FP(seg,ofs) \
XX--- 9,15 ----
XX  #endif
XX  #endif
XX  
XX! extern int  exec ANSI((int, char far *, char far *, unsigned int, char far *));
XX  
XX  #ifndef MK_FP
XX  #define MK_FP(seg,ofs) \
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/exec.asm	Sat Oct  6 12:05:50 1990
XX--- msdos/exec.asm	Sun Oct 28 23:16:15 1990
XX***************
XX*** 1,6 ****
XX! ; You must assemble this file with masm (or tasm) flag
XX! ;    /dmmodel where model is one of {small, compact, medium, large}
XX  ;
XX  ifdef msmall
XX  	        .model	small
XX  argbase		equ	4
XX--- 1,44 ----
XX! ; SYNOPSIS
XX! ;      Exec code for the swapping version of DOS spawn.
XX! ; 
XX! ; DESCRIPTION
XX! ;      This code is a model independent version of DOS exec that will swap
XX! ;      the calling process out to secondary storage prior to running the
XX! ;      child.  The prototype for calling the exec function is below.
XX  ;
XX+ ;      exec( int swap, char far *program, char far *cmdtail,
XX+ ;	     int environment_seg, int env_size, char far *tmpfilename );
XX+ ;
XX+ ;
XX+ ;      To assemble this file issue the command:
XX+ ;
XX+ ;         tasm /mx /t /dmmodel exec.asm
XX+ ;
XX+ ;      where 'model' is one of {small, compact, medium, large}, you may
XX+ ;      also use MASM 5.1 to assemble this file, in this case simply replace
XX+ ;      'tasm' with 'masm' in the above command line.
XX+ ;
XX+ ; AUTHOR
XX+ ;      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
XX+ ;      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
XX+ ;
XX+ ; COPYRIGHT
XX+ ;      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
XX+ ; 
XX+ ;      This program is free software; you can redistribute it and/or
XX+ ;      modify it under the terms of the GNU General Public License
XX+ ;      (version 1), as published by the Free Software Foundation, and
XX+ ;      found in the file 'LICENSE' included with this distribution.
XX+ ; 
XX+ ;      This program is distributed in the hope that it will be useful,
XX+ ;      but WITHOUT ANY WARRANTY; without even the implied warrant of
XX+ ;      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XX+ ;      GNU General Public License for more details.
XX+ ; 
XX+ ;      You should have received a copy of the GNU General Public License
XX+ ;      along with this program;  if not, write to the Free Software
XX+ ;      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XX+ ;
XX  ifdef msmall
XX  	        .model	small
XX  argbase		equ	4
XX***************
XX*** 21,28 ****
XX  a_prog		equ	<bp+argbase+2>
XX  a_tail		equ	<bp+argbase+6>
XX  a_env 		equ	<bp+argbase+10>
XX! a_esiz		equ	<bp+argbase+12>
XX! a_tmp		equ	<bp+argbase+14>
XX  
XX  
XX  ; Define all useful equ's
XX--- 59,65 ----
XX  a_prog		equ	<bp+argbase+2>
XX  a_tail		equ	<bp+argbase+6>
XX  a_env 		equ	<bp+argbase+10>
XX! a_tmp		equ	<bp+argbase+12>
XX  
XX  
XX  ; Define all useful equ's
XX***************
XX*** 49,57 ****
XX  old_ss		dw	?		; save stack seg across exec
XX  old_sp		dw	?		; save stack ptr across exec
XX  progsize	dw	?		; original size of the program
XX  resend		dw	?		; paragraph where resident code ends
XX  envseg		dw	?		; paragraph of environment segment
XX- envsize		dw	?		; length of environment in paragraphs
XX  psp		dw	?		; our own psp
XX  swap		dw	?		; swapping selection flag
XX  retcode		dw	?		; return code from exec
XX--- 86,94 ----
XX  old_ss		dw	?		; save stack seg across exec
XX  old_sp		dw	?		; save stack ptr across exec
XX  progsize	dw	?		; original size of the program
XX+ rootsize	dw	?		; size of base root kept during swap
XX  resend		dw	?		; paragraph where resident code ends
XX  envseg		dw	?		; paragraph of environment segment
XX  psp		dw	?		; our own psp
XX  swap		dw	?		; swapping selection flag
XX  retcode		dw	?		; return code from exec
XX***************
XX*** 126,132 ****
XX  ; First define the critical-error and control-brk handlers. 
XX  ; The critical error handler simply pops the machine state and returns an
XX  ; access denied result code.
XX! crit_err_handler proc near
XX  		add	sp, 6		; ip/cs/flags ...
XX  		pop	ax
XX  		pop	bx
XX--- 163,169 ----
XX  ; First define the critical-error and control-brk handlers. 
XX  ; The critical error handler simply pops the machine state and returns an
XX  ; access denied result code.
XX! crit_err_handler proc far
XX  		add	sp, 6		; ip/cs/flags ...
XX  		pop	ax
XX  		pop	bx
XX***************
XX*** 150,174 ****
XX  
XX  ;-----------------------------------------------------------------------------
XX  ; Here we set the interrupted flag, and terminate the currently running
XX! ; ess. proc 
XX! ctl_brk_handler proc near
XX  		inc	cs:interrupted		; set the flag
XX  
XX  ; Make certain it isn't us that is going to get terminated.
XX  ; There is a small window where the in_exec flag is set but the child is
XX  ; not running yet, I assume that DOS doesn't test for ctl_brk at that time
XX! ; as it is bussily creating a new ess. proc 
XX  		cmp	cs:in_exec,0
XX! 		je	just_return
XX! 		mov	ax, 04cffH		; stop the sucker!
XX! 		int	21H
XX! just_return:	ret
XX  ctl_brk_handler endp
XX  
XX  
XX  ;-----------------------------------------------------------------------------
XX  ; Something really nasty happened, so abort the exec call and exit.
XX! ; This kills the calling ess proc altogether, and is a very nasty way of
XX  ; termination since files may still be open etc.
XX  abort_exec_rhdr label near
XX  		mov	dx, offset error_rhdr
XX--- 187,211 ----
XX  
XX  ;-----------------------------------------------------------------------------
XX  ; Here we set the interrupted flag, and terminate the currently running
XX! ; process.
XX! ctl_brk_handler proc far
XX! 		clc				; make sure carry is clear
XX  		inc	cs:interrupted		; set the flag
XX  
XX  ; Make certain it isn't us that is going to get terminated.
XX  ; There is a small window where the in_exec flag is set but the child is
XX  ; not running yet, I assume that DOS doesn't test for ctl_brk at that time
XX! ; as it is bussily creating a new process.
XX  		cmp	cs:in_exec,0
XX! 		je	just_return		; note this implies CF == 0
XX! 		stc				; set CF to abort child
XX! just_return:	iret
XX  ctl_brk_handler endp
XX  
XX  
XX  ;-----------------------------------------------------------------------------
XX  ; Something really nasty happened, so abort the exec call and exit.
XX! ; This kills the calling process altogether, and is a very nasty way of
XX  ; termination since files may still be open etc.
XX  abort_exec_rhdr label near
XX  		mov	dx, offset error_rhdr
XX***************
XX*** 187,196 ****
XX  		jmp	print_it
XX  abort_exec proc near
XX  		mov	dx, offset error_string
XX! print_it:	mov	bx, [swap]
XX  		call	[free_resource+bx]
XX  		mov	ax, cs
XX  		mov	ds, ax
XX  		mov	ah, 9
XX  		int	21H
XX  kill_program:	mov	ax, 04cffH			; nuke it!
XX--- 224,235 ----
XX  		jmp	print_it
XX  abort_exec proc near
XX  		mov	dx, offset error_string
XX! print_it:	push	dx
XX! 		mov	bx, [swap]
XX  		call	[free_resource+bx]
XX  		mov	ax, cs
XX  		mov	ds, ax
XX+ 		pop	dx
XX  		mov	ah, 9
XX  		int	21H
XX  kill_program:	mov	ax, 04cffH			; nuke it!
XX***************
XX*** 402,408 ****
XX  ;	- walk DOS allocation chain and write out all other segments owned by
XX  ;	  the current program that are contiguous with the _psp segment
XX  ;	- copy the environment down to low memory
XX! ;	- resize the current _psp segment to savesize+envsize.
XX  ;	- free all segments belonging to program except current _psp segment
XX  swap_out proc near
XX  		mov	ax, 05800H	; get memory alocation strategy
XX--- 441,447 ----
XX  ;	- walk DOS allocation chain and write out all other segments owned by
XX  ;	  the current program that are contiguous with the _psp segment
XX  ;	- copy the environment down to low memory
XX! ;	- resize the current _psp segment to savesize
XX  ;	- free all segments belonging to program except current _psp segment
XX  swap_out proc near
XX  		mov	ax, 05800H	; get memory alocation strategy
XX***************
XX*** 427,432 ****
XX--- 466,472 ----
XX  		add	bx, ax			; bx is size of program to keep
XX  		sub	si, bx			; si is # of paragraphs to save.
XX  		add	di, bx			; di is paragraph to start at
XX+ 		mov	rootsize, bx
XX  		mov	resend, di		; cs:resend is saved start para
XX  		mov	al, seg_no_alloc	; set no allocation for segment
XX  		call	write_segment
XX***************
XX*** 434,441 ****
XX  
XX  ; We have now saved the portion of the program segment that will not remain
XX  ; resident during the exec.  We should now walk the DOS allocation chain and
XX! ; write out all other segments owned by the current ess. proc 
XX! 		mov	ax, [psp]
XX  		dec	ax
XX  		mov	es, ax
XX  		mov	bx, offset write_segment_data
XX--- 474,481 ----
XX  
XX  ; We have now saved the portion of the program segment that will not remain
XX  ; resident during the exec.  We should now walk the DOS allocation chain and
XX! ; write out all other segments owned by the current process.
XX! save_segments:	mov	ax, [psp]
XX  		dec	ax
XX  		mov	es, ax
XX  		mov	bx, offset write_segment_data
XX***************
XX*** 443,486 ****
XX  		jc	abort_swap_out
XX  
XX  ; Now we must walk the chain of allocated memory blocks again and free
XX! ; all those that are owned by the current ess, proc except the one that is
XX! ; the current ess' proc psp.
XX! free_segments:	mov	es, [psp]
XX  		mov	bx, offset free_dos_segment
XX  		call	walk_arena_chain
XX! 		jnc	copy_environ
XX  		jmp	abort_exec_free		; can't fix it up now.
XX  
XX! ; we have now written all segments that belong to the program to some
XX! ; other resource.  We can now copy the environment and resize the psp
XX! ; segment.
XX! copy_environ:	mov	ax, [envseg]		; get the environment segment
XX! 		or	ax, ax			; skip copy if it's null
XX! 		je	resize_program
XX! 		push	ds
XX! 		push	es
XX! 		mov	bx, [resend]		; here is where the environ goes
XX! 		mov	es, bx		
XX! 		mov	cx, [envsize]
XX! 		add	bx, cx
XX! 		sub	bx, [psp]
XX! 		mov	[envsize], bx		; bx is size of program after
XX! 		shl	cx, 1			; environ is copied.
XX! 		shl	cx, 1
XX! 		shl	cx, 1
XX! 		shl	cx, 1
XX! 		mov	ds, ax			; ds:si is source address
XX! 		xor	si, si			; es:di is dest address
XX! 		mov	di, si			; cx is count in bytes.
XX! 		call	copy_data
XX! 		mov	[envseg], es		; point the envseg at the
XX! 		pop	es			; right spot
XX! 		pop	ds
XX! 
XX! ; We now resize the program to the size specified by cs:envsize.  This will
XX! ; free the memory taken up by the current program segment.
XX  resize_program: mov	es, [psp]		; es is segment to resize.
XX! 		mov	bx, [envsize]		; bx is size of segment.
XX  		mov	ah, 04aH		; resize memory block
XX  		int	21H
XX  		jnc	swap_out_ok
XX--- 483,502 ----
XX  		jc	abort_swap_out
XX  
XX  ; Now we must walk the chain of allocated memory blocks again and free
XX! ; all those that are owned by the current process, except the one that is
XX! ; the current process' psp.
XX! free_segments:	mov	ax, [psp]
XX! 		dec	ax
XX! 		mov	es,ax
XX  		mov	bx, offset free_dos_segment
XX  		call	walk_arena_chain
XX! 		jnc	resize_program
XX  		jmp	abort_exec_free		; can't fix it up now.
XX  
XX! ; We now resize the program to the size specified by cs:rootsize.  This will
XX! ; free most of the memory taken up by the current program segment.
XX  resize_program: mov	es, [psp]		; es is segment to resize.
XX! 		mov	bx, [rootsize]		; bx is size of segment.
XX  		mov	ah, 04aH		; resize memory block
XX  		int	21H
XX  		jnc	swap_out_ok
XX***************
XX*** 513,530 ****
XX  no_swap_out:	cmp	[interrupted], 0	; were we interrupted?
XX  		jne	leave_exec		; yep, so clean up, don't exec
XX  
XX  ; set up the parameter block for the DOS exec call.
XX  ;    offset  contents
XX  ;        00  segment address of environment to be passed,
XX  ; 	     0 => use parents env.
XX! ;        02  pointer to command tail for new ess. proc 
XX  ;        06  pointer to fcb1
XX  ;        0a  pointer to fcb2
XX  		mov	cx, cs
XX  		mov	[word ptr ex_cmdtail], offset cmdtail
XX  		mov	[word ptr ex_cmdtail+2], cx
XX- 		mov	ax, [envseg]
XX- 		mov	[ex_envseg], ax
XX  
XX  ; set up registers for exec call
XX  ;	ds:dx	- pointer to pathname of program to execute
XX--- 529,557 ----
XX  no_swap_out:	cmp	[interrupted], 0	; were we interrupted?
XX  		jne	leave_exec		; yep, so clean up, don't exec
XX  
XX+ ; free passed in environment block if it is non zero.
XX+ ; This way the parent program does not need to free it.
XX+ 		mov	ax, [envseg]
XX+ 		or	ax, ax
XX+ 		je	setup_block
XX+ 		push	ax
XX+ 		mov	es, ax
XX+ 		mov	ah, 49H
XX+ 		int	21H
XX+ 		pop	ax
XX+ 
XX  ; set up the parameter block for the DOS exec call.
XX  ;    offset  contents
XX  ;        00  segment address of environment to be passed,
XX  ; 	     0 => use parents env.
XX! ;        02  pointer to command tail for new process.
XX  ;        06  pointer to fcb1
XX  ;        0a  pointer to fcb2
XX+ setup_block:	mov	ax, [envseg]
XX+ 		mov	[ex_envseg], ax
XX  		mov	cx, cs
XX  		mov	[word ptr ex_cmdtail], offset cmdtail
XX  		mov	[word ptr ex_cmdtail+2], cx
XX  
XX  ; set up registers for exec call
XX  ;	ds:dx	- pointer to pathname of program to execute
XX***************
XX*** 560,574 ****
XX  		cbw
XX  		mov	[retcode], ax
XX  
XX! leave_exec: 	mov	[in_exec], 0	; all done, reset in_exec flag
XX! 		cmp	[swap], 0	; check swap, if non-zero swap back in
XX  		je	no_swap_in
XX  		call	swap_in
XX- no_swap_in:	ret
XX- do_exec endp
XX  
XX  
XX  
XX  ;==============================================================================
XX  ; Everything past this point is overwriten with the environment and new
XX  ; program after the currently executing program is swapped out.
XX--- 587,605 ----
XX  		cbw
XX  		mov	[retcode], ax
XX  
XX! leave_exec:	cmp	[swap], 0	; check swap, if non-zero swap back in
XX  		je	no_swap_in
XX  		call	swap_in
XX  
XX+ ; Clear the in_exec after the swap back in.  This way we are guaranteed to
XX+ ; get parent in and the resources freed should a ^C be hit when we are reading
XX+ ; the image in.
XX+ no_swap_in:	mov	[in_exec], 0
XX+ 		ret
XX+ do_exec endp				
XX  
XX  
XX+ 
XX  ;==============================================================================
XX  ; Everything past this point is overwriten with the environment and new
XX  ; program after the currently executing program is swapped out.
XX***************
XX*** 596,602 ****
XX  
XX  
XX  ;-----------------------------------------------------------------------------
XX! ; This routine is used to walk the DOS alocated memory block chain and,
XX  ; starting at address supplied in the es register.  For each block it
XX  ; calls the routine specified by the bx register with the segment length
XX  ; in si, and it's address in di.  It does not apply the routine to the
XX--- 627,633 ----
XX  
XX  
XX  ;-----------------------------------------------------------------------------
XX! ; This routine is used to walk the DOS allocated memory block chain
XX  ; starting at address supplied in the es register.  For each block it
XX  ; calls the routine specified by the bx register with the segment length
XX  ; in si, and it's address in di.  It does not apply the routine to the
XX***************
XX*** 612,625 ****
XX  		mov	di, es
XX  		inc	di
XX  		mov	ax, word ptr es:1
XX  		cmp	ax, cs:psp			; is it owned by us?
XX  		jne	walk_done			; NOPE!  -- all done
XX! 		cmp	di, cs:psp			; make sure we don't
XX! 		je	next_block			; touch our psp
XX  		push	di
XX  		push	si
XX  		push	bx
XX! 		call	bx				; handle the segment
XX  		pop	bx
XX  		pop	si
XX  		pop	di
XX--- 643,663 ----
XX  		mov	di, es
XX  		inc	di
XX  		mov	ax, word ptr es:1
XX+ 
XX+ ; Stop the search if the block is NOT owned by us.  Ignore our own psp block
XX+ ; and our environment segment block.
XX  		cmp	ax, cs:psp			; is it owned by us?
XX  		jne	walk_done			; NOPE!  -- all done
XX! 		cmp	di, cs:envseg			; skip our environment
XX! 		je	next_block
XX! 		cmp	di, cs:psp			; skip our psp
XX! 		je	next_block
XX! 
XX! ; Now save state and call the routine pointed at by [bx].
XX  		push	di
XX  		push	si
XX  		push	bx
XX! 		call	bx
XX  		pop	bx
XX  		pop	si
XX  		pop	di
XX***************
XX*** 818,825 ****
XX  ; This is the main entry routine into the swap code and corresponds to the
XX  ; following C function call:
XX  ;
XX! ; exec( int swap, char far *program, char far *cmdtail,
XX! ;	int environment_seg, int env_size, char far *tmpfilename );
XX  ;
XX  ; Exec performs the following:
XX  ;	1. set up the local code segment copies of arguments to the exec call.
XX--- 856,863 ----
XX  ; This is the main entry routine into the swap code and corresponds to the
XX  ; following C function call:
XX  ;
XX! ; exec( int swap, char far *program, char far *cmdtail, int environment_seg,
XX! ;	char far *tmpfilename );
XX  ;
XX  ; Exec performs the following:
XX  ;	1. set up the local code segment copies of arguments to the exec call.
XX***************
XX*** 827,839 ****
XX  ;	   stack.
XX  ;	3. save old interrupt vectors for ctrl-brk.
XX  ;	4. install our own handler for the ctrl-brk interrupt, our handler
XX! ;	   terminates the current running ess, proc and returns with non-zero
XX  ;	   status code.
XX  ;	5. get our psp
XX  ;	6. setup arguments for exec call
XX  ;	7. exec the program, save result code on return.
XX  ;       8. restore previous ctrl-brk and crit-error handler.
XX! ;       9. restore previous ess proc stack, and segment registers.
XX  ;      10. return from exec with child result code in AX
XX  ;	   and global _Interrupted flag set to true if child execution was
XX  ;	   interrupted.
XX--- 865,877 ----
XX  ;	   stack.
XX  ;	3. save old interrupt vectors for ctrl-brk.
XX  ;	4. install our own handler for the ctrl-brk interrupt, our handler
XX! ;	   terminates the current running process, and returns with non-zero
XX  ;	   status code.
XX  ;	5. get our psp
XX  ;	6. setup arguments for exec call
XX  ;	7. exec the program, save result code on return.
XX  ;       8. restore previous ctrl-brk and crit-error handler.
XX! ;       9. restore previous process stack, and segment registers.
XX  ;      10. return from exec with child result code in AX
XX  ;	   and global _Interrupted flag set to true if child execution was
XX  ;	   interrupted.
XX***************
XX*** 862,869 ****
XX  		mov	es:swap, ax
XX  		mov	ax, ss:[a_env]		; save env seg to use
XX  		mov	es:envseg, ax
XX- 		mov	ax, ss:[a_esiz]		; get environment's size
XX- 		mov	es:envsize, ax
XX  
XX  		mov 	di, offset cs:cmdpath	; copy the command
XX  		lds 	si, ss:[a_prog]		; 65 bytes worth
XX--- 900,905 ----
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/config.mk	Thu Oct  4 09:24:52 1990
XX--- msdos/config.mk	Sun Oct 28 23:16:14 1990
XX***************
XX*** 6,12 ****
XX  
XX  # Memory model to compile for
XX  # set to s - small, m - medium, c - compact, l - large
XX! MODEL = c
XX  
XX  STARTUPFILE	= $(OS)/startup.mk
XX  
XX--- 6,16 ----
XX  
XX  # Memory model to compile for
XX  # set to s - small, m - medium, c - compact, l - large
XX! .IF $(DEBUG)
XX!    MODEL = l
XX! .ELSE
XX!    MODEL = c
XX! .END
XX  
XX  STARTUPFILE	= $(OS)/startup.mk
XX  
XX***************
XX*** 18,25 ****
XX  LDTMPLIB	= <+$(LDLIBS:s,/,\\,:t"+\n")\n+>
XX  
XX  # Debug flags
XX! DB_CFLAGS	= -DDBUG -v
XX! DB_LDFLAGS	= /v
XX  DB_LDLIBS	=
XX  
XX  # NO Debug flags
XX--- 22,29 ----
XX  LDTMPLIB	= <+$(LDLIBS:s,/,\\,:t"+\n")\n+>
XX  
XX  # Debug flags
XX! DB_CFLAGS	= -DDBUG
XX! DB_LDFLAGS	=
XX  DB_LDLIBS	=
XX  
XX  # NO Debug flags
XX***************
XX*** 31,38 ****
XX  CFLAGS         += -I$(OS)
XX  
XX  # Common MSDOS source files.
XX! # Define NOSWAP to non-null for the swap code to be excluded on making.
XX! .IF $(NOSWAP) == $(NULL)
XX     SWP_SRC = find.c spawn.c
XX     ASRC += exec.asm
XX  .END
XX--- 35,44 ----
XX  CFLAGS         += -I$(OS)
XX  
XX  # Common MSDOS source files.
XX! # Define SWAP to anything but 'y' for the swap code to be excluded on making.
XX! # Swapping for DOS versions is enabled by default.
XX! SWAP *= y
XX! .IF $(SWAP) == y
XX     SWP_SRC = find.c spawn.c
XX     ASRC += exec.asm
XX  .END
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/arlib.c	Sat Oct  6 12:05:18 1990
XX--- msdos/arlib.c	Mon Oct 22 16:53:32 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/arlib.c,v 1.1 90/10/06 12:05:19 dvadura Exp $
XX  -- SYNOPSIS -- Library access code.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/arlib.c,v 1.1 90/10/06 12:05:19 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- Library access code.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 35,41 ****
XX  
XX  #include "extern.h"
XX  #include "stdmacs.h"
XX- #include "vextern.h"
XX  
XX  time_t
XX  seek_arch(name, lib)
XX--- 35,40 ----
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/man/dmake.tf	Sat Oct  6 12:05:02 1990
XX--- man/dmake.tf	Sun Oct 28 13:26:42 1990
XX***************
XX*** 3,15 ****
XX  .ds TB "0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.5i +0.5i +2.0i
XX  .de Ip
XX  .fi
XX! .nr Ip \w\\$1 
XX  .IP "\\$1" \\n(Ipu
XX  \\$2
XX  .nf
XX  ..
XX  .de Is
XX! .nr )I \w\\$1u
XX  ..
XX  .de Ii
XX  .in \\n()Ru
XX--- 3,15 ----
XX  .ds TB "0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.5i +0.5i +2.0i
XX  .de Ip
XX  .fi
XX! .nr Ip \w'\\$1 '
XX  .IP "\\$1" \\n(Ipu
XX  \\$2
XX  .nf
XX  ..
XX  .de Is
XX! .nr )I \w'\\$1'u
XX  ..
XX  .de Ii
XX  .in \\n()Ru
XX***************
XX*** 50,57 ****
XX  .B -f
XX  flag then \fBdmake\fR uses standard input as the source of the makefile text.
XX  .PP
XX! Any macro definitions (arguments with embedded
XX! .Q "="
XX  signs) that appear on the command line are processed first
XX  and supercede definitions for macros of the same name found
XX  within the makefile.  In general it is impossible for definitions found
XX--- 50,56 ----
XX  .B -f
XX  flag then \fBdmake\fR uses standard input as the source of the makefile text.
XX  .PP
XX! Any macro definitions (arguments with embedded "="
XX  signs) that appear on the command line are processed first
XX  and supercede definitions for macros of the same name found
XX  within the makefile.  In general it is impossible for definitions found
XX***************
XX*** 77,85 ****
XX  section found at the end of this document.
XX  .SH OPTIONS
XX  .IP "\fB\-A\fR"
XX! Enable AUGMAKE special inference rule transformations (see the
XX! .Q "PERCENT(%) RULES"
XX! section), these are set to off by default.
XX  .IP "\fB\-e\fR"
XX  Read the environment and define all strings of the
XX  form '\fBENV-VAR\fP=\fIevalue\fP'
XX--- 76,83 ----
XX  section found at the end of this document.
XX  .SH OPTIONS
XX  .IP "\fB\-A\fR"
XX! Enable AUGMAKE special inference rule transformations
XX! (see the "PERCENT(%) RULES" section), these are set to off by default.
XX  .IP "\fB\-e\fR"
XX  Read the environment and define all strings of the
XX  form '\fBENV-VAR\fP=\fIevalue\fP'
XX***************
XX*** 120,128 ****
XX  (useful for debugging, but cannot be re-read by \fBdmake\fP)
XX  .IP "\fB\-P#\fR"
XX  On systems that support multi-processing cause \fBdmake\fP to use \fI#\fP
XX! concurrent child processes to make targets.  See the
XX! .Q "MULTI PROCESSING"
XX! section for more information.
XX  .IP "\fB\-q\fR"
XX  Check and see if the target is up to date.  Exits with code 0 if up to date,
XX  1 otherwise.
XX--- 118,125 ----
XX  (useful for debugging, but cannot be re-read by \fBdmake\fP)
XX  .IP "\fB\-P#\fR"
XX  On systems that support multi-processing cause \fBdmake\fP to use \fI#\fP
XX! concurrent child processes to make targets.
XX! See the "MULTI PROCESSING" section for more information.
XX  .IP "\fB\-q\fR"
XX  Check and see if the target is up to date.  Exits with code 0 if up to date,
XX  1 otherwise.
XX***************
XX*** 718,724 ****
XX  Thus using another example we have:
XX  .RS
XX  .sp
XX! .Is "test/{ f1  ""f2"" """" }.o    "
XX  .Ii "test/{f1 f2}.o"
XX  --> test/f1.o test/f2.o
XX  .Ii "test/ {f1 f2}.o"
XX--- 715,721 ----
XX  Thus using another example we have:
XX  .RS
XX  .sp
XX! .Is "test/{ f1  f2 }.o    "
XX  .Ii "test/{f1 f2}.o"
XX  --> test/f1.o test/f2.o
XX  .Ii "test/ {f1 f2}.o"
XX***************
XX*** 725,732 ****
XX  --> test/ f1.o f2.o
XX  .Ii "test/{f1 f2} .o"
XX  --> test/f1 test/f2 .o
XX! .Ii "test/{ f1  ""f2"" """" }.o"
XX! --> test/f1.o test/f2.o test/.o
XX  .sp
XX  .Ii and
XX  .sp
XX--- 722,729 ----
XX  --> test/ f1.o f2.o
XX  .Ii "test/{f1 f2} .o"
XX  --> test/f1 test/f2 .o
XX! .Ii "test/{ "f1"  """" }.o"
XX! --> test/f1.o test/.o
XX  .sp
XX  .Ii and
XX  .sp
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/man/dmake.p	Sat Oct  6 12:26:44 1990
XX--- man/dmake.p	Sun Oct 28 13:27:42 1990
XX***************
XX*** 869,879 ****
XX       A null token in the token list is specified using "".  Thus
XX       using another example we have:
XX  
XX!           test/{f1 f2}.o            --> test/f1.o test/f2.o
XX!           test/ {f1 f2}.o           --> test/ f1.o f2.o
XX!           test/{f1 f2} .o           --> test/f1 test/f2 .o
XX!           test/{ f1  "f2" "" }.o    --> test/f1.o test/f2.o
XX!                                     test/.o
XX  
XX            and
XX  
XX--- 869,878 ----
XX       A null token in the token list is specified using "".  Thus
XX       using another example we have:
XX  
XX!           test/{f1 f2}.o       --> test/f1.o test/f2.o
XX!           test/ {f1 f2}.o      --> test/ f1.o f2.o
XX!           test/{f1 f2} .o      --> test/f1 test/f2 .o
XX!           test/{               --> test/f1.o test/.o
XX  
XX            and
XX  
XX***************
XX*** 890,895 ****
XX--- 889,895 ----
XX       dencies.  Such entries are called _t_a_r_g_e_t_/_p_r_e_r_e_q_u_i_s_i_t_e or
XX       _r_u_l_e definitions.  Each rule definition is optionally fol-
XX       lowed by a set of lines that provide a recipe for updating
XX+      any targets defined by the rule.  Whenever ddmmaakkee attempts to
XX  
XX  
XX  
XX***************
XX*** 902,908 ****
XX  
XX  
XX  
XX-      any targets defined by the rule.  Whenever ddmmaakkee attempts to
XX       bring a target up to date and an explicit recipe is provided
XX       with a rule defining the target, that recipe is used to
XX       update the target.  A rule definition begins with a line
XX--- 902,907 ----
XX***************
XX*** 954,959 ****
XX--- 953,959 ----
XX  
XX       --    says to clear the previous list of prerequisites before
XX            adding the new prerequisites.  Thus,
XX+ 
XX  
XX  
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/man/dmake.nc	Sat Oct  6 12:26:46 1990
XX--- man/dmake.nc	Mon Oct 29 20:29:13 1990
XX***************
XX*** 869,879 ****
XX       A null token in the token list is specified using "".  Thus
XX       using another example we have:
XX  
XX!           test/{f1 f2}.o            --> test/f1.o test/f2.o
XX!           test/ {f1 f2}.o           --> test/ f1.o f2.o
XX!           test/{f1 f2} .o           --> test/f1 test/f2 .o
XX!           test/{ f1  "f2" "" }.o    --> test/f1.o test/f2.o
XX!                                     test/.o
XX  
XX            and
XX  
XX--- 869,878 ----
XX       A null token in the token list is specified using "".  Thus
XX       using another example we have:
XX  
XX!           test/{f1 f2}.o       --> test/f1.o test/f2.o
XX!           test/ {f1 f2}.o      --> test/ f1.o f2.o
XX!           test/{f1 f2} .o      --> test/f1 test/f2 .o
XX!           test/{               --> test/f1.o test/.o
XX  
XX            and
XX  
XX***************
XX*** 890,895 ****
XX--- 889,895 ----
XX       dencies.  Such entries are called target/prerequisite or
XX       rule definitions.  Each rule definition is optionally fol-
XX       lowed by a set of lines that provide a recipe for updating
XX+      any targets defined by the rule.  Whenever dmake attempts to
XX  
XX  
XX  
XX***************
XX*** 902,908 ****
XX  
XX  
XX  
XX-      any targets defined by the rule.  Whenever dmake attempts to
XX       bring a target up to date and an explicit recipe is provided
XX       with a rule defining the target, that recipe is used to
XX       update the target.  A rule definition begins with a line
XX--- 902,907 ----
XX***************
XX*** 954,959 ****
XX--- 953,959 ----
XX  
XX       -    says to clear the previous list of prerequisites before
XX            adding the new prerequisites.  Thus,
XX+ 
XX  
XX  
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/makefile.mk	Tue Oct  9 21:19:30 1990
XX--- makefile.mk	Tue Oct 30 13:24:08 1990
XX***************
XX*** 9,15 ****
XX  #
XX  # Valid values for the above macros are:
XX  #
XX! #	OS            - unix, msdos
XX  #       OSRELEASE     - bsd43, sysvr3, 386ix
XX  #		      - tccdos, mscdos  (valid only of OS == msdos)
XX  #       OSENVIRONMENT - uw {valid for unix, bsd43 configuration only.}
XX--- 9,15 ----
XX  #
XX  # Valid values for the above macros are:
XX  #
XX! #	OS            - unix, msdos, tos
XX  #       OSRELEASE     - bsd43, sysvr3, 386ix
XX  #		      - tccdos, mscdos  (valid only of OS == msdos)
XX  #       OSENVIRONMENT - uw {valid for unix, bsd43 configuration only.}
XX***************
XX*** 153,162 ****
XX  #
XX  #	dmake scripts	-- makes all the script files at once.
XX  #
XX! SH = $(@:s/swp-/-/:s,-,/,:s/scripts/${SCRIPTFILE}/:s/c60d/cd/)
XX! MS = MAKESTARTUP=$(@:s/swp-/-/:s,-,/,:s/scripts/startup.mk/:s/c60d/cd/)
XX  
XX! scripts: unix-scripts msdos-scripts
XX  
XX  # To add a new environment for UNIX, simply create the appropriate entry
XX  # in the style below for the macro which contains the OS, OSRELEASE and
XX--- 153,164 ----
XX  #
XX  #	dmake scripts	-- makes all the script files at once.
XX  #
XX! SH_n = $(@:s/swp-/-/:s,-,/,:s/scripts/${SCRIPTFILE}/)
XX! MS_n = MAKESTARTUP=$(@:s/swp-/-/:s,-,/,:s/scripts/startup.mk/)
XX! SH = $(SH_n:s/c40d/cd/:s/c50d/cd/:s/c51d/cd/:s/c60d/cd/)
XX! MS = $(MS_n:s/c40d/cd/:s/c50d/cd/:s/c51d/cd/:s/c60d/cd/)
XX  
XX! scripts: unix-scripts atari-tos-scripts msdos-scripts
XX  
XX  # To add a new environment for UNIX, simply create the appropriate entry
XX  # in the style below for the macro which contains the OS, OSRELEASE and
XX***************
XX*** 169,176 ****
XX  unix-386ix-scripts-flags   = OS=unix OSRELEASE=386ix  OSENVIRONMENT=
XX  unix-bsd43-uw-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=uw
XX  unix-bsd43-vf-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=vf
XX  
XX! unix-scripts: clean
XX  	$(MAKE) SCRIPTFILE=make.sh unix-bsd43-scripts
XX  	$(MAKE) SCRIPTFILE=make.sh unix-bsd43-uw-scripts
XX  	$(MAKE) SCRIPTFILE=make.sh unix-bsd43-vf-scripts
XX--- 171,179 ----
XX  unix-386ix-scripts-flags   = OS=unix OSRELEASE=386ix  OSENVIRONMENT=
XX  unix-bsd43-uw-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=uw
XX  unix-bsd43-vf-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=vf
XX+ tos--scripts-flags          = OS=tos  OSRELEASE=       OSENVIRONMENT=
XX  
XX! unix-scripts .SWAP : clean
XX  	$(MAKE) SCRIPTFILE=make.sh unix-bsd43-scripts
XX  	$(MAKE) SCRIPTFILE=make.sh unix-bsd43-uw-scripts
XX  	$(MAKE) SCRIPTFILE=make.sh unix-bsd43-vf-scripts
XX***************
XX*** 178,185 ****
XX  	$(MAKE) SCRIPTFILE=make.sh unix-sysvr1-scripts
XX  	$(MAKE) SCRIPTFILE=make.sh unix-386ix-scripts
XX  
XX! unix-%-scripts:; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
XX  
XX  # We make the standard dos scripts here, but we have to go and fix up the
XX  # make.bat file since it contains names of temporary files for the response
XX  # files required by the linker.  We need to also construct the response file
XX--- 181,192 ----
XX  	$(MAKE) SCRIPTFILE=make.sh unix-sysvr1-scripts
XX  	$(MAKE) SCRIPTFILE=make.sh unix-386ix-scripts
XX  
XX! unix-%-scripts .SWAP :; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
XX! tos-%-scripts  .SWAP :; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
XX  
XX+ atari-tos-scripts .SWAP : clean
XX+ 	$(MAKE) SCRIPTFILE=make.sh tos--scripts
XX+ 
XX  # We make the standard dos scripts here, but we have to go and fix up the
XX  # make.bat file since it contains names of temporary files for the response
XX  # files required by the linker.  We need to also construct the response file
XX***************
XX*** 190,216 ****
XX  # unix environment, and then make certain that the fix-msdos-%-scripts target
XX  # performs the correct function for the new environment.
XX  msdos-cf = OS=msdos OSENVIRONMENT=
XX! msdos-tccdos-scripts-flags = $(msdos-cf) OSRELEASE=tccdos NOSWAP=y
XX  msdos-tccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=tccdos
XX! msdos-mscdos-scripts-flags = $(msdos-cf) OSRELEASE=mscdos NOSWAP=y
XX! msdos-msc60dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos NOSWAP=y MSC_VER=6.0
XX! msdos-mscdosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos
XX  msdos-msc60dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=6.0
XX  
XX! msdos-scripts: clean
XX  	$(MAKE) SCRIPTFILE=mk.bat msdos-tccdos-scripts
XX  	$(MAKE) SCRIPTFILE=mkswp.bat msdos-tccdosswp-scripts
XX- 	$(MAKE) SCRIPTFILE=mk.bat msdos-mscdos-scripts
XX- 	$(MAKE) SCRIPTFILE=mk60.bat msdos-msc60dos-scripts
XX- 	$(MAKE) SCRIPTFILE=mkswp.bat msdos-mscdosswp-scripts
XX- 	$(MAKE) SCRIPTFILE=mk60swp.bat msdos-msc60dosswp-scripts
XX  
XX! msdos-%-scripts:
XX  	$(MAKE) -nus $(MS) $($@-flags) >$(SH)
XX  	$(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-msdos-$*-scripts
XX  
XX! MAPOBJ = $(*:s/tccdos/obj/:s/mscdos/obj/:s/msc60dos/obj60/).rsp
XX! MAPLIB = $(*:s/tccdos/lib/:s/mscdos/lib/:s/msc60dos/lib60/).rsp
XX  OBJRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPOBJ},)
XX  LIBRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPLIB},)
XX  DOSOBJ = $(CSTARTUP) $(OBJDIR)/{$(OBJECTS)}
XX--- 197,230 ----
XX  # unix environment, and then make certain that the fix-msdos-%-scripts target
XX  # performs the correct function for the new environment.
XX  msdos-cf = OS=msdos OSENVIRONMENT=
XX! msdos-tccdos-scripts-flags = $(msdos-cf) OSRELEASE=tccdos SWAP=n
XX  msdos-tccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=tccdos
XX! msdos-msc40dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=4.0
XX! msdos-msc40dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=4.0
XX! msdos-msc50dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.0
XX! msdos-msc50dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=5.0
XX! msdos-msc51dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.1
XX! msdos-msc51dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=5.1
XX! msdos-msc60dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=6.0
XX  msdos-msc60dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=6.0
XX  
XX! msdos-scripts: clean tcc-scripts msc-scripts;
XX! 
XX! tcc-scripts .SWAP :
XX  	$(MAKE) SCRIPTFILE=mk.bat msdos-tccdos-scripts
XX  	$(MAKE) SCRIPTFILE=mkswp.bat msdos-tccdosswp-scripts
XX  
XX! msc-scripts .SWAP :! 40 50 51 60
XX! 	$(MAKE) SCRIPTFILE=mk$?.bat msdos-msc$?dos-scripts
XX! 	$(MAKE) SCRIPTFILE=mk$?swp.bat msdos-msc$?dosswp-scripts
XX! 40 50 51 60:;
XX! 
XX! msdos-%-scripts .SWAP :
XX  	$(MAKE) -nus $(MS) $($@-flags) >$(SH)
XX  	$(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-msdos-$*-scripts
XX  
XX! MAPOBJ = obj$(SWAP:s/y/swp/:s/n//).rsp
XX! MAPLIB = lib$(SWAP:s/y/swp/:s/n//).rsp
XX  OBJRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPOBJ},)
XX  LIBRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPLIB},)
XX  DOSOBJ = $(CSTARTUP) $(OBJDIR)/{$(OBJECTS)}
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/makefile	Sat Oct  6 12:04:34 1990
XX--- makefile	Tue Oct 30 13:23:40 1990
XX***************
XX*** 12,35 ****
XX  	@echo "   make bsd43vf       - Generic BSD 4.3 that needs vfprintf"
XX  	@echo "   make sysvr3        - Generic SysV R3 UNIX"
XX  	@echo "   make sysvr1        - Generic SysV R1 UNIX"
XX- 	@echo "   make 386ix         - 386/ix (SysV R3) [NOTE: not tested]"
XX  	@echo "   make dynix         - Sequent DYNIX system"
XX  	@echo "   make ultrix        - Ultrix 3.0 system"
XX  	@echo "   make mips          - Any MIPS box"
XX  	@echo "   make tcc           - DOS with tcc 2.0"
XX  	@echo "   make tccswp        - swapping DOS version with tcc 2.0"
XX! 	@echo "   make msc           - DOS with MSC 4.0 to 5.1"
XX  	@echo "   make msc60         - DOS with MSC 6.0"
XX! 	@echo "   make mscswp        - swapping DOS version with MSC 4.0 to 5.1"
XX  	@echo "   make msc60swp      - swapping DOS version with MSC 6.0"
XX  
XX  bsd43uw :; /bin/sh -x < unix/bsd43/uw/make.sh
XX  bsd43vf dynix mips        :; /bin/sh -x < unix/bsd43/vf/make.sh
XX  sysvr1 sysvr3 bsd43 386ix :; /bin/sh -x < unix/$@/make.sh
XX! ultrix : sysvr3;
XX  
XX  # DOS with some form of make and sh
XX  # Note if you do not have a 'make and/or sh' program under MSDOS then
XX  # typing 'make' in the dmake distribution directory will invoke the make.bat
SHAR_EOF
echo "End of part 4, continue with part 5"
echo "5" > s2_seq_.tmp
exit 0
-- 
--------------------------------------------------------------------------------
"This is almost worth the HIGH blood pressure!" he  |Dennis Vadura
thought as yet another mosquito exploded.-R.Patching|dvadura@dragon.uwaterloo.ca
================================================================================

dvadura@watdragon.waterloo.edu (Dennis Vadura) (11/01/90)

#!/bin/sh
# this is part 5 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file dm36.p1 continued
#
CurArch=5
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> dm36.p1
XX  # batch file which will issue the appropriate instructions.
XX! tcc tccswp msc msc60 mscswp msc60swp:; make.bat $@
XX--- 12,44 ----
XX  	@echo "   make bsd43vf       - Generic BSD 4.3 that needs vfprintf"
XX  	@echo "   make sysvr3        - Generic SysV R3 UNIX"
XX  	@echo "   make sysvr1        - Generic SysV R1 UNIX"
XX  	@echo "   make dynix         - Sequent DYNIX system"
XX  	@echo "   make ultrix        - Ultrix 3.0 system"
XX  	@echo "   make mips          - Any MIPS box"
XX+ 	@echo "   make 386ix         - 386/ix (SysV R3) [NOTE: not tested]"
XX+ 	@echo "   make xenix	     - 386 Xenix box"
XX+ 	@echo "   make tos           - Atari-ST TOS using GCC as compiler"
XX  	@echo "   make tcc           - DOS with tcc 2.0"
XX  	@echo "   make tccswp        - swapping DOS version with tcc 2.0"
XX! 	@echo "   make msc40         - DOS with MSC 4.0"
XX! 	@echo "   make msc50         - DOS with MSC 5.0"
XX! 	@echo "   make msc51         - DOS with MSC 5.1"
XX  	@echo "   make msc60         - DOS with MSC 6.0"
XX! 	@echo "   make msc40swp      - swapping DOS version with MSC 4.0"
XX! 	@echo "   make msc50swp      - swapping DOS version with MSC 5.0"
XX! 	@echo "   make msc51swp      - swapping DOS version with MSC 5.1"
XX  	@echo "   make msc60swp      - swapping DOS version with MSC 6.0"
XX  
XX  bsd43uw :; /bin/sh -x < unix/bsd43/uw/make.sh
XX  bsd43vf dynix mips        :; /bin/sh -x < unix/bsd43/vf/make.sh
XX  sysvr1 sysvr3 bsd43 386ix :; /bin/sh -x < unix/$@/make.sh
XX! ultrix xenix: sysvr3;
XX! tos :; sh -x tos/make.sh
XX  
XX  # DOS with some form of make and sh
XX  # Note if you do not have a 'make and/or sh' program under MSDOS then
XX  # typing 'make' in the dmake distribution directory will invoke the make.bat
XX  # batch file which will issue the appropriate instructions.
XX! DOS_VER = tcc    msc40    msc50    msc51    msc60 \
XX! 	  tccswp msc40swp msc50swp msc51swp msc60swp
XX! $(DOS_VER) :; make.bat $@
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/make.c	Sat Oct  6 12:03:58 1990
XX--- make.c	Mon Oct 29 14:27:50 1990
XX***************
XX*** 206,211 ****
XX--- 206,219 ----
XX        thp = how->hw_next;
XX        (void) Infer_recipe( cp, how, NIL(DFASET), setdirroot );
XX  
XX+       /* Change directory only if the previous .SETDIR is a different
XX+       /* directory from the current one.  ie. all cells with the same .SETDIR
XX+       /* attribute are assumed to come from the same directory. */
XX+       if( cp->ce_attr & A_SETDIR )
XX+ 	 if( (setdirroot == NIL(CELL) || setdirroot->ce_dir != cp->ce_dir) &&
XX+ 	     (push += Push_dir(cp, (((cp->ce_attr|Glob_attr)&A_IGNORE) != 0))) )
XX+ 	    setdirroot = cp;
XX+ 
XX        /* If we inferred a new set of prerequisites then make
XX         * them before the current list represented by the current how pointer */
XX        if( thp != how->hw_next )
XX***************
XX*** 457,463 ****
XX  stop_making_it:
XX     if( m_at != NIL(HASH) ) _drop_mac( m_at );
XX  
XX!    if( push )  Pop_dir(FALSE);
XX  
XX     if( inf    != NIL(char) ) FREE( inf    );
XX     if( all    != NIL(char) ) FREE( all    );
XX--- 465,471 ----
XX  stop_making_it:
XX     if( m_at != NIL(HASH) ) _drop_mac( m_at );
XX  
XX!    while( push-- )  Pop_dir(FALSE);
XX  
XX     if( inf    != NIL(char) ) FREE( inf    );
XX     if( all    != NIL(char) ) FREE( all    );
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/make.bat	Sat Oct  6 12:04:32 1990
XX--- make.bat	Thu Oct 25 20:08:28 1990
XX***************
XX*** 7,18 ****
XX  echo Running make.bat script to make a %1 copy of dmake.
XX  
XX  if %0%1 == %0 goto error
XX! if %1 == msc goto makemsc
XX! if %1 == msc60 goto makemsc60
XX! if %1 == mscswp goto makemscswp
XX! if %1 == msc60swp goto makemsc60swp
XX! if %1 == tcc goto maketcc
XX! if %1 == tccswp goto maketccswp
XX  
XX  rem label the possible DOS variations for dmake here.
XX  :error
XX--- 7,22 ----
XX  echo Running make.bat script to make a %1 copy of dmake.
XX  
XX  if %0%1 == %0 goto error
XX! if %1 == tcc goto mktcc
XX! if %1 == tccswp goto mktccswp
XX! if %1 == msc40 goto mkmsc40
XX! if %1 == msc40swp goto mkmsc40swp
XX! if %1 == msc50 goto mkmsc50
XX! if %1 == msc50swp goto mkmsc50swp
XX! if %1 == msc51 goto mkmsc51
XX! if %1 == msc51swp goto mkmsc51swp
XX! if %1 == msc60 goto mkmsc60
XX! if %1 == msc60swp goto mkmsc60swp
XX  
XX  rem label the possible DOS variations for dmake here.
XX  :error
XX***************
XX*** 19,51 ****
XX  echo INDEX:  You must specify one of:
XX  echo    tcc      - Turbo C 2.0, compile.
XX  echo    tccswp   - Turbo C 2.0 compile of swapping dmake.
XX! echo    msc      - Microsoft C 4.0 to 5.1, compile.
XX  echo    msc60    - Microsoft C 6.0 compile.
XX! echo    mscswp   - Microsoft C 4.0 to 5.1, MASM 5.1 compile of swapping dmake.
XX  echo    msc60swp - Microsoft C 6.0, MASM 5.1 compile of swapping dmake.
XX  goto end
XX  
XX! rem This is the script that makes dmake using Microsoft C 4.0 or higher.
XX! :makemsc
XX! msdos\mscdos\mk.bat
XX  goto end
XX  
XX! rem This is the script that makes dmake using Microsoft C 4.0 or higher.
XX! :makemsc60
XX! msdos\mscdos\mk60.bat
XX  goto end
XX  
XX! :makemscswp
XX! msdos\mscdos\mkswp.bat
XX  goto end
XX  
XX! :makemscswp
XX  msdos\mscdos\mk60swp.bat
XX  goto end
XX  
XX  rem This is the script that makes dmake using Turbo C 2.0 or higher.
XX! rem This is the script that makes dmake using Turbo C 2.0 or higher.
XX! :maketcc
XX  cls
XX  echo WARNING:
XX  echo    The default response files:
XX--- 23,76 ----
XX  echo INDEX:  You must specify one of:
XX  echo    tcc      - Turbo C 2.0, compile.
XX  echo    tccswp   - Turbo C 2.0 compile of swapping dmake.
XX! echo    msc40    - Microsoft C 4.0 compile.
XX! echo    msc50    - Microsoft C 5.0 compile.
XX! echo    msc51    - Microsoft C 5.1 compile.
XX  echo    msc60    - Microsoft C 6.0 compile.
XX! echo    msc40swp - Microsoft C 4.0, MASM 5.1 compile of swapping dmake.
XX! echo    msc50swp - Microsoft C 5.0, MASM 5.1 compile of swapping dmake.
XX! echo    msc51swp - Microsoft C 5.1, MASM 5.1 compile of swapping dmake.
XX  echo    msc60swp - Microsoft C 6.0, MASM 5.1 compile of swapping dmake.
XX  goto end
XX  
XX! rem This is the script that makes dmake using Microsoft C 4.0
XX! :mkmsc40
XX! msdos\mscdos\mk40.bat
XX  goto end
XX  
XX! :mkmsc40swp
XX! msdos\mscdos\mk40swp.bat
XX  goto end
XX  
XX! rem This is the script that makes dmake using Microsoft C 5.0
XX! :mkmsc50
XX! msdos\mscdos\mk50.bat
XX  goto end
XX  
XX! :mkmsc50swp
XX! msdos\mscdos\mk50swp.bat
XX! goto end
XX! 
XX! rem This is the script that makes dmake using Microsoft C 5.1
XX! :mkmsc51
XX! msdos\mscdos\mk51.bat
XX! goto end
XX! 
XX! :mkmsc51swp
XX! msdos\mscdos\mk51swp.bat
XX! goto end
XX! 
XX! rem This is the script that makes dmake using Microsoft C 6.0
XX! :mkmsc60
XX! msdos\mscdos\mk60.bat
XX! goto end
XX! 
XX! :mkmsc60swp
XX  msdos\mscdos\mk60swp.bat
XX  goto end
XX  
XX  rem This is the script that makes dmake using Turbo C 2.0 or higher.
XX! :mktcc
XX  cls
XX  echo WARNING:
XX  echo    The default response files:
XX***************
XX*** 61,67 ****
XX  msdos\tccdos\mk.bat
XX  goto end
XX  
XX! :maketccswp
XX  cls
XX  echo WARNING:
XX  echo    The default response files:
XX--- 86,92 ----
XX  msdos\tccdos\mk.bat
XX  goto end
XX  
XX! :mktccswp
XX  cls
XX  echo WARNING:
XX  echo    The default response files:
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/getinp.c	Sat Oct  6 12:03:42 1990
XX--- getinp.c	Sun Oct 28 14:33:48 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/getinp.c,v 1.1 90/10/06 12:03:43 dvadura Exp $
XX  -- SYNOPSIS -- handle reading of input.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/getinp.c,v 1.1 90/10/06 12:03:43 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- handle reading of input.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 111,116 ****
XX--- 111,137 ----
XX  	 character. */
XX  
XX        q = p+strlen(p)-2;
XX+       /* ignore each RETURN at the end of a line before any further
XX+        * processing */
XX+       if( q[0] == '\r' && q[1] == '\n' ) {
XX+ 	 q[0] = '\n';
XX+ 	 q[1] = '\0';
XX+ 	 q--;
XX+       }
XX+       /* you also have to deal with END_OF_FILE chars to process raw
XX+        * DOS-Files. Normally they are the last chars in file, but after
XX+        * working on these file with vi, there is an additional NEWLINE
XX+        * after the last END_OF_FILE. So if the second last char in the
XX+        * actual line is END_OF_FILE, you can skip the last char. Then
XX+        * you can search the line back until you find no more END_OF_FILE
XX+        * and nuke each you found by string termination. */
XX+       if( q[0] == '\032' )
XX+ 	 q--;
XX+       while( q[1] == '\032' ) {
XX+ 	 q[1] = '\0';
XX+ 	 q--;
XX+       }
XX+ 
XX        if( ignore ) {
XX  	 if( q[0] != CONTINUATION_CHAR || q[1] != '\n' )  ignore = FALSE;
XX  	 *p = '\0';
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/expand.c	Sat Oct  6 12:03:40 1990
XX--- expand.c	Tue Oct 23 09:19:27 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/expand.c,v 1.1 90/10/06 12:03:40 dvadura Exp $
XX  -- SYNOPSIS -- macro expansion code.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/expand.c,v 1.1 90/10/06 12:03:40 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- macro expansion code.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 80,85 ****
XX--- 80,92 ----
XX  #include "alloc.h"
XX  #include "db.h"
XX  
XX+ /* Microsoft BRAINDAMAGE ALERT!!!!
XX+  * This #ifdef is here only to satisfy stupid bugs in MSC5.0 and MSC5.1
XX+  * it isn't needed for anything else.  It turns loop optimization off. */
XX+ #if defined(_MSC_VER)
XX+ #include "optoff.h"
XX+ #endif
XX+ 
XX  static	char*	_scan_token ANSI((char*, char**));
XX  static	char*	_scan_macro ANSI((char*, char**));
XX  static	char*	_scan_brace ANSI((char*, char**, int*));
XX***************
XX*** 208,214 ****
XX  }
XX  
XX  
XX- 
XX  void
XX  Map_esc( tok )/*
XX  ================
XX--- 215,220 ----
XX***************
XX*** 644,650 ****
XX     FREE( macro_name );
XX     DB_RETURN( result );
XX  }
XX- 
XX  
XX  
XX  static char*
XX--- 650,655 ----
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/dump.c	Sat Oct  6 12:03:38 1990
XX--- dump.c	Sat Oct 27 19:45:57 1990
XX***************
XX*** 34,41 ****
XX   * 
XX  */
XX  
XX- #include "db.h"
XX  #include "extern.h"
XX  
XX  #define M_TEST	(M_PRECIOUS | M_VAR_MASK)
XX  
XX--- 34,41 ----
XX   * 
XX  */
XX  
XX  #include "extern.h"
XX+ #include "db.h"
XX  
XX  #define M_TEST	(M_PRECIOUS | M_VAR_MASK)
XX  
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/dmake.c	Sat Oct  6 12:03:36 1990
XX--- dmake.c	Mon Oct 22 16:53:35 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/dmake.c,v 1.1 90/10/06 12:03:35 dvadura Exp $
XX  -- SYNOPSIS -- The main program.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/dmake.c,v 1.1 90/10/06 12:03:35 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- The main program.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 341,347 ****
XX  
XX     TALLOC( Start_dir.ce_name, 1, HASH );
XX     Start_dir.CE_NAME = ".SETDIR";
XX!    Push_dir( &Start_dir, Glob_attr & A_IGNORE );
XX  
XX     if( m_export ) {
XX        int i;
XX--- 341,347 ----
XX  
XX     TALLOC( Start_dir.ce_name, 1, HASH );
XX     Start_dir.CE_NAME = ".SETDIR";
XX!    Push_dir( &Start_dir, (int)(Glob_attr & A_IGNORE ));
XX  
XX     if( m_export ) {
XX        int i;
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/common/stdmacs.h	Sat Oct  6 12:04:48 1990
XX--- common/stdmacs.h	Sun Oct 28 13:37:08 1990
XX***************
XX*** 1,4 ****
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/common/RCS/stdmacs.h,v 1.1 90/10/06 12:04:47 dvadura Exp $
XX  -- SYNOPSIS -- general use macros.
XX  -- 
XX  -- DESCRIPTION
XX--- 1,4 ----
XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/common/RCS/stdmacs.h,v 1.1 90/10/06 12:04:47 dvadura Exp Locker: dvadura $
XX  -- SYNOPSIS -- general use macros.
XX  -- 
XX  -- DESCRIPTION
XX***************
XX*** 45,51 ****
XX--- 45,54 ----
XX  #endif
XX  
XX  #define	NIL(p)	((p*)NULL)
XX+ 
XX+ #if !defined(atarist)
XX  #define	offsetof(type,id) ((size_t)&((type*)NULL)->id)
XX+ #endif
XX  
XX  #define	FALSE	0
XX  #define	TRUE	1
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/common/db.h	Sat Oct  6 12:04:40 1990
XX--- common/db.h	Thu Oct 25 20:08:27 1990
XX***************
XX*** 42,48 ****
XX  
XX  #ifdef DBUG
XX  
XX- #  include <stdio.h>
XX  #  include <dbug.h>
XX  
XX  #  define DB_ENTER(a1)                DBUG_ENTER(a1)
XX--- 42,47 ----
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/common/alloc.h	Sat Oct  6 12:04:38 1990
XX--- common/alloc.h	Sun Oct 28 13:36:13 1990
XX***************
XX*** 42,48 ****
XX   * properly.
XX   */
XX  
XX! #if !defined(_TYPES_) && !defined(M_XENIX)
XX  #if defined(MSDOS) || defined(__MSDOS__)
XX  typedef unsigned size_t;
XX  #else
XX--- 42,48 ----
XX   * properly.
XX   */
XX  
XX! #if !defined(_TYPES_) && !defined(M_XENIX) && !defined(atarist)
XX  #if defined(MSDOS) || defined(__MSDOS__)
XX  typedef unsigned size_t;
XX  #else
XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/_install	Fri Oct  5 09:33:28 1990
XX--- _install	Tue Oct 30 13:25:59 1990
XX***************
XX*** 20,31 ****
XX  	dynix      - Sequent Symmetry dynix
XX  	ultrix	   - Ultrix 3.0 system
XX  	mips       - Any MIPS box
XX!         tcc        - DOS with tcc 2.0"
XX!         tccswp     - swapping DOS version with tcc 2.0"
XX!         msc        - DOS with MSC 4.0 to 5.1"
XX!         msc60      - DOS with MSC 6.0"
XX!         mscswp     - swapping DOS version with MSC 4.0 to 5.1"
XX!         msc60swp   - swapping DOS version with MSC 6.0"
XX  
XX  The file 'makefile' understands these targets and runs the appropriate script
XX  to create the correct version.
XX--- 20,36 ----
XX  	dynix      - Sequent Symmetry dynix
XX  	ultrix	   - Ultrix 3.0 system
XX  	mips       - Any MIPS box
XX! 	tos        - Atari-ST using GCC as compiler
XX!         tcc        - DOS with tcc 2.0
XX!         tccswp     - swapping DOS version with tcc 2.0
XX!         msc40      - DOS with MSC 4.0
XX!         msc50      - DOS with MSC 5.0
XX!         msc51      - DOS with MSC 5.1
XX!         msc60      - DOS with MSC 6.0
XX!         msc40swp   - swapping DOS version with MSC 4.0
XX!         msc50swp   - swapping DOS version with MSC 5.0
XX!         msc51swp   - swapping DOS version with MSC 5.1
XX!         msc60swp   - swapping DOS version with MSC 6.0
XX  
XX  The file 'makefile' understands these targets and runs the appropriate script
XX  to create the correct version.
XX***************
XX*** 35,44 ****
XX  			dmake 		[source for all common functions]
XX  			  |
XX  			  |
XX! 		     -----------
XX! 		     |	       |
XX! 		    unix     msdos	[source for OS specific functions]
XX! 		     |         |
XX    ----------------------     -------------
XX    |         |          |     |           |
XX  386ix     bsd43    sysvr3  tccdos     mscdos	[source for OSRELEASE specific
XX--- 40,49 ----
XX  			dmake 		[source for all common functions]
XX  			  |
XX  			  |
XX! 	    --------------------
XX! 	    |	     |	       |
XX! 	   unix     tos      msdos	[source for OS specific functions]
XX! 	    |	               |
XX    ----------------------     -------------
XX    |         |          |     |           |
XX  386ix     bsd43    sysvr3  tccdos     mscdos	[source for OSRELEASE specific
XX***************
XX*** 45,51 ****
XX  	    |					 functions]
XX  	--------
XX  	|      |
XX!        uw      vf
XX  
XX  
XX  Each of the directories (eg. bsd43, mscdos, tccdos, and sysvr3) contain source
XX--- 50,56 ----
XX  	    |					 functions]
XX  	--------
XX  	|      |
XX!        uw      vf   [source for OSENVIRONMENT specific functions]
XX  
XX  
XX  Each of the directories (eg. bsd43, mscdos, tccdos, and sysvr3) contain source
XX***************
XX*** 66,72 ****
XX  	are running a SHELL other than command.com, you may have to perform
XX  	some extra work to invoke the batch file.
XX  	
XX! 	Make sure you read the _readme.dos file before attempting to make the
XX  	MSDOS version, as it contains important configuration and limitation
XX  	information.)
XX  
XX--- 71,77 ----
XX  	are running a SHELL other than command.com, you may have to perform
XX  	some extra work to invoke the batch file.
XX  	
XX! 	Make sure you read the readme/msdos file before attempting to make the
XX  	MSDOS version, as it contains important configuration and limitation
XX  	information.)
XX  
XSHAR_EOF
Xchmod 0640 _patches || echo "restore of _patches fails"
Xset `wc -c _patches`;Sum=$1
Xif test "$Sum" != "101721"
Xthen echo original size 101721, current size $Sum;fi
X
X# Now run patch to fix up the files
Xpatch -p0 < _patches
Xexit 0
SHAR_EOF
chmod 0640 dm36.p1 || echo "restore of dm36.p1 fails"
rm -f s2_seq_.tmp
echo "You have unpacked the last part"
exit 0
-- 
--------------------------------------------------------------------------------
"This is almost worth the HIGH blood pressure!" he  |Dennis Vadura
thought as yet another mosquito exploded.-R.Patching|dvadura@dragon.uwaterloo.ca
================================================================================

dvadura@watdragon.waterloo.edu (Dennis Vadura) (11/01/90)

Oops, the subject line should read (part 03/05).

-sorry
-dennis
-- 
--------------------------------------------------------------------------------
"This is almost worth the HIGH blood pressure!" he  |Dennis Vadura
thought as yet another mosquito exploded.-R.Patching|dvadura@dragon.uwaterloo.ca
================================================================================