aboutsummaryrefslogtreecommitdiffstats
path: root/vms
diff options
context:
space:
mode:
Diffstat (limited to 'vms')
-rw-r--r--vms/ChangeLog44
-rw-r--r--vms/descrip.mms157
-rw-r--r--vms/gawkmisc.vms26
-rw-r--r--vms/vms-conf.h9
-rw-r--r--vms/vms_fwrite.c2
-rw-r--r--vms/vms_gawk.c10
-rw-r--r--vms/vmsbuild.com50
-rw-r--r--vms/vmstest.com177
8 files changed, 261 insertions, 214 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog
index d13315d2..d8fbf536 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,11 @@
+2012-12-09 Anders Wallin <anders_s_wallin@yahoo.se>
+
+ * vmstest.com: Updated to match main test/Makefile.
+
+2012-12-02 Arnold D. Robbins <arnold@skeeve.com>
+
+ * vms_gawk.c (CmdName): Force to just "GAWK".
+
2012-11-24 Arnold D. Robbins <arnold@skeeve.com>
* vmstest.com: Fix typo in applying previous patch.
@@ -6,10 +14,46 @@
* vmstest.com: Updated to match main test/Makefile.
+2012-11-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * vmsbuild.com: Updated. Thanks to Anders Wallin.
+ * vms-conf.h: Ditto, ditto.
+
+2012-11-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.vms (os_isreadable): Change first argument type to
+ awk_input_buf_t.
+ * vms-conf.h (HAVE_STDINT_H): Define.
+ (SHLIBEXT, DEFLIBPATH): Add definitions.
+ * vms_fwrite.c (tty_fwrite): Check do_debug instead of no-longer-
+ extant which_gawk variable.
+ * vms_gawk.c (vms_gawk): Check do_debug and do_profiling instead
+ of which_gawk.
+
+ Thanks to Anders Wallin.
+
+2012-08-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.vms (os_isreadable): Take IOBUF_PUBLIC instead of fd and
+ use passed in info.
+
+2012-07-29 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.vms (os_isreadable): Add isdir pointer parameter to be
+ set to true if fd is for a directory.
+
+2012-07-26 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.vms (os_isreadable): New function.
+
2012-03-29 Arnold D. Robbins <arnold@skeeve.com>
* config.h: Add definition for _Noreturn.
+2012-03-20 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * gawkmisc.vms (deflibpath): New global variable.
+
2012-03-28 Arnold D. Robbins <arnold@skeeve.com>
* 4.0.1: Release tar ball made.
diff --git a/vms/descrip.mms b/vms/descrip.mms
index f00921ea..d1dc1e44 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -12,14 +12,6 @@
# gawk.exe :
# This is the default target. DEC C has become the default compiler.
#
-# pgawk.exe :
-# An alternate version which generates some profiling feedback for
-# the awk programs it executes. Included with `make all'.
-#
-# dgawk.exe :
-# An alternate version which supports debugging.
-# Included with `make all'.
-#
# awkgram.c :
# If you don't have bison but do have VMS POSIX or DEC/Shell,
# change the PARSER and PASERINIT macros to use yacc. If you don't
@@ -100,14 +92,15 @@ ECHO = write sys$output
NOOP = continue
# object files
-GAWKOBJ = eval.obj,profile.obj
-PGAWKOBJ = eval_p.obj,profile_p.obj
-DGAWKOBJ = eval_d.obj,profile.obj,command.obj,debug.obj
-AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\
- field.obj,floatcomp.obj,gawkmisc.obj,getopt.obj,getopt1.obj,\
- io.obj
-AWKOBJ2 = main.obj,msg.obj,node.obj,random.obj,re.obj,\
- regex.obj,replace.obj,version.obj
+GAWKOBJ = eval.obj,profile.obj
+AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,cint_array.obj,\
+ command.obj,debug.obj,dfa.obj,ext.obj,field.obj,\
+ floatcomp.obj,gawkapi.obj,gawkmisc.obj,getopt.obj,getopt1.obj
+
+AWKOBJ2 = int_array.obj,io.obj,main.obj,mpfr.obj,msg.obj,node.obj,\
+ random.obj,re.obj,regex.obj,replace.obj,\
+ str_array.obj,symbol.obj,version.obj
+
AWKOBJS = $(AWKOBJ1),$(AWKOBJ2)
# VMSOBJS
@@ -117,25 +110,6 @@ VMSCODE = vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj,\
VMSCMD = gawk_cmd.obj # built from .cld file
VMSOBJS = $(VMSCODE),$(VMSCMD)
-# primary source files
-AWKSRC = array.c,builtin.c,dfa.c,eval.c,eval_p.c,ext.c,field.c,\
- floatcomp.c,gawkmisc.c,getopt.c,getopt1.c,io.c,main.c,\
- msg.c,node.c,profile.c,profile_p.c,random.c,re.c,regcomp.c,\
- regex.c,regex_internal.c,regexec.c,replace.c,version.c
-
-DBGSRC = eval_d.c,debug.c,command.y,cmd.h
-
-ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\
- gettext.h,mbsupport.h,protos.h,random.h
-
-VMSSRC = $(VMSDIR)gawkmisc.vms,$(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,\
- $(VMSDIR)vms_fwrite.c,$(VMSDIR)vms_args.c,$(VMSDIR)vms_gawk.c,\
- $(VMSDIR)vms_cli.c
-VMSHDRS = $(VMSDIR)redirect.h,$(VMSDIR)vms.h,$(VMSDIR)fcntl.h,\
- $(VMSDIR)varargs.h,$(VMSDIR)unixlib.h
-VMSOTHR = $(VMSDIR)descrip.mms,$(VMSDIR)vmsbuild.com,$(VMSDIR)version.com,\
- $(VMSDIR)gawk.hlp
-
DOCS= $(DOCDIR)gawk.1,$(DOCDIR)gawk.texi,$(DOCDIR)texinfo.tex
# Release of gawk
@@ -143,30 +117,20 @@ REL=4.0
PATCHLVL=1
# generic target
-all : gawk,pgawk,dgawk
- $(NOOP)
+all : gawk
+ @ $(NOOP)
# dummy target to allow building "gawk" in addition to explicit "gawk.exe"
gawk : gawk.exe
- $(ECHO) " GAWK "
-pgawk : pgawk.exe
- $(ECHO) " PGAWK "
-dgawk : dgawk.exe
- $(ECHO) " DGAWK "
+ @ $(ECHO) "$< is upto date"
# rules to build gawk
gawk.exe : $(GAWKOBJ) $(AWKOBJS) $(VMSOBJS) gawk.opt
$(LINK) $(LINKFLAGS) gawk.opt/options
-# rules to build pgawk and dgawk
-pgawk.exe : $(PGAWKOBJ) $(AWKOBJS) $(VMSOBJS) pgawk.opt
- $(LINK) $(LINKFLAGS) pgawk.opt/options
-dgawk.exe : $(DGAWKOBJ) $(AWKOBJS) $(VMSOBJS) dgawk.opt
- $(LINK) $(LINKFLAGS) dgawk.opt/options
-
gawk.opt : $(MAKEFILE) # create linker options file
- open/write opt gawk.opt ! ~ 'cat <<close >gawk.opt'
- write opt "! GAWK -- GNU awk"
+ @ open/write opt gawk.opt ! ~ 'cat <<close >gawk.opt'
+ @ write opt "! GAWK -- GNU awk"
@ write opt "$(GAWKOBJ)"
@ write opt "$(AWKOBJ1)"
@ write opt "$(AWKOBJ2)"
@@ -174,59 +138,52 @@ gawk.opt : $(MAKEFILE) # create linker options file
@ write opt "psect_attr=environ,noshr !extern [noshare] char **"
@ write opt "stack=48 !preallocate more pages (default is 20)"
@ write opt "iosegment=128 !ditto (default is 32)"
- write opt "$(LIBS)"
- write opt "identification=""V$(REL).$(PATCHLVL)"""
- close opt
-
-pgawk.opt : $(MAKEFILE) # create linker options file
- open/write opt pgawk.opt
- write opt "! PGAWK -- GNU awk w/ run-time profiling"
- @ write opt "$(PGAWKOBJ)"
- @ write opt "$(AWKOBJ1)"
- @ write opt "$(AWKOBJ2)"
- @ write opt "$(VMSOBJS)"
- @ write opt "psect_attr=environ,noshr !extern [noshare] char **"
- @ write opt "stack=48 !preallocate more pages (default is 20)"
- @ write opt "iosegment=128 !ditto (default is 32)"
- write opt "$(LIBS)"
- write opt "identification=""V$(REL).$(PATCHLVL)"""
- close opt
-
-dgawk.opt : $(MAKEFILE) # create linker options file
- open/write opt dgawk.opt
- write opt "! DGAWK -- GNU awk w/ debugging"
- @ write opt "$(DGAWKOBJ)"
- @ write opt "$(AWKOBJ1)"
- @ write opt "$(AWKOBJ2)"
- @ write opt "$(VMSOBJS)"
- @ write opt "psect_attr=environ,noshr !extern [noshare] char **"
- @ write opt "stack=48 !preallocate more pages (default is 20)"
- @ write opt "iosegment=128 !ditto (default is 32)"
- write opt "$(LIBS)"
- write opt "identification=""V$(REL).$(PATCHLVL)"""
- close opt
+ @ write opt "$(LIBS)"
+ @ write opt "identification=""V$(REL).$(PATCHLVL)"""
+ @ close opt
+$(VMSCODE) : awk.h config.h $(VMSDIR)redirect.h $(VMSDIR)vms.h
+$(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h config.h $(VMSDIR)redirect.h
+$(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
+
+#-----------------------------------------------------------------------------
+# Older versions of MMS have problems handling lower case file names typically
+# found on ODS-5 disks. Fix this by adding explicit dependencies.
+#_____________________________________________________________________________
+array.obj : array.c
+awkgram.obj : awkgram.c awk.h
+builtin.obj : builtin.c floatmagic.h random.h
+cint_array.obj : cint_array.c
+command.obj : command.c cmd.h
+debug.obj : debug.c cmd.h
+dfa.obj : dfa.c dfa.h
+ext.obj : ext.c
+eval.obj : eval.c
+field.obj : field.c
+floatcomp.obj : floatcomp.c
+gawkaoi.obj : gawkapi.c
+gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms
+getopt.obj : getopt.c
+getopt1.obj : getopt1.c
+int_array.obj : int_array.c
+io.obj : io.c
+main.obj : main.c
+msg.obj : msg.c
+mpfr.obj : mpfr.c
+node.obj : node.c
+profile.obj : profile.c
+random.obj : random.c random.h
+re.obj : re.c
+regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h
+str_array.obj : str_array.c
+symbol.obj : symbol.c
+version.obj : version.c
vms_misc.obj : $(VMSDIR)vms_misc.c
vms_popen.obj : $(VMSDIR)vms_popen.c
vms_fwrite.obj : $(VMSDIR)vms_fwrite.c
vms_args.obj : $(VMSDIR)vms_args.c
vms_gawk.obj : $(VMSDIR)vms_gawk.c
vms_cli.obj : $(VMSDIR)vms_cli.c
-$(VMSCODE) : awk.h config.h $(VMSDIR)redirect.h $(VMSDIR)vms.h
-
-gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms
-
-$(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h \
- config.h $(VMSDIR)redirect.h
-$(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
-$(PGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
-$(DGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
-random.obj : random.h
-builtin.obj : floatmagic.h random.h
-awkgram.obj : awkgram.c awk.h
-dfa.obj : dfa.c dfa.h
-regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h
-command.obj,debug.obj : cmd.h
replace.obj : replace.c $(MISSNGD)system.c $(MISSNGD)memcmp.c \
$(MISSNGD)memcpy.c $(MISSNGD)memset.c $(MISSNGD)memmove.c \
$(MISSNGD)strncasecmp.c $(MISSNGD)strerror.c \
@@ -245,6 +202,7 @@ awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c
@- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@
@- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@
@- if f$search("awkgram_tab.c").nes."" then rename/new_vers awkgram_tab.c $@
+
command.c : command.y
@- if f$search("ytab.c") .nes."" then delete ytab.c;*
@- if f$search("y_tab.c") .nes."" then delete y_tab.c;*
@@ -262,7 +220,7 @@ $(VMSCMD) : $(VMSDIR)gawk.cld
set command $(CLDFLAGS)/object=$@ $<
# special target for loading the help text into a VMS help library
-install.help : $(VMS)gawk.hlp
+install.help : $(VMSDIR)gawk.hlp
library/help $(HELPLIB) $< /log
# miscellaneous other targets
@@ -271,13 +229,12 @@ tidy :
- if f$search("[.*]*.*;-1").nes."" then purge [.*]
clean :
- - delete *.obj;*,gawk.opt;*,pgawk.opt;*,dgawk.opt;*
+ - if f$search ("*.obj") .nes. "" then delete *.obj;*
+ - if f$search ("gawk.opt") .nes. "" then delete gawk.opt;*
spotless : clean tidy
- if f$search("config.h").nes."" then rename config.h config.h-old/New
- if f$search("gawk.exe").nes."" then delete gawk.exe;*
- - if f$search("pgawk.exe").nes."" then delete pgawk.exe;*
- - if f$search("dgawk.exe").nes."" then delete dgawk.exe;*
- if f$search("gawk.dvi").nes."" then delete gawk.dvi;*
- if f$search("[.doc]texindex.exe").nes."" then delete [.doc]texindex.exe;*
diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms
index 346a1e88..08c8fb5e 100644
--- a/vms/gawkmisc.vms
+++ b/vms/gawkmisc.vms
@@ -25,6 +25,7 @@
char quote = '\'';
char *defpath = DEFPATH;
+char *deflibpath = DEFLIBPATH;
char envsep = ',';
/* gawk_name --- pull out the "gawk" part from how the OS called us */
@@ -143,6 +144,31 @@ int fd;
return (fstat(fd, &sbuf) == 0 && S_ISDIR(sbuf.st_mode));
}
+/* os_isreadable --- fd can be read from */
+
+int
+os_isreadable(const awk_input_buf_t *iobuf, bool *isdir)
+{
+ *isdir = false;
+
+ switch (iobuf->sbuf.st_mode & S_IFMT) {
+ case S_IFREG:
+ case S_IFCHR: /* ttys, /dev/null, .. */
+#ifdef S_IFSOCK
+ case S_IFSOCK:
+#endif
+#ifdef S_IFIFO
+ case S_IFIFO:
+#endif
+ return true;
+ case S_IFDIR:
+ *isdir = true;
+ /* fall through */
+ default:
+ return false;
+ }
+}
+
/* os_is_setuid --- true if running setuid root */
int
diff --git a/vms/vms-conf.h b/vms/vms-conf.h
index 59abd5de..fbd611f2 100644
--- a/vms/vms-conf.h
+++ b/vms/vms-conf.h
@@ -45,6 +45,10 @@
#define STACK_DIRECTION (-1)
#endif /*0*/
+#include <bitypes.h>
+#define INT32_MAX __INT32_MAX
+#define INT32_MIN __INT32_MIN
+
/* dynamic loading is possible */
#undef DYNAMIC
@@ -545,6 +549,10 @@
/* Whether `time_t' is an unsigned type. */
#define TIME_T_UNSIGNED 1
+/* Extension for shared libraries */
+#define SHLIBEXT "exe"
+
+
/*******************************/
/* Gawk configuration options. */
/*******************************/
@@ -561,6 +569,7 @@
*/
#define DEFPATH ".,/AWK_LIBRARY"
+#define DEFLIBPATH ".,/AWK_LIBRARY"
#define ENVSEP ','
/*
diff --git a/vms/vms_fwrite.c b/vms/vms_fwrite.c
index 921ac2d4..1a16f58c 100644
--- a/vms/vms_fwrite.c
+++ b/vms/vms_fwrite.c
@@ -77,7 +77,7 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file )
chan = file_num < _NFILE ? channel[file_num] : -1;
if (chan == 0) { /* if not initialized, need to assign a channel */
if (isatty(file_num) > 0 /* isatty: 1=yes, 0=no, -1=problem */
- && which_gawk != exe_debugging) {
+ && ! do_debug) {
Dsc device;
char devnam[255+1];
diff --git a/vms/vms_gawk.c b/vms/vms_gawk.c
index 222d803d..f22e2fa9 100644
--- a/vms/vms_gawk.c
+++ b/vms/vms_gawk.c
@@ -51,7 +51,7 @@ extern void *gawk_cmd;
extern void _exit(int);
static int vms_usage(int);
-static const char *CmdName; /* "GAWK", "DGAWK", or "PGAWK" */
+static const char *CmdName = "GAWK";
#define ARG_SIZ 250
union arg_w_prefix { /* structure used to simplify prepending of "-" */
@@ -80,10 +80,6 @@ vms_gawk()
int native_dcl = 1, /* assume true until we know otherwise */
short_circ; /* some options make P1, /commands, /input superfluous */
- CmdName = (which_gawk == exe_profiling) ? "PGAWK"
- : (which_gawk == exe_debugging) ? "DGAWK"
- : "GAWK";
-
/* check "GAWK_P1"--it's required; its presence will tip us off */
sts = Cli_Present("GAWK_P1");
if (CondVal(sts) == CondVal(CLI$_SYNTAX)) {
@@ -98,7 +94,7 @@ vms_gawk()
}
short_circ = Present("USAGE") || Present("VERSION") || Present("COPYRIGHT");
if (vmswork(sts)) /* command parsed successfully */
- v_add_arg(argc = 0, CmdName); /* save "GAWK|DGAWK|PGAWK" as argv[0] */
+ v_add_arg(argc = 0, CmdName); /* save "GAWK" as argv[0] */
else if (CondVal(sts) == CondVal(CLI$_INSFPRM))
/* vms_usage() will handle /usage, /version, and /copyright */
return short_circ ? vms_usage(0)
@@ -245,7 +241,7 @@ options: /FIELD_SEPARATOR=\"FS_value\" \n\
complaint = 0; /* clean exit */
} else if (Present("VERSION") || Present("COPYRIGHT")) {
/* construct a truncated Unix-style command line to control main() */
- v_add_arg(argc=0, CmdName); /* save "GAWK",&c as argv[0] */
+ v_add_arg(argc=0, CmdName); /* save "GAWK" as argv[0] */
#if 0
v_add_arg(++argc, Present("VERSION") ? "-V" : "-C");
#else
diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com
index 047e49a2..95c6aeb3 100644
--- a/vms/vmsbuild.com
+++ b/vms/vmsbuild.com
@@ -10,9 +10,10 @@ $! gawk 3.1.1 revised, Apr'02
$! gawk 3.1.6 revised, Mar'07
$! gawk-bytecode revd, Jan'10
$! gawk 4.0.0 revd, May'11
+$! gawk 4.1.0 revd, Nov'12
$!
-$ REL = "4.0" !release version number
-$ PATCHLVL = "1"
+$ REL = "4.1" !release version number
+$ PATCHLVL = "0"
$!
$!
$ CCFLAGS = "/noList" ! "/noOpt/Debug"
@@ -90,12 +91,15 @@ $ cc regex.c
$ cc replace.c
$ cc version.c
$ cc eval.c
-$ cc eval_p.c
-$ cc eval_d.c
$ cc profile.c
-$ cc profile_p.c
$ cc command.c
$ cc debug.c
+$ cc int_array.c
+$ cc cint_array.c
+$ cc gawkapi.c
+$ cc mpfr.c
+$ cc str_array.c
+$ cc symbol.c
$ cc [.vms]vms_misc.c
$ cc [.vms]vms_popen.c
$ cc [.vms]vms_fwrite.c
@@ -112,6 +116,7 @@ array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
gawkmisc.obj,getopt.obj,getopt1.obj,io.obj
main.obj,msg.obj,node.obj
random.obj,re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.obj
+command.obj,debug.obj,int_array.obj,cint_array.obj,gawkapi.obj,mpfr.obj,str_array.obj,symbol.obj
[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
psect_attr=environ,noshr !extern [noshare] char **
@@ -122,42 +127,7 @@ $ write Fopt libs
$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
$ close Fopt
$!
-$ create pgawk.opt
-! PGAWK -- GNU awk w/ run-time profiling
-array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
-gawkmisc.obj,getopt.obj,getopt1.obj,io.obj
-main.obj,msg.obj,node.obj
-random.obj,re.obj,regex.obj,replace.obj,version.obj,eval_p.obj,profile_p.obj
-[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
-[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
-psect_attr=environ,noshr !extern [noshare] char **
-stack=48 !preallocate more pages (default is 20)
-iosegment=128 !ditto (default is 32)
-$ open/append Fopt pgawk.opt
-$ write Fopt libs
-$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
-$ close Fopt
-$!
-$ create dgawk.opt
-! DGAWK -- GNU awk w/ debugging
-array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
-gawkmisc.obj,getopt.obj,getopt1.obj,io.obj
-main.obj,msg.obj,node.obj
-random.obj,re.obj,regex.obj,replace.obj,version.obj
-eval_d.obj,profile.obj,command.obj,debug.obj
-[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
-[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
-psect_attr=environ,noshr !extern [noshare] char **
-stack=48 !preallocate more pages (default is 20)
-iosegment=128 !ditto (default is 32)
-$ open/append Fopt dgawk.opt
-$ write Fopt libs
-$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
-$ close Fopt
-$!
$ v = f$verify(1)
$ link/exe=gawk.exe gawk.opt/options
-$ link/exe=pgawk.exe pgawk.opt/options
-$ link/exe=dgawk.exe dgawk.opt/options
$! 'f$verify(v)'
$ exit
diff --git a/vms/vmstest.com b/vms/vmstest.com
index 179ad679..fd8e7ee3 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -8,6 +8,10 @@ $
$! 3.1.7: changed to share code among many common tests, and
$! to put results for test foo into _foo.tmp instead of tmp.
$!
+$! 4.0.71: New tests:
+$! functab1,functab2,functab3,id,incdupe,incdupe2, incdupe3,include2
+$! symtab1,symtab2,symtab3,symtab4,symtab5,symtab6
+$!
$ echo = "write sys$output"
$ cmp = "diff/Output=_NL:/Maximum=1"
$ igncascmp = "''cmp'/Ignore=Case"
@@ -15,12 +19,10 @@ $ sumslp = "edit/Sum"
$ rm = "delete/noConfirm/noLog"
$ mv = "rename/New_Vers"
$ gawk = "$sys$disk:[-]gawk"
-$ pgawk = "$sys$disk:[-]pgawk"
$ AWKPATH_srcdir = "define/User AWKPATH sys$disk:[]"
$
$ listdepth = 0
$ pipeok = 0
-$ pgawkok = -1
$ floatmode = -1 ! 0: D_float, 1: G_float, 2: IEEE T_float
$
$ list = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7+" "+p8
@@ -34,7 +36,7 @@ $all:
$bigtest: echo "bigtest..."
$ ! omits "printlang" and "extra"
$ list = "basic unix_tests gawk_ext vms_tests charset_tests" -
- + " machine_tests pgawk_tests"
+ + " machine_tests"
$ gosub list_of_tests
$ return
$
@@ -98,18 +100,20 @@ $gawk_ext: echo "gawk_ext... (gawk.extensions)"
$ list = "aadelete1 aadelete2 aarray1 aasort aasorti" -
+ " argtest arraysort backw badargs beginfile1 binmode1" -
+ " clos1way charasbytes delsub devfd devfd1 devfd2 dumpvars exit" -
- + " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen fsfwfs" -
+ + " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen functab1" -
+ + " functab2 functab3 fsfwfs" -
+ " fwtest fwtest2 fwtest3" -
+ " gensub gensub2 getlndir gnuops2 gnuops3 gnureops" -
- + " icasefs icasers igncdym igncfs ignrcase ignrcas2"
+ + " icasefs id icasers igncdym igncfs ignrcase ignrcas2 incdupe incdupe2 incdupe3"
$ gosub list_of_tests
-$ list = "indirectcall lint lintold lintwarn match1" -
+$ list = "include2 indirectcall lint lintold lintwarn match1" -
+ " match2 match3 manyfiles mbprintf3 mbstr1" -
+ " nastyparm next nondec" -
+ " nondec2 patsplit posix profile1 procinfs printfbad1" -
- + " printfbad2 printfbad3 pty1 regx8bit rebuf reint" -
- + " reint2 rsstart1 rsstart2 rsstart3 rstest6 shadow" -
- + " sortfor sortu splitarg4 strtonum strftime switch2"
+ + " printfbad2 printfbad3 profile2 profile3 pty1" -
+ + " regx8bit rebuf reint reint2 rsstart1 rsstart2 rsstart3 rstest6" -
+ + " shadow sortfor sortu splitarg4 strtonum strftime switch2" -
+ + " symtab1 symtab2 symtab3 symtab4 symtab5 symtab6"
$ gosub list_of_tests
$ return
$
@@ -135,16 +139,6 @@ $ list = "double1 double2 fmtspcl intformat"
$ gosub list_of_tests
$ return
$
-$ ! pgawk_tests is part of bigtest; profile_tests is a separate subset
-$profile_tests: echo "profile_tests..."
-$ list = "profile1"
-$ gosub list_of_tests
-$ ! fall through to pgawk_tests
-$pgawk_tests: echo "pgawk_tests..."
-$ list = "profile2 profile3"
-$ gosub list_of_tests
-$ return
-$
$extra: echo "extra..."
$ list = "regtest inftest inet"
$ gosub list_of_tests
@@ -378,15 +372,16 @@ $pty1:
$ echo "''test': not supported"
$ return
$
-$messages: echo "messages"
+$
+$messages: echo "''test'"
$ set noOn
-$ gawk -f messages.awk > out2 >& out3
-$ cmp out1.ok out1.
-$ if $status then rm out1.;
-$ cmp out2.ok out2.
-$ if $status then rm out2.;
-$ cmp out3.ok out3.
-$ if $status then rm out3.;
+$ gawk -f 'test'.awk > _out2 >& _out3
+$ cmp out1.ok _out1.
+$ if $status then rm _out1.;
+$ cmp out2.ok _out2.
+$ if $status then rm _out2.;
+$ cmp out3.ok _out3.
+$ if $status then rm _out3.;
$ set On
$ return
$
@@ -608,6 +603,67 @@ $ cmp intprec.ok _intprec.tmp
$ if $status then rm _intprec.tmp;
$ return
$
+$incdupe: echo "''test'"
+$ set noOn
+$ gawk --lint -i inclib -i inclib.awk "BEGIN {print sandwich(""a"", ""b"", ""c"")}" > _'test'.tmp 2>&1
+$ if .not. $status then call exit_code 1 _'test'.tmp
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
+$ set On
+$ return
+$
+$incdupe2: echo "''test'"
+$ set noOn
+$ gawk --lint -f inclib -f inclib.awk >_'test'.tmp 2>&1
+$ if .not. $status then call exit_code 1 _'test'.tmp
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
+$ set On
+$ return
+$
+$incdupe3: echo "''test'"
+$ gawk --lint -f hello -f hello.awk >_'test'.tmp 2>&1
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
+$ return
+$
+$include2: echo "''test'"
+$ gawk -i inclib "BEGIN {print sandwich(""a"", ""b"", ""c"")}" >_'test'.tmp 2>&1
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
+$ return
+$
+$id:
+$symtab1:
+$symtab2:
+$symtab3: echo "''test'"
+$ set noOn
+$ gawk -f 'test'.awk >_'test'.tmp 2>&1
+$ if .not. $status then call exit_code 2 _'test'.tmp
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
+$ set On
+$ return
+$
+$symtab4:
+$symtab5: echo "''test'"
+$ set noOn
+$ gawk -f 'test'.awk <'test'.in >_'test'.tmp 2>&1
+$ if .not. $status then call exit_code 2 _'test'.tmp
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
+$ set On
+$ return
+$
+$symtab6: echo "''test'"
+$ set noOn
+$ gawk -d__'test'.tmp -f 'test'.awk
+$ pipe search __'test'.tmp "ENVIRON" /match=nand | search sys$pipe "PROCINFO" /match=nand > _'test'.tmp
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*,__'test'.tmp;*
+$ set On
+$ return
+$
$childin: echo "childin skipped"
$ return
$! note: this `childin' test currently [gawk 3.0.3] fails for vms
@@ -803,7 +859,9 @@ $aadelete1:
$aadelete2:
$arrayparm:
$fnaryscl:
-$match2:
+$functab1:
+$functab2:
+$functab3:
$nastyparm:
$opasnslf:
$opasnidx:
@@ -956,7 +1014,6 @@ $aryprm4:
$aryprm5:
$aryprm6:
$aryprm7:
-$delfunc:
$dfastress:
$nfneg:
$numindex:
@@ -972,8 +1029,9 @@ $ cmp 'test'.ok _'test'.tmp
$ if $status then rm _'test'.tmp;
$ return
$
-$fnamedat:
-$fnasgnm:
+$ !
+$ ! For tests requiring exit code 2
+$ !
$ echo "''test'"
$ set noOn
$ gawk -f 'test'.awk <'test'.in >_'test'.tmp 2>&1
@@ -991,8 +1049,11 @@ $ cmp exitval2.ok _exitval2.tmp
$ if $status then rm _exitval2.tmp;
$ return
$
+$delfunc:
$fcall_exit2:
+$fnamedat:
$fnarray2:
+$fnasgnm:
$fnmisc:
$gsubasgn:
$unterm:
@@ -1050,6 +1111,7 @@ $
$fcall_exit:
$fnarray:
$funsmnam:
+$match2:
$paramdup:
$paramres:
$parseme:
@@ -1481,62 +1543,45 @@ $ cmp dumpvars.ok _dumpvars.tmp
$ if $status then rm _dumpvars.tmp;
$ return
$
-$profile1: echo "profile1"
-$ ! this profile test is run with gawk rather than pgawk
+$profile1: echo "''test'"
$ ! FIXME: for both gawk invocations which pipe output to SORT,
$ ! two output files get created; the top version has real output
$ ! but there's also an empty lower version.
-$ oldout = f$search("_profile1.tmp1")
-$ gawk --profile -v "sortcmd=SORT sys$intput: sys$output:" -
+$ oldout = f$search("_''test'.tmp1")
+$ gawk --pretty-print -v "sortcmd=SORT sys$intput: sys$output:" -
-f xref.awk dtdgport.awk > _'test'.tmp1
-$ badout = f$search("_profile1.tmp1;-1")
+$ badout = f$search("_''test'.tmp1;-1")
$ if badout.nes."" .and. badout.nes.oldout then rm 'badout'
-$ oldout = f$search("_profile1.tmp2")
+$ oldout = f$search("_''test'.tmp2")
$ gawk -v "sortcmd=SORT sys$intput: sys$output:" -
-f awkprof.out dtdgport.awk > _'test'.tmp2
-$ badout = f$search("_profile1.tmp2;-1")
+$ badout = f$search("_''test'.tmp2;-1")
$ if badout.nes."" .and. badout.nes.oldout then rm 'badout'
-$ cmp _profile1.tmp1 _profile1.tmp2
-$ if $status then rm _profile1.tmp%;,awkprof.out;
-$ return
-$
-$ ! pgawk tests; building pgawk is optional so have to check whether it's here
-$profile2:
-$profile3:
-$ if pgawkok.lt.0
-$ then f = f$parse(pgawk,".exe;")
-$ ! expect first parse to fail due to leading dollar sign
-$ if f.eqs."" then f = f$parse(f$extract(1,999,pgawk),".exe;")
-$ if f.nes."" then f = f$search(f)
-$ pgawkok = (f.nes."").and.1 ! set to 1 or 0
-$ if .not.pgawkok then -
- echo "Can't find pgawk.exe so can't run profiling tests."
-$ endif
-$ if pgawkok then goto do__'test'
-$ echo "''test' skipped"
+$ cmp _'test'.tmp1 _'test'.tmp2
+$ if $status then rm _'test'.tmp%;,awkprof.out;
$ return
$
-$do__profile2: echo "profile2"
-$ pgawk -v "sortcmd=SORT sys$input: sys$output:" -
+$profile2: echo "''test'"
+$ gawk --profile -v "sortcmd=SORT sys$input: sys$output:" -
-f xref.awk dtdgport.awk > _NL:
$ ! sed <awkprof.out 1,2d >_profile2.tmp
-$ sumslp awkprof.out /update=sys$input: /output=_profile2.tmp
+$ sumslp awkprof.out /update=sys$input: /output=_'test'.tmp
-1,2
/
$ rm awkprof.out;
-$ cmp profile2.ok _profile2.tmp
-$ if $status then rm _profile2.tmp;*
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
$ return
$
-$do__profile3: echo "profile3"
-$ pgawk -f profile3.awk > _NL:
+$profile3: echo "''test'"
+$ gawk --profile -f 'test'.awk > _NL:
$ ! sed <awkprof.out 1,2d >_profile3.tmp
-$ sumslp awkprof.out /update=sys$input: /output=_profile3.tmp
+$ sumslp awkprof.out /update=sys$input: /output=_'test'.tmp
-1,2
/
$ rm awkprof.out;
-$ cmp profile3.ok _profile3.tmp
-$ if $status then rm _profile3.tmp;*
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;*
$ return
$
$next: echo "next"