R@&T
+M/LTANH@!M$'-(<.+'I8 N %8S2&+'HX _Y>V HX&C "+'H0 M$K-(7,#Z4__
+MBQZ. /^7I )R**"' 3P =.\\ 743BQZ% ;1(S2%R!CL&@0%TV^DA_XL>C@#_
+MEZH"Z\Z+'HX _Y>P L.X %C-(:.6 (L^C ",RRO?B\=(CL FBS8# (DVA "X
+MYP71Z-'HT>C1Z /8*_,#^XD>A@")/H@ L #H'0%R,:&, $B.P+LD!NC+ '(C
+MH8P 2([ NQT&Z+T P C/
+MHXX ^<.#/HX '0(Z(, <@/H<_^#/I( '5FH8H "\!T"%".P+1)S2%8H8H
+MH\0"C,G'!L8"VP")#L@"NIH CL&[Q (>B2;4 HP6T@+'!M8" #_!I@ N !+
+MS2$NCA;2 BZ+)M0"'W,&H]8"ZQ.0M$W-(8#\ 74$_P:2 #+DHY @SZ. !T
+M ^B?_L<&F ,/'!HX #HE@##)HLV P",QT7W(Z@_X =#6+SH'Y_P]^ [G_#U'1X='AT>'1X5=6B_$S
+MTK "BQZ. %/_EY@"6_^7G@)>7UIR!@/Z*_+KQL/#P\/#P\.@B $*P'07NH@!
+M,\FT/,TA<@RCR@''!HX ! #K I#YPXD^@0&)%H,!(YR1 <065 '$)U0!Q"]4
+M <0T5 '$1U0!Q%!4 <1;5 '$:%0!Q&U4 <1U5 '$A50!Q(]4 <2:5 '$K%0!
+MQ+Y4 <3A5 '$YE0!Q.Y4 <3T5 '$^E0!Q0!4 <4&5 '%#%0!Q1%4 <455 '%
+M-E0!Q3U4 <585 '%750!Q6)4 <5G5 '%=%0!Q7Y4 <6,5 '%DU0!Q9Q4 <6E
+M5 '%J50!Q:U4 <6Q5 '%OE0!Q<)4 <7'5 '%TU0!Q=U4 <865 '&/%0!QDI4
+M <7F5 '%ZE0!Q?!4 <7T5 '%_50!Q@%4 <835 '&*%0!QBQ4 <8V5 '&1%0!
+MQE94 <9:5 '&:%0!QFQ4 <9Q5 '&=U0!QH94 <:,5 '&FU0!QIY4 <:D5 '&
+MIE0!QJI4 <:M5 '&LE0!QK=4 <:[5 '&OU0!QL54 <;/5 '&U%0!QMI4 <;J
+M5 '&[U0!QO-4 <;]5 ''!%0!QQM4 <-5 ''HE0!QZE4 <>T5 ''N%0!Q\-4 '5 $%H'\! 9\&B3:% :*' ;J!
+M ;D' (L>R@&T0,TA<@8]!P!T ?G#'BZ.'H$!+HL6@P$NBPZ% 2Z+'LH!M$#-
+M(1]R!SL&A0%T ?G#58OL5E<>#@?\BT8&)J.. (M&$":CB@"_F@#%=@BY00#H
+M]_R_VP#%=@RY@0#HZ_R_B '%=A*Y00#HW_R,T":C@ FB2:" (S(CMB.T+R
+M ,<&D@ ,<&D +@C-O (NC :^ KJS [@C)C #HU?TNQ1:\ K@C)
+M7C ".PR;$'C0 )HI' 2ZBTP$FB@$NHM(!
+MN"$US2$NB1[, 2Z,!LX!'HS(CMBZV *X(27-(1]?7+L46S &,V O"= FX
+M(26<+O\>S $?RPJ
+#include
+#include
+#include
+#include
+#include
+#include
+#include "dosdta.h"
+
+#ifndef MK_FP
+#define MK_FP(seg,ofs) ((void far *) \
+ (((unsigned long)(seg) << 16) | (unsigned)(ofs)))
+#endif
+#ifndef FP_SEG
+#define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
+#endif
+#ifndef FP_OFF
+#define FP_OFF(fp) ((unsigned)(fp))
+#endif
+
+int find_err;
+
+/*
+ * get/set dta address
+ */
+
+static DTA far *
+_getsetdta(newdta)
+DTA far *newdta;
+{
+ DTA far *olddta;
+ union REGS r;
+ struct SREGS s;
+
+ /* get old dta */
+ r.h.ah = 0x2f;
+ intdos(&r, &r);
+ segread(&s);
+ olddta = (DTA far *) MK_FP(s.es, r.x.bx);
+
+ /* conditionally set new dta */
+ if (newdta) {
+ r.h.ah = 0x1a;
+ s.ds = FP_SEG(newdta);
+ r.x.dx = FP_OFF(newdta);
+ intdosx(&r, &r, &s);
+ }
+
+ return olddta;
+}
+
+/*
+ * dos findfirst
+ */
+
+DTA *
+findfirst(name, dta)
+char *name;
+DTA *dta;
+{
+ union REGS r;
+ struct SREGS s;
+ DTA far *dtasave;
+ char far *nmp = (char far *)name;
+
+ dtasave = _getsetdta((DTA far *)dta);
+
+ /* do directory lookup */
+ segread(&s);
+ r.h.ah = 0x4e;
+ r.x.cx = 0x10;
+ r.x.dx = FP_OFF(nmp);
+ s.ds = FP_SEG(nmp);
+ intdosx(&r, &r, &s);
+ /* restore dta */
+ _getsetdta(dtasave);
+ find_err = r.x.ax;
+ if (r.x.cflag)
+ return(NULL);
+
+ return dta;
+}
+
+/*
+ * dos findnext
+ */
+
+DTA *
+findnext(dta)
+DTA *dta;
+{
+ union REGS r;
+ DTA far *dtasave;
+
+ dtasave = _getsetdta((DTA far *)dta);
+
+ /* do directory lookup */
+ r.h.ah = 0x4f;
+ intdos(&r, &r);
+ /* restore old dta */
+ _getsetdta(dtasave);
+ find_err = r.x.ax;
+ if (r.x.cflag)
+ return(NULL);
+
+ return dta;
+}
diff --git a/dmake/msdos/microsft/config.h b/dmake/msdos/microsft/config.h
new file mode 100644
index 000000000000..ba62cfe2a353
--- /dev/null
+++ b/dmake/msdos/microsft/config.h
@@ -0,0 +1,77 @@
+/* RCS $Id: config.h,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+--
+-- SYNOPSIS
+-- Configurarion include file.
+--
+-- DESCRIPTION
+-- There is one of these for each specific machine configuration.
+-- It can be used to further tweek the machine specific sources
+-- so that they compile.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#if defined (_MSC_VER)
+# if _MSC_VER < 500
+ Force a compile-time blowup.
+ Do not define "#define _MSC_VER" for MSC compilers earlier than 5.0.
+# endif
+#endif
+
+/* define this for configurations that don't have the coreleft function
+ * so that the code compiles. To my knowledge coreleft exists only on
+ * Turbo C, but it is needed here since the function is used in many debug
+ * macros. */
+#define coreleft() 0L
+
+/* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */
+#ifndef SIGTERM
+# define SIGTERM SIGINT
+#endif
+
+/* Fixes unimplemented line buffering for MSC 5.x and 6.0.
+ * MSC _IOLBF is the same as _IOFBF
+ */
+#if defined(MSDOS) && defined (_MSC_VER)
+# undef _IOLBF
+# define _IOLBF _IONBF
+#endif
+
+/* in alloc.h: size_t is redefined
+ * defined in stdio.h which is included by alloc.h
+ */
+#if defined(MSDOS) && defined (_MSC_VER)
+# define _TYPES_
+#endif
+
+/* in sysintf.c: SIGQUIT is used, this is not defined in MSC */
+#ifndef SIGQUIT
+# define SIGQUIT SIGTERM
+#endif
+
+/* MSC doesn't seem to care about CONST */
+#define CONST
+
+#ifndef MSDOS
+# define MSDOS 1
+#endif
+
+/* a small problem with pointer to voids on some unix machines needs this */
+#define PVOID void *
+
+/* Have to pull this in for the standard lib defines */
+#include
diff --git a/dmake/msdos/microsft/config.mk b/dmake/msdos/microsft/config.mk
new file mode 100644
index 000000000000..cd049cd471af
--- /dev/null
+++ b/dmake/msdos/microsft/config.mk
@@ -0,0 +1,59 @@
+# This is the MSC 4.0 and higher DOS configuration file for DMAKE
+# It simply modifies the values of SRC, and checks to see if
+# OSENVIRONMENT is defined. If so it includes the appropriate
+# config.mk file.
+#
+# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
+# directory.
+#
+osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
+
+TMPDIR :=
+.EXPORT : TMPDIR
+
+# Definition of macros for library, and C startup code.
+
+# The following sources are required for MSC
+OSR_SRC = tempnam.c
+.SETDIR=$(osrdir) : $(OSR_SRC)
+
+SRC += $(OSR_SRC)
+.SOURCE.h : $(osrdir)
+
+SET_STACK = -stack:4096
+NDB_LDFLAGS += $(SET_STACK)
+
+ASFLAGS += -t -mx $(S_$(MODEL))
+
+# Microsoft C doesn't need tail but needs head
+LDTAIL = ;
+LDHEAD =
+
+# Debugging libraries
+DB_LDFLAGS += -co -li -map $(SET_STACK)
+DB_LDLIBS +=
+
+# NO Debug MSC flags:
+# Set the environment variable MSC_VER to be one of 5.1, 6.0, 8.0 (for VC++4.0)
+# to get these by default when you make dmake using 'dmake'.
+#
+# Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
+# and sets the flags appropriately.
+
+CFLAGS += -I$(osrdir) $(C_$(MODEL)) -nologo
+DB_CFLAGS += -Zi
+
+# See if we modify anything in the lower levels.
+.IF $(OSENVIRONMENT) != $(NULL)
+ .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
+.END
+
+C_s =
+C_m = -AM
+C_c = -AC
+C_l = -AL
+
+S_s = -Dmsmall
+S_m = -Dmmedium
+S_c = -Dmcompact
+S_l = -Dmlarge
diff --git a/dmake/msdos/microsft/msc51/config.mk b/dmake/msdos/microsft/msc51/config.mk
new file mode 100644
index 000000000000..beaae0dfea97
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/config.mk
@@ -0,0 +1,11 @@
+# Definition of macros for library, and C startup code.
+osedir = $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)
+
+.IMPORT .IGNORE : MSC_VER
+MSC_VER *= 5.1
+
+CFLAGS += -I$(osedir) -D_MSC_VER=$(MSC_VER:s,.,,)0
+
+NDB_CFLAGS += -Oscl -Gs
+NDB_LDFLAGS += -exe -packc -batch
+NDB_LDLIBS +=
diff --git a/dmake/msdos/microsft/msc51/lib.rsp b/dmake/msdos/microsft/msc51/lib.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/lib.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/msdos/microsft/msc51/libswp.rsp b/dmake/msdos/microsft/msc51/libswp.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/libswp.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/msdos/microsft/msc51/mk.bat b/dmake/msdos/microsft/msc51/mk.bat
new file mode 100755
index 000000000000..b111d6e62f01
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/mk.bat
@@ -0,0 +1,102 @@
+md objects
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs infer.c
+copy infer.obj objects
+del infer.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs make.c
+copy make.obj objects
+del make.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs stat.c
+copy stat.obj objects
+del stat.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs expand.c
+copy expand.obj objects
+del expand.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dmstring.c
+copy dmstring.obj objects
+del dmstring.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs hash.c
+copy hash.obj objects
+del hash.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dag.c
+copy dag.obj objects
+del dag.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dmake.c
+copy dmake.obj objects
+del dmake.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs path.c
+copy path.obj objects
+del path.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs imacs.c
+copy imacs.obj objects
+del imacs.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs sysintf.c
+copy sysintf.obj objects
+del sysintf.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs parse.c
+copy parse.obj objects
+del parse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs getinp.c
+copy getinp.obj objects
+del getinp.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs quit.c
+copy quit.obj objects
+del quit.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs state.c
+copy state.obj objects
+del state.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dmdump.c
+copy dmdump.obj objects
+del dmdump.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs macparse.c
+copy macparse.obj objects
+del macparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs rulparse.c
+copy rulparse.obj objects
+del rulparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs percent.c
+copy percent.obj objects
+del percent.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs function.c
+copy function.obj objects
+del function.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
+copy ruletab.obj objects
+del ruletab.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
+copy dirbrk.obj objects
+del dirbrk.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
+copy runargv.obj objects
+del runargv.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
+copy arlib.obj objects
+del arlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dchdir.c
+copy dchdir.obj objects
+del dchdir.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
+copy switchar.obj objects
+del switchar.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
+copy rmprq.obj objects
+del rmprq.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\tee.c
+copy tee.obj objects
+del tee.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\find.c
+copy find.obj objects
+del find.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dirlib.c
+copy dirlib.obj objects
+del dirlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dstrlwr.c
+copy dstrlwr.obj objects
+del dstrlwr.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs unix\dcache.c
+copy dcache.obj objects
+del dcache.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\microsft\tempnam.c
+copy tempnam.obj objects
+del tempnam.obj
+link /stack:4096/exe/packc/batch @msdos\microsft\msc51\obj.rsp,dmake.exe,NUL.MAP;
+copy msdos\microsft\msc51\template.mk startup\config.mk
diff --git a/dmake/msdos/microsft/msc51/mkswp.bat b/dmake/msdos/microsft/msc51/mkswp.bat
new file mode 100755
index 000000000000..5ab14d3517e5
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/mkswp.bat
@@ -0,0 +1,104 @@
+md objects
+masm -t -mx -Dmlarge msdos\exec.asm,,,;
+mv exec.obj objects
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs infer.c
+copy infer.obj objects
+del infer.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs make.c
+copy make.obj objects
+del make.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs stat.c
+copy stat.obj objects
+del stat.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs expand.c
+copy expand.obj objects
+del expand.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dmstring.c
+copy dmstring.obj objects
+del dmstring.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs hash.c
+copy hash.obj objects
+del hash.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dag.c
+copy dag.obj objects
+del dag.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dmake.c
+copy dmake.obj objects
+del dmake.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs path.c
+copy path.obj objects
+del path.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs imacs.c
+copy imacs.obj objects
+del imacs.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs sysintf.c
+copy sysintf.obj objects
+del sysintf.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs parse.c
+copy parse.obj objects
+del parse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs getinp.c
+copy getinp.obj objects
+del getinp.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs quit.c
+copy quit.obj objects
+del quit.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs state.c
+copy state.obj objects
+del state.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs dmdump.c
+copy dmdump.obj objects
+del dmdump.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs macparse.c
+copy macparse.obj objects
+del macparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs rulparse.c
+copy rulparse.obj objects
+del rulparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs percent.c
+copy percent.obj objects
+del percent.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs function.c
+copy function.obj objects
+del function.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
+copy ruletab.obj objects
+del ruletab.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
+copy dirbrk.obj objects
+del dirbrk.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
+copy runargv.obj objects
+del runargv.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
+copy arlib.obj objects
+del arlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dchdir.c
+copy dchdir.obj objects
+del dchdir.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
+copy switchar.obj objects
+del switchar.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
+copy rmprq.obj objects
+del rmprq.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\spawn.c
+copy spawn.obj objects
+del spawn.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\find.c
+copy find.obj objects
+del find.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dirlib.c
+copy dirlib.obj objects
+del dirlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\dstrlwr.c
+copy dstrlwr.obj objects
+del dstrlwr.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs unix\dcache.c
+copy dcache.obj objects
+del dcache.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc51 -D_MSC_VER=510 -Oscl -Gs msdos\microsft\tempnam.c
+copy tempnam.obj objects
+del tempnam.obj
+link /stack:4096/exe/packc/batch @msdos\microsft\msc51\objswp.rsp,dmake.exe,NUL.MAP;
+copy msdos\microsft\msc51\template.mk startup\config.mk
diff --git a/dmake/msdos/microsft/msc51/obj.rsp b/dmake/msdos/microsft/msc51/obj.rsp
new file mode 100644
index 000000000000..8f79a32754c9
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/obj.rsp
@@ -0,0 +1,33 @@
+objects\infer.obj+
+objects\make.obj+
+objects\stat.obj+
+objects\expand.obj+
+objects\dmstring.obj+
+objects\hash.obj+
+objects\dag.obj+
+objects\dmake.obj+
+objects\path.obj+
+objects\imacs.obj+
+objects\sysintf.obj+
+objects\parse.obj+
+objects\getinp.obj+
+objects\quit.obj+
+objects\state.obj+
+objects\dmdump.obj+
+objects\macparse.obj+
+objects\rulparse.obj+
+objects\percent.obj+
+objects\function.obj+
+objects\ruletab.obj+
+objects\dirbrk.obj+
+objects\runargv.obj+
+objects\arlib.obj+
+objects\dchdir.obj+
+objects\switchar.obj+
+objects\rmprq.obj+
+objects\tee.obj+
+objects\find.obj+
+objects\dirlib.obj+
+objects\dstrlwr.obj+
+objects\dcache.obj+
+objects\tempnam.obj
diff --git a/dmake/msdos/microsft/msc51/objswp.rsp b/dmake/msdos/microsft/msc51/objswp.rsp
new file mode 100644
index 000000000000..54524124d236
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/objswp.rsp
@@ -0,0 +1,34 @@
+objects\exec.obj+
+objects\infer.obj+
+objects\make.obj+
+objects\stat.obj+
+objects\expand.obj+
+objects\dmstring.obj+
+objects\hash.obj+
+objects\dag.obj+
+objects\dmake.obj+
+objects\path.obj+
+objects\imacs.obj+
+objects\sysintf.obj+
+objects\parse.obj+
+objects\getinp.obj+
+objects\quit.obj+
+objects\state.obj+
+objects\dmdump.obj+
+objects\macparse.obj+
+objects\rulparse.obj+
+objects\percent.obj+
+objects\function.obj+
+objects\ruletab.obj+
+objects\dirbrk.obj+
+objects\runargv.obj+
+objects\arlib.obj+
+objects\dchdir.obj+
+objects\switchar.obj+
+objects\rmprq.obj+
+objects\spawn.obj+
+objects\find.obj+
+objects\dirlib.obj+
+objects\dstrlwr.obj+
+objects\dcache.obj+
+objects\tempnam.obj
diff --git a/dmake/msdos/microsft/msc51/public.h b/dmake/msdos/microsft/msc51/public.h
new file mode 100644
index 000000000000..3130d161c24e
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/public.h
@@ -0,0 +1,169 @@
+/* RCS $Id: public.h,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+void main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
+char ** Pack_argv ANSI((int, int, char *));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)()));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *, int));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI(());
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, int, int, char *));
+void Clean_up_processes ANSI(());
+int Wait_for_child ANSI((int, int));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int dchdir ANSI((char *));
+void Remove_prq ANSI((CELLPTR));
+int spawnvpe ANSI((int, char *, char **, char **));
+void Hook_std_writes ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t CacheStat ANSI((char *, int));
+
+#endif
diff --git a/dmake/msdos/microsft/msc51/template.mk b/dmake/msdos/microsft/msc51/template.mk
new file mode 100644
index 000000000000..7174197d6284
--- /dev/null
+++ b/dmake/msdos/microsft/msc51/template.mk
@@ -0,0 +1,7 @@
+# ** Default build configuration for dmake.
+# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED
+# ** USE "startup/local.mk" for those.
+
+ OS *:= msdos
+ OSRELEASE *:= microsft
+ OSENVIRONMENT *:= msc51
diff --git a/dmake/msdos/microsft/msc60/config.mk b/dmake/msdos/microsft/msc60/config.mk
new file mode 100644
index 000000000000..5b206bec34bd
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/config.mk
@@ -0,0 +1,11 @@
+# Definition of macros for library, and C startup code.
+osedir = $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)
+
+.IMPORT .IGNORE : MSC_VER
+MSC_VER *= 6.0
+
+CFLAGS += -I$(osedir) -D_MSC_VER=$(MSC_VER:s,.,,)0
+
+NDB_CFLAGS += -Osecgl -Gs
+NDB_LDFLAGS += -exe -packc -batch
+NDB_LDLIBS +=
diff --git a/dmake/msdos/microsft/msc60/lib.rsp b/dmake/msdos/microsft/msc60/lib.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/lib.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/msdos/microsft/msc60/libswp.rsp b/dmake/msdos/microsft/msc60/libswp.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/libswp.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/msdos/microsft/msc60/mk.bat b/dmake/msdos/microsft/msc60/mk.bat
new file mode 100755
index 000000000000..c260b6d54abd
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/mk.bat
@@ -0,0 +1,102 @@
+md objects
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs infer.c
+copy infer.obj objects
+del infer.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs make.c
+copy make.obj objects
+del make.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs stat.c
+copy stat.obj objects
+del stat.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs expand.c
+copy expand.obj objects
+del expand.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dmstring.c
+copy dmstring.obj objects
+del dmstring.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs hash.c
+copy hash.obj objects
+del hash.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dag.c
+copy dag.obj objects
+del dag.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dmake.c
+copy dmake.obj objects
+del dmake.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs path.c
+copy path.obj objects
+del path.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs imacs.c
+copy imacs.obj objects
+del imacs.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs sysintf.c
+copy sysintf.obj objects
+del sysintf.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs parse.c
+copy parse.obj objects
+del parse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs getinp.c
+copy getinp.obj objects
+del getinp.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs quit.c
+copy quit.obj objects
+del quit.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs state.c
+copy state.obj objects
+del state.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dmdump.c
+copy dmdump.obj objects
+del dmdump.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs macparse.c
+copy macparse.obj objects
+del macparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs rulparse.c
+copy rulparse.obj objects
+del rulparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs percent.c
+copy percent.obj objects
+del percent.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs function.c
+copy function.obj objects
+del function.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\ruletab.c
+copy ruletab.obj objects
+del ruletab.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dirbrk.c
+copy dirbrk.obj objects
+del dirbrk.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\runargv.c
+copy runargv.obj objects
+del runargv.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\arlib.c
+copy arlib.obj objects
+del arlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dchdir.c
+copy dchdir.obj objects
+del dchdir.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\switchar.c
+copy switchar.obj objects
+del switchar.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\rmprq.c
+copy rmprq.obj objects
+del rmprq.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\tee.c
+copy tee.obj objects
+del tee.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\find.c
+copy find.obj objects
+del find.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dirlib.c
+copy dirlib.obj objects
+del dirlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dstrlwr.c
+copy dstrlwr.obj objects
+del dstrlwr.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs unix\dcache.c
+copy dcache.obj objects
+del dcache.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\microsft\tempnam.c
+copy tempnam.obj objects
+del tempnam.obj
+link /stack:4096/exe/packc/batch @msdos\microsft\msc60\obj.rsp,dmake.exe,NUL.MAP;
+copy msdos\microsft\msc60\template.mk startup\config.mk
diff --git a/dmake/msdos/microsft/msc60/mkswp.bat b/dmake/msdos/microsft/msc60/mkswp.bat
new file mode 100755
index 000000000000..6b9ed76a5085
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/mkswp.bat
@@ -0,0 +1,104 @@
+md objects
+masm -t -mx -Dmlarge msdos\exec.asm,,,;
+mv exec.obj objects
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs infer.c
+copy infer.obj objects
+del infer.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs make.c
+copy make.obj objects
+del make.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs stat.c
+copy stat.obj objects
+del stat.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs expand.c
+copy expand.obj objects
+del expand.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dmstring.c
+copy dmstring.obj objects
+del dmstring.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs hash.c
+copy hash.obj objects
+del hash.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dag.c
+copy dag.obj objects
+del dag.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dmake.c
+copy dmake.obj objects
+del dmake.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs path.c
+copy path.obj objects
+del path.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs imacs.c
+copy imacs.obj objects
+del imacs.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs sysintf.c
+copy sysintf.obj objects
+del sysintf.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs parse.c
+copy parse.obj objects
+del parse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs getinp.c
+copy getinp.obj objects
+del getinp.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs quit.c
+copy quit.obj objects
+del quit.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs state.c
+copy state.obj objects
+del state.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs dmdump.c
+copy dmdump.obj objects
+del dmdump.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs macparse.c
+copy macparse.obj objects
+del macparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs rulparse.c
+copy rulparse.obj objects
+del rulparse.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs percent.c
+copy percent.obj objects
+del percent.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs function.c
+copy function.obj objects
+del function.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\ruletab.c
+copy ruletab.obj objects
+del ruletab.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dirbrk.c
+copy dirbrk.obj objects
+del dirbrk.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\runargv.c
+copy runargv.obj objects
+del runargv.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\arlib.c
+copy arlib.obj objects
+del arlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dchdir.c
+copy dchdir.obj objects
+del dchdir.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\switchar.c
+copy switchar.obj objects
+del switchar.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\rmprq.c
+copy rmprq.obj objects
+del rmprq.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\spawn.c
+copy spawn.obj objects
+del spawn.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\find.c
+copy find.obj objects
+del find.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dirlib.c
+copy dirlib.obj objects
+del dirlib.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\dstrlwr.c
+copy dstrlwr.obj objects
+del dstrlwr.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs unix\dcache.c
+copy dcache.obj objects
+del dcache.obj
+cl -c -I. -Imsdos -Imsdos\microsft -AL -nologo -Imsdos\microsft\msc60 -D_MSC_VER=600 -Osecgl -Gs msdos\microsft\tempnam.c
+copy tempnam.obj objects
+del tempnam.obj
+link /stack:4096/exe/packc/batch @msdos\microsft\msc60\objswp.rsp,dmake.exe,NUL.MAP;
+copy msdos\microsft\msc60\template.mk startup\config.mk
diff --git a/dmake/msdos/microsft/msc60/obj.rsp b/dmake/msdos/microsft/msc60/obj.rsp
new file mode 100644
index 000000000000..8f79a32754c9
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/obj.rsp
@@ -0,0 +1,33 @@
+objects\infer.obj+
+objects\make.obj+
+objects\stat.obj+
+objects\expand.obj+
+objects\dmstring.obj+
+objects\hash.obj+
+objects\dag.obj+
+objects\dmake.obj+
+objects\path.obj+
+objects\imacs.obj+
+objects\sysintf.obj+
+objects\parse.obj+
+objects\getinp.obj+
+objects\quit.obj+
+objects\state.obj+
+objects\dmdump.obj+
+objects\macparse.obj+
+objects\rulparse.obj+
+objects\percent.obj+
+objects\function.obj+
+objects\ruletab.obj+
+objects\dirbrk.obj+
+objects\runargv.obj+
+objects\arlib.obj+
+objects\dchdir.obj+
+objects\switchar.obj+
+objects\rmprq.obj+
+objects\tee.obj+
+objects\find.obj+
+objects\dirlib.obj+
+objects\dstrlwr.obj+
+objects\dcache.obj+
+objects\tempnam.obj
diff --git a/dmake/msdos/microsft/msc60/objswp.rsp b/dmake/msdos/microsft/msc60/objswp.rsp
new file mode 100644
index 000000000000..54524124d236
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/objswp.rsp
@@ -0,0 +1,34 @@
+objects\exec.obj+
+objects\infer.obj+
+objects\make.obj+
+objects\stat.obj+
+objects\expand.obj+
+objects\dmstring.obj+
+objects\hash.obj+
+objects\dag.obj+
+objects\dmake.obj+
+objects\path.obj+
+objects\imacs.obj+
+objects\sysintf.obj+
+objects\parse.obj+
+objects\getinp.obj+
+objects\quit.obj+
+objects\state.obj+
+objects\dmdump.obj+
+objects\macparse.obj+
+objects\rulparse.obj+
+objects\percent.obj+
+objects\function.obj+
+objects\ruletab.obj+
+objects\dirbrk.obj+
+objects\runargv.obj+
+objects\arlib.obj+
+objects\dchdir.obj+
+objects\switchar.obj+
+objects\rmprq.obj+
+objects\spawn.obj+
+objects\find.obj+
+objects\dirlib.obj+
+objects\dstrlwr.obj+
+objects\dcache.obj+
+objects\tempnam.obj
diff --git a/dmake/msdos/microsft/msc60/public.h b/dmake/msdos/microsft/msc60/public.h
new file mode 100644
index 000000000000..3130d161c24e
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/public.h
@@ -0,0 +1,169 @@
+/* RCS $Id: public.h,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+void main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
+char ** Pack_argv ANSI((int, int, char *));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)()));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *, int));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI(());
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, int, int, char *));
+void Clean_up_processes ANSI(());
+int Wait_for_child ANSI((int, int));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int dchdir ANSI((char *));
+void Remove_prq ANSI((CELLPTR));
+int spawnvpe ANSI((int, char *, char **, char **));
+void Hook_std_writes ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t CacheStat ANSI((char *, int));
+
+#endif
diff --git a/dmake/msdos/microsft/msc60/template.mk b/dmake/msdos/microsft/msc60/template.mk
new file mode 100644
index 000000000000..a147c694c5f7
--- /dev/null
+++ b/dmake/msdos/microsft/msc60/template.mk
@@ -0,0 +1,7 @@
+# ** Default build configuration for dmake.
+# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED
+# ** USE "startup/local.mk" for those.
+
+ OS *:= msdos
+ OSRELEASE *:= microsft
+ OSENVIRONMENT *:= msc60
diff --git a/dmake/msdos/microsft/optoff.h b/dmake/msdos/microsft/optoff.h
new file mode 100644
index 000000000000..b2426a1259ba
--- /dev/null
+++ b/dmake/msdos/microsft/optoff.h
@@ -0,0 +1,27 @@
+/* RCS $Id: optoff.h,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+--
+-- SYNOPSIS
+-- Turn off microsoft loop optimization.
+--
+-- DESCRIPTION
+-- This is broken in some pre 600 compilers so just turn it off.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+#if _MSC_VER < 600
+# pragma loop_opt(off)
+#endif
diff --git a/dmake/msdos/microsft/tempnam.c b/dmake/msdos/microsft/tempnam.c
new file mode 100644
index 000000000000..1a105c6b0f3a
--- /dev/null
+++ b/dmake/msdos/microsft/tempnam.c
@@ -0,0 +1,110 @@
+/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+--
+-- SYNOPSIS
+-- tempnam
+--
+-- DESCRIPTION
+-- temp file name generation routines.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/*LINTLIBRARY*/
+#include
+#include
+#include
+#include
+
+#if defined(max)
+# undef max
+#endif
+#define max(A,B) (((A)<(B))?(B):(A))
+
+extern char *mktemp();
+extern int access();
+int d_access();
+
+/* MSC stdio.h defines P_tmpdir, so let's undo it here */
+/* Under DOS leave the default tmpdir pointing here! */
+#ifdef P_tmpdir
+#undef P_tmpdir
+#endif
+static char *P_tmpdir = "";
+
+char *
+tempnam(dir, prefix)
+char *dir; /* use this directory please (if non-NULL) */
+char *prefix; /* use this (if non-NULL) as filename prefix */
+{
+ static int count = 0;
+ register char *p, *q, *tmpdir;
+ int tl=0, dl=0, pl;
+ char buf[30];
+
+ pl = strlen(P_tmpdir);
+
+ if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
+ else if( (tmpdir = getenv("TMP")) != NULL ) tl = strlen(tmpdir);
+ if( dir != NULL ) dl = strlen(dir);
+
+ if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
+ return(NULL);
+
+ *p = '\0';
+
+ if( (tl == 0) || (d_access( strcpy(p, tmpdir), 0) != 0) )
+ if( (dl == 0) || (d_access( strcpy(p, dir), 0) != 0) )
+ if( d_access( strcpy(p, P_tmpdir), 0) != 0 )
+ if( !prefix )
+ prefix = "tp";
+
+ if(prefix)
+ {
+ *(p+strlen(p)+2) = '\0';
+ (void)strncat(p, prefix, 2);
+ }
+
+ sprintf( buf, "%08x", _psp );
+ buf[6]='\0';
+ (void)strcat(p, buf );
+ sprintf( buf, "%04d", count++ );
+ q=p+strlen(p)-6;
+ *q++ = buf[0]; *q++ = buf[1];
+ *q++ = buf[2]; *q++ = buf[3];
+
+ if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
+
+ return(p);
+}
+
+
+
+d_access( name, flag )
+char *name;
+int flag;
+{
+ extern char *DirSepStr;
+ char *p;
+ int r;
+
+ if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
+ r = access( name, flag );
+ p = name+strlen(name)-1;
+ if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
+
+ return( r );
+}
diff --git a/dmake/msdos/rmprq.c b/dmake/msdos/rmprq.c
new file mode 100644
index 000000000000..f2194bced053
--- /dev/null
+++ b/dmake/msdos/rmprq.c
@@ -0,0 +1,38 @@
+/* RCS $Id: rmprq.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Remove prerequisites code.
+--
+-- DESCRIPTION
+-- This code is different for DOS and for UNIX and parallel make
+-- architectures since the parallel case requires the rm's to be
+-- run in parallel, whereas DOS guarantees to run them sequentially.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#include "extern.h"
+
+PUBLIC void
+Remove_prq( tcp )
+CELLPTR tcp;
+{
+ tcp->ce_flag &= ~(F_MADE|F_VISITED);
+ tcp->ce_time = 0L;
+
+ Make( tcp, tcp );
+}
diff --git a/dmake/msdos/ruletab.c b/dmake/msdos/ruletab.c
new file mode 100644
index 000000000000..6d9d69f348a1
--- /dev/null
+++ b/dmake/msdos/ruletab.c
@@ -0,0 +1,45 @@
+/* RCS $Id: ruletab.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Default initial configuration of dmake.
+--
+-- DESCRIPTION
+-- Define here the initial set of rules that are defined before
+-- dmake performs any processing.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/* These are control macros for dmake that MUST be defined at some point
+ * if they are NOT dmake will not work! These are default definitions. They
+ * may be overridden inside the .STARTUP makefile, they are here
+ * strictly so that dmake can parse the STARTUP makefile */
+
+#include
+
+static char *_rules[] = {
+ "MAXLINELENGTH := 2046",
+ "MAXPROCESSLIMIT := 1",
+ "MAXPROCESS := 1",
+ ".IMPORT .IGNORE: ROOTDIR",
+ ".MAKEFILES : makefile.mk makefile",
+ ".SOURCE : .NULL",
+#include "startup.h"
+ (char *)NULL };
+
+char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
+
diff --git a/dmake/msdos/runargv.c b/dmake/msdos/runargv.c
new file mode 100644
index 000000000000..cefd5d9944b2
--- /dev/null
+++ b/dmake/msdos/runargv.c
@@ -0,0 +1,132 @@
+/* RCS $Id: runargv.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Run a sub process.
+--
+-- DESCRIPTION
+-- Use spawn to run a subprocess.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#include
+#include
+#include "extern.h"
+#include "sysintf.h"
+
+static int _abort_flg = FALSE;
+static void _add_child ANSI((CELLPTR, int));
+static void _finished_child ANSI((int));
+
+PUBLIC int
+runargv(target, ignore, group, last, shell, cmd)
+CELLPTR target;
+int ignore;
+int group;
+int last;
+int shell;
+char *cmd;
+{
+#if ! defined(_MSC_VER)
+#if defined(__BORLANDC__) && __BORLANDC__ >= 0x500
+ extern char ** _RTLENTRY _EXPDATA environ;
+#else
+ extern char **environ;
+#endif
+#endif
+ int status;
+ char **argv;
+
+ _add_child(target, ignore);
+ /* return immediately for noop command */
+ if (strncmp(cmd, "noop", 4) == 0 && (cmd[4] == ' ' || cmd[4] == '\0')) {
+ status = 0;
+ }
+ else {
+ argv = Pack_argv( group, shell, cmd );
+
+ if ( strcmp(argv[0],"echo") == 0 ) {
+ int i;
+ int first = 1;
+ int nl = 1;
+
+ if (strcmp(argv[1],"-n") == 0) nl--;
+
+ for (i=2-nl;argv[i]; i++) {
+ if (!first) putchar(' ');
+ printf("%s", argv[i]);
+ }
+ if (nl) printf("\n");
+ fflush(stdout);
+ status = 0;
+ }
+ else {
+ status = spawnvpe(P_WAIT, *argv, argv, environ);
+ }
+ }
+
+ if( status == -1 ) Error("%s: %s", argv[0], strerror(errno));
+ _finished_child(status);
+ if( last && !Doing_bang ) Update_time_stamp( target );
+
+ return( 0 );
+}
+
+
+PUBLIC void
+Clean_up_processes()
+{
+ _abort_flg = TRUE;
+ _finished_child(-1);
+}
+
+
+PUBLIC int
+Wait_for_child( abort_flg, pid )
+int abort_flg;
+int pid;
+{
+ return(1);
+}
+
+
+static int _valid = -1;
+static CELLPTR _tg;
+static int _ignore;
+
+static void
+_add_child( target, ignore )
+CELLPTR target;
+int ignore;
+{
+ _tg = target;
+ _ignore = ignore;
+ _valid = 0;
+
+ Current_target = NIL(CELL);
+}
+
+
+static void
+_finished_child(status)
+int status;
+{
+ if( _valid == -1 ) return;
+ Unlink_temp_files( _tg );
+ _valid = -1;
+ Handle_result( status, _ignore, _abort_flg, _tg );
+}
diff --git a/dmake/msdos/spawn.c b/dmake/msdos/spawn.c
new file mode 100644
index 000000000000..e62d936ee567
--- /dev/null
+++ b/dmake/msdos/spawn.c
@@ -0,0 +1,414 @@
+/* RCS $Id: spawn.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Spawnvpe code to emulate spawnvpe call common to DOS compilers.
+--
+-- DESCRIPTION
+-- This implementation is further integrated into dmake in that it
+-- determines the program to execute and if it's extension is either
+-- .bat or .ksh it executes it using the appropriate shell based on the
+-- setting of .MKSARGS. If .MKSARGS is set then in addition
+-- to the command tail getting built the arguments are also passed in the
+-- environment pursuant to the published MKS argument passing conventions.
+-- If the variable Swap_on_exec is set and the DOS OS supports it
+-- then the dmake executable image is swapped to secondary storage prior
+-- to running the child process. This is requested by setting the
+-- appropriate flag in the call to exec.
+--
+-- This and the exec.asm routine are derived from work that was supplied
+-- to me by Kent Williams (williams@umaxc.weeg.uiowa.edu) and by
+-- Len Reed, (..!gatech!holos0!lbr or holos0!lbr@gatech.edu., Holos
+-- Software, Inc., Tucker, Ga.). I sincerely acknowledge their help since
+-- their Turbo C, and MSC 6.0 code lead directly to this combined
+-- swapping exec that hopefully works with either compiler in all memory
+-- models.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#include
+#include
+
+#if defined(_MSC_VER) && _MSC_VER >= 600
+ /* Ignore the MSC 6.0 library's "const"-riddled prototype
+ for spawnvpe.
+ */
+# define spawnvpe _ignore_msc_spawnvpe
+# include
+# undef spawnvpe
+ int spawnvpe(int, char *, char **, char **);
+#else
+# include
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include "extern.h"
+#include "dosdta.h"
+#include "exec.h"
+#include "sysintf.h"
+
+extern int Interrupted;
+
+/* variables and functions local to this file */
+static char *_findexec ANSI((char *, int *));
+static char **_getpath ANSI(());
+static char far *_dos_alloc ANSI((uint16));
+
+static uint16 _swap_mask;
+static int _mks_args;
+static char dot_com[] = ".COM",
+ dot_exe[] = ".EXE",
+ dot_bat[] = ".BAT",
+ dot_ksh[] = ".KSH";
+
+/* Kinds of executables */
+#define SCR 1
+#define COM 2
+#define EXE 4
+#define ALL (SCR|COM|EXE)
+
+/* How to make a long pointer */
+#define CF(x) (char far *)x
+
+/* Make sure we know how to get a segment out of a long pointer */
+#ifndef FP_SEG
+#define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
+#endif
+
+
+PUBLIC int
+spawnvpe(mode, program, av, ep)/*
+=================================
+ Spawn a process using an environment and a vector of arguments.
+ The code computes a new environment, puts the MKS arguments into
+ it if need be, and calls the appropriate routines to search the
+ path and to invoke the process. */
+int mode;
+char *program;
+char **av;
+char **ep;
+{
+ char pwd[PATH_MAX+1];
+ char **envp = ep; /* Cause we are going to mess with it. */
+ char **argv = av; /* Same with this one. */
+ char cmdtail[129];
+ char far *environment;
+ char *tail;
+ char *swptmp;
+ unsigned int envsize;
+ unsigned int cmdsize;
+ int cmdtailen;
+ int i;
+ int doswap;
+
+ /* First check to see if we can find the program to execute this way we
+ * don't alloc the environment and other such stuff prior to figuring out
+ * we don't know how to run the program. */
+find_program:
+ if((program = _findexec(program, &i)) == NIL(char)) {
+ errno = ENOENT;
+ return( -1 );
+ }
+
+ /* i is set to TRUE in _findexec if the exec is a shell
+ * script (either .BAT or .KSH file), returns FALSE for all others. */
+ if( i && !Packed_shell ) {
+ /* Restore the spaces into the command line that were erased by
+ * the previous call to Pack_argv. This enables us to repack the
+ * command as a shell command using Pack_argv again. */
+ for( i=0; argv[i] != NIL(char); i++ ) {
+ int x = strlen(argv[i]);
+ if( argv[i+1] != NIL(char) ) argv[i][x] = ' ';
+ }
+
+ argv = Pack_argv( FALSE, TRUE, *argv );
+
+ /* Go and find the program again, I hate goto's but it seems silly to
+ * use tail recursion here just for aesthetic purity. */
+ program = *argv;
+ goto find_program;
+ }
+
+ /* Compute size of *argv vector for passing as MKS style arguments */
+ cmdsize = strlen(*argv)+2;
+
+ /* So we have decided on a program to run, therefore pack the command tail
+ * and build the environment to pass to the exec code. This loop packs the
+ * DOS command tail, and computes the size of all arguments for the MKS
+ * argument passing convention. Note that we reserve one less byte in the
+ * command tail if we are not using MKS style argument passing.
+ *
+ * Make sure the command tail contains at leat a space. Some commands fail
+ * to work if the command tail is only a \r, STUPID DOS! */
+ cmdtailen = ((_mks_args = ((Glob_attr & A_MKSARGS) != 0)) != 0)?3:2;
+ tail = cmdtail+1;
+
+ if( argv[1] != NIL(char) )
+ for( i=1; argv[i] != NIL(char); i++ ) {
+ int arglen = strlen(argv[i]);
+
+ cmdsize += arglen+2; /* Compute all args size for MKS */
+
+ if( (cmdtailen += arglen+1) <= 128 ) {
+ register char *p = argv[i];
+ tail[-1] = ' '; /* put in the space */
+ while( *tail++ = *p++ ); /* put in the arg */
+ }
+ else if( !_mks_args ) {
+ errno = E2BIG; /* unless its MKS exit if arglist */
+ return(-1); /* is too long. */
+ }
+ }
+ else
+ *tail++ = ' ';
+
+ /* Finish the command tail set up, placing the length in the first byte,
+ * and the \r \n \0 at the end for DOS, MKS and us respectively. */
+ *cmdtail = tail-cmdtail-2;
+ tail[-1] = '\r';
+ if( _mks_args ) *tail++ = '\n';
+ *tail = '\0';
+
+ /* Compute size of environment, skipping any MKS arguments passed in our
+ * environment */
+ for(; *envp && **envp == '~'; envp++ );
+ for(i=0, envsize=_mks_args?cmdsize:1; envp[i] != NIL(char); i++ )
+ envsize += strlen(envp[i]) + 1;
+
+ /* Check the DOS version number here. If it is < 3.0 then we don't
+ * even want to think about executing the swapping code. Permanently
+ * set swap to 0. */
+ doswap = (_osmajor < 3) ? 0 : Swap_on_exec;
+
+ /* Set up temporary file for swapping */
+ swptmp = doswap?tempnam(NIL(char),"mk"):"";
+
+ /* Allocate an appropriate sized environment block and align it on a
+ * paragraph boundary. It will later get copied to an appropriately low
+ * place in the executable image so that when we swap out the environment
+ * is still present. Use
+ * _dos_alloc
+ * to allocate the environment segment. The segment is freed by the call
+ * to exec. */
+ environment = _dos_alloc( envsize = ((envsize+16)>>4) );
+ *environment = '\0';
+
+ /* First copy the arguments preceeded by ~ character if we are using
+ * MKS style argument passing */
+ if( _mks_args )
+ for(; *argv; argv++) {
+ register char *p = *argv;
+
+ *environment++ = '~';
+ while( *environment++ = *p++ ); /* Far dest, poss near ptr */
+ }
+
+ /* Now stick in the current evironment vectors. */
+ for(; *envp; envp++) {
+ register char *p = *envp;
+ while( *environment++ = *p++ ); /* Far dest, poss near ptr */
+ }
+
+ /* Clear the interrupted flag, and exec */
+ Interrupted = 0;
+
+ /* Preserve the current working directory accross a spawn call
+ * DOS is brain dead about this. This way we have some hope of cleaning
+ * up the swapping tempfiles after we return. */
+ strcpy(pwd,Get_current_dir());
+ i = exec(doswap,CF(program),CF(cmdtail),FP_SEG(environment),CF(swptmp));
+ Set_dir(pwd);
+
+ /* Now free the temporary file name */
+ if( doswap ) FREE(swptmp);
+
+ /* If swap was interrupted then quit properly from dmake. */
+ if( Interrupted ) Quit();
+
+ return(i);
+}
+
+
+PUBLIC void
+Hook_std_writes( file )
+char *file;
+{
+ if( file!= NIL(char) ) {
+ int mode = O_BINARY | O_WRONLY | O_CREAT | O_TRUNC;
+ int handle;
+
+ if (*file == '+') {
+ ++file; /* -F +file means append to file */
+ mode = O_BINARY | O_WRONLY | O_CREAT | O_APPEND;
+ }
+ handle = open(file, mode, S_IREAD | S_IWRITE);
+ if (handle < 0) {
+ Fatal( "Could not open -F file");
+ }
+ (void) lseek(handle, 0L, SEEK_END);
+ do_hook_std_writes(handle);
+ }
+ else
+ do_unhook_std_writes();
+}
+
+
+/*
+** _findexec finds executables on the path.
+** Note that it is pretty simple to add support for other executable types
+** shell scripts, etc.
+**
+** This follows the command.com behavior very closely.
+*/
+static char *
+_findexec( s, is_shell )/*
+==========================
+ Cloned closely from code provided by Kent Williams. Stripped his down to
+ a reduced search since dmake doesn't need to recompute the PATH vector
+ each time it does the search since it cannot alter the path vector once
+ it begins to make recipes. Also modified it to use findfirst and findnext
+ as provided for dirlib package that I got off the net. */
+char *s;
+int *is_shell;
+{
+ unsigned found_flags;
+ char **pathv = NIL(char *);
+ char *ext = NIL(char);
+ char *buf = NIL(char);
+ char *p[2];
+ char *dot_scr;
+ char *dot;
+
+ p[0] = ""; p[1] = NIL(char);
+ if( strchr("./\\", *s) || s[1] == ':' )
+ pathv = p;
+ else if( (pathv = _getpath()) == NIL(char *) )
+ return( NIL(char) );
+
+ /* Compute the extension we need if any. */
+ if( (dot = strrchr(s,'.')) != NIL(char) &&
+ dot > strrchr(s,'/') && dot > strrchr(s,'\\') )
+ ext = dot+1;
+
+ dot_scr = _mks_args ? dot_ksh : dot_bat;
+ *is_shell = FALSE;
+
+ for( found_flags = 0; *pathv && !found_flags; pathv++ ) {
+ DTA dta;
+
+ if( !ext ) {
+ char *name;
+ buf = Build_path( *pathv, name=DmStrJoin(s, ".???", -1, FALSE) );
+ FREE(name);
+ }
+ else
+ buf = Build_path( *pathv, s );
+
+ if( findfirst((char *)strupr(buf), &dta) != NIL(DTA) ) {
+ if( !ext ) {
+ char *dot;
+
+ /* search order is .com .exe (.ksh || .bat)
+ * there has to be a '.' */
+ do {
+ dot = strrchr(dta.name,'.');
+ if(0 == strcmp(dot,dot_com))
+ found_flags |= COM;
+ else if(0 == strcmp(dot,dot_exe))
+ found_flags |= EXE;
+ else if( 0 == strcmp(dot,dot_scr) )
+ found_flags |= SCR;
+ } while( found_flags != ALL && findnext(&dta) != NIL(DTA) );
+
+ if(found_flags & COM) ext = dot_com;
+ else if(found_flags & EXE) ext = dot_exe;
+ else if(found_flags & SCR) {
+ ext = dot_scr;
+ *is_shell = TRUE;
+ }
+
+ if( found_flags ) {
+ char *name;
+ buf = Build_path( *pathv, name=DmStrJoin(s,ext,-1,FALSE) );
+ FREE(name);
+ strupr(buf);
+ }
+ }
+ else
+ found_flags++;
+ }
+ }
+
+ return( found_flags ? buf : NIL(char) );
+}
+
+
+/*
+** getpath turns the DOS path into a char *vector, It is gotten and
+** transformed only once since dmake can't modify the value of PATH while
+** it is making targets.
+*/
+static char **
+_getpath()
+{
+ static char **dir = NIL(char *);
+ register char *p;
+
+ if( !dir ) {
+ register char *t;
+ int i;
+ char *semi = NIL(char);
+
+ if( (p = getenv("PATH")) == NIL(char) ) p = "";
+ for( i=1, t=p; *t; t++ ) if( *t == ';' ) i++;
+
+ TALLOC(dir, i+1, char *);
+ p = DmStrDup(p);
+
+ for( i=0; p; p = semi ? (semi+1):NIL(char),i++ ){
+ if( (semi = strchr(p,';')) != NIL(char) ) *semi = '\0';
+ dir[i] = p;
+ }
+ dir[i]=NIL(char);
+ }
+
+ return( dir );
+}
+
+
+static char far *
+_dos_alloc( size )/*
+====================
+ This routine allocates size paragraphs from DOS. It changes the memory
+ allocation strategy to allocate from the tail and then changes it back.
+ to using first fit. */
+uint16 size;
+{
+ union REGS r;
+
+ r.h.ah = 0x48;
+ r.x.bx = size;
+
+ intdos( &r, &r );
+ if( r.x.cflag ) No_ram();
+
+ return( (char far *) MK_FP(r.x.ax, 0) );
+}
diff --git a/dmake/msdos/startup.h b/dmake/msdos/startup.h
new file mode 100644
index 000000000000..22eeb863e809
--- /dev/null
+++ b/dmake/msdos/startup.h
@@ -0,0 +1,26 @@
+/* RCS $Id: startup.h,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Dmake startup header file definition.
+--
+-- DESCRIPTION
+-- Where we define the default value of MAKESTARTUP.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+"MAKESTARTUP := $(MAKECMD:d)startup/startup.mk",
diff --git a/dmake/msdos/switchar.c b/dmake/msdos/switchar.c
new file mode 100644
index 000000000000..8879a9ad7c44
--- /dev/null
+++ b/dmake/msdos/switchar.c
@@ -0,0 +1,55 @@
+/* RCS $Id: switchar.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- switch char query.
+--
+-- DESCRIPTION
+-- Get the current value of the command line switch char. Only useful
+-- in a DOS environment, otherwise we #define it to be '-'.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+#if defined(_MSC_VER)
+#include
+#endif
+#include
+#include
+#include "stdmacs.h"
+
+getswitchar()/*
+===============
+ Try the environment first. If you don't find SWITCHAR there, then use
+ the DOS call. The call is undocumented, and doesn't work for DOS versions
+ 4.0 and up, so the check of the environment will fix that. */
+{
+#if defined(__MSDOS__) || defined(M_I86)
+ union REGS rg;
+ static char *_env_switchar = NIL(char);
+
+ if( _env_switchar != NIL(char) ||
+ (_env_switchar = (char *)getenv("SWITCHAR")) != NIL(char) )
+ return(*_env_switchar);
+
+ rg.h.ah = 0x37; /* switch char request */
+ rg.h.al = 0; /* get (not set) */
+
+ intdos(&rg, &rg);
+ return (rg.h.dl);
+#endif /* M_I86 */
+
+ return ('-');
+}
diff --git a/dmake/msdos/sysintf.h b/dmake/msdos/sysintf.h
new file mode 100644
index 000000000000..2a6d92a59329
--- /dev/null
+++ b/dmake/msdos/sysintf.h
@@ -0,0 +1,53 @@
+/* RCS $Id: sysintf.h,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Interfaces for sysintf.c
+--
+-- DESCRIPTION
+-- Abstractions of functions in sysintf.c
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+#define DMSTAT stat
+#define VOID_LCACHE(l,m)
+#define GETPID _psp
+#define DMSTRLWR(A,B) dstrlwr(A,B)
+
+extern char * tempnam();
+extern char * getcwd();
+
+/*
+** standard C items
+*/
+
+/*
+** DOS interface standard items
+*/
+#define chdir(p) dchdir(p)
+
+/*
+** make parameters
+*/
+#ifdef _POSIX_NAME_MAX
+#undef _POSIX_NAME_MAX
+#endif
+#define _POSIX_NAME_MAX 12
+
+#ifdef _POSIX_PATH_MAX
+#undef _POSIX_PATH_MAX
+#endif
+#define _POSIX_PATH_MAX 64
diff --git a/dmake/msdos/tee.c b/dmake/msdos/tee.c
new file mode 100644
index 000000000000..f2c8b5de6543
--- /dev/null
+++ b/dmake/msdos/tee.c
@@ -0,0 +1,31 @@
+/* RCS $Id: tee.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $
+--
+-- SYNOPSIS
+-- Hook_std_writes() dummy call for non swapping MSDOS versions.
+--
+-- DESCRIPTION
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#include "extern.h"
+
+PUBLIC void
+Hook_std_writes( file )
+char *file;
+{
+}
diff --git a/dmake/msdos/zortech/config.h b/dmake/msdos/zortech/config.h
new file mode 100644
index 000000000000..096498844fc9
--- /dev/null
+++ b/dmake/msdos/zortech/config.h
@@ -0,0 +1,52 @@
+/* RCS $Id: config.h,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+--
+-- SYNOPSIS
+-- Configurarion include file.
+--
+-- DESCRIPTION
+-- There is one of these for each specific machine configuration.
+-- It can be used to further tweek the machine specific sources
+-- so that they compile.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+/* in sysintf.c: SIGQUIT is used, this is not defined in ZTC */
+#ifndef SIGQUIT
+# define SIGQUIT SIGTERM
+#endif
+
+/* in sysintf.c: tzset is not supported by ZTC */
+#define tzset()
+
+/* ZTC uses it's own swapping spawn. */
+#define spawnvpe(a,b,c,d) spawnvp(a,b,c)
+
+#ifndef CONST
+# define CONST const
+#endif
+
+#ifndef MSDOS
+# define MSDOS 1
+#endif
+
+extern unsigned _psp;
+
+/* a small problem with pointer to voids on some unix machines needs this */
+#define PVOID void *
+
+#include
diff --git a/dmake/msdos/zortech/config.mk b/dmake/msdos/zortech/config.mk
new file mode 100644
index 000000000000..e947dc87620b
--- /dev/null
+++ b/dmake/msdos/zortech/config.mk
@@ -0,0 +1,73 @@
+# This is the ZTC DOS configuration file for DMAKE
+# It simply modifies the values of SRC, and checks to see if
+# OSENVIRONMENT is defined. If so it includes the appropriate
+# config.mk file.
+#
+# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
+# directory.
+#
+osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
+
+TMPDIR :=
+.EXPORT : TMPDIR
+
+# Definition of macros for library, and C startup code.
+# Swapping for DOS versions is enabled by default. ZTC will automatically
+# perform swapping to XMS, EMS or disk by including _swapl.obj at link time.
+# To be most effective, _swapl.obj should be the first file linked so we
+# assign it to CSTARTUP if needed.
+.IF $(SWAP) == y
+ CSTARTUP = _swapl.obj
+.END
+
+# The following sources are required for ZTC
+# The tempnam supplied with ZTC doesn't handle a NULL dir.
+OSR_SRC = tempnam.c environ.c
+.SETDIR=$(osrdir) : $(OSR_SRC)
+
+SRC += $(OSR_SRC)
+.SOURCE.h : $(osrdir)
+
+# Local configuration modifications for CFLAGS
+# If you have a 286, you can use -2 or appropriate to get better code,
+# in that case uncomment the line below. (You can also simply set
+# it in the CL environment variable.)
+#CFLAGS += -2
+ASFLAGS += -t -mx $(S_$(MODEL))
+
+# Redefine this, it isn't needed!
+LDTAIL = ;
+
+# Debugging libraries
+DB_LDFLAGS += -g
+DB_LDLIBS +=
+
+# NO Debug ZTC flags:
+#
+
+CFLAGS += -I$(osrdir) $(C_$(MODEL))
+CFLAGS += -DM_I86=1 -DMSDOS
+CFLAGS += -b # use large compiler
+#CFLAGS += -w # no warnings
+CFLAGS += -mi # integer only
+CFLAGS += -p # no auto-prototyping
+NDB_CFLAGS += -o
+DB_CFLAGS += -g
+
+# Redefine rule for making our objects, we don't need mv
+%$O : %.c ;% $(CC) -c $(CFLAGS) -o$@ $<
+
+# See if we modify anything in the lower levels.
+.IF $(OSENVIRONMENT) != $(NULL)
+ .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
+.END
+
+C_s =
+C_m = -mM
+C_c = -mC
+C_l = -mL
+
+S_s = -Dmsmall
+S_m = -Dmmedium
+S_c = -Dmcompact
+S_l = -Dmlarge
diff --git a/dmake/msdos/zortech/environ.c b/dmake/msdos/zortech/environ.c
new file mode 100644
index 000000000000..c76d9a4831a6
--- /dev/null
+++ b/dmake/msdos/zortech/environ.c
@@ -0,0 +1,59 @@
+/* RCS $Id: environ.c,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+--
+-- SYNOPSIS
+-- environment routines.
+--
+-- DESCRIPTION
+-- Someone thought that Zortech needs this.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+/*LINTLIBRARY*/
+#include
+#include
+#include
+#include "alloc.h"
+
+/* ZTC++ doesn't have environ, so we have to create one. */
+
+extern char *_envptr;
+char **environ = { NULL };
+
+void
+make_env()
+{
+ int i;
+ char *cp;
+
+ for (i = 0, cp = _envptr; *cp; i++, cp += strlen(cp)+1)
+ ;
+
+ TALLOC(environ, i+1, char*);
+
+ for (i = 0, cp = _envptr; *cp; i++, cp += strlen(cp)+1)
+ environ[i] = cp;
+
+ return;
+}
+
+void
+free_env()
+{
+ FREE(environ);
+
+ return;
+}
diff --git a/dmake/msdos/zortech/lib.rsp b/dmake/msdos/zortech/lib.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/msdos/zortech/lib.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/msdos/zortech/libswp.rsp b/dmake/msdos/zortech/libswp.rsp
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/dmake/msdos/zortech/libswp.rsp
@@ -0,0 +1 @@
+
diff --git a/dmake/msdos/zortech/mkswp.bat b/dmake/msdos/zortech/mkswp.bat
new file mode 100755
index 000000000000..60c12d37217e
--- /dev/null
+++ b/dmake/msdos/zortech/mkswp.bat
@@ -0,0 +1,36 @@
+md objects
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\infer.obj infer.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\make.obj make.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\stat.obj stat.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\expand.obj expand.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmstring.obj dmstring.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\hash.obj hash.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dag.obj dag.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmake.obj dmake.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\path.obj path.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\imacs.obj imacs.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\sysintf.obj sysintf.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\parse.obj parse.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\getinp.obj getinp.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\quit.obj quit.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\state.obj state.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmdump.obj dmdump.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\macparse.obj macparse.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\rulparse.obj rulparse.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\percent.obj percent.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\function.obj function.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\ruletab.obj msdos\ruletab.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dirbrk.obj msdos\dirbrk.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\runargv.obj msdos\runargv.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\arlib.obj msdos\arlib.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dchdir.obj msdos\dchdir.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\switchar.obj msdos\switchar.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\rmprq.obj msdos\rmprq.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\tee.obj msdos\tee.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\find.obj msdos\find.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dirlib.obj msdos\dirlib.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dstrlwr.obj msdos\dstrlwr.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dcache.obj unix\dcache.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\tempnam.obj msdos\zortech\tempnam.c
+ztc -c -I. -Imsdos -Imsdos\zortech -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\environ.obj msdos\zortech\environ.c
+blink @msdos\zortech\objswp.rsp,dmake.exe,NUL.MAP;
diff --git a/dmake/msdos/zortech/obj.rsp b/dmake/msdos/zortech/obj.rsp
new file mode 100644
index 000000000000..c97a42f9f0aa
--- /dev/null
+++ b/dmake/msdos/zortech/obj.rsp
@@ -0,0 +1,34 @@
+objects\infer.obj+
+objects\make.obj+
+objects\stat.obj+
+objects\expand.obj+
+objects\dmstring.obj+
+objects\hash.obj+
+objects\dag.obj+
+objects\dmake.obj+
+objects\path.obj+
+objects\imacs.obj+
+objects\sysintf.obj+
+objects\parse.obj+
+objects\getinp.obj+
+objects\quit.obj+
+objects\state.obj+
+objects\dmdump.obj+
+objects\macparse.obj+
+objects\rulparse.obj+
+objects\percent.obj+
+objects\function.obj+
+objects\ruletab.obj+
+objects\dirbrk.obj+
+objects\runargv.obj+
+objects\arlib.obj+
+objects\dchdir.obj+
+objects\switchar.obj+
+objects\rmprq.obj+
+objects\tee.obj+
+objects\find.obj+
+objects\dirlib.obj+
+objects\dstrlwr.obj+
+objects\dcache.obj+
+objects\tempnam.obj+
+objects\environ.obj
diff --git a/dmake/msdos/zortech/objswp.rsp b/dmake/msdos/zortech/objswp.rsp
new file mode 100644
index 000000000000..60a33c4eb523
--- /dev/null
+++ b/dmake/msdos/zortech/objswp.rsp
@@ -0,0 +1,35 @@
+_swapl.obj+
+objects\infer.obj+
+objects\make.obj+
+objects\stat.obj+
+objects\expand.obj+
+objects\dmstring.obj+
+objects\hash.obj+
+objects\dag.obj+
+objects\dmake.obj+
+objects\path.obj+
+objects\imacs.obj+
+objects\sysintf.obj+
+objects\parse.obj+
+objects\getinp.obj+
+objects\quit.obj+
+objects\state.obj+
+objects\dmdump.obj+
+objects\macparse.obj+
+objects\rulparse.obj+
+objects\percent.obj+
+objects\function.obj+
+objects\ruletab.obj+
+objects\dirbrk.obj+
+objects\runargv.obj+
+objects\arlib.obj+
+objects\dchdir.obj+
+objects\switchar.obj+
+objects\rmprq.obj+
+objects\tee.obj+
+objects\find.obj+
+objects\dirlib.obj+
+objects\dstrlwr.obj+
+objects\dcache.obj+
+objects\tempnam.obj+
+objects\environ.obj
diff --git a/dmake/msdos/zortech/public.h b/dmake/msdos/zortech/public.h
new file mode 100644
index 000000000000..89c586b44e5a
--- /dev/null
+++ b/dmake/msdos/zortech/public.h
@@ -0,0 +1,168 @@
+/* RCS $Id: public.h,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
+-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
+--
+--
+-- SYNOPSIS
+-- Local functions exported to be visible by others.
+--
+-- DESCRIPTION
+-- This file is generated by 'genpub'. Function declarations
+-- that appear in this file are extracted by 'genpub' from
+-- source files. Any function in the source file whose definition
+-- appears like:
+--
+-- PUBLIC return_type
+-- function( arg_list );
+-- type_expr1 arg1;
+-- ...
+--
+-- has its definition extracted and a line of the form:
+--
+-- return_type function ANSI((type_expr1,type_expr2,...));
+--
+-- entered into the output file.
+--
+-- AUTHOR
+-- Dennis Vadura, dvadura@dmake.wticorp.com
+--
+-- WWW
+-- http://dmake.wticorp.com/
+--
+-- COPYRIGHT
+-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
+--
+-- This program is NOT free software; you can redistribute it and/or
+-- modify it under the terms of the Software License Agreement Provided
+-- in the file /readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+
+#ifndef _DMAKE_PUBLIC_h
+#define _DMAKE_PUBLIC_h
+
+#ifdef EXTERN
+#undef EXTERN
+#endif
+#if defined(DEFINE_DMAKE_VARIABLES)
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+/***** genpub: Begin list of generated function headers */
+void Infer_recipe ANSI((CELLPTR, CELLPTR));
+int Make_targets ANSI(());
+int Make ANSI((CELLPTR, CELLPTR));
+int Exec_commands ANSI((CELLPTR));
+void Print_cmnd ANSI((char *, int, int));
+int Push_dir ANSI((char *, char *, int));
+void Pop_dir ANSI((int));
+void Append_line ANSI((char *, int, FILE *, char *, int, int));
+void Stat_target ANSI((CELLPTR, int, int));
+char *Expand ANSI((char *));
+char *Apply_edit ANSI((char *, char *, char *, int, int));
+void Map_esc ANSI((char *));
+char* Apply_modifiers ANSI((int, char *));
+char* Tokenize ANSI((char *, char *, char, int));
+char* ScanToken ANSI((char *, char **, int));
+char *DmStrJoin ANSI((char *, char *, int, int));
+char *DmStrAdd ANSI((char *, char *, int));
+char *DmStrApp ANSI((char *, char *));
+char *DmStrDup ANSI((char *));
+char *DmStrDup2 ANSI((char *));
+char *DmStrPbrk ANSI((char *, char *));
+char *DmStrSpn ANSI((char *, char *));
+char *DmStrStr ANSI((char *, char *));
+char *DmSubStr ANSI((char *, char *));
+uint16 Hash ANSI((char *, uint32 *));
+HASHPTR Get_name ANSI((char *, HASHPTR *, int));
+HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
+HASHPTR Push_macro ANSI((HASHPTR));
+HASHPTR Pop_macro ANSI((HASHPTR));
+HASHPTR Def_macro ANSI((char *, char *, int));
+CELLPTR Def_cell ANSI((char *));
+LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
+void Clear_prerequisites ANSI((CELLPTR));
+int Test_circle ANSI((CELLPTR, int));
+STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
+t_attr Rcp_attribute ANSI((char *));
+void main ANSI((int, char **));
+FILE *Openfile ANSI((char *, int, int));
+FILE *Closefile ANSI(());
+FILE *Search_file ANSI((char *, char **));
+char *Filename ANSI(());
+int Nestlevel ANSI(());
+FILE *TryFiles ANSI((LINKPTR));
+void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist)));
+void No_ram ANSI(());
+void Usage ANSI((int));
+void Version ANSI(());
+char *Get_suffix ANSI((char *));
+char *Basename ANSI((char *));
+char *Filedir ANSI((char *));
+char *Build_path ANSI((char *, char *));
+void Make_rules ANSI(());
+void Create_macro_vars ANSI(());
+time_t Do_stat ANSI((char *, char *, char **, int));
+int Do_touch ANSI((char *, char *, char **));
+void Void_lib_cache ANSI((char *, char *));
+time_t Do_time ANSI(());
+int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
+char ** Pack_argv ANSI((int, int, char *));
+char *Read_env_string ANSI((char *));
+int Write_env_string ANSI((char *, char *));
+void ReadEnvironment ANSI(());
+void Catch_signals ANSI((void (*)()));
+void Clear_signals ANSI(());
+void Prolog ANSI((int, char* []));
+void Epilog ANSI((int));
+char *Get_current_dir ANSI(());
+int Set_dir ANSI((char*));
+char Get_switch_char ANSI(());
+FILE* Get_temp ANSI((char **, char *, int));
+FILE *Start_temp ANSI((char *, CELLPTR, char **));
+void Open_temp_error ANSI((char *, char *));
+void Link_temp ANSI((CELLPTR, FILE *, char *));
+void Close_temp ANSI((CELLPTR, FILE *));
+void Unlink_temp_files ANSI((CELLPTR));
+void Handle_result ANSI((int, int, int, CELLPTR));
+void Update_time_stamp ANSI((CELLPTR));
+int Remove_file ANSI((char *));
+void Parse ANSI((FILE *));
+int Get_line ANSI((char *, FILE *));
+char *Do_comment ANSI((char *, char **, int));
+char *Get_token ANSI((TKSTRPTR, char *, int));
+void Quit ANSI(());
+void Read_state ANSI(());
+void Write_state ANSI(());
+int Check_state ANSI((CELLPTR, STRINGPTR *, int));
+void Dump ANSI(());
+void Dump_recipe ANSI((STRINGPTR));
+int Parse_macro ANSI((char *, int));
+int Macro_op ANSI((char *));
+int Parse_rule_def ANSI((int *));
+int Rule_op ANSI((char *));
+void Add_recipe_to_list ANSI((char *, int, int));
+void Bind_rules_to_targets ANSI((int));
+int Set_group_attributes ANSI((char *));
+DFALINKPTR Match_dfa ANSI((char *));
+void Check_circle_dfa ANSI(());
+void Add_nfa ANSI((char *));
+char *Exec_function ANSI((char *));
+int If_root_path ANSI((char *));
+int runargv ANSI((CELLPTR, int, int, int, int, char *));
+void Clean_up_processes ANSI(());
+int Wait_for_child ANSI((int, int));
+time_t seek_arch ANSI((char*, char*));
+int touch_arch ANSI((char*, char*));
+int dchdir ANSI((char *));
+void Remove_prq ANSI((CELLPTR));
+void Hook_std_writes ANSI((char *));
+void dstrlwr ANSI((char *, char *));
+time_t CacheStat ANSI((char *, int));
+
+#endif
diff --git a/dmake/msdos/zortech/startup.mk b/dmake/msdos/zortech/startup.mk
new file mode 100644
index 000000000000..3c167a02e400
--- /dev/null
+++ b/dmake/msdos/zortech/startup.mk
@@ -0,0 +1,153 @@
+# MSDOS DMAKE startup file. Customize to suit your needs.
+# Assumes MKS toolkit for the tool commands, and Zortech C. Change as req'd.
+# See the documentation for a description of internally defined macros.
+#
+# Disable warnings for macros redefined here that were given
+# on the command line.
+__.SILENT !:= $(.SILENT)
+.SILENT !:= yes
+
+# Configuration parameters for DMAKE startup.mk file
+# Set these to NON-NULL if you wish to turn the parameter on.
+_HAVE_RCS := yes # yes => RCS is installed.
+_HAVE_SCCS := # yes => SCCS is installed.
+
+# Applicable suffix definitions
+A := .lib # Libraries
+E := .exe # Executables
+F := .for # Fortran
+O := .obj # Objects
+P := .pas # Pascal
+S := .asm # Assembler sources
+V := # RCS suffix
+
+# See if these are defined
+TMPDIR := $(ROOTDIR)/tmp
+.IMPORT .IGNORE : TMPDIR SHELL COMSPEC
+
+# Recipe execution configurations
+# First set SHELL, If it is not defined, use COMSPEC, otherwise
+# it is assumed to be MKS Korn SHELL.
+.IF $(SHELL) == $(NULL)
+.IF $(COMSPEC) == $(NULL)
+ SHELL := $(ROOTDIR)/bin/sh$E
+.ELSE
+ SHELL := $(COMSPEC)
+.END
+.END
+GROUPSHELL := $(SHELL)
+
+# Now set remaining arguments depending on which SHELL we
+# are going to use. COMSPEC (assumed to be command.com) or
+# MKS Korn Shell.
+.IF $(SHELL)==$(COMSPEC)
+ SHELLFLAGS := $(SWITCHAR)c
+ GROUPFLAGS := $(SHELLFLAGS)
+ SHELLMETAS := *"?<>
+ GROUPSUFFIX := .bat
+ DIRSEPSTR := \\\
+ DIVFILE = $(TMPFILE:s,/,\)
+.ELSE
+ SHELLFLAGS := -c
+ GROUPFLAGS :=
+ SHELLMETAS := *"?<>|()&][$$\#`'
+ GROUPSUFFIX := .ksh
+ .MKSARGS := yes
+ DIVFILE = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
+ DIVSEP_shell_yes := \\\
+ DIVSEP_shell_no := \\
+.END
+
+# Standard C-language command names and flags
+ CC := ztc # C-compiler and flags
+ CFLAGS +=
+
+ AS := masm # Assembler and flags
+ ASFLAGS +=
+
+ LD = blink # Loader and flags
+ LDFLAGS +=
+ LDLIBS =
+
+# Definition of $(MAKE) macro for recursive makes.
+ MAKE = $(MAKECMD) -S $(MFLAGS)
+
+# Language and Parser generation Tools and their flags
+ YACC := yacc # standard yacc
+ YFLAGS +=
+ YTAB := ytab # yacc output files name stem.
+
+ LEX := lex # standard lex
+ LFLAGS +=
+ LEXYY := lex_yy # lex output file
+
+# Other Compilers, Tools and their flags
+ PC := any_pc # pascal compiler
+ RC := anyf77 # ratfor compiler
+ FC := anyf77 # fortran compiler
+
+ CO := co # check out for RCS
+ COFLAGS += -q
+
+ AR := ar # archiver
+ ARFLAGS+= ruv
+
+ RM := rm # remove a file command
+ RMFLAGS +=
+
+# Implicit generation rules for making inferences.
+# We don't provide .yr or .ye rules here. They're obsolete.
+# Rules for making *$O
+ %$O : %.c ; $(CC) $(CFLAGS) -c $<
+ %$O : %.cpp ; $(CC) $(CFLAGS) -c $<
+ %$O : %$P ; $(PC) $(PFLAGS) -c $<
+ %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
+ %$O : %.cl ; class -c $<
+ %$O :| %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
+
+# Executables
+ %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
+
+# lex and yacc rules
+ %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
+ %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
+
+# RCS support
+.IF $(_HAVE_RCS)
+ % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
+ .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
+.END
+
+# SCCS support
+.IF $(_HAVE_SCCS)
+ % : s.% ; get $<
+ .NOINFER : s.%
+.END
+
+# Recipe to make archive files.
+%$A .SWAP .GROUP :
+ $(AR) $(ARFLAGS) $@ $?
+ $(RM) $(RMFLAGS) $?
+
+# DMAKE uses this recipe to remove intermediate targets
+.REMOVE :; $(RM) -f $<
+
+# AUGMAKE extensions for SYSV compatibility
+"@B" = $(@:b)
+"@D" = $(@:d)
+"@F" = $(@:f)
+"*B" = $(*:b)
+"*D" = $(*:d)
+"*F" = $(*:f)
+"/readme/license.txt.
+--
+-- LOG
+-- Use cvs log to obtain detailed change logs.
+*/
+/*LINTLIBRARY*/
+#include
+#include
+#include
+#include
+
+#if defined(max)
+# undef max
+#endif
+#define max(A,B) (((A)<(B))?(B):(A))
+
+extern char *mktemp();
+extern int access();
+int d_access();
+
+/* Zortech C stdio.h doesn't define P_tmpdir, so let's do it here */
+/* Under DOS leave the default tmpdir pointing here! */
+static char *P_tmpdir = "";
+
+char *
+tempnam(dir, prefix)
+const char *dir; /* use this directory please (if non-NULL) */
+const char *prefix; /* use this (if non-NULL) as filename prefix */
+{
+ static int count = 0;
+ register char *p, *q, *tmpdir;
+ int tl=0, dl=0, pl;
+ char buf[30];
+
+ pl = strlen(P_tmpdir);
+
+ if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
+ else if( (tmpdir = getenv("TMP")) != NULL ) tl = strlen(tmpdir);
+ if( dir != NULL ) dl = strlen(dir);
+
+ if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
+ return(NULL);
+
+ *p = '\0';
+
+ if( (tl == 0) || (d_access( strcpy(p, tmpdir), 0) != 0) )
+ if( (dl == 0) || (d_access( strcpy(p, dir), 0) != 0) )
+ if( d_access( strcpy(p, P_tmpdir), 0) != 0 )
+ if( !prefix )
+ prefix = "tp";
+
+ if(prefix)
+ {
+ *(p+strlen(p)+2) = '\0';
+ (void)strncat(p, prefix, 2);
+ }
+
+ sprintf( buf, "%08x", _psp );
+ buf[6]='\0';
+ (void)strcat(p, buf );
+ sprintf( buf, "%04d", count++ );
+ q=p+strlen(p)-6;
+ *q++ = buf[0]; *q++ = buf[1];
+ *q++ = buf[2]; *q++ = buf[3];
+
+ if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
+
+ return(p);
+}
+
+
+
+d_access( name, flag )
+char *name;
+int flag;
+{
+ extern char *DirSepStr;
+ char *p;
+ int r;
+
+ if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
+ r = access( name, flag );
+ p = name+strlen(name)-1;
+ if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
+
+ return( r );
+}
--
cgit