summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-02-22 14:43:02 -0500
committerSteve Dickson <steved@redhat.com>2009-02-22 14:43:02 -0500
commit43d64aa2dabf5029aac3e503a875a3cda6c5d253 (patch)
tree34b0d7d90205ca9f6a26c319638d80d44ee03bd7 /basic
downloadcthon04-43d64aa2dabf5029aac3e503a875a3cda6c5d253.tar.gz
cthon04-43d64aa2dabf5029aac3e503a875a3cda6c5d253.tar.xz
cthon04-43d64aa2dabf5029aac3e503a875a3cda6c5d253.zip
Inital Commit
Diffstat (limited to 'basic')
-rw-r--r--basic/Makefile94
-rw-r--r--basic/console/build.bat37
-rwxr-xr-xbasic/console/test1.mak201
-rwxr-xr-xbasic/console/test2.mak182
-rwxr-xr-xbasic/console/test3.mak182
-rwxr-xr-xbasic/console/test4.mak182
-rwxr-xr-xbasic/console/test4a.mak182
-rwxr-xr-xbasic/console/test5.mak182
-rwxr-xr-xbasic/console/test5a.mak182
-rwxr-xr-xbasic/console/test5b.mak182
-rwxr-xr-xbasic/console/test6.mak182
-rwxr-xr-xbasic/console/test7.mak182
-rwxr-xr-xbasic/console/test7a.mak182
-rwxr-xr-xbasic/console/test7b.mak182
-rwxr-xr-xbasic/console/test8.mak182
-rwxr-xr-xbasic/console/test9.mak182
-rw-r--r--basic/dos/build.bat37
-rwxr-xr-xbasic/dos/test1.mak92
-rwxr-xr-xbasic/dos/test2.mak85
-rwxr-xr-xbasic/dos/test3.mak85
-rwxr-xr-xbasic/dos/test4.mak85
-rwxr-xr-xbasic/dos/test4a.mak85
-rwxr-xr-xbasic/dos/test5.mak85
-rwxr-xr-xbasic/dos/test5a.mak85
-rwxr-xr-xbasic/dos/test5b.mak85
-rwxr-xr-xbasic/dos/test6.mak85
-rwxr-xr-xbasic/dos/test7.mak85
-rwxr-xr-xbasic/dos/test7a.mak85
-rwxr-xr-xbasic/dos/test7b.mak85
-rwxr-xr-xbasic/dos/test8.mak85
-rwxr-xr-xbasic/dos/test9.mak85
-rwxr-xr-xbasic/runtests82
-rw-r--r--basic/runtests.mvs48
-rwxr-xr-xbasic/runtests.orig82
-rw-r--r--basic/scripts/basic.bat101
-rw-r--r--basic/scripts/basic2.bat72
-rw-r--r--basic/scripts/basic3.bat101
-rw-r--r--basic/scripts/cthon.bat16
-rw-r--r--basic/scripts/cthon00.mst126
-rw-r--r--basic/scripts/cthon01.mst436
-rw-r--r--basic/scripts/cthon02.mst469
-rw-r--r--basic/scripts/cthon03.mst428
-rw-r--r--basic/scripts/cthon04.mst366
-rw-r--r--basic/scripts/runcthon.prl66
-rw-r--r--basic/subr.c830
-rw-r--r--basic/tags170
-rw-r--r--basic/test1.c176
-rw-r--r--basic/test2.c173
-rw-r--r--basic/test3.c143
-rw-r--r--basic/test4.c187
-rw-r--r--basic/test4a.c165
-rw-r--r--basic/test5.c358
-rw-r--r--basic/test5a.c301
-rw-r--r--basic/test5b.c219
-rw-r--r--basic/test6.c293
-rw-r--r--basic/test7.c248
-rw-r--r--basic/test7a.c195
-rw-r--r--basic/test7b.c245
-rw-r--r--basic/test8.c207
-rw-r--r--basic/test9.c182
60 files changed, 10417 insertions, 0 deletions
diff --git a/basic/Makefile b/basic/Makefile
new file mode 100644
index 0000000..b87462e
--- /dev/null
+++ b/basic/Makefile
@@ -0,0 +1,94 @@
+#
+# @(#)Makefile 1.8 2003/12/29 Connectathon Testsuite
+# 1.5 Lachman ONC Test Suite source
+#
+# to make tests, use 'make'
+# to copy tests to another directory, use 'make copy DESTDIR=dir'
+# to copy source to another directory, use 'make dist DESTDIR=dir'
+
+TESTS = test1 test2 test3 test4 test5 test6 test7 test8 test9
+AUXTESTS = test4a test5a test5b test7a test7b
+DOSRUNFILES = scripts/*.bat scripts/*.mst scripts/*.prl
+DOSBUILDFILES = console/*.bat console/*.mak dos/*.bat dos/*.mak
+DOSFILES = $(DOSRUNFILES) $(DOSBUILDFILES)
+DESTDIR = /no/such/path
+
+INCLUDES=../tests.h
+
+include ../tests.init
+
+all: origtests auxtests
+ if test ! -x runtests; then chmod a+x runtests; fi
+
+origtests: $(TESTS)
+auxtests: $(AUXTESTS)
+
+subr.o: subr.c $(INCLUDES)
+
+test1: test1.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test2: test2.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test3: test3.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test4: test4.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test4a: test4a.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test5: test5.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test5a: test5a.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test5b: test5b.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test6: test6.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test7: test7.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test7a: test7a.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test7b: test7b.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test8: test8.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+test9: test9.c $(INCLUDES) subr.o
+ $(CC) $(CFLAGS) -o $@ $@.c subr.o $(LIBS)
+
+lint:
+ lint $(CFLAGS) test1.c subr.c $(LIBS)
+ lint $(CFLAGS) test2.c subr.c $(LIBS)
+ lint $(CFLAGS) test3.c subr.c $(LIBS)
+ lint $(CFLAGS) test4.c subr.c $(LIBS)
+ lint $(CFLAGS) test4a.c subr.c $(LIBS)
+ lint $(CFLAGS) test5.c subr.c $(LIBS)
+ lint $(CFLAGS) test5a.c subr.c $(LIBS)
+ lint $(CFLAGS) test5b.c subr.c $(LIBS)
+ lint $(CFLAGS) test6.c subr.c $(LIBS)
+ lint $(CFLAGS) test7.c subr.c $(LIBS)
+ lint $(CFLAGS) test7a.c subr.c $(LIBS)
+ lint $(CFLAGS) test7b.c subr.c $(LIBS)
+ lint $(CFLAGS) test8.c subr.c $(LIBS)
+ lint $(CFLAGS) test9.c subr.c $(LIBS)
+
+clean:
+ rm -f *.o $(TESTS) $(AUXTESTS)
+
+copy: $(TESTS)
+ cp -f runtests runtests.mvs $(TESTS) $(AUXTESTS) $(DESTDIR)
+
+dist:
+ cp -f runtests runtests.mvs Makefile *.c $(DESTDIR)
+ tar cf - $(DOSFILES) | (cd $(DESTDIR); tar xfBp -)
diff --git a/basic/console/build.bat b/basic/console/build.bat
new file mode 100644
index 0000000..51fe601
--- /dev/null
+++ b/basic/console/build.bat
@@ -0,0 +1,37 @@
+rem @(#)build.bat 1.1 98/10/26 Connectathon Testsuite
+@echo off
+
+rem Cthon Test Suite NMAKE Build Script for Microsoft Visual C++ 1.5
+
+rem The Cthon Test Suite can not be build reliably with Microsoft
+rem Visual C++ Workbench. This is due to Workbench rebuilding the
+rem dependency files if the source is moved from one location to
+rem another. When this occurs the Unix format pathnames for the
+rem Unix include files are added into the makefile and when the
+rem compiler runs it complains it can not find the files. So this
+rem script was created to run NMAKE with the makefiles instead.
+rem This requires that the PATH, LIB and INCLUDE environment
+rem variables be set up correctly, or their location passed as
+rem parameter %1 to this script.
+
+set LIB=%LIB%;%1\LIB
+set INCLUDE=%INCLUDE%;%1\INCLUDE
+set PATH=%PATH%;%1\BIN
+
+NMAKE TEST1.MAK
+NMAKE TEST2.MAK
+NMAKE TEST3.MAK
+NMAKE TEST4.MAK
+NMAKE TEST5.MAK
+NMAKE TEST6.MAK
+NMAKE TEST7.MAK
+NMAKE TEST8.MAK
+NMAKE TEST9.MAK
+NMAKE TEST4a.MAK
+NMAKE TEST5a.MAK
+NMAKE TEST5b.MAK
+NMAKE TEST7a.MAK
+NMAKE TEST7b.MAK
+
+
+
diff --git a/basic/console/test1.mak b/basic/console/test1.mak
new file mode 100755
index 0000000..7c371b0
--- /dev/null
+++ b/basic/console/test1.mak
@@ -0,0 +1,201 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "test1.mak" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\test1.exe .\WinRel\test1.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /ML /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /ML /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /ML /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"test1.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST1.SBR \
+ .\WinRel\SUBR.SBR
+
+.\WinRel\test1.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:no /PDB:$(OUTDIR)/"test1.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"test1.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST1.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\test1.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST1.exe .\WinDebug\test1.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /ML /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /ML /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /ML /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"test1.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"test1.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST1.SBR \
+ .\WinDebug\SUBR.SBR
+
+.\WinDebug\test1.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"test1.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"test1.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST1.OBJ \
+ .\WinDebug\SUBR.OBJ
+
+.\WinDebug\TEST1.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST1.C
+DEP_TEST1=\
+ ..\tests.h\
+ ..\unixdos.h
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST1.OBJ : $(SOURCE) $(DEP_TEST1) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST1.OBJ : $(SOURCE) $(DEP_TEST1) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=..\SUBR.C
+DEP_SUBR_=\
+ ..\tests.h\
+ ..\unixdos.h
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\SUBR.OBJ : $(SOURCE) $(DEP_SUBR_) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\SUBR.OBJ : $(SOURCE) $(DEP_SUBR_) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test2.mak b/basic/console/test2.mak
new file mode 100755
index 0000000..484f573
--- /dev/null
+++ b/basic/console/test2.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST2.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST2.exe .\WinRel\TEST2.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST2.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST2.SBR
+
+.\WinRel\TEST2.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST2.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST2.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST2.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST2.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST2.exe .\WinDebug\TEST2.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST2.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST2.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST2.SBR
+
+.\WinDebug\TEST2.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST2.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST2.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST2.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST2.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST2.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST2.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST2.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test3.mak b/basic/console/test3.mak
new file mode 100755
index 0000000..a7ffd31
--- /dev/null
+++ b/basic/console/test3.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST3.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST3.exe .\WinRel\TEST3.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST3.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST3.SBR
+
+.\WinRel\TEST3.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST3.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST3.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST3.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST3.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST3.exe .\WinDebug\TEST3.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST3.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST3.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST3.SBR
+
+.\WinDebug\TEST3.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST3.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST3.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST3.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST3.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST3.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST3.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST3.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test4.mak b/basic/console/test4.mak
new file mode 100755
index 0000000..5a17ac2
--- /dev/null
+++ b/basic/console/test4.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST4.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST4.exe .\WinRel\TEST4.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST4.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST4.SBR
+
+.\WinRel\TEST4.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST4.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST4.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST4.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST4.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST4.exe .\WinDebug\TEST4.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST4.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST4.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST4.SBR
+
+.\WinDebug\TEST4.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST4.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST4.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST4.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST4.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST4.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST4.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST4.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test4a.mak b/basic/console/test4a.mak
new file mode 100755
index 0000000..af97f71
--- /dev/null
+++ b/basic/console/test4a.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST4a.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST4a.exe .\WinRel\TEST4a.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST4a.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST4a.SBR
+
+.\WinRel\TEST4a.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST4a.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST4a.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST4a.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST4a.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST4a.exe .\WinDebug\TEST4a.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST4a.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST4a.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST4a.SBR
+
+.\WinDebug\TEST4a.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST4a.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST4a.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST4a.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST4a.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST4a.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST4a.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST4a.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test5.mak b/basic/console/test5.mak
new file mode 100755
index 0000000..e60d8c9
--- /dev/null
+++ b/basic/console/test5.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST5.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST5.exe .\WinRel\TEST5.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST5.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST5.SBR
+
+.\WinRel\TEST5.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST5.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST5.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST5.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST5.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST5.exe .\WinDebug\TEST5.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST5.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST5.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST5.SBR
+
+.\WinDebug\TEST5.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST5.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST5.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST5.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST5.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST5.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST5.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST5.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test5a.mak b/basic/console/test5a.mak
new file mode 100755
index 0000000..4b89c08
--- /dev/null
+++ b/basic/console/test5a.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST5a.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST5a.exe .\WinRel\TEST5a.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST5a.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST5a.SBR
+
+.\WinRel\TEST5a.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST5a.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST5a.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST5a.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST5a.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST5a.exe .\WinDebug\TEST5a.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST5a.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST5a.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST5a.SBR
+
+.\WinDebug\TEST5a.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST5a.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST5a.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST5a.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST5a.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST5a.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST5a.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST5a.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test5b.mak b/basic/console/test5b.mak
new file mode 100755
index 0000000..31b6cc8
--- /dev/null
+++ b/basic/console/test5b.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST5b.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST5b.exe .\WinRel\TEST5b.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST5b.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST5b.SBR
+
+.\WinRel\TEST5b.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST5b.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST5b.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST5b.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST5b.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST5b.exe .\WinDebug\TEST5b.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST5b.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST5b.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST5b.SBR
+
+.\WinDebug\TEST5b.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST5b.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST5b.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST5b.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST5b.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST5b.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST5b.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST5b.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test6.mak b/basic/console/test6.mak
new file mode 100755
index 0000000..42e2a27
--- /dev/null
+++ b/basic/console/test6.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST6.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST6.exe .\WinRel\TEST6.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST6.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST6.SBR
+
+.\WinRel\TEST6.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST6.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST6.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST6.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST6.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST6.exe .\WinDebug\TEST6.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST6.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST6.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST6.SBR
+
+.\WinDebug\TEST6.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST6.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST6.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST6.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST6.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST6.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST6.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST6.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test7.mak b/basic/console/test7.mak
new file mode 100755
index 0000000..2915a78
--- /dev/null
+++ b/basic/console/test7.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST7.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST7.exe .\WinRel\TEST7.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST7.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST7.SBR
+
+.\WinRel\TEST7.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST7.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST7.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST7.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST7.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST7.exe .\WinDebug\TEST7.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST7.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST7.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST7.SBR
+
+.\WinDebug\TEST7.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST7.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST7.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST7.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST7.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST7.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST7.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST7.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test7a.mak b/basic/console/test7a.mak
new file mode 100755
index 0000000..8a3c780
--- /dev/null
+++ b/basic/console/test7a.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST7a.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST7a.exe .\WinRel\TEST7a.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST7a.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST7a.SBR
+
+.\WinRel\TEST7a.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST7a.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST7a.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST7a.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST7a.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST7a.exe .\WinDebug\TEST7a.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST7a.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST7a.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST7a.SBR
+
+.\WinDebug\TEST7a.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST7a.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST7a.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST7a.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST7a.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST7a.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST7a.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST7a.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test7b.mak b/basic/console/test7b.mak
new file mode 100755
index 0000000..c90d870
--- /dev/null
+++ b/basic/console/test7b.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST7b.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST7b.exe .\WinRel\TEST7b.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST7b.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST7b.SBR
+
+.\WinRel\TEST7b.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST7b.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST7b.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST7b.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST7b.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST7b.exe .\WinDebug\TEST7b.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST7b.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST7b.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST7b.SBR
+
+.\WinDebug\TEST7b.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST7b.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST7b.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST7b.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST7b.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST7b.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST7b.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST7b.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test8.mak b/basic/console/test8.mak
new file mode 100755
index 0000000..c9218cc
--- /dev/null
+++ b/basic/console/test8.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST8.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST8.exe .\WinRel\TEST8.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST8.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST8.SBR
+
+.\WinRel\TEST8.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST8.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST8.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST8.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST8.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST8.exe .\WinDebug\TEST8.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST8.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST8.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST8.SBR
+
+.\WinDebug\TEST8.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST8.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST8.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST8.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST8.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST8.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST8.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST8.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/console/test9.mak b/basic/console/test9.mak
new file mode 100755
index 0000000..82ed99c
--- /dev/null
+++ b/basic/console/test9.mak
@@ -0,0 +1,182 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "TEST9.MAK" CFG="Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+################################################################################
+# Begin Project
+# PROP Target_Last_Scanned "Win32 Debug"
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : .\WinRel\TEST9.exe .\WinRel\TEST9.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR$(INTDIR)/\
+ /Fo$(INTDIR)/ /c
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST9.bsc"
+BSC32_SBRS= \
+ .\WinRel\TEST9.SBR
+
+.\WinRel\TEST9.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST9.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"TEST9.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinRel\TEST9.OBJ \
+ .\WinRel\SUBR.OBJ
+
+.\WinRel\TEST9.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : .\WinDebug\TEST9.exe .\WinDebug\TEST9.bsc
+
+$(OUTDIR) :
+ if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE CPP /nologo /W0 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# ADD CPP /nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
+# SUBTRACT CPP /YX
+CPP_PROJ=/nologo /W0 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
+ /FR$(INTDIR)/ /Fo$(INTDIR)/ /Fd$(OUTDIR)/"TEST9.pdb" /c
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"TEST9.bsc"
+BSC32_SBRS= \
+ .\WinDebug\TEST9.SBR
+
+.\WinDebug\TEST9.bsc : $(OUTDIR) $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
+# SUBTRACT LINK32 /INCREMENTAL:no
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:console /INCREMENTAL:yes /PDB:$(OUTDIR)/"TEST9.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"TEST9.exe"
+DEF_FILE=
+LINK32_OBJS= \
+ .\WinDebug\TEST9.OBJ \
+ .\WINDEBUG\SUBR.OBJ
+
+.\WinDebug\TEST9.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cpp{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+.cxx{$(CPP_OBJS)}.obj:
+ $(CPP) $(CPP_PROJ) $<
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=..\TEST9.C
+
+!IF "$(CFG)" == "Win32 Release"
+
+.\WinRel\TEST9.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ELSEIF "$(CFG)" == "Win32 Debug"
+
+.\WinDebug\TEST9.OBJ : $(SOURCE) $(INTDIR)
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\WINDEBUG\SUBR.OBJ
+# End Source File
+# End Group
+# End Project
+################################################################################
diff --git a/basic/dos/build.bat b/basic/dos/build.bat
new file mode 100644
index 0000000..51fe601
--- /dev/null
+++ b/basic/dos/build.bat
@@ -0,0 +1,37 @@
+rem @(#)build.bat 1.1 98/10/26 Connectathon Testsuite
+@echo off
+
+rem Cthon Test Suite NMAKE Build Script for Microsoft Visual C++ 1.5
+
+rem The Cthon Test Suite can not be build reliably with Microsoft
+rem Visual C++ Workbench. This is due to Workbench rebuilding the
+rem dependency files if the source is moved from one location to
+rem another. When this occurs the Unix format pathnames for the
+rem Unix include files are added into the makefile and when the
+rem compiler runs it complains it can not find the files. So this
+rem script was created to run NMAKE with the makefiles instead.
+rem This requires that the PATH, LIB and INCLUDE environment
+rem variables be set up correctly, or their location passed as
+rem parameter %1 to this script.
+
+set LIB=%LIB%;%1\LIB
+set INCLUDE=%INCLUDE%;%1\INCLUDE
+set PATH=%PATH%;%1\BIN
+
+NMAKE TEST1.MAK
+NMAKE TEST2.MAK
+NMAKE TEST3.MAK
+NMAKE TEST4.MAK
+NMAKE TEST5.MAK
+NMAKE TEST6.MAK
+NMAKE TEST7.MAK
+NMAKE TEST8.MAK
+NMAKE TEST9.MAK
+NMAKE TEST4a.MAK
+NMAKE TEST5a.MAK
+NMAKE TEST5b.MAK
+NMAKE TEST7a.MAK
+NMAKE TEST7b.MAK
+
+
+
diff --git a/basic/dos/test1.mak b/basic/dos/test1.mak
new file mode 100755
index 0000000..ac5b381
--- /dev/null
+++ b/basic/dos/test1.mak
@@ -0,0 +1,92 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST1
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = SUBR.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST1.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT =
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = SUBR.SBR \
+ TEST1.SBR
+
+
+SUBR_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+TEST1_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+SUBR.OBJ: ..\SUBR.C $(SUBR_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\SUBR.C
+
+TEST1.OBJ: ..\TEST1.C $(TEST1_DEP)
+ $(CC) $(CFLAGS) $(CUSEPCHFLAG) /c ..\TEST1.C
+
+$(PROJ).EXE:: SUBR.OBJ TEST1.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+SUBR.OBJ +
+TEST1.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test2.mak b/basic/dos/test2.mak
new file mode 100755
index 0000000..674359e
--- /dev/null
+++ b/basic/dos/test2.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST2
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST2.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST2.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST2.SBR
+
+
+TEST2_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST2.OBJ: ..\TEST2.C $(TEST2_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST2.C
+
+$(PROJ).EXE:: TEST2.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST2.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test3.mak b/basic/dos/test3.mak
new file mode 100755
index 0000000..8f09995
--- /dev/null
+++ b/basic/dos/test3.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST3
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST3.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST3.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST3.SBR
+
+
+TEST3_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST3.OBJ: ..\TEST3.C $(TEST3_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST3.C
+
+$(PROJ).EXE:: TEST3.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST3.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test4.mak b/basic/dos/test4.mak
new file mode 100755
index 0000000..d856c0c
--- /dev/null
+++ b/basic/dos/test4.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST4
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST4.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST4.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST4.SBR
+
+
+TEST4_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST4.OBJ: ..\TEST4.C $(TEST4_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST4.C
+
+$(PROJ).EXE:: TEST4.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST4.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test4a.mak b/basic/dos/test4a.mak
new file mode 100755
index 0000000..4a2ecc6
--- /dev/null
+++ b/basic/dos/test4a.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST4A
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST4A.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST4A.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST4A.SBR
+
+
+TEST4A_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST4A.OBJ: ..\TEST4A.C $(TEST4A_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST4A.C
+
+$(PROJ).EXE:: TEST4A.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST4A.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test5.mak b/basic/dos/test5.mak
new file mode 100755
index 0000000..f9c6209
--- /dev/null
+++ b/basic/dos/test5.mak
@@ -0,0 +1,85 @@
+# Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST5
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST5.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST5.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:10240
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:10240
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST5.SBR
+
+
+TEST5_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST5.OBJ: ..\TEST5.C $(TEST5_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST5.C
+
+$(PROJ).EXE:: TEST5.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST5.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test5a.mak b/basic/dos/test5a.mak
new file mode 100755
index 0000000..c029345
--- /dev/null
+++ b/basic/dos/test5a.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST5A
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST5A.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST5A.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:10240
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:10240
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST5A.SBR
+
+
+TEST5A_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST5A.OBJ: ..\TEST5A.C $(TEST5A_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST5A.C
+
+$(PROJ).EXE:: TEST5A.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST5A.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test5b.mak b/basic/dos/test5b.mak
new file mode 100755
index 0000000..1fd61ea
--- /dev/null
+++ b/basic/dos/test5b.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST5B
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST5B.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST5B.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:10240
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:10240
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST5B.SBR
+
+
+TEST5B_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST5B.OBJ: ..\TEST5B.C $(TEST5B_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST5B.C
+
+$(PROJ).EXE:: TEST5B.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST5B.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test6.mak b/basic/dos/test6.mak
new file mode 100755
index 0000000..020cb8b
--- /dev/null
+++ b/basic/dos/test6.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST6
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST6.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST6.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST6.SBR
+
+
+TEST6_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST6.OBJ: ..\TEST6.C $(TEST6_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST6.C
+
+$(PROJ).EXE:: TEST6.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST6.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test7.mak b/basic/dos/test7.mak
new file mode 100755
index 0000000..6d08323
--- /dev/null
+++ b/basic/dos/test7.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST7
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST7.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST7.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST7.SBR
+
+
+TEST7_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST7.OBJ: ..\TEST7.C $(TEST7_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST7.C
+
+$(PROJ).EXE:: TEST7.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST7.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test7a.mak b/basic/dos/test7a.mak
new file mode 100755
index 0000000..5a7dd40
--- /dev/null
+++ b/basic/dos/test7a.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST7A
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST7A.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST7A.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST7A.SBR
+
+
+TEST7A_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST7A.OBJ: ..\TEST7A.C $(TEST7A_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST7A.C
+
+$(PROJ).EXE:: TEST7A.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST7A.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test7b.mak b/basic/dos/test7b.mak
new file mode 100755
index 0000000..f05471f
--- /dev/null
+++ b/basic/dos/test7b.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST7B
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST7B.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST7B.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST7B.SBR
+
+
+TEST7B_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST7B.OBJ: ..\TEST7B.C $(TEST7B_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST7B.C
+
+$(PROJ).EXE:: TEST7B.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST7B.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test8.mak b/basic/dos/test8.mak
new file mode 100755
index 0000000..9d0220f
--- /dev/null
+++ b/basic/dos/test8.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST8
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST8.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST8.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST8.SBR
+
+
+TEST8_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST8.OBJ: ..\TEST8.C $(TEST8_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST8.C
+
+$(PROJ).EXE:: TEST8.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST8.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/dos/test9.mak b/basic/dos/test9.mak
new file mode 100755
index 0000000..d17df27
--- /dev/null
+++ b/basic/dos/test9.mak
@@ -0,0 +1,85 @@
+# External Makefile for Microsoft Visual C++ generated build script - Do not modify
+
+PROJ = TEST9
+DEBUG = 1
+PROGTYPE = 6
+CALLER =
+ARGS =
+DLLS =
+D_RCDEFINES = -d_DEBUG
+R_RCDEFINES = -dNDEBUG
+ORIGIN = MSVC
+ORIGIN_VER = 1.00
+PROJPATH =
+USEMFC = 0
+CC = cl
+CPP = cl
+CXX = cl
+CCREATEPCHFLAG =
+CPPCREATEPCHFLAG =
+CUSEPCHFLAG =
+CPPUSEPCHFLAG =
+FIRSTC = TEST9.C
+FIRSTCPP =
+RC = rc
+CFLAGS_D_DEXE = /nologo /G2 /W0 /Zi /AM /Od /D "_DEBUG" /D "_DOS" /D "DOS" /FR /Fd"TEST9.PDB"
+CFLAGS_R_DEXE = /nologo /Gs /G2 /W0 /AM /Ox /D "NDEBUG" /D "_DOS" /FR
+LFLAGS_D_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /CO /STACK:5120
+LFLAGS_R_DEXE = /NOLOGO /ONERROR:NOEXE /NOI /STACK:5120
+LIBS_D_DEXE = oldnames mlibce
+LIBS_R_DEXE = oldnames mlibce
+RCFLAGS = /nologo
+RESFLAGS = /nologo
+RUNFLAGS =
+OBJS_EXT = SUBR.OBJ
+LIBS_EXT =
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS_D_DEXE)
+LFLAGS = $(LFLAGS_D_DEXE)
+LIBS = $(LIBS_D_DEXE)
+MAPFILE = nul
+RCDEFINES = $(D_RCDEFINES)
+!else
+CFLAGS = $(CFLAGS_R_DEXE)
+LFLAGS = $(LFLAGS_R_DEXE)
+LIBS = $(LIBS_R_DEXE)
+MAPFILE = nul
+RCDEFINES = $(R_RCDEFINES)
+!endif
+!if [if exist MSVC.BND del MSVC.BND]
+!endif
+SBRS = TEST9.SBR
+
+
+TEST9_DEP = ..\tests.h \
+ ..\unixdos.h
+
+
+SUBR_DEP =
+
+all: $(PROJ).EXE $(PROJ).BSC
+
+TEST9.OBJ: ..\TEST9.C $(TEST9_DEP)
+ $(CC) $(CFLAGS) $(CCREATEPCHFLAG) /c ..\TEST9.C
+
+$(PROJ).EXE:: TEST9.OBJ $(OBJS_EXT) $(DEFFILE)
+ echo >NUL @<<$(PROJ).CRF
+TEST9.OBJ +
+$(OBJS_EXT)
+$(PROJ).EXE
+$(MAPFILE)
+..\..\lib\+
+..\..\include\+
+$(LIBS)
+$(DEFFILE);
+<<
+ link $(LFLAGS) @$(PROJ).CRF
+
+run: $(PROJ).EXE
+ $(PROJ) $(RUNFLAGS)
+
+
+$(PROJ).BSC: $(SBRS)
+ bscmake @<<
+/o$@ $(SBRS)
+<<
diff --git a/basic/runtests b/basic/runtests
new file mode 100755
index 0000000..24b0afc
--- /dev/null
+++ b/basic/runtests
@@ -0,0 +1,82 @@
+:
+#!/bin/sh
+#
+# @(#)runtests 1.3 00/07/10 Connectathon Testsuite
+#
+
+InitFile="../tests.init"
+
+if test $# -ge 1
+then
+ TESTARG=$1
+else
+ . $InitFile
+fi
+
+echo "Starting BASIC tests: test directory $NFSTESTDIR (arg: $TESTARG)"
+mkdir $NFSTESTDIR
+if test ! -d $NFSTESTDIR
+then
+ echo "Can't make directory $NFSTESTDIR"
+ exit 1
+fi
+
+set -e
+
+# File and Directory tree creation test
+echo ""
+./test1 $TESTARG
+
+# File and Directory tree removal test
+echo ""
+./test2 $TESTARG
+
+# Lookup across mount point
+echo ""
+./test3 $TESTARG
+
+# Setattr, getattr and lookup tests
+echo ""
+./test4 $TESTARG
+# Getattr and lookup tests
+# echo ""
+# ./test4a $TESTARG
+
+# Write and read tests
+echo ""
+./test5 $TESTARG
+# Test 5a and 5b separate out the read and write tests into simpler components.
+# echo ""
+# ./test5a $TESTARG
+# echo ""
+# ./test5b $TESTARG
+
+# Read Directory test
+echo "TESTARG=$TESTARG"
+./test6 $TESTARG
+
+# Rename and Link test
+echo ""
+if [ "$HARDLINKS"o != no ]
+then
+ ./test7 $TESTARG
+else
+ ./test7a $TESTARG
+fi
+# Link Test
+# echo ""
+# ./test7b $TESTARG
+
+# Symlink and readlink test
+echo ""
+./test8 $TESTARG
+
+# Getfs test
+echo ""
+./test9 $TESTARG
+
+echo ""
+
+echo "Congratulations, you passed the basic tests!"
+
+exit 0
diff --git a/basic/runtests.mvs b/basic/runtests.mvs
new file mode 100644
index 0000000..ef680b7
--- /dev/null
+++ b/basic/runtests.mvs
@@ -0,0 +1,48 @@
+:
+#!/bin/sh
+#
+# @(#)runtests.mvs 1.2 97/01/03 Connectathon Testsuite
+#
+#. ../startup.sh
+
+# see ../startup.sh for usage info
+# 'ARGS=-f' for basic funtionality tests (one pass of each test)
+# 'ARGS= ' for longer tests without timing (1-3 minutes per test)
+# 'ARGS=-t' for longer tests with timing
+
+ARGS="-m"
+
+echo "Starting BASIC tests: test directory $NFSTESTDIR (arg: $ARGS)"
+
+echo ""
+# levels files dirs fname dname
+test1 $ARGS 1 2 0 mvsn mvsd
+echo ""
+test2 $ARGS 1 2 0 mvsn mvsd
+echo ""
+test3 $ARGS 1
+# echo ""
+# test4 $ARGS DON'T DO SETATTR TESTS
+echo ""
+test4a $ARGS 10 1 mvsn
+echo ""
+test5 $ARGS 1048576 10 bigfile
+# echo ""
+# test5a $ARGS
+# echo ""
+# test5b $ARGS
+echo ""
+test6 -i $ARGS 200 1 mvsn
+# echo ""
+# test7 $ARGS DON'T TEST LINK OPERTAIONS
+echo ""
+test7a $ARGS 10 1 mvsn newn
+# echo ""
+# test7b $ARGS DON'T TEST LINK OPERATIONS
+# echo ""
+# test8 $ARGS DON'T TEST SYMLINK/READLINK OPERATIONS
+echo ""
+test9 $ARGS 1
+echo ""
+
+echo "Congratulations, you passed the basic tests for MVS/NFS!"
diff --git a/basic/runtests.orig b/basic/runtests.orig
new file mode 100755
index 0000000..32e1d85
--- /dev/null
+++ b/basic/runtests.orig
@@ -0,0 +1,82 @@
+:
+#!/bin/sh
+#
+# @(#)runtests 1.3 00/07/10 Connectathon Testsuite
+#
+
+InitFile="../tests.init"
+
+if test $# -ge 1
+then
+ TESTARG=$1
+else
+ . $InitFile
+fi
+
+echo "Starting BASIC tests: test directory $NFSTESTDIR (arg: $TESTARG)"
+mkdir $NFSTESTDIR
+if test ! -d $NFSTESTDIR
+then
+ echo "Can't make directory $NFSTESTDIR"
+ exit 1
+fi
+
+set -e
+
+# File and Directory tree creation test
+echo ""
+./test1 $TESTARG
+
+# File and Directory tree removal test
+echo ""
+./test2 $TESTARG
+
+# Lookup across mount point
+echo ""
+./test3 $TESTARG
+
+# Setattr, getattr and lookup tests
+echo ""
+./test4 $TESTARG
+# Getattr and lookup tests
+# echo ""
+# ./test4a $TESTARG
+
+# Write and read tests
+echo ""
+./test5 $TESTARG
+# Test 5a and 5b separate out the read and write tests into simpler components.
+# echo ""
+# ./test5a $TESTARG
+# echo ""
+# ./test5b $TESTARG
+
+# Read Directory test
+echo ""
+./test6 $TESTARG
+
+# Rename and Link test
+echo ""
+if [ "$HARDLINKS"o != no ]
+then
+ ./test7 $TESTARG
+else
+ ./test7a $TESTARG
+fi
+# Link Test
+# echo ""
+# ./test7b $TESTARG
+
+# Symlink and readlink test
+echo ""
+./test8 $TESTARG
+
+# Getfs test
+echo ""
+./test9 $TESTARG
+
+echo ""
+
+echo "Congratulations, you passed the basic tests!"
+
+exit 0
diff --git a/basic/scripts/basic.bat b/basic/scripts/basic.bat
new file mode 100644
index 0000000..9f10032
--- /dev/null
+++ b/basic/scripts/basic.bat
@@ -0,0 +1,101 @@
+
+rem @(#)basic.bat 1.1 98/10/26 Connectathon Testsuite
+@echo off
+echo.
+echo Starting CONNECTATHON BASIC tests
+echo.
+
+set TESTDIR=%2
+set TESTARG1=%3
+set TESTARG2=%4
+set OLDPATH=%PATH%
+
+echo Arg1 is the network_drive: to create the test dir on = %1%
+rem Note: Arg1 should also be the drive you start the macro (ie. L:)
+echo Arg2 is the basename of the directory to create = %TESTDIR%
+echo Arg3 is the value of test arg1 = %TESTARG1%
+echo Arg4 is the value of test arg2 = %TESTARG2%
+echo Arg5 is the full path to the directory containing the tests = %5%
+echo.
+
+choice /t:C,10 /n /c:AC (A-bort or C-ontinue):
+if errorlevel 2 goto Continue
+if errorlevel 1 goto Exit
+:Continue
+
+PATH=%5;%PATH%
+
+%1
+cd \
+
+deltree /y %TESTDIR%*
+
+set NFSTESTDIR=%TESTDIR%1
+test1 %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+
+test2 %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%3
+rem test3 Only 1 Param
+test3 %TESTARG1%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%4
+test4 %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%5
+test5 %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%6
+rem "'test6 Param 1 must be <= Param 2'"
+test6 %TESTARG1% %TESTARG1%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%7
+test7 %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%8
+test8 %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+rem No cd .. or deltree /y needed
+
+set NFSTESTDIR=%TESTDIR%9
+rem test9 Only 1 Param
+test9 %TESTARG1%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+echo "Congratulations, you completed the basic tests!"
+
+:Exit
+
+PATH=%OLDPATH%
+
diff --git a/basic/scripts/basic2.bat b/basic/scripts/basic2.bat
new file mode 100644
index 0000000..9ee4e38
--- /dev/null
+++ b/basic/scripts/basic2.bat
@@ -0,0 +1,72 @@
+
+rem @(#)basic2.bat 1.1 98/10/26 Connectathon Testsuite
+@echo off
+echo.
+echo Starting CONNECTATHON BASIC tests 4a, 5a, 5b, 7a & 7b
+echo.
+
+set TESTDIR=%2
+set TESTARG1=%3
+set TESTARG2=%4
+set OLDPATH=%PATH%
+
+echo Arg1 is the network_drive: to create the test dir on = %1%
+rem Note: Arg1 should be the drive you start the macro from also
+echo Arg2 is the basename of the directory to create = %TESTDIR%
+echo Arg3 is the value of test arg1 = %TESTARG1%
+echo Arg4 is the value of test arg2 = %TESTARG2%
+echo Arg5 is the full path to the directory containing the tests = %5%
+echo.
+
+choice /t:C,10 /n /c:AC (A-bort or C-ontinue):
+if errorlevel 2 goto Continue
+if errorlevel 1 goto Exit
+:Continue
+
+PATH=%5;%PATH%
+
+%1
+cd \
+
+deltree /y %TESTDIR%*
+
+set NFSTESTDIR=%TESTDIR%4
+test4a %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%5
+test5a %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+
+set NFSTESTDIR=%TESTDIR%5
+test5b %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%7
+test7a %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%7
+test7b %TESTARG1% %TESTARG2%
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+echo "Congratulations, you completed the basic tests!"
+
+:Exit
+
+PATH=%OLDPATH%
+
diff --git a/basic/scripts/basic3.bat b/basic/scripts/basic3.bat
new file mode 100644
index 0000000..f19cacc
--- /dev/null
+++ b/basic/scripts/basic3.bat
@@ -0,0 +1,101 @@
+
+rem @(#)basic3.bat 1.1 98/10/26 Connectathon Testsuite
+@echo off
+echo.
+echo Starting CONNECTATHON BASIC tests 1 -9 with Stress Load Parameters
+echo.
+
+set TESTDIR=%2
+set TESTARG1=%3
+set TESTARG2=%4
+set OLDPATH=%PATH%
+
+echo Arg1 is the network drive to create the test dir on = %1%
+rem Note: Arg1 should be the drive you start the macro from also
+echo Arg2 is the basename of the directory to create = %TESTDIR%
+echo Arg3 is the value of test arg1 = %TESTARG1%
+echo Arg4 is the value of test arg2 = %TESTARG2%
+echo Arg5 is the full path to the directory containing the tests = %5%
+echo.
+
+choice /t:C,10 /n /c:AC (A-bort or C-ontinue):
+if errorlevel 2 goto Continue
+if errorlevel 1 goto Exit
+:Continue
+
+PATH=%5;%PATH%
+
+%1
+cd \
+
+deltree /y %TESTDIR%*
+
+set NFSTESTDIR=%TESTDIR%1
+test1 4 10 5
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+
+test2 4 10 5
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%3
+rem test3 Only 1 Param
+test3 1000
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%4
+test4 500 100
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%5
+test5 8192 128
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%6
+rem "'test6 Param 1 must be <= Param 2'"
+test6 512 512
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%7
+test7 10 100
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+set NFSTESTDIR=%TESTDIR%8
+test8 1 1
+if errorlevel 1 echo *** Test Failed ***
+%1
+rem No cd .. or deltree /y needed
+
+set NFSTESTDIR=%TESTDIR%9
+rem test9 Only 1 Param
+test9 1000
+if errorlevel 1 echo *** Test Failed ***
+%1
+cd \
+deltree /y %NFSTESTDIR%
+
+echo "Congratulations, you completed the basic tests!"
+
+:Exit
+
+PATH=%OLDPATH%
+
diff --git a/basic/scripts/cthon.bat b/basic/scripts/cthon.bat
new file mode 100644
index 0000000..0d27ee5
--- /dev/null
+++ b/basic/scripts/cthon.bat
@@ -0,0 +1,16 @@
+rem @(#)cthon.bat 1.1 98/10/26 Connectathon Testsuite
+@echo off
+
+rem %1 path to executable
+rem %2 name of test
+rem %3 testdir name
+rem %4 logfile name
+rem %+ parameters
+
+
+PATH=%1;%PATH%
+set NFSTESTDIR=%3
+
+@echo on
+redir -r2 %2 %5 %6 %7 %8 %9 >> %4
+
diff --git a/basic/scripts/cthon00.mst b/basic/scripts/cthon00.mst
new file mode 100644
index 0000000..67a19b6
--- /dev/null
+++ b/basic/scripts/cthon00.mst
@@ -0,0 +1,126 @@
+'******************************* CTHON00.MST *********************************
+' @(#)cthon00.mst 1.1 98/10/26 Connectathon Testsuite
+'
+'Description: This test suite contains a set of test cases and scenarios that
+' are used to test Directory Caching. It is the same as CTHON01,
+' except that it uses the MS-Test SHELL command instead of RUN.
+' This allows it to work properly with Win95.
+'
+'******************************************************************************
+
+'********************************* HISTORY ************************************
+' Date DVE Comments
+' 3/01/94 Jack Morrison Initial version
+'******************************************************************************
+'
+'******************************************************************************
+'* Include Files
+'******************************************************************************
+
+'$INCLUDE 'DECLARES.INC'
+
+Const APPL_ABBR$ = "CTHON"
+
+'$INCLUDE 'NFSCOMM.INC'
+'$INCLUDE 'NFSSUBS.INC'
+
+'******************************************************************************
+' Subroutines and Functions Declarations
+'******************************************************************************
+
+Declare Sub CTHONTest12a ()
+Declare Sub CTHONTest12b ()
+Declare Sub CTHONTest12c ()
+
+Declare Sub CTHONTest03 ()
+Declare Sub CTHONTest04 ()
+Declare Sub CTHONTest05 ()
+Declare Sub CTHONTest06 ()
+Declare Sub CTHONTest07 ()
+Declare Sub CTHONTest09 ()
+
+'******************************************************************************
+'* Initialize Variables
+'******************************************************************************
+Const Failed = "err"
+Const Drives = 3
+'******************************************************************************
+'* Main prorgram code
+'******************************************************************************
+On Error Goto ErrorTrap
+
+QueSetSpeed 75
+
+Setup
+
+FOR C = 1 TO Drives
+
+rtn = Connect(NetHost(C), NetDrive(C), NetPath(C), "") 'user$ passwd$
+
+If rtn <> PASS Then EXIT FOR
+If EXISTS (NetDrive(C)+":\testlog.*") Then KILL NetDrive(C)+":\testlog.*"
+
+NEXT C
+
+If C >= Drives Then
+
+' *** Execute the tests
+
+CTHONTest12a
+
+Else
+ WriteLogFile "Drive Could Not Be Connected. Test Aborted !"
+ failure_Occurred = TRUE
+End If
+
+FOR D = 1 TO Drives
+
+rtn = Disconnect (NetDrive(D))
+
+NEXT D
+
+Cleanup
+CheckExit
+
+End
+
+'******************************************************************************
+'Subroutines
+'******************************************************************************
+
+'******************************************************************************
+'SUB CTHONTest12a
+'******************************************************************************
+Sub CTHONTest12a() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON Acceptance Test"+" "+DateTime$
+
+FOR I = 1 TO Drives
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+levels$ = "1"
+files$ = "1"
+dirs$ = "1"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON Acceptance Test In Progess", 0,0,0,0, TRUE, TRUE
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+CheckLog "testlog.12", Failed$, False
+NEXT I
+
+EndSubTest " CTHON Acceptance Test"+" "+DateTime$
+
+End Sub
+
diff --git a/basic/scripts/cthon01.mst b/basic/scripts/cthon01.mst
new file mode 100644
index 0000000..3883183
--- /dev/null
+++ b/basic/scripts/cthon01.mst
@@ -0,0 +1,436 @@
+'******************************* CTHON01.MST *********************************
+' @(#)cthon01.mst 1.1 98/10/26 Connectathon Testsuite
+'
+'Description: This test suite contains a set of test cases and scenarios that
+' are used to test Directory Caching.
+'
+'
+'
+'******************************************************************************
+
+'********************************* HISTORY ************************************
+' Date DVE Comments
+' 3/01/94 Jack Morrison Initial version
+'******************************************************************************
+
+'Test cases:
+'
+'******************************************************************************
+'* Include Files
+'******************************************************************************
+
+'$INCLUDE 'DECLARES.INC'
+
+Const APPL_ABBR$ = "CTHON"
+
+'$INCLUDE 'NFSCOMM.INC'
+'$INCLUDE 'NFSSUBS.INC'
+
+'******************************************************************************
+' Subroutines and Functions Declarations
+'******************************************************************************
+
+Declare Sub CthonTest12a ()
+Declare Sub CthonTest12b ()
+Declare Sub CthonTest12c ()
+
+Declare Sub CthonTest03 ()
+Declare Sub CthonTest04 ()
+Declare Sub CthonTest05 ()
+Declare Sub CthonTest06 ()
+Declare Sub CthonTest07 ()
+Declare Sub CthonTest09 ()
+
+'******************************************************************************
+'* Initialize Variables
+'******************************************************************************
+Global NumDrives AS INTEGER
+'******************************************************************************
+'* Main prorgram code
+'******************************************************************************
+On Error Goto ErrorTrap
+
+QueSetSpeed 75
+
+Setup
+
+ret = Connect (NetHost(1), NetDrive(1), NetPath(1), "") 'user$ passwd$
+ret = Connect (NetHost(2), NetDrive(2), NetPath(2), "") 'user$ passwd$
+ret = Connect (NetHost(3), NetDrive(3), NetPath(3), "") 'user$ passwd$
+
+' At some point set NumDrives% = MaxDrive% because the
+' way it is now it will run thru the same drive every time
+NumDrives% = MaxDrive%
+
+FOR I = 1 TO MaxDrive%
+ If EXISTS (NetDrive(I)+":\testlog.*") Then
+ KILL NetDrive(I)+":\testlog.*"
+ End If
+
+'*** Execute the tests
+
+CthonTest12a
+CthonTest12b
+CthonTest12c
+
+CthonTest03
+CthonTest04
+CthonTest05
+CthonTest06
+CthonTest07
+CthonTest09
+
+
+ret = Disconnect (NetDrive(1))
+ret = Disconnect (NetDrive(2))
+ret = Disconnect (NetDrive(3))
+
+NEXT I
+
+Cleanup
+
+End
+
+'******************************************************************************
+' Subroutines and Functions
+'******************************************************************************
+'******************************************************************************
+'Subroutines
+'******************************************************************************
+
+'******************************************************************************
+'SUB CthonTest12a
+'******************************************************************************
+Sub CthonTest12a() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+FOR L = 1 To 7
+
+levels$ = STR$(L)
+files$ = "1"
+dirs$ = "1"
+
+CHDRIVE NetDrive(I)
+
+If NOT EXISTS ("testdir.12") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test12.dir not deleted"
+End If
+
+NEXT L
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+'******************************************************************************
+'SUB CthonTest12b
+'******************************************************************************
+Sub CthonTest12b() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+levels$ = "1"
+files$ = "999"
+dirs$ = "1"
+
+CHDRIVE NetDrive(I)
+
+If NOT EXISTS ("testdir.12") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test12.dir not deleted"
+End If
+
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+
+'******************************************************************************
+'SUB CthonTest12c
+'******************************************************************************
+Sub CthonTest12c() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+levels$ = "4"
+files$ = "10"
+dirs$ = "5"
+
+CHDRIVE NetDrive(I)
+
+If NOT EXISTS ("testdir.12") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test12.dir not deleted"
+End If
+
+
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+'******************************************************************************
+'SUB CthonTest03
+'******************************************************************************
+Sub CthonTest03() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+CHDRIVE NetDrive(I)
+
+FOR C = 1 TO 1000 STEP 10
+
+count$ = STR$(C)
+
+If NOT EXISTS ("testdir.3") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test3 testdir.3 testlog.3 "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test3.dir not deleted"
+End If
+
+NEXT C
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+'******************************************************************************
+'SUB CthonTest04
+'******************************************************************************
+Sub CthonTest04() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+CHDRIVE NetDrive(I)
+
+FOR F = 1 TO 500 STEP 100
+
+files$ = STR$(F)
+count$ = "10"
+
+If NOT EXISTS ("testdir.4") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test4 testdir.4 testlog.4 "+files$+" "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test4.dir not deleted"
+End If
+
+NEXT F
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+
+'******************************************************************************
+'SUB CthonTest06
+'******************************************************************************
+Sub CthonTest06() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+CHDRIVE NetDrive(I)
+
+FOR F = 1 TO 512 STEP 256
+
+files$ = STR$(F)
+count$ = "1"
+
+If NOT EXISTS ("testdir.6") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test6 testdir.6 testlog.6 "+files$+" "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test6.dir not deleted"
+End If
+
+NEXT F
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+
+'******************************************************************************
+'SUB CthonTest09
+'******************************************************************************
+Sub CthonTest09() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+CHDRIVE NetDrive(I)
+
+FOR C = 1 TO 1000 STEP 10
+
+count$ = STR$(C)
+
+If NOT EXISTS ("testdir.9") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test9 testdir.9 testlog.9 "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test9.dir not deleted"
+End If
+
+NEXT C
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+
+'******************************************************************************
+'SUB CthonTest05
+'******************************************************************************
+Sub CthonTest05() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+CHDRIVE NetDrive(I)
+fname$ = ""
+
+FOR N = 1 TO 8 STEP 1
+fname$ = fname$+"x"
+
+FOR C = 1 TO 10 STEP 1
+count$ = STR$(C)
+
+FOR S = 512 TO 8192 STEP 512
+size$ = STR$(s)
+
+If NOT EXISTS ("testdir.5") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test5 testdir.5 testlog.5 "+size$+" "+count$+" "+fname$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test5.dir not deleted"
+End If
+
+NEXT S
+NEXT C
+NEXT N
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
+
+'******************************************************************************
+'SUB CthonTest07
+'******************************************************************************
+Sub CthonTest07() Static
+
+' initialize - open logs and start Cthon
+
+StartSubTest ""
+
+FOR I = 1 TO NumDrives%
+
+CHDRIVE NetDrive(I)
+sfname$ = ""
+
+FOR S = 1 TO 8
+sfname$ = sfname$ + "a"
+efname$ = ""
+
+FOR E = 1 TO 8
+efname$ = efname$ + "z"
+
+If NOT EXISTS ("testdir.7") Then
+
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test7 testdir.7 testlog.7 1 1 "+sfname$+" "+efname$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test7.dir not deleted"
+End If
+
+NEXT E
+NEXT S
+NEXT I
+
+EndSubTest ""
+
+End Sub
+
diff --git a/basic/scripts/cthon02.mst b/basic/scripts/cthon02.mst
new file mode 100644
index 0000000..6e54423
--- /dev/null
+++ b/basic/scripts/cthon02.mst
@@ -0,0 +1,469 @@
+'******************************* CTHON02.MST *********************************
+' @(#)cthon02.mst 1.1 98/10/26 Connectathon Testsuite
+'
+'Description: This test suite contains a set of test cases and scenarios that
+' are used to test Directory Caching. It is similar to CTHON01,
+' but the parameters used as not as large, so it creates less
+' stress and executes in much less time.
+'
+'******************************************************************************
+
+'********************************* HISTORY ************************************
+' Date DVE Comments
+' 3/01/94 Jack Morrison Initial version
+'******************************************************************************
+
+'Test cases:
+'
+'******************************************************************************
+'* Include Files
+'******************************************************************************
+
+'$INCLUDE 'DECLARES.INC'
+
+Const APPL_ABBR$ = "CTHON"
+
+'$INCLUDE 'NFSCOMM.INC'
+'$INCLUDE 'NFSSUBS.INC'
+
+'******************************************************************************
+' Subroutines and Functions Declarations
+'******************************************************************************
+
+Declare Sub CTHONTest12a ()
+Declare Sub CTHONTest12b ()
+Declare Sub CTHONTest12c ()
+
+Declare Sub CTHONTest03 ()
+Declare Sub CTHONTest04 ()
+Declare Sub CTHONTest05 ()
+Declare Sub CTHONTest06 ()
+Declare Sub CTHONTest07 ()
+Declare Sub CTHONTest09 ()
+
+'******************************************************************************
+'* Initialize Variables
+'******************************************************************************
+Const Failed = "err"
+'******************************************************************************
+'* Main prorgram code
+'******************************************************************************
+On Error Goto ErrorTrap
+
+QueSetSpeed 75
+
+Setup
+
+FOR C = 1 TO MaxDrive%
+
+rtn = Connect(NetHost(C), NetDrive(C), NetPath(C), "") 'user$ passwd$
+
+If rtn <> PASS Then EXIT FOR
+If EXISTS (NetDrive(C)+":\testlog.*") Then KILL NetDrive(C)+":\testlog.*"
+
+NEXT C
+
+If C >= Maxdrive% Then
+
+' *** Execute the tests
+
+CTHONTest12a
+CTHONTest12b
+CTHONTest12c
+
+CTHONTest03
+CTHONTest04
+CTHONTest05
+CTHONTest06
+CTHONTest07
+CTHONTest09
+
+Else
+ WriteLogFile "Drive Could Not Be Connected. Test Aborted !"
+ failure_Occurred = TRUE
+End If
+
+FOR D = 1 TO Maxdrive%
+
+rtn = Disconnect (NetDrive(D))
+
+NEXT D
+
+Cleanup
+CheckExit
+
+End
+
+'******************************************************************************
+' Subroutines and Functions
+'******************************************************************************
+'******************************************************************************
+'Subroutines
+'******************************************************************************
+
+'******************************************************************************
+'SUB CTHONTest12a
+'******************************************************************************
+Sub CTHONTest12a() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12A"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+FOR L = 1 To 1
+
+levels$ = STR$(L)
+files$ = "1"
+dirs$ = "1"
+
+CHDRIVE NetDrive(I)
+
+If NOT EXISTS ("testdir.12") Then
+
+STATUSBOX "CTHON02 SubTest 1a In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test1 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+STATUSBOX "CTHON02 SubTest 2a In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test2 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test12.dir not deleted"
+End If
+
+NEXT L
+NEXT I
+
+CheckLog "testlog.12", Failed$, False
+EndSubTest " CTHON SubTest12A"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest12b
+'******************************************************************************
+Sub CTHONTest12b() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12B"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+levels$ = "1"
+files$ = "1"
+dirs$ = "1"
+
+CHDRIVE NetDrive(I)
+
+If NOT EXISTS ("testdir.12") Then
+
+STATUSBOX "CTHON02 SubTest 1b In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test1 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+STATUSBOX "CTHON02 SubTest 2b In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test2 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test12.dir not deleted"
+End If
+
+NEXT I
+
+CheckLog "testlog.12", Failed$, False
+EndSubTest " CTHON SubTest12B"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest12c
+'******************************************************************************
+Sub CTHONTest12c() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12C"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+' CTHON01 => levels$ = "4"
+levels$ = "1"
+' CTHON01 => files$ = "10"
+files$ = "1"
+' CTHON01 => dirs$ = "5"
+dirs$ = "1"
+
+CHDRIVE NetDrive(I)
+
+If NOT EXISTS ("testdir.12") Then
+
+STATUSBOX "CTHON02 SubTest 1c In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test1 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+STATUSBOX "CTHON02 SubTest 2c In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test2 testdir.12 testlog.12 "+levels$+" "+files$+" "+dirs$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test12.dir not deleted"
+End If
+
+
+NEXT I
+
+CheckLog "testlog.12", Failed$, False
+EndSubTest " CTHON SubTest12C"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest03
+'******************************************************************************
+Sub CTHONTest03() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 3"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+
+' CTHON01 => FOR C = 1 TO 1000 STEP 10
+FOR C = 1 TO 10 STEP 10
+
+count$ = STR$(C)
+
+If NOT EXISTS ("testdir.3") Then
+
+STATUSBOX "CTHON02 SubTest 3 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test3 testdir.3 testlog.3 "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test3.dir not deleted"
+End If
+
+NEXT C
+NEXT I
+
+CheckLog "testlog.3", Failed$, False
+EndSubTest " CTHON SubTest 3"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest04
+'******************************************************************************
+Sub CTHONTest04() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 4"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+
+FOR F = 1 TO 100 STEP 100
+
+files$ = STR$(F)
+' CTHON01 => count$ = "10"
+count$ = "1"
+
+If NOT EXISTS ("testdir.4") Then
+
+STATUSBOX "CTHON02 SubTest 4 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test4 testdir.4 testlog.4 "+files$+" "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test4.dir not deleted"
+End If
+
+NEXT F
+NEXT I
+
+CheckLog "testlog.4", Failed$, False
+EndSubTest " CTHON SubTest 4"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest06
+'******************************************************************************
+Sub CTHONTest06() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 6"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+
+FOR F = 1 TO 256 STEP 256
+
+files$ = STR$(F)
+count$ = "1"
+
+If NOT EXISTS ("testdir.6") Then
+
+STATUSBOX "CTHON02 SubTest 6 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test6 testdir.6 testlog.6 "+files$+" "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test6.dir not deleted"
+End If
+
+NEXT F
+NEXT I
+
+CheckLog "testlog.6", Failed$, False
+EndSubTest " CTHON SubTest 6"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest09
+'******************************************************************************
+Sub CTHONTest09() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 9"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+
+' CTHON01 - FOR C = 1 TO 1000 STEP 10
+FOR C = 1 TO 100 STEP 100
+
+count$ = STR$(C)
+
+If NOT EXISTS ("testdir.9") Then
+
+STATUSBOX "CTHON02 SubTest 9 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test9 testdir.9 testlog.9 "+count$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test9.dir not deleted"
+End If
+
+NEXT C
+NEXT I
+
+CheckLog "testlog.9", Failed$, False
+EndSubTest " CTHON SubTest 9"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest05
+'******************************************************************************
+Sub CTHONTest05() Static
+
+' initialize - open logs and start CTHON (this is the longest test)
+
+StartSubTest " CTHON SubTest 5"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+fname$ = ""
+
+' CTHON01 => FOR N = 1 TO 4 STEP 1
+FOR N = 1 TO 1 STEP 1
+fname$ = fname$+"x"
+
+' CTHON01 => FOR C = 1 TO 10 STEP 1
+FOR C = 1 TO 1 STEP 1
+count$ = STR$(C)
+
+' CTHON01 => FOR S = 512 TO 8192 STEP 512
+FOR S = 1024 TO 1024 STEP 1024 ' 1024 > 5120 > 9216 > 13312
+size$ = STR$(s)
+
+If NOT EXISTS ("testdir.5") Then
+
+STATUSBOX "CTHON02 SubTest 5 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test5 testdir.5 testlog.5 "+size$+" "+count$+" "+fname$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test5.dir not deleted"
+End If
+
+NEXT S
+NEXT C
+NEXT N
+NEXT I
+
+CheckLog "testlog.5", Failed$, False
+EndSubTest " CTHON SubTest 5"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest07
+'******************************************************************************
+Sub CTHONTest07() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 7"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+sfname$ = ""
+
+FOR S = 1 TO 2
+sfname$ = sfname$ + "a"
+efname$ = ""
+
+FOR E = 2 TO 2
+efname$ = efname$ + "z"
+
+If NOT EXISTS ("testdir.7") Then
+
+STATUSBOX "CTHON02 SubTest 7 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"test7 testdir.7 testlog.7 1 1 "+sfname$+" "+efname$
+Run Execute$, ,SW_HIDE
+
+Else
+failure_Occurred = True
+WriteLogFile "Previous test directory test7.dir not deleted"
+End If
+
+NEXT E
+NEXT S
+NEXT I
+
+CheckLog "testlog.7", Failed$, False
+EndSubTest " CTHON SubTest 7"+" "+DateTime$
+
+End Sub
+
diff --git a/basic/scripts/cthon03.mst b/basic/scripts/cthon03.mst
new file mode 100644
index 0000000..f020688
--- /dev/null
+++ b/basic/scripts/cthon03.mst
@@ -0,0 +1,428 @@
+'******************************* CTHON03.MST *********************************
+' @(#)cthon03.mst 1.1 98/10/26 Connectathon Testsuite
+'
+'Description: This test suite contains a set of test cases and scenarios that
+' are used to test Directory Caching. It is the same as CTHON01,
+' except that it uses the MS-Test SHELL command instead of RUN.
+' This allows it to work properly with Win95.
+'
+'******************************************************************************
+
+'********************************* HISTORY ************************************
+' Date DVE Comments
+' 3/01/94 Jack Morrison Initial version
+'******************************************************************************
+'
+'******************************************************************************
+'* Include Files
+'******************************************************************************
+
+'$INCLUDE 'DECLARES.INC'
+
+Const APPL_ABBR$ = "CTHON"
+
+'$INCLUDE 'NFSCOMM.INC'
+'$INCLUDE 'NFSSUBS.INC'
+
+'******************************************************************************
+' Subroutines and Functions Declarations
+'******************************************************************************
+
+Declare Sub CTHONTest12a ()
+Declare Sub CTHONTest12b ()
+Declare Sub CTHONTest12c ()
+
+Declare Sub CTHONTest03 ()
+Declare Sub CTHONTest04 ()
+Declare Sub CTHONTest05 ()
+Declare Sub CTHONTest06 ()
+Declare Sub CTHONTest07 ()
+Declare Sub CTHONTest09 ()
+
+'******************************************************************************
+'* Initialize Variables
+'******************************************************************************
+Const Failed = "err"
+'******************************************************************************
+'* Main prorgram code
+'******************************************************************************
+On Error Goto ErrorTrap
+
+QueSetSpeed 75
+
+Setup
+
+FOR C = 1 TO MaxDrive%
+
+rtn = Connect(NetHost(C), NetDrive(C), NetPath(C), "") 'user$ passwd$
+
+If rtn <> PASS Then EXIT FOR
+If EXISTS (NetDrive(C)+":\testlog.*") Then KILL NetDrive(C)+":\testlog.*"
+
+NEXT C
+
+If C >= Maxdrive% Then
+
+' *** Execute the tests
+
+CTHONTest12a
+CTHONTest12b
+CTHONTest12c
+
+CTHONTest03
+CTHONTest04
+CTHONTest05
+CTHONTest06
+CTHONTest07
+CTHONTest09
+
+Else
+ WriteLogFile "Drive Could Not Be Connected. Test Aborted !"
+ failure_Occurred = TRUE
+End If
+
+FOR D = 1 TO Maxdrive%
+
+rtn = Disconnect (NetDrive(D))
+
+NEXT D
+
+Cleanup
+CheckExit
+
+End
+
+'******************************************************************************
+'Subroutines
+'******************************************************************************
+
+'******************************************************************************
+'SUB CTHONTest12a
+'******************************************************************************
+Sub CTHONTest12a() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12A"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+FOR L = 1 To 7
+
+levels$ = STR$(L)
+files$ = "1"
+dirs$ = "1"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 1a In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+STATUSBOX "CTHON03 SubTest 2a In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+NEXT L
+CheckLog "testlog.12", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest12A"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest12b
+'******************************************************************************
+Sub CTHONTest12b() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12B"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+levels$ = "1"
+files$ = "999"
+dirs$ = "1"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 1b In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+STATUSBOX "CTHON03 SubTest 2b In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+CheckLog "testlog.12", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest12B"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest12c
+'******************************************************************************
+Sub CTHONTest12c() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12C"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+levels$ = "4"
+files$ = "10"
+dirs$ = "5"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 1c In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+STATUSBOX "CTHON03 SubTest 2c In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+CheckLog "testlog.12", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest12C"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest03
+'******************************************************************************
+Sub CTHONTest03() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 3"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.3"
+CreateDir$ = ""
+
+FOR C = 1 TO 1000 STEP 10
+
+count$ = STR$(C)
+
+If EXISTS ("testdir.3","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 3 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test3 testdir.3 testlog.3 "+CreateDir$+" "+count$
+SHELL Execute$
+
+NEXT C
+CheckLog "testlog.3", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest 3"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest04
+'******************************************************************************
+Sub CTHONTest04() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 4"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.4"
+CreateDir$ = ""
+
+FOR F = 1 TO 500 STEP 100
+
+files$ = STR$(F)
+count$ = "10"
+
+If EXISTS ("testdir.4","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 4 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test4 testdir.4 testlog.4 "+CreateDir$+" "+files$+" "+count$
+SHELL Execute$
+
+NEXT F
+CheckLog "testlog.4", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest 4"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest06
+'******************************************************************************
+Sub CTHONTest06() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 6"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.6"
+CreateDir$ = ""
+
+FOR F = 1 TO 512 STEP 256
+
+files$ = STR$(F)
+count$ = "1"
+
+If EXISTS ("testdir.6","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 6 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test6 testdir.6 testlog.6 "+CreateDir$+" "+files$+" "+count$
+SHELL Execute$
+
+NEXT F
+CheckLog "testlog.6", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest 6"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest09
+'******************************************************************************
+Sub CTHONTest09() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 9"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.9"
+CreateDir$ = ""
+
+FOR C = 1 TO 1000 STEP 10
+
+count$ = STR$(C)
+
+If EXISTS ("testdir.9","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 9 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test9 testdir.9 testlog.9 "+CreateDir$+" "+count$
+SHELL Execute$
+
+NEXT C
+CheckLog "testlog.9", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest 9"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest05
+'******************************************************************************
+Sub CTHONTest05() Static
+
+' initialize - open logs and start CTHON (this is the longest test)
+
+StartSubTest " CTHON SubTest 5"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.5"
+CreateDir$ = ""
+fname$ = ""
+
+FOR N = 1 TO 8 STEP 1
+fname$ = fname$+"x"
+
+FOR C = 1 TO 10 STEP 1
+count$ = STR$(C)
+
+FOR S = 512 TO 8192 STEP 512
+size$ = STR$(s)
+
+If EXISTS ("testdir.5","+d") Then CreateDir$ = "-n"
+
+
+STATUSBOX "CTHON03 SubTest 5 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test5 testdir.5 testlog.5 "+CreateDir$+" "+size$+" "+count$+" "+fname$
+SHELL Execute$
+
+NEXT S
+NEXT C
+NEXT N
+CheckLog "testlog.5", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest 5"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest07
+'******************************************************************************
+Sub CTHONTest07() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 7"+" "+DateTime$
+
+FOR I = 1 TO MaxDrive%
+
+CHDRIVE NetDrive(I)
+SHELL "deltree /y *.7"
+CreateDir$ = ""
+sfname$ = ""
+
+FOR S = 1 TO 8
+sfname$ = sfname$ + "a"
+efname$ = ""
+
+FOR E = 1 TO 8
+efname$ = efname$ + "z"
+
+If EXISTS ("testdir.7","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON03 SubTest 7 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test7 testdir.7 testlog.7 "+CreateDir$+" 1 1 "+sfname$+" "+efname$
+SHELL Execute$
+
+NEXT E
+NEXT S
+CheckLog "testlog.7", Failed$, False
+NEXT I
+
+EndSubTest " CTHON SubTest 7"+" "+DateTime$
+
+End Sub
+
diff --git a/basic/scripts/cthon04.mst b/basic/scripts/cthon04.mst
new file mode 100644
index 0000000..b5f5542
--- /dev/null
+++ b/basic/scripts/cthon04.mst
@@ -0,0 +1,366 @@
+'******************************* CTHON04.MST *********************************
+' @(#)cthon04.mst 1.1 98/10/26 Connectathon Testsuite
+'
+'Description: This test suite contains a set of test cases and scenarios that
+' are used to test Directory Caching. It is similar to CTHON02,
+' but it only runs on 1 drive and the parameters used are not as
+' large, so it creates less stress and executes in much less time.
+' It also uses the MS-Test SHELL command instead of RUN, which
+' allows it to work properly with Win95 (usually).
+'
+'******************************************************************************
+
+'********************************* HISTORY ************************************
+' Date DVE Comments
+' 3/01/94 Jack Morrison Initial version
+'******************************************************************************
+'
+'******************************************************************************
+'* Include Files
+'******************************************************************************
+
+'$INCLUDE 'DECLARES.INC'
+
+Const APPL_ABBR$ = "CTHON"
+
+'$INCLUDE 'NFSCOMM.INC'
+'$INCLUDE 'NFSSUBS.INC'
+
+'******************************************************************************
+' Subroutines and Functions Declarations
+'******************************************************************************
+
+Declare Sub CTHONTest12a ()
+Declare Sub CTHONTest12b ()
+Declare Sub CTHONTest12c ()
+
+Declare Sub CTHONTest03 ()
+Declare Sub CTHONTest04 ()
+Declare Sub CTHONTest05 ()
+Declare Sub CTHONTest06 ()
+Declare Sub CTHONTest07 ()
+Declare Sub CTHONTest09 ()
+
+'******************************************************************************
+'* Initialize Variables
+'******************************************************************************
+Const Failed = "err"
+'******************************************************************************
+'* Main prorgram code
+'******************************************************************************
+On Error Goto ErrorTrap
+
+QueSetSpeed 75
+
+Setup
+
+rtn = Connect(NetHost(1), NetDrive(1), NetPath(1), "") 'user$ passwd$
+If rtn = PASS Then
+
+If EXISTS (NetDrive(1)+":\testlog.*") Then KILL NetDrive(1)+":\testlog.*"
+
+CTHONTest12a
+CTHONTest12b
+CTHONTest12c
+CTHONTest03
+CTHONTest04
+CTHONTest05
+CTHONTest06
+CTHONTest07
+CTHONTest09
+
+rtn = Disconnect (NetDrive(1))
+
+Else
+ WriteLogFile "Could Not Connect Drive "+NetDrive(1)+" to "+NetHost(1)+" "+NetPath(1)
+ failure_Occurred = TRUE
+End If
+
+Cleanup
+CheckExit
+
+End
+
+'******************************************************************************
+'Subroutines
+'******************************************************************************
+
+'******************************************************************************
+'SUB CTHONTest12a
+'******************************************************************************
+Sub CTHONTest12a() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12A"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+levels$ = "1"
+files$ = "1"
+dirs$ = "1"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 1a In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+STATUSBOX "CTHON04 SubTest 2a In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+CheckLog "testlog.12", Failed$, False
+EndSubTest " CTHON SubTest12A"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest12b
+'******************************************************************************
+Sub CTHONTest12b() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12B"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+levels$ = "1"
+files$ = "1"
+dirs$ = "1"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 1b In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+STATUSBOX "CTHON04 SubTest 2b In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+CheckLog "testlog.12", Failed$, False
+EndSubTest " CTHON SubTest12B"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest12c
+'******************************************************************************
+Sub CTHONTest12c() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest12C"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.12"
+CreateDir$ = ""
+
+levels$ = "1"
+files$ = "1"
+dirs$ = "1"
+
+If EXISTS ("testdir.12","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 1c In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test1 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+STATUSBOX "CTHON04 SubTest 2c In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test2 testdir.12 testlog.12 "+CreateDir$+" "+levels$+" "+files$+" "+dirs$
+SHELL Execute$
+
+CheckLog "testlog.12", Failed$, False
+EndSubTest " CTHON SubTest12C"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest03
+'******************************************************************************
+Sub CTHONTest03() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 3"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.3"
+CreateDir$ = ""
+
+count$ = "1"
+
+If EXISTS ("testdir.3","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 3 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test3 testdir.3 testlog.3 "+CreateDir$+" "+count$
+SHELL Execute$
+
+CheckLog "testlog.3", Failed$, False
+EndSubTest " CTHON SubTest 3"+" "+DateTime$
+
+End Sub
+
+'******************************************************************************
+'SUB CTHONTest04
+'******************************************************************************
+Sub CTHONTest04() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 4"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.4"
+CreateDir$ = ""
+
+files$ = "1"
+count$ = "10"
+
+If EXISTS ("testdir.4","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 4 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test4 testdir.4 testlog.4 "+CreateDir$+" "+files$+" "+count$
+SHELL Execute$
+
+CheckLog "testlog.4", Failed$, False
+EndSubTest " CTHON SubTest 4"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest06
+'******************************************************************************
+Sub CTHONTest06() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 6"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.6"
+CreateDir$ = ""
+
+F = 512
+files$ = "1"
+count$ = "1"
+
+If EXISTS ("testdir.6","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 6 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test6 testdir.6 testlog.6 "+CreateDir$+" "+files$+" "+count$
+SHELL Execute$
+
+CheckLog "testlog.6", Failed$, False
+EndSubTest " CTHON SubTest 6"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest09
+'******************************************************************************
+Sub CTHONTest09() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 9"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.9"
+CreateDir$ = ""
+
+count$ = "1"
+
+If EXISTS ("testdir.9","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 9 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test9 testdir.9 testlog.9 "+CreateDir$+" "+count$
+SHELL Execute$
+
+CheckLog "testlog.9", Failed$, False
+EndSubTest " CTHON SubTest 9"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest05
+'******************************************************************************
+Sub CTHONTest05() Static
+
+' initialize - open logs and start CTHON (this is the longest test)
+
+StartSubTest " CTHON SubTest 5"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.5"
+CreateDir$ = ""
+fname$ = ""
+
+FOR N = 1 TO 2 STEP 1
+fname$ = fname$+"x"
+
+FOR C = 1 TO 2 STEP 1
+count$ = STR$(C)
+
+size$ = "512"
+
+If EXISTS ("testdir.5","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 5 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test5 testdir.5 testlog.5 "+CreateDir$+" "+size$+" "+count$+" "+fname$
+SHELL Execute$
+
+NEXT C
+NEXT N
+
+CheckLog "testlog.5", Failed$, False
+EndSubTest " CTHON SubTest 5"+" "+DateTime$
+
+End Sub
+
+
+'******************************************************************************
+'SUB CTHONTest07
+'******************************************************************************
+Sub CTHONTest07() Static
+
+' initialize - open logs and start CTHON
+
+StartSubTest " CTHON SubTest 7"+" "+DateTime$
+
+CHDRIVE NetDrive(1)
+SHELL "deltree /y *.7"
+CreateDir$ = ""
+sfname$ = ""
+
+FOR S = 1 TO 2
+sfname$ = sfname$ + "a"
+efname$ = ""
+
+FOR E = 1 TO 2
+efname$ = efname$ + "z"
+
+If EXISTS ("testdir.7","+d") Then CreateDir$ = "-n"
+
+STATUSBOX "CTHON04 SubTest 7 In Progess", 0,0,0,0, TRUE, TRUE
+Execute$ = ProgramPath$+"cthon.bat "+ProgramPath$+" test7 testdir.7 testlog.7 "+CreateDir$+" 1 1 "+sfname$+" "+efname$
+SHELL Execute$
+
+NEXT E
+NEXT S
+
+CheckLog "testlog.7", Failed$, False
+EndSubTest " CTHON SubTest 7"+" "+DateTime$
+
+End Sub
+
diff --git a/basic/scripts/runcthon.prl b/basic/scripts/runcthon.prl
new file mode 100644
index 0000000..80975a8
--- /dev/null
+++ b/basic/scripts/runcthon.prl
@@ -0,0 +1,66 @@
+# @(#)runcthon.prl 1.1 98/10/26 Connectathon Testsuite
+
+print "Run CONNECTATHON Tests\n";
+
+$count = $ARGV[0];
+
+&initpwd;
+
+chdir($ENV{'PWD'});
+
+$path = ($ENV{'PWD'});
+print $path;
+print "\n";
+
+for ($i = 1; $i <= $count; $i++) {
+
+$winpath = ($path . "\\win32\\basic");
+print "\n$i $winpath\n";
+chdir $winpath;
+system "perl runbasic.prl";
+chdir($ENV{'PWD'});
+
+$dospath = ($path . "\\dos\\basic");
+print "\n$i $dospath\n";
+chdir $dospath;
+system "perl runbasic.prl";
+chdir($ENV{'PWD'});
+
+$pospath = ($path . "\\posix\\basic");
+print "\n$i $pospath\n";
+chdir $pospath;
+#system "perl runbasic.prl";
+chdir($ENV{'PWD'});
+
+$dospath = ($path . "\\dos\\special");
+print "\n$i $dospath\n";
+chdir $dospath;
+system "runtests.bat";
+chdir($ENV{'PWD'});
+
+}
+
+exit 0;
+
+
+
+sub initpwd {
+ if ($ENV{'PWD'}) {
+ local($dd,$di) = stat('.');
+ local($pd,$pi) = stat($ENV{'PWD'});
+ if ($di != $pi || $dd != $pd) {
+ chop($ENV{'PWD'} = `cd`);
+ }
+ }
+ else {
+ chop($ENV{'PWD'} = `cd`);
+ }
+ if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|) {
+ local($pd,$pi) = stat($2);
+ local($dd,$di) = stat($1);
+ if ($di == $pi && $dd == $pd) {
+ $ENV{'PWD'}="$2$3";
+ }
+ }
+# print "$ENV{'PWD'}\n";
+}
diff --git a/basic/subr.c b/basic/subr.c
new file mode 100644
index 0000000..cf220b7
--- /dev/null
+++ b/basic/subr.c
@@ -0,0 +1,830 @@
+/*
+ * @(#)subr.c 1.6 03/12/29 Connectathon Testsuite
+ * 1.6 Lachman ONC Test Suite source
+ *
+ * Useful subroutines shared by all tests
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifdef DOSorWIN32
+#include <io.h>
+#include <direct.h>
+#else
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/timeb.h>
+
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef STDARG
+#include <stdarg.h>
+#endif
+
+#include "../tests.h"
+
+char *Myname;
+int Dflag = 0;
+
+static void chdrive ARGS_((char *path));
+
+/*
+ * Build a directory tree "lev" levels deep
+ * with "files" number of files in each directory
+ * and "dirs" fan out. Starts at the current directory.
+ * "fname" and "dname" are the base of the names used for
+ * files and directories.
+ */
+void
+dirtree(lev, files, dirs, fname, dname, totfiles, totdirs)
+ int lev;
+ int files;
+ int dirs;
+ char *fname;
+ char *dname;
+ int *totfiles;
+ int *totdirs;
+{
+ int fd;
+ int f, d;
+ char name[MAXPATHLEN];
+
+ if (lev-- == 0) {
+ return;
+ }
+ for ( f = 0; f < files; f++) {
+ if (Dflag == 0)
+ sprintf(name, "%s%d", fname, f);
+ else
+ sprintf(name, "%s%d.%d", fname, lev, f);
+ if ((fd = creat(name, CHMOD_RW)) < 0) {
+ error("creat %s failed", name);
+ exit(1);
+ }
+ (*totfiles)++;
+ if (close(fd) < 0) {
+ error("close %d failed", fd);
+ exit(1);
+ }
+ }
+ for ( d = 0; d < dirs; d++) {
+ if (Dflag == 0)
+ sprintf(name, "%s%d", dname, d);
+ else
+ sprintf(name, "%s%d.%d", dname, lev, d);
+ if (unix_mkdir(name, 0777) < 0) {
+ error("mkdir %s failed", name);
+ exit(1);
+ }
+ (*totdirs)++;
+ if (unix_chdir(name) < 0) {
+ error("chdir %s failed", name);
+ exit(1);
+ }
+ dirtree(lev, files, dirs, fname, dname, totfiles, totdirs);
+ if (unix_chdir("..") < 0) {
+ error("chdir .. failed");
+ exit(1);
+ }
+ }
+}
+
+/*
+ * Remove a directory tree starting at the current directory.
+ * "fname" and "dname" are the base of the names used for
+ * files and directories to be removed - don't remove anything else!
+ * "files" and "dirs" are used with fname and dname to generate
+ * the file names to remove.
+ *
+ * This routine will fail if, say after removing known files,
+ * the directory is not empty.
+ *
+ * This is used to test the unlink function and to clean up after tests.
+ */
+void
+rmdirtree(lev, files, dirs, fname, dname, totfiles, totdirs, ignore)
+ int lev;
+ int files;
+ int dirs;
+ char *fname;
+ char *dname;
+ int *totfiles; /* total removed */
+ int *totdirs; /* total removed */
+ int ignore;
+{
+ int f, d;
+ char name[MAXPATHLEN];
+
+ if (lev-- == 0) {
+ return;
+ }
+ for ( f = 0; f < files; f++) {
+ if (Dflag == 0)
+ sprintf(name, "%s%d", fname, f);
+ else
+ sprintf(name, "%s%d.%d", fname, lev, f);
+ if (unlink(name) < 0 && !ignore) {
+ error("unlink %s failed", name);
+ exit(1);
+ }
+ (*totfiles)++;
+ }
+ for ( d = 0; d < dirs; d++) {
+ if (Dflag == 0)
+ sprintf(name, "%s%d", dname, d);
+ else
+ sprintf(name, "%s%d.%d", dname, lev, d);
+ if (unix_chdir(name) < 0) {
+ if (ignore)
+ continue;
+ error("chdir %s failed", name);
+ exit(1);
+ }
+ rmdirtree(lev, files, dirs, fname, dname, totfiles, totdirs, ignore);
+ if (unix_chdir("..") < 0) {
+ error("chdir .. failed");
+ exit(1);
+ }
+ if (rmdir(name) < 0) {
+ error("rmdir %s failed", name);
+ exit(1);
+ }
+ (*totdirs)++;
+ }
+}
+
+#ifdef STDARG
+void
+error(char *str, ...)
+{
+ int oerrno;
+ char *ret;
+ char path[MAXPATHLEN];
+ va_list ap;
+
+ oerrno = errno;
+
+ va_start(ap, str);
+ if ((ret = getcwd(path, sizeof(path))) == NULL)
+ fprintf(stderr, "%s: getcwd failed\n", Myname);
+ else
+ fprintf(stderr, "\t%s: (%s) ", Myname, path);
+ vfprintf(stderr, str, ap);
+ va_end(ap);
+
+ if (oerrno) {
+ errno = oerrno;
+ perror(" ");
+ } else {
+ fprintf(stderr, "\n");
+ }
+ fflush(stderr);
+ if (ret == NULL)
+ exit(1);
+}
+#else
+/* VARARGS */
+error(str, ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9)
+ char *str;
+{
+ int oerrno;
+ char *ret;
+ char path[MAXPATHLEN];
+
+ oerrno = errno;
+ if ((ret = getcwd(path, sizeof(path))) == NULL)
+ fprintf(stderr, "%s: getcwd failed\n", Myname);
+ else
+ fprintf(stderr, "\t%s: (%s) ", Myname, path);
+
+ fprintf(stderr, str, ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9);
+ if (oerrno) {
+ errno = oerrno;
+ perror(" ");
+ } else {
+ fprintf(stderr, "\n");
+ }
+ fflush(stderr);
+ if (ret == NULL)
+ exit(1);
+}
+#endif /* STDARG */
+
+static struct timeval ts, te;
+
+/*
+ * save current time in struct ts
+ */
+void
+starttime()
+{
+
+ gettimeofday(&ts, (struct timezone *)0);
+}
+
+/*
+ * sets the struct tv to the difference in time between
+ * current time and the time in struct ts.
+ */
+void
+endtime(tv)
+ struct timeval *tv;
+{
+
+ gettimeofday(&te, (struct timezone *)0);
+ if (te.tv_usec < ts.tv_usec) {
+ te.tv_sec--;
+ te.tv_usec += 1000000;
+ }
+ tv->tv_usec = te.tv_usec - ts.tv_usec;
+ tv->tv_sec = te.tv_sec - ts.tv_sec;
+#ifdef DOS
+ /*
+ * DOS uses time since midnight, so it could go negative if the
+ * test spans midnight. If that happens, add a day.
+ */
+ if (tv->tv_sec < 0)
+ tv->tv_sec += 24 * 3600;
+#endif
+}
+
+/*
+ * Set up and move to a test directory
+ */
+void
+testdir(dir)
+ char *dir;
+{
+ struct stat statb;
+ char str[MAXPATHLEN];
+
+ /*
+ * If dir is non-NULL, use that dir. If NULL, first
+ * check for env variable NFSTESTDIR. If that is not
+ * set, use the compiled-in TESTDIR.
+ */
+ if (dir == NULL)
+ if ((dir = getenv("NFSTESTDIR")) == NULL)
+ dir = TESTDIR;
+
+ if (stat(dir, &statb) == 0) {
+ sprintf(str, "rm -r %s", dir);
+#ifdef WIN16
+ if (rmdir(dir) < 0) {
+#else
+ if (system(str) != 0) {
+#endif
+ error("can't remove old test directory %s", dir);
+ exit(1);
+ }
+ }
+
+ if (unix_mkdir(dir, 0777) < 0) {
+ error("can't create test directory %s", dir);
+ exit(1);
+ }
+ if (unix_chdir(dir) < 0) {
+ error("can't chdir to test directory %s", dir);
+ exit(1);
+ }
+}
+
+/*
+ * Move to a test directory
+ */
+int
+mtestdir(dir)
+ char *dir;
+{
+ /*
+ * If dir is non-NULL, use that dir. If NULL, first
+ * check for env variable NFSTESTDIR. If that is not
+ * set, use the compiled-in TESTDIR.
+ */
+ if (dir == NULL)
+ if ((dir = getenv("NFSTESTDIR")) == NULL)
+ dir = TESTDIR;
+
+ if (unix_chdir(dir) < 0) {
+ error("can't chdir to test directory %s", dir);
+ return(-1);
+ }
+ return(0);
+}
+
+/*
+ * get parameter at parm, convert to int, and make sure that
+ * it is at least min.
+ */
+long
+getparm(parm, min, label)
+ char *parm;
+ long min;
+ char *label;
+{
+ long val;
+
+ val = atol(parm);
+ if (val < min) {
+ error("Illegal %s parameter %ld, must be at least %ld",
+ label, val, min);
+ exit(1);
+ }
+ return(val);
+}
+
+/*
+ * exit point for successful test
+ */
+void
+complete()
+{
+
+ fprintf(stdout, "\t%s ok.\n", Myname);
+ chdrive(Myname);
+ exit(0);
+}
+
+/*
+ * Change to drive specified in path
+ */
+int
+unix_chdir(path)
+char *path;
+{
+ chdrive(path);
+ return chdir(path);
+}
+
+#ifndef DOSorWIN32
+
+static void
+chdrive(path)
+ char *path;
+{
+}
+
+int
+unix_mkdir(path, mode)
+ char *path;
+ mode_t mode;
+{
+ return mkdir(path, mode);
+}
+
+#endif /* DOSorWIN32 */
+
+
+#ifdef NEED_STRERROR
+/*
+ * Hack replacement for strerror(). This could be made to include useful
+ * error strings, but it will do for the time being.
+ */
+char *
+strerror(errval)
+ int errval; /* errno value */
+{
+ static char buf[1024];
+
+ sprintf(buf, "error %d", errval);
+ return (buf);
+}
+#endif /* NEED_STRERROR */
+
+/***********************************************************/
+/* The following routines were ADDED specifically for */
+/* DOS AND WIN32. */
+/***********************************************************/
+
+#ifdef DOSorWIN32
+
+/*
+ * Return file statistics for the path specified
+ */
+
+int
+lstat(char * path, struct stat * buf)
+{
+ return stat(path, buf);
+}
+
+int
+unix_mkdir(const char * path, int mode)
+{
+ mode = mode; /* keep lint, compiler happy */
+ return mkdir(path);
+}
+
+#endif /* DOSorWIN32 */
+
+/************************************************************/
+/* The following routines were ADDED specifically for WIN32.*/
+/************************************************************/
+
+#ifdef WIN32
+
+/*
+ * Change to drive specified in path
+ */
+static void
+chdrive(char * path)
+{
+ int desireddrive;
+
+ if (path[1] == ':') {
+ desireddrive = toupper(path[0]) - ('A' - 1);
+ if (_chdrive(desireddrive)) {
+ error("can't change to drive %c:", path[0]);
+ exit(1);
+ }
+ }
+}
+
+void
+gettimeofday(struct timeval *TV, struct timezone *TimeZone)
+{
+ struct _timeb dostime;
+
+ _ftime(&dostime);
+ TV->tv_sec = dostime.time;
+ TV->tv_usec = dostime.millitm * 1000L;
+ TimeZone = TimeZone; /* shut up compiler/lint */
+}
+
+int
+statfs(char * path, struct statfs * buf)
+{
+ char *p = (char *) buf;
+ int i;
+ unsigned drive;
+
+ unsigned sect_per_clust;
+ unsigned bytes_per_sect;
+ unsigned free_clust;
+ unsigned clust;
+ char rootpath[MAXPATHLEN];
+
+ for (i = 0; i < sizeof(*buf); i++)
+ *p++ = (char) -1;
+ buf->f_type = 0; /* that's what the man page says */
+ if (path[1] == ':')
+ drive = toupper(path[0]) - ('A' - 1);
+ else
+ drive = _getdrive();
+
+ // GetDiskFreeSpace must have the #$%^&* root!
+ // be simple-minded: must be "d:\<whatever>"
+ strcpy(rootpath, path);
+ p = strtok(rootpath, "\\");
+ *p++ = '\\';
+ *p = '\0';
+ if (! GetDiskFreeSpace(rootpath, &sect_per_clust, &bytes_per_sect,
+ &free_clust, &clust)) {
+ printf("GetDiskFreeSpace failed\n");
+ return -1;
+ }
+ buf->f_bsize = bytes_per_sect;
+ buf->f_blocks = clust * sect_per_clust;
+ buf->f_bfree = free_clust * sect_per_clust;
+ buf->f_bavail = buf->f_bfree;
+
+ return 0;
+}
+
+/***************************************************************
+DIRENT emulation for Win32
+***************************************************************/
+char pattern[MAXNAMLEN];
+struct _finddata_t findtst;
+long findhandle;
+int maxentry;
+int currententry;
+int diropen = 0;
+struct dirent *dirlist;
+DIR dirst;
+
+static void copynametolower(char *dest, char *src);
+static void findt_to_dirent(struct dirent *d);
+static int win32_findfirst(char *pattern);
+static int win32_findnext(void);
+
+int
+win32_findfirst(char *pattern)
+{
+ findhandle = _findfirst(pattern, &findtst);
+ return findhandle == -1;
+}
+
+int
+win32_findnext(void)
+{
+ return _findnext(findhandle, &findtst);
+}
+
+int
+win32_findclose(void)
+{
+ return _findclose(findhandle);
+}
+
+DIR *
+opendir(char * dirname)
+{
+ int i;
+
+ strcpy(pattern, dirname);
+ strcat(pattern, "\\*.*");
+ if (diropen)
+ return NULL;
+ diropen = 1;
+ dirlist = (struct dirent *) malloc(512 * sizeof(struct dirent));
+ if (dirlist == NULL)
+ return NULL;
+
+ if (win32_findfirst(pattern))
+ return NULL;
+ findt_to_dirent(&dirlist[0]);
+ for (i = 1; ! win32_findnext(); i++) {
+ findt_to_dirent(&dirlist[i]);
+ }
+ win32_findclose();
+
+ maxentry = i - 1;
+ currententry = 0;
+ return &dirst;
+}
+
+void
+rewinddir(DIR * dirp)
+{
+ int i;
+ unsigned int attributes = _A_NORMAL|_A_RDONLY|_A_HIDDEN|_A_SUBDIR;
+
+ dirp = dirp; /* shut up compiler */
+
+ if (win32_findfirst(pattern)) {
+ error("rewind failed");
+ exit(1);
+ }
+ findt_to_dirent(&dirlist[0]);
+ for (i = 1; ! win32_findnext(); i++) {
+ findt_to_dirent(&dirlist[i]);
+ }
+ win32_findclose();
+
+ maxentry = i - 1;
+ currententry = 0;
+}
+
+long
+telldir(DIR * dirp)
+{
+ dirp = dirp; /* keep compiler happy */
+ return (long) currententry;
+}
+
+void
+seekdir(DIR * dirp, long loc)
+{
+ dirp = dirp; /* keep compiler happy */
+ if (loc <= (long) maxentry)
+ currententry = (int) loc;
+ /* else seekdir silently fails */
+}
+
+struct dirent *
+readdir(DIR * dirp)
+{
+ dirp = dirp; /* shut up compiler */
+ if (currententry > maxentry)
+ return (struct dirent *) NULL;
+ else {
+ return &dirlist[currententry++];
+ }
+}
+
+void
+findt_to_dirent(struct dirent * d)
+{
+ copynametolower(d->d_name, findtst.name);
+}
+
+static void
+copynametolower(char * dest, char * src)
+{
+ int i;
+ for (i = 0; dest[i] = (char) tolower((int) src[i]); i++) {
+ /* null body */
+ }
+}
+
+void
+closedir(DIR * dirp)
+{
+ dirp = dirp; /* keep compiler happy */
+ diropen = 0;
+}
+
+
+#endif /* WIN32 */
+
+/***********************************************************/
+/* The following routines were ADDED specifically for DOS */
+/***********************************************************/
+
+#if defined DOS
+
+/*
+ * Change to drive specified in path
+ */
+
+static void
+chdrive(path)
+ char *path;
+{
+ int desireddrive, drive;
+ if (path[1] == ':') {
+ desireddrive = toupper(path[0]) - ('A' - 1);
+ _dos_setdrive(desireddrive, &drive);
+ _dos_getdrive(&drive);
+ if (drive != desireddrive) {
+ error("can't change to drive %c:", path[0]);
+ exit(1);
+ }
+ }
+}
+
+
+void
+gettimeofday(struct timeval *TV, struct timezone *TimeZone)
+{
+ struct dostime_t dostime;
+
+ _dos_gettime(&dostime);
+ TV->tv_sec = dostime.hour * 3600L
+ + dostime.minute * 60L
+ + dostime.second;
+ TV->tv_usec = dostime.hsecond * 10000L;
+ TimeZone = TimeZone; /* shut up compiler/lint */
+}
+
+int
+statfs(path, buf)
+ char *path;
+ struct statfs *buf;
+{
+ char *p = (char *) buf;
+ int i;
+ unsigned drive;
+ struct diskfree_t diskspace;
+
+ for (i = 0; i < sizeof(*buf); i++)
+ *p++ = (char) -1;
+ buf->f_type = 0; /* that's what the man page says */
+ if (path[1] == ':')
+ drive = toupper(path[0]) - ('A' - 1);
+ else
+ _dos_getdrive(&drive);
+ if (_dos_getdiskfree(drive, &diskspace))
+ return -1;
+ buf->f_bsize = diskspace.bytes_per_sector;
+ buf->f_blocks = (long) diskspace.total_clusters
+ * diskspace.sectors_per_cluster;
+ buf->f_bfree = (long) diskspace.avail_clusters
+ * diskspace.sectors_per_cluster;
+ buf->f_bavail = buf->f_bfree;
+ return 0;
+}
+
+/***************************************************************
+DIRENT emulation for DOS
+***************************************************************/
+char pattern[MAXNAMLEN];
+struct find_t findtst;
+int maxentry;
+int currententry;
+int diropen = 0;
+struct dirent *dirlist;
+DIR dirst;
+
+static void copynametolower(char *dest, char *src);
+static void findt_to_dirent(struct find_t *f, struct dirent *d);
+
+DIR *
+opendir(dirname)
+ char *dirname;
+{
+ int i;
+ unsigned int attributes = _A_NORMAL|_A_RDONLY|_A_HIDDEN|_A_SUBDIR;
+
+ strcpy(pattern, dirname);
+ strcat(pattern, "\\*.*");
+ if (diropen)
+ return NULL;
+ diropen = 1;
+ dirlist = (struct dirent *) malloc(512 * sizeof(struct dirent));
+ if (dirlist == NULL)
+ return NULL;
+ if (_dos_findfirst(pattern, attributes, &findtst))
+ return NULL;
+ findt_to_dirent(&findtst, &dirlist[0]);
+ for (i = 1; ! _dos_findnext(&findtst); i++) {
+ findt_to_dirent(&findtst, &dirlist[i]);
+ }
+ maxentry = i - 1;
+ currententry = 0;
+ return &dirst;
+}
+
+void
+rewinddir(dirp)
+ DIR *dirp;
+{
+ int i;
+ unsigned int attributes = _A_NORMAL|_A_RDONLY|_A_HIDDEN|_A_SUBDIR;
+
+ dirp = dirp; /* shut up compiler */
+ if (_dos_findfirst(pattern, attributes, &findtst)) {
+ error("rewind failed");
+ exit(1);
+ }
+ findt_to_dirent(&findtst, &dirlist[0]);
+ for (i = 1; ! _dos_findnext(&findtst); i++) {
+ findt_to_dirent(&findtst, &dirlist[i]);
+ }
+ maxentry = i - 1;
+ currententry = 0;
+}
+
+long
+telldir(dirp)
+ DIR *dirp;
+{
+ dirp = dirp; /* keep compiler happy */
+ return (long) currententry;
+}
+
+void
+seekdir(dirp, loc)
+ DIR *dirp;
+ long loc;
+{
+ dirp = dirp; /* keep compiler happy */
+ if (loc <= (long) maxentry)
+ currententry = (int) loc;
+ /* else seekdir silently fails */
+}
+
+struct dirent *
+readdir(dirp)
+ DIR *dirp;
+{
+ dirp = dirp; /* shut up compiler */
+ if (currententry > maxentry)
+ return (struct dirent *) NULL;
+ else {
+ return &dirlist[currententry++];
+ }
+}
+
+void
+findt_to_dirent(f, d)
+ struct find_t *f;
+ struct dirent *d;
+{
+ copynametolower(d->d_name, f->name);
+}
+
+static void
+copynametolower(dest, src)
+ char *dest;
+ char *src;
+{
+ int i;
+ for (i = 0; dest[i] = (char) tolower((int) src[i]); i++) {
+ /* null body */
+ }
+}
+
+void
+closedir(dirp)
+ DIR *dirp;
+{
+ dirp = dirp; /* keep compiler happy */
+ diropen = 0;
+}
+
+#endif /* DOS */
diff --git a/basic/tags b/basic/tags
new file mode 100644
index 0000000..dacdda4
--- /dev/null
+++ b/basic/tags
@@ -0,0 +1,170 @@
+!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
+!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
+!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
+!_TAG_PROGRAM_NAME Exuberant Ctags //
+!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
+!_TAG_PROGRAM_VERSION 5.6 //
+BIT test6.c 53;" d file:
+BITMOD test6.c 50;" d file:
+BUFSZ test5.c 56;" d file:
+BUFSZ test5a.c 55;" d file:
+BUFSZ test5b.c 46;" d file:
+CLRBIT test6.c 55;" d file:
+DOSorWIN32 subr.c 10;" d file:
+DOSorWIN32 test1.c 17;" d file:
+DOSorWIN32 test2.c 17;" d file:
+DOSorWIN32 test3.c 16;" d file:
+DOSorWIN32 test4.c 21;" d file:
+DOSorWIN32 test4a.c 20;" d file:
+DOSorWIN32 test5.c 22;" d file:
+DOSorWIN32 test5a.c 21;" d file:
+DOSorWIN32 test5b.c 18;" d file:
+DOSorWIN32 test6.c 18;" d file:
+DOSorWIN32 test7.c 19;" d file:
+DOSorWIN32 test7a.c 19;" d file:
+DOSorWIN32 test7b.c 19;" d file:
+DOSorWIN32 test8.c 20;" d file:
+DOSorWIN32 test9.c 24;" d file:
+DSIZE test5.c 57;" d file:
+DSIZE test5a.c 56;" d file:
+DSIZE test5b.c 47;" d file:
+Dflag subr.c /^int Dflag = 0;$/;" v
+Fflag test1.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test2.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test3.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test4.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test4a.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test5.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test5a.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test5b.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test6.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test7.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test7a.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test7b.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test8.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Fflag test9.c /^static int Fflag = 0; \/* test function only; set count to 1, negate -t *\/$/;" v file:
+Iflag test6.c /^static int Iflag = 0; \/* Ignore non-test files dir entries *\/$/;" v file:
+MAXFILES test6.c 49;" d file:
+MIN test5.c 53;" d file:
+MIN test5a.c 52;" d file:
+MIN test5b.c 43;" d file:
+Myname subr.c /^char *Myname;$/;" v
+NNAME test7.c 44;" d file:
+NNAME test7a.c 42;" d file:
+NNAME test7b.c 44;" d file:
+Nflag test1.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test2.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test3.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test4.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test4a.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test5.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test5a.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test5b.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test6.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test7.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test7a.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test7b.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test8.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+Nflag test9.c /^static int Nflag = 0; \/* Suppress directory operations *\/$/;" v file:
+O_SYNC test5.c 24;" d file:
+O_SYNC test5a.c 23;" d file:
+SETBIT test6.c 54;" d file:
+SNAME test8.c 46;" d file:
+Sflag test1.c /^static int Sflag = 0; \/* don't print non-error messages *\/$/;" v file:
+Sflag test5.c /^static int Sflag = 0; \/* use synchronous writes *\/$/;" v file:
+Sflag test5a.c /^static int Sflag = 0; \/* use synchronous writes *\/$/;" v file:
+Tflag test1.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test2.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test3.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test4.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test4a.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test5.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test5a.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test5b.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test6.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test7.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test7a.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test7b.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test8.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+Tflag test9.c /^static int Tflag = 0; \/* print timing *\/$/;" v file:
+USE_OPEN test5.c 49;" d file:
+USE_OPEN test5a.c 48;" d file:
+bitmap test6.c /^static unsigned char bitmap[MAXFILES \/ BITMOD];$/;" v file:
+chdrive subr.c /^chdrive(char * path)$/;" f file:
+chdrive subr.c /^chdrive(path)$/;" f file:
+closedir subr.c /^closedir(DIR * dirp)$/;" f
+closedir subr.c /^closedir(dirp)$/;" f
+complete subr.c /^complete()$/;" f
+copynametolower subr.c /^copynametolower(char * dest, char * src)$/;" f file:
+copynametolower subr.c /^copynametolower(dest, src)$/;" f file:
+currententry subr.c /^int currententry;$/;" v
+dirlist subr.c /^struct dirent *dirlist;$/;" v typeref:struct:dirent
+diropen subr.c /^int diropen = 0;$/;" v
+dirst subr.c /^DIR dirst;$/;" v
+dirtree subr.c /^dirtree(lev, files, dirs, fname, dname, totfiles, totdirs)$/;" f
+endtime subr.c /^endtime(tv)$/;" f
+error subr.c /^error(char *str, ...)$/;" f
+error subr.c /^error(str, ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9)$/;" f
+findhandle subr.c /^long findhandle;$/;" v
+findt_to_dirent subr.c /^findt_to_dirent(f, d)$/;" f
+findt_to_dirent subr.c /^findt_to_dirent(struct dirent * d)$/;" f
+findtst subr.c /^struct _finddata_t findtst;$/;" v typeref:struct:_finddata_t
+findtst subr.c /^struct find_t findtst;$/;" v typeref:struct:find_t
+getparm subr.c /^getparm(parm, min, label)$/;" f
+gettimeofday subr.c /^gettimeofday(struct timeval *TV, struct timezone *TimeZone)$/;" f
+lstat subr.c /^lstat(char * path, struct stat * buf)$/;" f
+main test1.c /^main(argc, argv)$/;" f
+main test2.c /^main(argc, argv)$/;" f
+main test3.c /^main(argc, argv)$/;" f
+main test4.c /^main(argc, argv)$/;" f
+main test4a.c /^main(argc, argv)$/;" f
+main test5.c /^main(argc, argv)$/;" f
+main test5a.c /^main(argc, argv)$/;" f
+main test5b.c /^main(argc, argv)$/;" f
+main test6.c /^main(argc, argv)$/;" f
+main test7.c /^main(argc, argv)$/;" f
+main test7a.c /^main(argc, argv)$/;" f
+main test7b.c /^main(argc, argv)$/;" f
+main test8.c /^main(argc, argv)$/;" f
+main test9.c /^main(argc, argv)$/;" f
+maxentry subr.c /^int maxentry;$/;" v
+mtestdir subr.c /^mtestdir(dir)$/;" f
+opendir subr.c /^opendir(char * dirname)$/;" f
+opendir subr.c /^opendir(dirname)$/;" f
+pattern subr.c /^char pattern[MAXNAMLEN];$/;" v
+readdir subr.c /^readdir(DIR * dirp)$/;" f
+readdir subr.c /^readdir(dirp)$/;" f
+rewinddir subr.c /^rewinddir(DIR * dirp)$/;" f
+rewinddir subr.c /^rewinddir(dirp)$/;" f
+rmdirtree subr.c /^rmdirtree(lev, files, dirs, fname, dname, totfiles, totdirs, ignore)$/;" f
+seekdir subr.c /^seekdir(DIR * dirp, long loc)$/;" f
+seekdir subr.c /^seekdir(dirp, loc)$/;" f
+starttime subr.c /^starttime()$/;" f
+statfs subr.c /^statfs(char * path, struct statfs * buf)$/;" f
+statfs subr.c /^statfs(path, buf)$/;" f
+strerror subr.c /^strerror(errval)$/;" f
+te subr.c /^static struct timeval ts, te;$/;" v typeref:struct: file:
+telldir subr.c /^telldir(DIR * dirp)$/;" f
+telldir subr.c /^telldir(dirp)$/;" f
+testdir subr.c /^testdir(dir)$/;" f
+ts subr.c /^static struct timeval ts, te;$/;" v typeref:struct:timeval file:
+unix_chdir subr.c /^unix_chdir(path)$/;" f
+unix_mkdir subr.c /^unix_mkdir(const char * path, int mode)$/;" f
+unix_mkdir subr.c /^unix_mkdir(path, mode)$/;" f
+usage test1.c /^usage()$/;" f file:
+usage test2.c /^usage()$/;" f file:
+usage test3.c /^usage()$/;" f file:
+usage test4.c /^usage()$/;" f file:
+usage test4a.c /^usage()$/;" f file:
+usage test5.c /^usage()$/;" f file:
+usage test5a.c /^usage()$/;" f file:
+usage test5b.c /^usage()$/;" f file:
+usage test6.c /^usage()$/;" f file:
+usage test7.c /^usage()$/;" f file:
+usage test7a.c /^usage()$/;" f file:
+usage test7b.c /^usage()$/;" f file:
+usage test8.c /^usage()$/;" f file:
+usage test9.c /^usage()$/;" f file:
+win32_findclose subr.c /^win32_findclose(void)$/;" f
+win32_findfirst subr.c /^win32_findfirst(char *pattern)$/;" f
+win32_findnext subr.c /^win32_findnext(void)$/;" f
diff --git a/basic/test1.c b/basic/test1.c
new file mode 100644
index 0000000..6b15c34
--- /dev/null
+++ b/basic/test1.c
@@ -0,0 +1,176 @@
+/*
+ * @(#)test1.c 1.5 99/08/29 Connectathon Testsuite
+ * 1.4 Lachman ONC Test Suite source
+ *
+ * Test file and directory creation.
+ * Builds a tree on the server.
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (if creating directories, level > 1)
+ * creat()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#endif
+
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/stat.h>
+#include <stdio.h>
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Sflag = 0; /* don't print non-error messages */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [levels files dirs fname dname]\n",
+ Myname);
+ /* -s is a hidden option used by test2 */
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = DFILS; /* number of files in each dir */
+ int totfiles = 0;
+ int dirs = DDIRS; /* directories in each dir */
+ int totdirs = 0;
+ int levels = DLEVS; /* levels deep */
+ char *fname = FNAME;
+ char *dname = DNAME;
+ struct timeval time;
+ char *opts;
+
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 's': /* silent */
+ Sflag++;
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ levels = getparm(*argv, 1, "levels");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ files = getparm(*argv, 0, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ dirs = getparm(*argv, 0, "dirs");
+ if (dirs == 0 && levels != 1) {
+ error("Illegal dirs parameter, must be at least 1");
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argc--;
+ argv++;
+ }
+ if (argc) {
+ dname = *argv;
+ argc--;
+ argv++;
+ }
+ if (argc != 0) {
+ error("too many parameters");
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ levels = 2;
+ files = 2;
+ dirs = 2;
+ }
+
+ if (!Sflag) {
+ fprintf(stdout, "%s: File and directory creation test\n",
+ Myname);
+ }
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ if (Tflag && !Sflag) {
+ starttime();
+ }
+ dirtree(levels, files, dirs, fname, dname, &totfiles, &totdirs);
+ if (Tflag && !Sflag) {
+ endtime(&time);
+ }
+ if (!Sflag) {
+ fprintf(stdout,
+ "\tcreated %d files %d directories %d levels deep",
+ totfiles, totdirs, levels);
+ }
+ if (Tflag && !Sflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ if (!Sflag) {
+ fprintf(stdout, "\n");
+ }
+ complete();
+}
diff --git a/basic/test2.c b/basic/test2.c
new file mode 100644
index 0000000..cdb52eb
--- /dev/null
+++ b/basic/test2.c
@@ -0,0 +1,173 @@
+/*
+ * @(#)test2.c 1.6 99/08/29 Connectathon Testsuite
+ * 1.3 Lachman ONC Test Suite source
+ *
+ * Test file and directory removal.
+ * Builds a tree on the server.
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * rmdir() (if removing directories, level > 1)
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#endif
+
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [levels files dirs fname dname]\n",
+ Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = DFILS; /* number of files in each dir */
+ int totfiles = 0;
+ int dirs = DDIRS; /* directories in each dir */
+ int totdirs = 0;
+ int levels = DLEVS; /* levels deep */
+ char *fname = FNAME;
+ char *dname = DNAME;
+ struct timeval time;
+ char *opts;
+ char str[256];
+
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ levels = getparm(*argv, 1, "levels");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ files = getparm(*argv, 0, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ dirs = getparm(*argv, 0, "dirs");
+ if (dirs == 0 && levels != 1) {
+ error("Illegal dirs parameter, must be at least 1");
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argc--;
+ argv++;
+ }
+ if (argc) {
+ dname = *argv;
+ argc--;
+ argv++;
+ }
+ if (argc != 0) {
+ error("too many parameters");
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ levels = 2;
+ files = 2;
+ dirs = 2;
+ }
+
+ fprintf(stdout, "%s: File and directory removal test\n", Myname);
+
+ if (mtestdir(NULL)) {
+ sprintf(str, "test1 -s %s %d %d %d %s %s",
+ Nflag ? "-n" : "",
+ levels, files, dirs, fname, dname);
+ if (system(str) != 0) {
+ error("can't make directroy tree to remove");
+ exit(1);
+ }
+ if (mtestdir(NULL)) {
+ error("still can't go to test directory");
+ exit(1);
+ }
+ }
+
+ if (Tflag) {
+ starttime();
+ }
+ rmdirtree(levels, files, dirs, fname, dname, &totfiles, &totdirs, 0);
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout,
+ "\tremoved %d files %d directories %d levels deep",
+ totfiles, totdirs, levels);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+ complete();
+}
diff --git a/basic/test3.c b/basic/test3.c
new file mode 100644
index 0000000..c53fff8
--- /dev/null
+++ b/basic/test3.c
@@ -0,0 +1,143 @@
+/*
+ * @(#)test3.c 1.7 00/12/30 Connectathon Testsuite
+ * 1.5 Lachman ONC Test Suite source
+ *
+ * Test lookup up and down across mount points
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * getcwd()
+ * stat()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/types.h>
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [count]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int count = 250; /* times to do test */
+ int ct;
+ struct timeval time;
+ struct stat statb;
+ char *opts;
+ char path[MAXPATHLEN];
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ fprintf(stdout, "%s: lookups across mount point\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ if (getcwd(path, sizeof(path)) == NULL) {
+ fprintf(stderr, "%s: getcwd failed\n", Myname);
+ exit(1);
+ }
+ if (stat(path, &statb) < 0) {
+ error("can't stat %s after getcwd", path);
+ exit(1);
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d getcwd and stat calls", count * 2);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+ complete();
+}
diff --git a/basic/test4.c b/basic/test4.c
new file mode 100644
index 0000000..f72e956
--- /dev/null
+++ b/basic/test4.c
@@ -0,0 +1,187 @@
+/*
+ * @(#)test4.c 1.7 99/12/10 Connectathon Testsuite
+ * 1.4 Lachman ONC Test Suite source
+ *
+ * Test setattr, getattr and lookup
+ *
+ * Creates the files in the test directory - does not create a directory
+ * tree.
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * chmod()
+ * stat()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#endif
+
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [files count]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout,
+ " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = 10; /* number of files in each dir */
+ int fi;
+ int count = 50; /* times to do each file */
+ int ct;
+ int totfiles = 0;
+ int totdirs = 0;
+ char *fname = FNAME;
+ struct timeval time;
+ char str[MAXPATHLEN];
+ struct stat statb;
+ char *opts;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* suppress initial directory */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argc--;
+ argv++;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ dirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs);
+
+ fprintf(stdout, "%s: setattr, getattr, and lookup\n", Myname);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ for (fi = 0; fi < files; fi++) {
+ sprintf(str, "%s%d", fname, fi);
+ if (chmod(str, CHMOD_NONE) < 0) {
+ error("can't chmod %o %s", CHMOD_NONE, str);
+ exit(0);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after CMOD_NONE", str);
+ exit(1);
+ }
+ if ((statb.st_mode & CHMOD_MASK) != CHMOD_NONE) {
+ error("%s has mode %o after chmod 0",
+ str, (statb.st_mode & 0777));
+ exit(1);
+ }
+ if (chmod(str, CHMOD_RW) < 0) {
+ error("can't chmod %o %s", CHMOD_RW, str);
+ exit(0);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after CHMOD_RW", str);
+ exit(1);
+ }
+ if ((statb.st_mode & CHMOD_MASK) != CHMOD_RW) {
+ error("%s has mode %o after chmod 0666",
+ str, (statb.st_mode & 0777));
+ exit(1);
+ }
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d chmods and stats on %d files",
+ files * count * 2, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+ /* XXX REMOVE DIRECTORY TREE? */
+ complete();
+}
diff --git a/basic/test4a.c b/basic/test4a.c
new file mode 100644
index 0000000..336ed74
--- /dev/null
+++ b/basic/test4a.c
@@ -0,0 +1,165 @@
+/*
+ * @(#)test4a.c 1.7 99/12/10 Connectathon Testsuite
+ * 1.3 Lachman ONC Test Suite source
+ *
+ * Test getattr and lookup
+ *
+ * Creates the files in the test directory - does not create a directory
+ * tree.
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * stat()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#endif
+
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [files [count [fname]]]\n",
+ Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout,
+ " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = 10; /* number of files in each dir */
+ int fi;
+ int count = 50; /* times to do each file */
+ int ct;
+ int totfiles = 0;
+ int totdirs = 0;
+ char *fname = FNAME;
+ struct timeval time;
+ char str[MAXPATHLEN];
+ struct stat statb;
+ char *opts;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* suppress initial directory */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argc--;
+ argv++;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ dirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs);
+
+ fprintf(stdout, "%s: getattr and lookup\n", Myname);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ for (fi = 0; fi < files; fi++) {
+ sprintf(str, "%s%d", fname, fi);
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s", str);
+ exit(1);
+ }
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d stats on %d files",
+ files * count * 2, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+ /* XXX REMOVE DIRECTORY TREE? */
+ complete();
+}
diff --git a/basic/test5.c b/basic/test5.c
new file mode 100644
index 0000000..f9463ae
--- /dev/null
+++ b/basic/test5.c
@@ -0,0 +1,358 @@
+/*
+ * @(#)test5.c 1.8 2003/12/01 Connectathon Testsuite
+ * 1.5 Lachman ONC Test Suite source
+ *
+ * Test read and write
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * open()
+ * read()
+ * write()
+ * stat()
+ * fstat()
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+/* Synchronous Write is Not supported in the Windows version yet.*/
+#undef O_SYNC
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#ifdef MMAP
+#include <sys/mman.h>
+#endif
+
+#include "../tests.h"
+
+#if defined(O_SYNC) || defined(DOSorWIN32)
+#define USE_OPEN
+#endif
+
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#define BUFSZ 8192
+#define DSIZE 1048576
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+#ifdef O_SYNC
+static int Sflag = 0; /* use synchronous writes */
+#endif
+
+static void
+usage()
+{
+#ifdef O_SYNC
+ fprintf(stdout, "usage: %s [-htfns] [size count fname]\n", Myname);
+#else
+ fprintf(stdout, "usage: %s [-htfn] [size count fname]\n", Myname);
+#endif
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+#ifdef O_SYNC
+ fprintf(stdout, " s Use synchronous writes\n");
+#endif
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int count = DCOUNT; /* times to do each file */
+ int ct;
+ off_t size = DSIZE;
+ off_t si;
+ int i;
+ int fd;
+ off_t bytes = 0;
+ int roflags; /* open read-only flags */
+ int woflags; /* write-only create flags */
+ char *bigfile = "bigfile";
+ struct timeval time;
+ struct stat statb;
+ char *opts;
+ char buf[BUFSZ];
+ double etime;
+#ifdef MMAP
+ caddr_t maddr;
+#endif
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+#ifdef O_SYNC
+ case 's': /* synchronous writes */
+ Sflag++;
+ break;
+#endif
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ size = getparm(*argv, 1, "size");
+ if (size <= 0) {
+ usage();
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ if (count <= 0) {
+ usage();
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ bigfile = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ woflags = O_WRONLY|O_CREAT|O_TRUNC;
+ roflags = O_RDONLY;
+#ifdef O_SYNC
+ if (Sflag) {
+ woflags |= O_SYNC;
+ }
+#endif
+#ifdef DOSorWIN32
+ woflags |= O_BINARY | O_RDWR; /* create and open file */
+ roflags |= O_BINARY;
+#endif
+
+ fprintf(stdout, "%s: read and write\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ for (i = 0; i < BUFSZ / sizeof (int); i++) {
+ ((int *)buf)[i] = i;
+ }
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+#ifdef USE_OPEN
+ if ((fd = open(bigfile, woflags, CHMOD_RW)) < 0) {
+#else
+ if ((fd = creat(bigfile, CHMOD_RW)) < 0) {
+#endif
+ error("can't create '%s'", bigfile);
+ exit(1);
+ }
+ if (stat(bigfile, &statb) < 0) {
+ error("can't stat '%s'", bigfile);
+ exit(1);
+ }
+ if (statb.st_size != 0) {
+ error("'%s' has size %ld, should be 0",
+ bigfile, (long)statb.st_size);
+ exit(1);
+ }
+ for (si = size; si > 0; si -= bytes) {
+ bytes = MIN(BUFSZ, si);
+ if (write(fd, buf, bytes) != bytes) {
+ error("'%s' write failed", bigfile);
+ exit(1);
+ }
+ }
+ if (close(fd) < 0) {
+ error("can't close %s", bigfile);
+ exit(1);
+ }
+ if (stat(bigfile, &statb) < 0) {
+ error("can't stat '%s'", bigfile);
+ exit(1);
+ }
+ if (statb.st_size != size) {
+ error("'%s' has size %ld, should be %ld",
+ bigfile, (long)(statb.st_size), (long)size);
+ exit(1);
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+
+ if ((fd = open(bigfile, roflags)) < 0) {
+ error("can't open '%s'", bigfile);
+ exit(1);
+ }
+#ifdef MMAP
+ maddr = mmap((caddr_t)0, (size_t)size, PROT_READ,
+ MAP_PRIVATE, fd, (off_t)0);
+ if (maddr == MAP_FAILED) {
+ error("can't mmap '%s'", bigfile);
+ exit(1);
+ }
+ if (msync(maddr, (size_t)size, MS_INVALIDATE) < 0) {
+ error("can't invalidate pages for '%s'", bigfile);
+ exit(1);
+ }
+ if (munmap(maddr, (size_t)size) < 0) {
+ error("can't munmap '%s'", bigfile);
+ exit(1);
+ }
+#endif
+ for (si = size; si > 0; si -= bytes) {
+ bytes = MIN(BUFSZ, si);
+ if (read(fd, buf, bytes) != bytes) {
+ error("'%s' read failed", bigfile);
+ exit(1);
+ }
+ for (i = 0; i < bytes / sizeof (int); i++) {
+ if (((int *)buf)[i] != i) {
+ error("bad data in '%s'", bigfile);
+ exit(1);
+ }
+ }
+ }
+ close(fd);
+
+ fprintf(stdout, "\twrote %ld byte file %d times", (long)size, count);
+
+ if (Tflag) {
+ etime = (double)time.tv_sec + (double)time.tv_usec / 1000000.0;
+ if (etime != 0.0) {
+ fprintf(stdout, " in %ld.%-2ld seconds (%d bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (int)((double)size * ((double)count / etime)));
+ } else {
+ fprintf(stdout, " in %ld.%-2ld seconds (> %ld bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (long)size * count);
+ }
+ }
+ fprintf(stdout, "\n");
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ if ((fd = open(bigfile, roflags)) < 0) {
+ error("can't open '%s'", bigfile);
+ exit(1);
+ }
+#ifdef MMAP
+ maddr = mmap((caddr_t)0, (size_t)size, PROT_READ,
+ MAP_PRIVATE, fd, (off_t)0);
+ if (maddr == MAP_FAILED) {
+ error("can't mmap '%s'", bigfile);
+ exit(1);
+ }
+ if (msync(maddr, (size_t)size, MS_INVALIDATE) < 0) {
+ error("can't invalidate pages for '%s'", bigfile);
+ exit(1);
+ }
+ if (munmap(maddr, (size_t)size) < 0) {
+ error("can't munmap '%s'", bigfile);
+ exit(1);
+ }
+#endif
+ for (si = size; si > 0; si -= bytes) {
+ bytes = MIN(BUFSZ, si);
+ if (read(fd, buf, bytes) != bytes) {
+ error("'%s' read failed", bigfile);
+ exit(1);
+ }
+ }
+ close(fd);
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\tread %ld byte file %d times", (long)size, count);
+ if (Tflag) {
+ etime = (double)time.tv_sec + (double)time.tv_usec / 1000000.0;
+ if (etime != 0.0) {
+ fprintf(stdout, " in %ld.%-2ld seconds (%d bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (int)((double)size * ((double)count / etime)));
+ } else {
+ fprintf(stdout, " in %ld.%-2ld seconds (> %ld bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (long)size * count);
+ }
+ }
+ fprintf(stdout, "\n");
+
+ if (unlink(bigfile) < 0) {
+ error("can't unlink '%s'", bigfile);
+ exit(1);
+ }
+ complete();
+}
diff --git a/basic/test5a.c b/basic/test5a.c
new file mode 100644
index 0000000..716d917
--- /dev/null
+++ b/basic/test5a.c
@@ -0,0 +1,301 @@
+/*
+ * @(#)test5a.c 1.8 2003/12/01 Connectathon Testsuite
+ * 1.3 Lachman ONC Test Suite source
+ *
+ * Test write
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * open()
+ * read()
+ * write()
+ * stat()
+ * fstat()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+/* Synchronous Write is Not supported in the Windows version yet.*/
+#undef O_SYNC
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#ifdef MMAP
+#include <sys/mman.h>
+#endif
+
+#include "../tests.h"
+
+#if defined(O_SYNC) || defined(DOSorWIN32)
+#define USE_OPEN
+#endif
+
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#define BUFSZ 8192
+#define DSIZE 1048576
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+#ifdef O_SYNC
+static int Sflag = 0; /* use synchronous writes */
+#endif
+
+static void
+usage()
+{
+#ifdef O_SYNC
+ fprintf(stdout, "usage: %s [-htfns] [size count fname]\n", Myname);
+#else
+ fprintf(stdout, "usage: %s [-htfn] [size count fname]\n", Myname);
+#endif
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+#ifdef O_SYNC
+ fprintf(stdout, " s Use synchronous writes\n");
+#endif
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int count = DCOUNT; /* times to do each file */
+ int ct;
+ off_t size = DSIZE;
+ off_t si;
+ int i;
+ int fd;
+ off_t bytes = 0;
+ int roflags; /* open read-only flags */
+ int woflags; /* write-only create flags */
+ char *bigfile = "bigfile";
+ struct timeval time;
+ struct stat statb;
+ char *opts;
+ char buf[BUFSZ];
+ double etime;
+#ifdef MMAP
+ caddr_t maddr;
+#endif
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+#ifdef O_SYNC
+ case 's': /* synchronous writes */
+ Sflag++;
+ break;
+#endif
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ size = getparm(*argv, 1, "size");
+ if (size <= 0) {
+ usage();
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ if (count <= 0) {
+ usage();
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ bigfile = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ woflags = O_WRONLY|O_CREAT|O_TRUNC;
+ roflags = O_RDONLY;
+#ifdef O_SYNC
+ if (Sflag) {
+ woflags |= O_SYNC;
+ }
+#endif
+#ifdef DOSorWIN32
+ woflags |= O_BINARY | O_RDWR; /* create and open file */
+ roflags |= O_BINARY;
+#endif
+
+ fprintf(stdout, "%s: write\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ for (i = 0; i < BUFSZ / sizeof (int); i++) {
+ ((int *)buf)[i] = i;
+ }
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+#ifdef USE_OPEN
+ if ((fd = open(bigfile, woflags, CHMOD_RW)) < 0) {
+#else
+ if ((fd = creat(bigfile, CHMOD_RW)) < 0) {
+#endif
+ error("can't create '%s'", bigfile);
+ exit(1);
+ }
+ if (stat(bigfile, &statb) < 0) {
+ error("can't stat '%s'", bigfile);
+ exit(1);
+ }
+ if (statb.st_size != 0) {
+ error("'%s' has size %ld, should be 0",
+ bigfile, (long)statb.st_size);
+ exit(1);
+ }
+ for (si = size; si > 0; si -= bytes) {
+ bytes = MIN(BUFSZ, si);
+ if (write(fd, buf, bytes) != bytes) {
+ error("'%s' write failed", bigfile);
+ exit(1);
+ }
+ }
+ if (close(fd) < 0) {
+ error("can't close %s", bigfile);
+ exit(1);
+ }
+ if (stat(bigfile, &statb) < 0) {
+ error("can't stat '%s'", bigfile);
+ exit(1);
+ }
+ if (statb.st_size != size) {
+ error("'%s' has size %ld, should be %ld",
+ bigfile, (long)(statb.st_size), (long)size);
+ exit(1);
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+
+ if ((fd = open(bigfile, roflags)) < 0) {
+ error("can't open '%s'", bigfile);
+ exit(1);
+ }
+#ifdef MMAP
+ maddr = mmap((caddr_t)0, (size_t)size, PROT_READ,
+ MAP_PRIVATE, fd, (off_t)0);
+ if (maddr == MAP_FAILED) {
+ error("can't mmap '%s'", bigfile);
+ exit(1);
+ }
+ if (msync(maddr, (size_t)size, MS_INVALIDATE) < 0) {
+ error("can't invalidate pages for '%s'", bigfile);
+ exit(1);
+ }
+ if (munmap(maddr, (size_t)size) < 0) {
+ error("can't munmap '%s'", bigfile);
+ exit(1);
+ }
+#endif
+ for (si = size; si > 0; si -= bytes) {
+ bytes = MIN(BUFSZ, si);
+ if (read(fd, buf, bytes) != bytes) {
+ error("'%s' read failed", bigfile);
+ exit(1);
+ }
+ for (i = 0; i < bytes / sizeof (int); i++) {
+ if (((int *)buf)[i] != i) {
+ error("bad data in '%s'", bigfile);
+ exit(1);
+ }
+ }
+ }
+ close(fd);
+
+ fprintf(stdout, "\twrote %ld byte file %d times", (long)size, count);
+
+ if (Tflag) {
+ etime = (double)time.tv_sec + (double)time.tv_usec / 1000000.0;
+ if (etime != 0.0) {
+ fprintf(stdout, " in %ld.%-2ld seconds (%ld bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (long)((double)size * ((double)count / etime)));
+ } else {
+ fprintf(stdout, " in %ld.%-2ld seconds (> %ld bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (long)size * count);
+ }
+ }
+ fprintf(stdout, "\n");
+
+ complete();
+}
diff --git a/basic/test5b.c b/basic/test5b.c
new file mode 100644
index 0000000..7062680
--- /dev/null
+++ b/basic/test5b.c
@@ -0,0 +1,219 @@
+/*
+ * @(#)test5b.c 1.7 03/12/01 Connectathon Testsuite
+ * 1.3 Lachman ONC Test Suite source
+ *
+ * Test read - will read a file of specified size, contents not looked at
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * open()
+ * read()
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#ifdef MMAP
+#include <sys/mman.h>
+#endif
+
+#include "../tests.h"
+
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#define BUFSZ 8192
+#define DSIZE 1048576
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [size count fname]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int count = DCOUNT; /* times to do each file */
+ int ct;
+ off_t size = DSIZE;
+ off_t si;
+ int fd;
+ off_t bytes = 0;
+ int roflags; /* open read-only flags */
+ char *bigfile = "bigfile";
+ struct timeval time;
+ char *opts;
+ char buf[BUFSZ];
+ double etime;
+#ifdef MMAP
+ caddr_t maddr;
+#endif
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ size = getparm(*argv, 1, "size");
+ if (size <= 0) {
+ usage();
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ if (count <= 0) {
+ usage();
+ exit(1);
+ }
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ bigfile = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ roflags = O_RDONLY;
+#ifdef DOSorWIN32
+ roflags |= O_BINARY;
+#endif
+
+ fprintf(stdout, "%s: read\n", Myname);
+
+ mtestdir(NULL);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ if ((fd = open(bigfile, roflags)) < 0) {
+ error("can't open '%s'", bigfile);
+ exit(1);
+ }
+#ifdef MMAP
+ maddr = mmap((caddr_t)0, (size_t)size, PROT_READ,
+ MAP_PRIVATE, fd, (off_t)0);
+ if (maddr == MAP_FAILED) {
+ error("can't mmap '%s'", bigfile);
+ exit(1);
+ }
+ if (msync(maddr, (size_t)size, MS_INVALIDATE) < 0) {
+ error("can't invalidate pages for '%s'", bigfile);
+ exit(1);
+ }
+ if (munmap(maddr, (size_t)size) < 0) {
+ error("can't munmap '%s'", bigfile);
+ exit(1);
+ }
+#endif
+ for (si = size; si > 0; si -= bytes) {
+ bytes = MIN(BUFSZ, si);
+ if (read(fd, buf, bytes) != bytes) {
+ error("'%s' read failed", bigfile);
+ exit(1);
+ }
+ }
+ close(fd);
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+
+ fprintf(stdout, "\tread %ld byte file %d times", (long)size, count);
+
+ if (Tflag) {
+ etime = (double)time.tv_sec + (double)time.tv_usec / 1000000.0;
+ if (etime != 0.0) {
+ fprintf(stdout, " in %ld.%-2ld seconds (%ld bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (long)((double)size * ((double)count / etime)));
+ } else {
+ fprintf(stdout, " in %ld.%-2ld seconds (> %ld bytes/sec)",
+ (long)time.tv_sec, (long)time.tv_usec / 10000,
+ (long)size * count);
+ }
+ }
+ fprintf(stdout, "\n");
+
+ if (unlink(bigfile) < 0) {
+ error("can't unlink '%s'", bigfile);
+ exit(1);
+ }
+ complete();
+}
diff --git a/basic/test6.c b/basic/test6.c
new file mode 100644
index 0000000..1d64c88
--- /dev/null
+++ b/basic/test6.c
@@ -0,0 +1,293 @@
+/*
+ * @(#)test6.c 1.5 99/08/29 Connectathon Testsuite
+ * 1.4 Lachman ONC Test Suite source
+ *
+ * Test readdir
+ *
+ * Uses the following important system/library calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * unlink()
+ * opendir(), rewinddir(), readdir(), closedir()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#include <string.h>
+#ifdef use_directs
+#include <sys/dir.h>
+#else
+#include <dirent.h>
+#endif
+#endif /* DOSorWIN32 */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+static int Iflag = 0; /* Ignore non-test files dir entries */
+
+#define MAXFILES 512 /* maximum files allowed for this test */
+#define BITMOD 8 /* bits per u_char */
+static unsigned char bitmap[MAXFILES / BITMOD];
+
+#define BIT(x) (bitmap[(x) / BITMOD] & (1 << ((x) % BITMOD)) )
+#define SETBIT(x) (bitmap[(x) / BITMOD] |= (1 << ((x) % BITMOD)) )
+#define CLRBIT(x) (bitmap[(x) / BITMOD] &= ~(1 << ((x) % BITMOD)) )
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfni] [files count fname]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+ fprintf(stdout, " i Ignore non-test files dir entries\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#ifdef use_directs
+ struct direct *dp;
+#else
+ struct dirent *dp;
+#endif
+ char *fname = FNAME;
+ int files = 200; /* number of files in each dir */
+ int fi;
+ int count = 200; /* times to read dir */
+ int ct;
+ int entries = 0;
+ int totfiles = 0;
+ int totdirs = 0;
+ DIR *dir;
+ struct timeval time;
+ char *p, str[MAXPATHLEN];
+ char *opts;
+ int err, i, dot, dotdot;
+ int nmoffset;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ case 'i': /* ignore spurious files */
+ Iflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ nmoffset = strlen(fname);
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ if (count > files) {
+ error("count (%d) can't be greater than files (%d)",
+ count, files);
+ exit(1);
+ }
+
+ if (files > MAXFILES) {
+ error("too many files requested (max is %d)", MAXFILES);
+ exit(1);
+ }
+
+ fprintf(stdout, "%s: readdir\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ dirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ if ((dir = opendir(".")) == NULL) {
+ error("can't opendir %s", ".");
+ exit(1);
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ rewinddir(dir);
+ dot = 0;
+ dotdot = 0;
+ err = 0;
+ for (i = 0; i < sizeof(bitmap); i++)
+ bitmap[i] = 0;
+ while ((dp = readdir(dir)) != NULL) {
+ entries++;
+ if (strcmp(".", dp->d_name) == 0) {
+ if (dot) {
+ /* already read dot */
+ error("'.' dir entry read twice");
+ exit(1);
+ }
+ dot++;
+ continue;
+ } else if (strcmp("..", dp->d_name) == 0) {
+ if (dotdot) {
+ /* already read dotdot */
+ error("'..' dir entry read twice");
+ exit(1);
+ }
+ dotdot++;
+ continue;
+ }
+
+ /*
+ * at this point, should have entry of the form
+ * fname%d
+ */
+ /* If we don't have our own directory, ignore
+ such errors (if Iflag set). */
+ if (strncmp(dp->d_name, fname, nmoffset)) {
+ if (Iflag)
+ continue;
+ else {
+ error("unexpected dir entry '%s'",
+ dp->d_name);
+ exit(1);
+ }
+ }
+
+ /* get ptr to numeric part of name */
+ p = dp->d_name + nmoffset;
+ fi = atoi(p);
+ if (fi < 0 || fi >= MAXFILES) {
+ error("unexpected dir entry '%s'",
+ dp->d_name);
+ exit(1);
+ }
+ if (BIT(fi)) {
+ error("duplicate '%s' dir entry read",
+ dp->d_name);
+ err++;
+ } else
+ SETBIT(fi);
+ } /* end readdir loop */
+ if (!dot) {
+ error("didn't read '.' dir entry, pass %d", ct);
+ err++;
+ }
+ if (!dotdot) {
+ error("didn't read '..' dir entry, pass %d", ct);
+ err++;
+ }
+ for (fi = 0; fi < ct; fi++) {
+ if (BIT(fi)) {
+ sprintf(str, "%s%d", fname, fi);
+ error("unlinked '%s' dir entry read pass %d",
+ str, ct);
+ err++;
+ }
+ }
+ for (fi = ct; fi < files; fi++) {
+ if (!BIT(fi)) {
+ sprintf(str, "%s%d", fname, fi);
+ error("\
+didn't read expected '%s' dir entry, pass %d", str, ct);
+ err++;
+ }
+ }
+ if (err) {
+ error("Test failed with %d errors", err);
+ exit(1);
+ }
+ sprintf(str, "%s%d", fname, ct);
+ if (unlink(str) < 0) {
+ error("can't unlink %s", str);
+ exit(1);
+ }
+ }
+
+ closedir(dir);
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d entries read, %d files",
+ entries, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+ rmdirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs, 1);
+ complete();
+}
diff --git a/basic/test7.c b/basic/test7.c
new file mode 100644
index 0000000..f7b3e2e
--- /dev/null
+++ b/basic/test7.c
@@ -0,0 +1,248 @@
+/*
+ * @(#)test7.c 1.7 99/08/29 Connectathon Testsuite
+ * 1.4 Lachman ONC Test Suite source
+ *
+ * Test rename, link
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * creat()
+ * stat()
+ * rename()
+ * link()
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/types.h>
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+#define NNAME "newfile." /* new filename for rename and link */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [files count fname nname]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = 10; /* number of files in each dir */
+ int fi;
+ int count = 10; /* times to do each file */
+ int ct;
+ int totfiles = 0;
+ int totdirs = 0;
+ char *fname = FNAME;
+ char *nname = NNAME;
+ struct timeval time;
+ char str[MAXPATHLEN];
+ char new[MAXPATHLEN];
+ struct stat statb;
+ char *opts;
+ int oerrno;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ nname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ fprintf(stdout, "%s: link and rename\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ dirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ for (fi = 0; fi < files; fi++) {
+ sprintf(str, "%s%d", fname, fi);
+ sprintf(new, "%s%d", nname, fi);
+ if (rename(str, new) < 0) {
+ error("can't rename %s to %s", str, new);
+ exit(1);
+ }
+ if (stat(str, &statb) == 0) {
+ error("%s exists after rename to %s", str, new);
+ exit(1);
+ }
+ if (stat(new, &statb) < 0) {
+ error("can't stat %s after rename from %s",
+ new, str);
+ exit(1);
+ }
+ if (statb.st_nlink != 1) {
+ error("%s has %d links after rename (expect 1)",
+ new, statb.st_nlink);
+ exit(1);
+ }
+#ifndef DOSorWIN32
+ if (link(new, str) < 0) {
+ oerrno = errno;
+ error("can't link %s to %s", new, str);
+ errno = oerrno;
+ if (errno == EOPNOTSUPP)
+ complete();
+ exit(1);
+ }
+ if (stat(new, &statb) < 0) {
+ error("can't stat %s after link", new);
+ exit(1);
+ }
+ if (statb.st_nlink != 2) {
+ error("%s has %d links after link (expect 2)",
+ new, statb.st_nlink);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after link", str);
+ exit(1);
+ }
+ if (statb.st_nlink != 2) {
+ error("%s has %d links after link (expect 2)",
+ str, statb.st_nlink);
+ exit(1);
+ }
+ if (unlink(new) < 0) {
+ error("can't unlink %s", new);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after unlink %s",
+ str, new);
+ exit(1);
+ }
+ if (statb.st_nlink != 1) {
+ error("%s has %d links after unlink (expect 1)",
+ str, statb.st_nlink);
+ exit(1);
+ }
+#else /* DOSorWIN32 */
+ /* just rename back to orig name */
+ if (rename(new, str) < 0) {
+ error("can't rename %s to %s", new, str);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't find %s after rename", str);
+ exit(1);
+ }
+ if (stat(new, &statb) == 0) {
+ error("still found %s after rename", new);
+ exit(1);
+ }
+#endif /* DOSorWIN32 */
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d renames and links on %d files",
+ files * count * 2, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+
+ /* Cleanup files left around */
+ rmdirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs, 1);
+
+ complete();
+}
diff --git a/basic/test7a.c b/basic/test7a.c
new file mode 100644
index 0000000..1e4170c
--- /dev/null
+++ b/basic/test7a.c
@@ -0,0 +1,195 @@
+/*
+ * @(#)test7a.c 1.6 99/08/29 Connectathon Testsuite
+ * 1.3 Lachman ONC Test Suite source
+ *
+ * Test rename
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * stat()
+ * rename()
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#endif
+
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+#define NNAME "newfile." /* new filename for rename */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [files count fname nname]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = 10; /* number of files in each dir */
+ int fi;
+ int count = 10; /* times to do each file */
+ int ct;
+ int totfiles = 0;
+ int totdirs = 0;
+ char *fname = FNAME;
+ char *nname = NNAME;
+ struct timeval time;
+ char str[MAXPATHLEN];
+ char new[MAXPATHLEN];
+ struct stat statb;
+ char *opts;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ nname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ fprintf(stdout, "%s: rename\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ dirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ for (fi = 0; fi < files; fi++) {
+ sprintf(str, "%s%d", fname, fi);
+ sprintf(new, "%s%d", nname, fi);
+ if (rename(str, new) < 0) {
+ error("can't rename %s to %s", str, new);
+ exit(1);
+ }
+ if (stat(str, &statb) == 0) {
+ error("%s exists after rename", str);
+ exit(1);
+ }
+ if (stat(new, &statb) < 0) {
+ error("can't stat %s after rename", new);
+ exit(1);
+ }
+ if (rename(new, str) < 0) {
+ error("can't rename %s to %s", new, str);
+ exit(1);
+ }
+ if (stat(new, &statb) == 0) {
+ error("%s exists after rename", new);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after rename", str);
+ exit(1);
+ }
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d renames on %d files",
+ files * count * 2, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+
+ /* Cleanup files left around */
+ rmdirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs, 1);
+
+ complete();
+}
diff --git a/basic/test7b.c b/basic/test7b.c
new file mode 100644
index 0000000..2f5b119
--- /dev/null
+++ b/basic/test7b.c
@@ -0,0 +1,245 @@
+/*
+ * @(#)test7b.c 1.7 99/08/29 Connectathon Testsuite
+ * 1.3 Lachman ONC Test Suite source
+ *
+ * Test link
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * stat()
+ * link()
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+#include <sys/types.h>
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+#define NNAME "newfile." /* new filename for link */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [files count fname nname]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = 10; /* number of files in each dir */
+ int fi;
+ int count = 10; /* times to do each file */
+ int ct;
+ int totfiles = 0;
+ int totdirs = 0;
+ char *fname = FNAME;
+ char *nname = NNAME;
+ struct timeval time;
+ char str[MAXPATHLEN];
+ char new[MAXPATHLEN];
+ struct stat statb;
+ char *opts;
+ int oerrno;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ nname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ fprintf(stdout, "%s: link\n", Myname);
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ dirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ for (fi = 0; fi < files; fi++) {
+ sprintf(str, "%s%d", fname, fi);
+ sprintf(new, "%s%d", nname, fi);
+#ifndef DOSorWIN32
+ if (link(str, new) < 0) {
+ oerrno = errno;
+ error("can't link %s to %s", str, new);
+ errno = oerrno;
+ if (errno == EOPNOTSUPP)
+ complete();
+ exit(1);
+ }
+ if (stat(new, &statb) < 0) {
+ error("can't stat %s after link", new);
+ exit(1);
+ }
+ if (statb.st_nlink != 2) {
+ error("%s has %d links after link (expect 2)",
+ new, statb.st_nlink);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after link", str);
+ exit(1);
+ }
+ if (statb.st_nlink != 2) {
+ error("%s has %d links after link (expect 2)",
+ str, statb.st_nlink);
+ exit(1);
+ }
+ if (unlink(new) < 0) {
+ error("can't unlink %s", new);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after unlink %s",
+ str, new);
+ exit(1);
+ }
+ if (statb.st_nlink != 1) {
+ error("%s has %d links after unlink (expect 1)",
+ str, statb.st_nlink);
+ exit(1);
+ }
+#else /* DOSorWIN32 */ /* just rename back to orig name */
+ if (rename(str, new) < 0) {
+ error("can't rename %s to %s", str, new);
+ exit(1);
+ }
+ if (stat(new, &statb) < 0) {
+ error("can't stat %s after rename %s",
+ new, str);
+ exit(1);
+ }
+ if (statb.st_nlink != 1) {
+ error("%s has %d links after rename (expect 1)",
+ new, statb.st_nlink);
+ exit(1);
+ }
+ if (rename(new, str) < 0) {
+ error("can't rename %s to %s", new, str);
+ exit(1);
+ }
+ if (stat(str, &statb) < 0) {
+ error("can't stat %s after rename %s",
+ str, new);
+ exit(1);
+ }
+ if (statb.st_nlink != 1) {
+ error("%s has %d links after rename (expect 1)",
+ str, statb.st_nlink);
+ exit(1);
+ }
+#endif /* DOSorWIN32 */
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d links on %d files",
+ files * count, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+
+ /* Cleanup files left around */
+ rmdirtree(1, files, 0, fname, DNAME, &totfiles, &totdirs, 1);
+
+ complete();
+}
diff --git a/basic/test8.c b/basic/test8.c
new file mode 100644
index 0000000..ea9aa0c
--- /dev/null
+++ b/basic/test8.c
@@ -0,0 +1,207 @@
+/*
+ * @(#)test8.c 1.7 2001/08/25 Connectathon Testsuite
+ * 1.4 Lachman ONC Test Suite source
+ *
+ * Test symlink, readlink
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+ * creat()
+ * symlink()
+ * readlink()
+ * lstat()
+ * unlink()
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+#define SNAME "/this/is/a/symlink" /* symlink prefix */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [files count fname sname]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int files = 10; /* number of files in each dir */
+ int fi;
+ int count = 20; /* times to do each file */
+ int ct;
+ char *fname = FNAME;
+ char *sname = SNAME;
+ struct timeval time;
+ char str[MAXPATHLEN];
+ char new[MAXPATHLEN];
+ char buf[MAXPATHLEN];
+ int ret;
+ struct stat statb;
+ char *opts;
+ int oerrno;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ files = getparm(*argv, 1, "files");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ fname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ sname = *argv;
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+#ifndef S_IFLNK
+ fprintf(stdout, "\
+%s: symlink and readlink not supported on this client\n", Myname);
+#else /* S_IFLNK */
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+ fprintf(stdout, "%s: symlink and readlink\n", Myname);
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+ for (fi = 0; fi < files; fi++) {
+ sprintf(str, "%s%d", fname, fi);
+ sprintf(new, "%s%d", sname, fi);
+ if (symlink(new, str) < 0) {
+ oerrno = errno;
+ error("can't make symlink %s", str);
+ errno = oerrno;
+ if (errno == EOPNOTSUPP)
+ complete();
+ else
+ exit(1);
+ }
+ if (lstat(str, &statb) < 0) {
+ error("can't stat %s after symlink", str);
+ exit(1);
+ }
+ if ((statb.st_mode & S_IFMT) != S_IFLNK) {
+ error("mode of %s not symlink");
+ exit(1);
+ }
+ if ((ret = readlink(str, buf, MAXPATHLEN))
+ != strlen(new)) {
+ error("readlink %s ret %d, expect %d",
+ str, ret, strlen(new));
+ exit(1);
+ }
+ if (strncmp(new, buf, ret) != 0) {
+ error("readlink %s returned bad linkname",
+ str);
+ exit(1);
+ }
+ if (unlink(str) < 0) {
+ error("can't unlink %s", str);
+ exit(1);
+ }
+ }
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+ fprintf(stdout, "\t%d symlinks and readlinks on %d files",
+ files * count * 2, files);
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+#endif /* S_IFLNK */
+ complete();
+}
diff --git a/basic/test9.c b/basic/test9.c
new file mode 100644
index 0000000..ef68fc2
--- /dev/null
+++ b/basic/test9.c
@@ -0,0 +1,182 @@
+/*
+ * @(#)test9.c 1.7 2001/08/25 Connectathon Testsuite
+ * 1.4 Lachman ONC Test Suite source
+ *
+#ifdef SVR4
+ * Test statvfs
+#else
+ * Test statfs
+#endif
+ *
+ * Uses the following important system calls against the server:
+ *
+ * chdir()
+ * mkdir() (for initial directory creation if not -m)
+#ifdef SVR4
+ * statvfs()
+#else
+ * statfs()
+#endif
+ */
+
+#if defined (DOS) || defined (WIN32)
+/* If Dos, Windows or Win32 */
+#define DOSorWIN32
+#endif
+
+#ifndef DOSorWIN32
+#include <sys/param.h>
+#include <unistd.h>
+#ifdef SVR4
+#include <sys/statvfs.h>
+#else
+#if defined (OSF1) || defined (BSD)
+#include <sys/mount.h>
+#else
+#include <sys/vfs.h>
+#endif /* OSF1 || BSD */
+#endif /* SVR4 */
+#endif /* DOSorWIN32 */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef DOSorWIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+#include "../tests.h"
+
+static int Tflag = 0; /* print timing */
+static int Fflag = 0; /* test function only; set count to 1, negate -t */
+static int Nflag = 0; /* Suppress directory operations */
+
+static void
+usage()
+{
+ fprintf(stdout, "usage: %s [-htfn] [count]\n", Myname);
+ fprintf(stdout, " Flags: h Help - print this usage info\n");
+ fprintf(stdout, " t Print execution time statistics\n");
+ fprintf(stdout, " f Test function only (negate -t)\n");
+ fprintf(stdout, " n Suppress test directory create operations\n");
+}
+
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#ifdef SVR4
+ int count = 1500; /* times to do statvfs call */
+#else
+ int count = 1500; /* times to do statfs call */
+#endif
+ int ct;
+ struct timeval time;
+#ifdef SVR4
+ struct statvfs sfsb;
+#else
+ struct statfs sfsb;
+#endif
+ char *opts;
+
+ umask(0);
+ setbuf(stdout, NULL);
+ Myname = *argv++;
+ argc--;
+ while (argc && **argv == '-') {
+ for (opts = &argv[0][1]; *opts; opts++) {
+ switch (*opts) {
+ case 'h': /* help */
+ usage();
+ exit(1);
+ break;
+
+ case 't': /* time */
+ Tflag++;
+ break;
+
+ case 'f': /* funtionality */
+ Fflag++;
+ break;
+
+ case 'n': /* No Test Directory create */
+ Nflag++;
+ break;
+
+ default:
+ error("unknown option '%c'", *opts);
+ usage();
+ exit(1);
+ }
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc) {
+ count = getparm(*argv, 1, "count");
+ argv++;
+ argc--;
+ }
+ if (argc) {
+ usage();
+ exit(1);
+ }
+
+ if (Fflag) {
+ Tflag = 0;
+ count = 1;
+ }
+
+ if (!Nflag)
+ testdir(NULL);
+ else
+ mtestdir(NULL);
+
+#ifdef SVR4
+ fprintf(stdout, "%s: statvfs\n", Myname);
+#else
+ fprintf(stdout, "%s: statfs\n", Myname);
+#endif
+
+ if (Tflag) {
+ starttime();
+ }
+
+ for (ct = 0; ct < count; ct++) {
+#ifdef SVR4
+ if (statvfs(".", &sfsb) < 0) {
+ error("can't do statvfs on \".\"");
+ exit(1);
+ }
+#else
+#ifdef SVR3
+ if (statfs(".", &sfsb, sizeof(sfsb), 0) < 0) {
+#else
+ if (statfs(".", &sfsb) < 0) {
+#endif
+ error("can't do statfs on \".\"");
+ exit(1);
+ }
+#endif
+ }
+
+ if (Tflag) {
+ endtime(&time);
+ }
+#ifdef SVR4
+ fprintf(stdout, "\t%d statvfs calls", count);
+#else
+ fprintf(stdout, "\t%d statfs calls", count);
+#endif
+ if (Tflag) {
+ fprintf(stdout, " in %ld.%-2ld seconds",
+ (long)time.tv_sec, (long)time.tv_usec / 10000);
+ }
+ fprintf(stdout, "\n");
+ complete();
+}