diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 13:17:58 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 13:17:58 +0300 |
commit | e888f1834b88270590b7e04d64c03c75863e4565 (patch) | |
tree | ab679ecbf16dc4f11b90a53f4b1e0084d78c98b0 /vms | |
parent | fae4762eba9ff7bb466a600130e9c90eaac6b0bc (diff) | |
download | gawk-e888f1834b88270590b7e04d64c03c75863e4565.tar.gz |
Move to gawk-3.1.2.gawk-3.1.2
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ChangeLog | 52 | ||||
-rw-r--r-- | vms/descrip.mms | 20 | ||||
-rw-r--r-- | vms/gawk.hlp | 51 | ||||
-rw-r--r-- | vms/gawkmisc.vms | 4 | ||||
-rw-r--r-- | vms/vms-conf.h | 14 | ||||
-rw-r--r-- | vms/vms_args.c | 2 | ||||
-rw-r--r-- | vms/vms_cli.c | 2 | ||||
-rw-r--r-- | vms/vms_gawk.c | 12 | ||||
-rw-r--r-- | vms/vms_misc.c | 4 | ||||
-rw-r--r-- | vms/vmstest.com | 26 |
10 files changed, 130 insertions, 57 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog index 162b2fb5..210976ba 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,55 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins <arnold@skeeve.com> + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Thu Feb 27 17:54:33 2003 Pat Rankin <rankin@pactechdata.com> + + * descrip.mms: Revert regex compilation to single file. + vmsbuild.com: Likewise. + +Thu Feb 20 18:06:54 2003 Pat Rankin <rankin@pactechdata.com> + + * vms_gawk.c (vms_gawk): Don't check for `RUNUSED' status because + it gets a false match when gawk is invoked via fork+exec. + + * gawk.hlp: Limited updates to the release notes section. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins <arnold@skeeve.com> + + All relevant files: Copyright year updated to 2003. + +Mon Feb 3 20:37:09 2003 Pat Rankin <rankin@pactechdata.com> + + * vms-conf.h (ssize_t): Define as int. + (TIME_T_UNSIGNED): New macro; used in strftime. + * vms_cli.c (Cli_Parse_Command): Increase command buffer size + from 2.5Kb to 8Kb. + + From Steve Pitcher: + * vms_gawk.c (vms_gawk): Don't report "missing required element" + for INSFPRM status unless invoked via a native DCL verb. + + From Jouk Jansen: + * vms-conf.h (CRTL_VER_V731): New macro. + * vms_misc.c (getpgrp): Use it. + +Mon Dec 23 16:53:42 2002 Pat Rankin <rankin@pactechdata.com> + + * descrip.mms (AWKOBJ1, AWKOBJ2): Split AWKOBJS into pieces to + avoid line length overflow when creating gawk.opt. + (regcomp.obj, regexec.obj, regex_internal.obj): New targets. + * vmsbuild.com: Likewise. + +Thu Nov 21 19:45:08 2002 Pat Rankin <rankin@pactechdata.com> + + * descrip.mms: Update to reflect regex changes; eliminate dfa. + + * vmstest.com (exit_code): Hack to add "EXIT CODE n" record to + output for tests that trigger gawk failure. + Wed May 1 16:41:32 2002 Arnold D. Robbins <arnold@skeeve.com> * Release 3.1.1: Release tar file made. diff --git a/vms/descrip.mms b/vms/descrip.mms index c9e979d2..b1dc393e 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -88,10 +88,11 @@ ECHO = write sys$output NOOP = continue # object files -AWKOBJS = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\ +AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,ext.obj,\ field.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 + msg.obj,node.obj,random.obj,re.obj +AWKOBJ2 = regex.obj,replace.obj,version.obj,eval.obj,profile.obj +AWKOBJS = $(AWKOBJ1),$(AWKOBJ2) # VMSOBJS # VMS specific stuff @@ -101,11 +102,12 @@ VMSCMD = gawk_cmd.obj # built from .cld file VMSOBJS = $(VMSCODE),$(VMSCMD) # source and documentation files -AWKSRC = array.c,builtin.c,dfa.c,ext.c,eval.c,field.c,gawkmisc.c,\ +AWKSRC = array.c,builtin.c,ext.c,eval.c,field.c,gawkmisc.c,\ getopt.c,getopt1.c,io.c,main.c,msg.c,node.c,random.c,re.c,\ - random.c,regex.c,replace.c,version.c,eval.c,profile.c + random.c,regcomp.c,regex.c,regex_internal.c,regexec.c,\ + replace.c,version.c,eval.c,profile.c -ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\ +ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,getopt.h,\ patchlev.h,protos.h,random.h VMSSRC = $(VMSDIR)gawkmisc.vms,$(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,\ @@ -137,7 +139,8 @@ gawk.exe : $(AWKOBJS) $(VMSOBJS) gawk.opt gawk.opt : $(MAKEFILE) # create linker options file open/write opt gawk.opt ! ~ 'cat <<close >gawk.opt' write opt "! GAWK -- GNU awk" - @ write opt "$(AWKOBJS)" + @ 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)" @@ -156,11 +159,12 @@ $(VMSCODE) : awk.h config.h $(VMSDIR)redirect.h $(VMSDIR)vms.h gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms -$(AWKOBJS) : awk.h dfa.h regex.h config.h $(VMSDIR)redirect.h +$(AWKOBJS) : awk.h regex.h config.h $(VMSDIR)redirect.h random.obj : random.h builtin.obj : random.h main.obj : patchlev.h awkgram.obj : awkgram.c awk.h +regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h # bison or yacc required awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c diff --git a/vms/gawk.hlp b/vms/gawk.hlp index bc1a2210..8b5cbdcd 100644 --- a/vms/gawk.hlp +++ b/vms/gawk.hlp @@ -4,6 +4,7 @@ ! revised, Jul'92 ! revised, Jan'95 ! revised, Apr'97 +! revised, Jan'03 ! Online help for GAWK. ! 1 GAWK @@ -11,7 +12,7 @@ the awk programming language. awk is an interpretive language which can handle many data-reformatting jobs with just a few lines of code. It has powerful string manipulation and pattern matching capabilities - built in. This version should be compatible with POSIX 1003.2 awk. + built in. This version is compatible with POSIX 1003.2 awk. The VMS version of GAWK supports both the original UN*X-style command interface and a DCL interface. The only setup requirement for GAWK @@ -31,10 +32,8 @@ The options are case-sensitive. On VMS, the DCL command interpreter converts unquoted text into uppercase before passing it to the running program. However, GAWK is written in 'C' and the C Run-Time Library - (VAXCRTL) converts unquoted text into *lowercase*. Therefore, the - -Fval and -W options must be enclosed in quotes. - - Note: under VMS POSIX, the usual shell command line processing occurs. + (VAXCRTL or DECC$SHR) converts unquoted text into *lowercase*. + Therefore, the -Fval and -W options must be enclosed in quotes. 3 options -f file use the specified file as the awk program source; if more than one instance of -f is used, each file will be read @@ -67,7 +66,7 @@ (since awk's 'print' statement includes the trailing 'newline'). On VMS, to include a quote character inside of a quoted string, two - successive quotes ("") must be used. (Not necessary for VMS POSIX.) + successive quotes ("") must be used. 3 data_files After all dash-options are examined, and after the program text if there were no occurrences of the -f option, remaining (space separated) @@ -104,10 +103,6 @@ >>$vfile incorrect; would be interpreted as file "$vfile" in stream-lf format rather than as file "vfile" in RMS 'text' format | error; command line pipes not supported - - Note: under VMS POSIX these features are implemented by the shell - rather than inside GAWK, so consult the shell documentation for - specific details. 3 wildcard_expansion The command parsing in the VMS implementation of GAWK does some emulation of a UN*X-style shell, where certain characters on the @@ -127,11 +122,6 @@ found, those filenames are put into the command line in place of the original pattern. If no matching files are found, the original pattern is left in place. - - Note: under VMS POSIX wildcard expansion, or "file globbing", is - performed by the shell rather than inside GAWK, so consult the shell - documentation for details. In particular, the last sentence of the - previous paragraph does not apply. 2 DCL_syntax GAWK's DCL-style interface is more or less a standard DCL command, with one required parameter. Multiple values--when present--are separated @@ -143,8 +133,6 @@ Usage: GAWK /COMMANDS="awk program text" data_file[,data_file,...] or GAWK /INPUT=awk_file data_file[,"Var=value",data_file,...] ( or GAWK /INPUT=(awk_file1,awk_file2,...) data_file[,...] ) - - Not applicable under VMS POSIX. 3 Parameter data_file[,datafile,...] (data_file data_file ...) data_file[,"Var=value",...,data_file,...] (data_file Var=value &c) @@ -1110,6 +1098,13 @@ incorporated into the official GNU distribution of version 2.13 in Spring 1991. (Version 2.12 was never publically released.) 2 release_notes + GAWK 3.1.2 handles parsing of the command line differently than + earlier versions for the case where there is a single token, which + often yielded a "missing required element" error in earlier versions. + + [Note for 3.1.x: these release notes haven't been updated in quite + some time. Most of the information is still applicable though.] + GAWK 3.0.3 tested under VAX/VMS V6.2 and Alpha/VMS V6.2, April, 1997; should be compatible with VMS versions V4.6 and later. Current source code is compatible with DEC's DEC C v5.x or VAX C v3.2; also compiles @@ -1121,24 +1116,9 @@ look in the current default directory, then if the file wasn't found it will look in the directory specified by the translation of logical name "AWK_LIBRARY". - - Not applicable under VMS POSIX. 3 known_problems There are several known problems with GAWK running on VMS. Some can - be ignored, others require work-arounds. Note: GAWK in the VMS POSIX - environment does not have these problems. -4 command_line_parsing - The command - gawk "program text" - will pass the first phase of DCL parsing (the single required - parameter is present), then it will give an error that a required - element (either /input=awk_file or /commands="program text") is - missing. If what was intended (as is most likely) is to pass the - program text to the UN*X-style command interface, the following - variation is required - gawk -- "program text" - The presence of "--", which is normally optional, will inhibit the - attempt to use DCL parsing (as will any '-' option or redirection). + be ignored, others require work-arounds. 4 file_formats If a file having the RMS attribute "Fortran carriage control" is read as input, it will generate an empty first record if the first @@ -1199,7 +1179,8 @@ VMS status value, so 0 indicates success and non-zero indicates failure. The final exit status will be 1 (VMS success) if 0 is used, or even (VMS non-success) if non-zero is used. -3 changes +!3 changes +3 prior_changes Changes between version 3.0.6 and 2.15.6 General @@ -1211,8 +1192,6 @@ VMS-specific Switched to build with DEC C by default - -3 prior_changes Changes between version 2.15.6 and 2.14 General diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms index 4d47369c..a364801d 100644 --- a/vms/gawkmisc.vms +++ b/vms/gawkmisc.vms @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-1996 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-1996, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -70,7 +70,7 @@ int flag; /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff --git a/vms/vms-conf.h b/vms/vms-conf.h index 92794d2d..50c2790a 100644 --- a/vms/vms-conf.h +++ b/vms/vms-conf.h @@ -3,11 +3,11 @@ /* * config.h -- configuration definitions for gawk. * - * For VMS (assumes V4.6 or later; tested on V5.5-2) + * For VMS (assumes V4.6 or later; tested on V5.5-2 and V7.1) */ /* - * Copyright (C) 1991-1992, 1995-1996, 1999, 2001, 2002 the Free Software Foundation, Inc. + * Copyright (C) 1991-1992, 1995-1996, 1999, 2001, 2002, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -144,7 +144,7 @@ #undef HAVE_PORTALS /* don't have portals on /p on this system */ #undef DYNAMIC /* don't allow dynamic addition of builtins */ #define STRTOD_NOT_C89 1 /* strtod doesn't have C89 semantics */ -/* #undef ssize_t */ /* signed version of size_t */ +#define ssize_t int /* signed version of size_t */ /* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT @@ -330,6 +330,9 @@ /* Define as 1 if you have catgets and don't want to use GNU gettext. */ #undef HAVE_CATGETS +/* Whether `time_t' is an unsigned type. */ +#define TIME_T_UNSIGNED 1 + #if 0 #include <custom.h> /* overrides for stuff autoconf can't deal with */ #else @@ -397,10 +400,13 @@ # define __VMS_VER 60100000 #endif #if __CRTL_VER >= 60200000 +# if __CRTL_VER >= 70301000 +# define CRTL_VER_V731 +# endif # undef __CRTL_VER # define __CRTL_VER 60100000 #endif -#endif +#endif /* __DECC */ /* * GNU C diff --git a/vms/vms_args.c b/vms/vms_args.c index fbe50ff6..e63758f7 100644 --- a/vms/vms_args.c +++ b/vms/vms_args.c @@ -23,7 +23,7 @@ * expansion. Should be called immediately upon image startup. * * Pat Rankin, Nov'89 - * rankin@eql.Caltech.EDU + * rankin@pactechdata.com * * <ifile - open 'ifile' (readonly) as 'stdin' * >nfile - create 'nfile' as 'stdout' (stream-lf format) diff --git a/vms/vms_cli.c b/vms/vms_cli.c index a9386216..1638290b 100644 --- a/vms/vms_cli.c +++ b/vms/vms_cli.c @@ -60,7 +60,7 @@ Cli_Parse_Command( const void *cmd_tables, const char *cmd_verb ) Dsc rdesc; unsigned :32; unsigned :32; unsigned :32; } cmd; U_Long sts; int ltmp; - char longbuf[2600]; + char longbuf[8200]; (void)lib$establish(lib$sig_to_ret); memset(&cmd, 0, sizeof cmd); diff --git a/vms/vms_gawk.c b/vms/vms_gawk.c index e021b375..619144bf 100644 --- a/vms/vms_gawk.c +++ b/vms/vms_gawk.c @@ -1,6 +1,6 @@ /* vms_gawk.c -- parse GAWK command line using DCL syntax - Copyright (C) 1991-1993, 1996 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996, 2003 the Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -65,10 +65,12 @@ vms_gawk() union arg_w_prefix buf; char misc_args[10], *misc_argp; int argc, W_cnt; + int native_dcl = 1; /* assume true until we know otherwise */ /* check "GAWK_P1"--it's required; its presence will tip us off */ sts = Cli_Present("GAWK_P1"); if (CondVal(sts) == CondVal(CLI$_SYNTAX)) { + native_dcl = 0; /* not invoked via a native command verb */ /* syntax error indicates that we weren't invoked as a native DCL command, so we'll now attempt to generate a command from the foreign command string and parse that. @@ -80,18 +82,20 @@ vms_gawk() if (vmswork(sts)) /* command parsed successfully */ v_add_arg(argc = 0, COMMAND_NAME); /* save "GAWK" as argv[0] */ else if (CondVal(sts) == CondVal(CLI$_INSFPRM)) - return vms_usage(USAGE_FILE_RQRD); /* insufficient parameters */ + return native_dcl ? vms_usage(USAGE_FILE_RQRD) : 0; /* insufficient parameters */ else if (CondVal(sts) == CondVal(CLI$_CONFLICT)) return vms_usage(USAGE_BAD_COMBO); /* conflicting qualifiers (/input+/command) */ +#if 0 /* 3.1.2: removed since this can't distinguish RUN vs fork+exec */ else if (CondVal(sts) == CondVal(CLI$_RUNUSED)) return vms_usage(USAGE_RUN_CMD); /* RUN GAWK won't work (no command line) */ +#endif else return 0; /* forced to rely on original parsing */ if (Present("USAGE")) /* give usage message and quit */ return vms_usage(0); else if (! (Present("PROGRAM") || Present("PROGFILE")) ) - return vms_usage(USAGE_PROG_RQRD); /* missing required option */ + return native_dcl ? vms_usage(USAGE_PROG_RQRD) : 0; /* missing required option */ misc_argp = misc_args; *misc_argp++ = '-'; /* now points at &misc_args[1] */ @@ -172,7 +176,7 @@ vms_gawk() } /* vms_usage() - display one or more messages and then terminate */ -static int /* note: doesn't return anything; allows 'return vms_usage()' */ +static int /* note: usually doesn't return */ vms_usage( int complaint ) { static const char diff --git a/vms/vms_misc.c b/vms/vms_misc.c index 439790d5..46c87ef1 100644 --- a/vms/vms_misc.c +++ b/vms/vms_misc.c @@ -1,6 +1,6 @@ /* vms_misc.c -- sustitute code for missing/different run-time library routines. - Copyright (C) 1991-1993, 1996-1997, 2001 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996-1997, 2001, 2003 the Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -222,6 +222,7 @@ void tzset(void) #endif /*VMS_V7*/ +#ifndef CRTL_VER_V731 /* getpgrp() -- there's no such thing as process group under VMS; * job tree might be close enough to be useful though. */ @@ -229,6 +230,7 @@ int getpgrp(void) { return 0; } +#endif #ifndef __GNUC__ void vms_bcopy( const char *src, char *dst, int len ) diff --git a/vms/vmstest.com b/vms/vmstest.com index 6bff4e22..8fb26a53 100644 --- a/vms/vmstest.com +++ b/vms/vmstest.com @@ -338,6 +338,7 @@ $arrayparm: echo "arrayparm" $ set noOn $ AWKPATH_srcdir $ gawk -f arrayparm.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp arrayparm.ok tmp. $ if $status then rm tmp.; @@ -347,6 +348,7 @@ $paramdup: echo "paramdup" $ set noOn $ AWKPATH_srcdir $ gawk -f paramdup.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 1 $ set On $ cmp paramdup.ok tmp. $ if $status then rm tmp.; @@ -365,6 +367,7 @@ $defref: echo "defref" $ set noOn $ AWKPATH_srcdir $ gawk --lint -f defref.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp defref.ok tmp. $ if $status then rm tmp.; @@ -430,6 +433,7 @@ $prmarscl: echo "prmarscl" $ set noOn $ AWKPATH_srcdir $ gawk -f prmarscl.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp prmarscl.ok tmp. $ if $status then rm tmp.; @@ -439,6 +443,7 @@ $sclforin: echo "sclforin" $ set noOn $ AWKPATH_srcdir $ gawk -f sclforin.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp sclforin.ok tmp. $ if $status then rm tmp.; @@ -448,6 +453,7 @@ $sclifin: echo "sclifin" $ set noOn $ AWKPATH_srcdir $ gawk -f sclifin.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp sclifin.ok tmp. $ if $status then rm tmp.; @@ -584,6 +590,7 @@ $fnarray: echo "fnarray" $ set noOn $ AWKPATH_srcdir $ gawk -f fnarray.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnarray.ok tmp. $ if $status then rm tmp.; @@ -705,6 +712,7 @@ $noparms: echo "noparms" $ set noOn $ AWKPATH_srcdir $ gawk -f noparms.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 1 $ set On $ cmp noparms.ok tmp. $ if $status then rm tmp.; @@ -804,6 +812,7 @@ $ $funsmnam: echo "funsmnam" $ set noOn $ gawk -f funsmnam.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp funsmnam.ok tmp. $ if $status then rm tmp.; @@ -812,6 +821,7 @@ $ $fnamedat: echo "fnamedat" $ set noOn $ gawk -f fnamedat.awk < fnamedat.in >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnamedat.ok tmp. $ if $status then rm tmp.; @@ -820,6 +830,7 @@ $ $numindex: echo "numindex" $ set noOn $ gawk -f numindex.awk < numindex.in >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp numindex.ok tmp. $ if $status then rm tmp.; @@ -828,6 +839,7 @@ $ $subslash: echo "subslash" $ set noOn $ gawk -f subslash.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp subslash.ok tmp. $ if $status then rm tmp.; @@ -836,6 +848,7 @@ $ $opasnslf: echo "opasnslf" $ set noOn $ gawk -f opasnslf.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp opasnslf.ok tmp. $ if $status then rm tmp.; @@ -844,6 +857,7 @@ $ $opasnidx: echo "opasnidx" $ set noOn $ gawk -f opasnidx.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp opasnidx.ok tmp. $ if $status then rm tmp.; @@ -936,6 +950,7 @@ $parseme: echo "parseme" $ set noOn $ AWKPATH_srcdir $ gawk -f parseme.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp parseme.ok tmp. $ if $status then rm tmp.; @@ -951,6 +966,7 @@ $fnaryscl: echo "fnaryscl" $ set noOn $ AWKPATH_srcdir $ gawk -f fnaryscl.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnaryscl.ok tmp. $ if $status then rm tmp.; @@ -960,6 +976,7 @@ $fnasgnm: echo "fnasgnm" $ set noOn $ AWKPATH_srcdir $ gawk -f fnasgnm.awk < fnasgnm.in >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnasgnm.ok tmp. $ if $status then rm tmp.; @@ -1241,5 +1258,14 @@ $ else cmp nl: nl: !deassign/user sys${error,output} $ endif $ endsubroutine !fixup_LRL $ +$! add a fake "EXIT CODE" record to the end of the temporary output file +$! to simulate the ``|| echo EXIT CODE $$? >>_$@'' shell script usage +$exit_code: subroutine +$ if f$trnlnm("FTMP").nes."" then close/noLog ftmp +$ open/Append ftmp tmp. +$ write ftmp "EXIT CODE: ",p1 +$ close ftmp +$ endsubroutine !exit_code +$ $!NOTREACHED $ exit |