diff options
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ChangeLog | 40 | ||||
-rw-r--r-- | vms/gawkmisc.vms | 26 | ||||
-rw-r--r-- | vms/vms-conf.h | 9 | ||||
-rw-r--r-- | vms/vms_fwrite.c | 2 | ||||
-rw-r--r-- | vms/vms_gawk.c | 10 | ||||
-rw-r--r-- | vms/vmsbuild.com | 50 |
6 files changed, 89 insertions, 48 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog index d13315d2..2109f6a3 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,7 @@ +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 +10,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/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 |