diff options
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ChangeLog | 50 | ||||
-rw-r--r-- | vms/descrip.mms | 50 | ||||
-rw-r--r-- | vms/gawkmisc.vms | 11 | ||||
-rw-r--r-- | vms/redirect.h | 50 | ||||
-rw-r--r-- | vms/vms-conf.h | 13 | ||||
-rw-r--r-- | vms/vms.h | 54 | ||||
-rw-r--r-- | vms/vms_fwrite.c | 16 | ||||
-rw-r--r-- | vms/vms_misc.c | 8 | ||||
-rw-r--r-- | vms/vms_popen.c | 14 | ||||
-rw-r--r-- | vms/vmsbuild.com | 33 |
10 files changed, 224 insertions, 75 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog index fcb60064..2a9f92af 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,53 @@ +Sat Nov 6 16:33:01 2010 Pat Rankin <rankin@pactechdata.com> + + * redirect.h, vms.h: Drop use of P() macro in function prototypes. + * vms_misc.c, vms_popen.c: Likewise. + +Wed Aug 11 17:47:57 2010 Pat Rankin <rankin@pactechdata.com> + + * redirect.h (vsnprintf): Move #define into !HAVE_SNPRINTF block. + +Tue Aug 10 12:57:40 2010 Pat Rankin <rankin@pactechdata.com> + + * redirect.h: Declare vsnprintf and define it to use missing_d one. + * vms-conf.h: Add #undef template for HAVE_SETENV. + +Mon Aug 9 10:58:03 2010 Arnold Robbins <arnold@skeeve.com> + + * redirect.h: Add decls of setenv, unsetenv, and snprintf to + avoid informational warnings from the compiler about undecleared + functions. + +Thu Aug 5 15:01:55 2010 Arnold Robbins <arnold@skeeve.com> + + * vms-build.com: Correctly build dgawk. + * redirect.h (setenv, unsetenv): Define as macros to get the + replacement versions in missing_d/. + +Mon Mar 8 15:17:41 2010 Pat Rankin <rankin@pactechdata.com> + + * vmstest.com (space): handle alternate error reason. + (fmtspcl): suppress this test. + +Wed Mar 3 16:29:10 2010 Pat Rankin <rankin@pactechdata.com> + + * vms-conf.h: sync with configh.in; reformat a couple of comments. + (PACKAGE_URL): add #undef as placeholder. + +Wed Jan 6 19:05:05 2010 Pat Rankin <rankin@pactechdata.com> + + * vms_fwrite.c (tty_fwrite): Check which_gawk, and stick to + ordinary fwrite() when it's exe_debugging because dgawk uses + other stdio calls besides fwrite for terminal output, and that + wouldn't interleave sanely with tty_fwrite()'s terminal output. + +Wed Jan 6 19:05:05 2010 Pat Rankin <rankin@pactechdata.com> + + * awk.h (exe_mode): Define new enum: exe_gawking for regular gawk, + exe_debugging for dgawk, and exe_profiling for pgawk. + (which_gawk): Declare new variable. + * eval.c (which_gawk): Define it. + Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com> * Release 3.1.8: Release tar file made. diff --git a/vms/descrip.mms b/vms/descrip.mms index a3abd14b..0357dd2b 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -16,6 +16,10 @@ # 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 @@ -25,6 +29,9 @@ # target. If you use bison and it is already defined system-wide, # comment out the PARSERINIT definition. # +# command.c : +# Similar to awkgram.c; built from command.y with yacc or bison. +# # install.help : # You can make the target 'install.help' to load the VMS help text # into a help library. Modify the HELPLIB macro if you don't want @@ -94,6 +101,7 @@ 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,\ @@ -113,6 +121,8 @@ AWKSRC = array.c,builtin.c,dfa.c,eval.c,eval_p.c,ext.c,field.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 @@ -131,7 +141,7 @@ REL=3.1 PATCHLVL=8 # generic target -all : gawk,pgawk +all : gawk,pgawk,dgawk $(NOOP) # dummy target to allow building "gawk" in addition to explicit "gawk.exe" @@ -139,14 +149,18 @@ gawk : gawk.exe $(ECHO) " GAWK " pgawk : pgawk.exe $(ECHO) " PGAWK " +dgawk : dgawk.exe + $(ECHO) " DGAWK " # rules to build gawk gawk.exe : $(GAWKOBJ) $(AWKOBJS) $(VMSOBJS) gawk.opt $(LINK) $(LINKFLAGS) gawk.opt/options -# rules to build pgawk +# 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' @@ -176,6 +190,20 @@ pgawk.opt : $(MAKEFILE) # create linker options file 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 + vms_misc.obj : $(VMSDIR)vms_misc.c vms_popen.obj : $(VMSDIR)vms_popen.c vms_fwrite.obj : $(VMSDIR)vms_fwrite.c @@ -190,22 +218,33 @@ $(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 # bison or yacc required awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c @- if f$search("ytab.c") .nes."" then delete ytab.c;* !POSIX yacc @- if f$search("y_tab.c") .nes."" then delete y_tab.c;* !DEC/Shell yacc - @- if f$search("awk_tab.c").nes."" then delete awk_tab.c;* !bison + @- if f$search("awkgram_tab.c").nes."" then delete awkgram_tab.c;* !bison + - $(PARSERINIT) + $(PARSER) $(YFLAGS) $< + @- 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;* + @- if f$search("command_tab.c").nes."" then delete command_tab.c;* - $(PARSERINIT) $(PARSER) $(YFLAGS) $< @- 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("awk_tab.c").nes."" then rename/new_vers awk_tab.c $@ + @- if f$search("command_tab.c").nes."" then rename/new_vers command_tab.c $@ config.h : $(VMSDIR)vms-conf.h copy $< $@ @@ -223,12 +262,13 @@ tidy : - if f$search("[.*]*.*;-1").nes."" then purge [.*] clean : - - delete *.obj;*,gawk.opt;*,pgawk.opt;* + - delete *.obj;*,gawk.opt;*,pgawk.opt;*,dgawk.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 df5ded15..6f8fdaef 100644 --- a/vms/gawkmisc.vms +++ b/vms/gawkmisc.vms @@ -169,3 +169,14 @@ int fd; /* no-op */ return; } + +/* files_are_same --- deal with VMS struct stat */ + +int +files_are_same(struct stat *f1, struct stat *f2) +{ + return (strcmp(f1->st_dev, f2->st_dev) == 0 + && f1->st_ino[0] == f2->st_ino[0] + && f1->st_ino[1] == f2->st_ino[1] + && f1->st_ino[2] == f2->st_ino[2]); +} diff --git a/vms/redirect.h b/vms/redirect.h index f6df0f65..e6bd4a04 100644 --- a/vms/redirect.h +++ b/vms/redirect.h @@ -41,6 +41,8 @@ #define regexec gnu_regexec #define regfree gnu_regfree #define regerror gnu_regerror +#define setenv gawk_setenv +#define unsetenv gawk_unsetenv #ifndef VMS_POSIX #define strftime gnu_strftime /* always use missing/strftime.c */ #define strcasecmp gnu_strcasecmp @@ -84,47 +86,51 @@ extern int gettimeofday(struct timeval *,void *); #define pclose vms_pclose #ifndef HAVE_SNPRINTF #define snprintf gawk_snprintf /* avoid %CC-I-INTRINSICDECL diagnostic */ +#define vsnprintf gawk_vsnprintf #else #ifdef CRTL_VER_V732 /* when overriding the version of the C library that compiler thinks is in use, we need to duplicate something being suppressed in <stdio.h> */ -int snprintf(char *,size_t,const char *,...); +extern int snprintf(char *,size_t,const char *,...); #endif #endif +extern int vsnprintf(char *restrict,size_t,const char *,va_list); +extern int setenv(const char *,const char *,int); +extern int unsetenv(const char *); #define strerror vms_strerror #define strdup vms_strdup #define unlink vms_unlink #if defined(VAXC) || (defined(__GNUC__) && !defined(__alpha)) #define fstat(fd,sb) VMS_fstat(fd,sb) #endif -extern void exit P((int)); -extern int open P((const char *,int,...)); -extern char *strerror P((int)); -extern char *strdup P((const char *str)); -extern int vms_devopen P((const char *,int)); +extern void exit(int); +extern int open(const char *,int,...); +extern char *strerror(int); +extern char *strdup(const char *str); +extern int vms_devopen(const char *,int); # ifndef NO_TTY_FWRITE #define fwrite tty_fwrite #define fclose tty_fclose -extern size_t fwrite P((const void *,size_t,size_t,FILE *)); -extern int fclose P((FILE *)); +extern size_t fwrite(const void *,size_t,size_t,FILE *); +extern int fclose(FILE *); # endif -extern FILE *popen P((const char *,const char *)); -extern int pclose P((FILE *)); -extern void vms_arg_fixup P((int *,char ***)); +extern FILE *popen(const char *,const char *); +extern int pclose(FILE *); +extern void vms_arg_fixup(int *,char ***); /* some things not in STDC_HEADERS */ -extern size_t gnu_strftime P((char *,size_t,const char *,const struct tm *)); -extern int unlink P((const char *)); -extern int getopt P((int,char **,char *)); -extern int isatty P((int)); +extern size_t gnu_strftime(char *,size_t,const char *,const struct tm *); +extern int unlink(const char *); +extern int getopt(int,char **,char *); +extern int isatty(int); #ifndef fileno -extern int fileno P((FILE *)); +extern int fileno(FILE *); #endif -extern int close P((int)); -extern int dup P((int)); -extern int dup2 P((int, int)); -extern int read P((int, void *, int)); -extern int getpgrp P((void)); -extern void tzset P((void)); +extern int close(int); +extern int dup(int); +extern int dup2(int, int); +extern int read(int, void *, int); +extern int getpgrp(void); +extern void tzset(void); #endif /* not VMS_POSIX and not IN_CONFIG_H */ diff --git a/vms/vms-conf.h b/vms/vms-conf.h index 079cc506..110c73f2 100644 --- a/vms/vms-conf.h +++ b/vms/vms-conf.h @@ -145,11 +145,14 @@ /* Define to 1 if you have the <libintl.h> header file. */ #undef HAVE_LIBINTL_H +/* Define if you have the sigsegv library. */ +#undef HAVE_LIBSIGSEGV + /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM -/* Define if you have the sigsegv library. */ -#undef HAVE_LIBSIGSEGV +/* Define to 1 if you have a fully functional readline library. */ +#undef HAVE_LIBREADLINE /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 @@ -208,12 +211,12 @@ /* we have portals on /p on this system */ #undef HAVE_PORTALS +/* we'll use the one in [.missing_d] */ +#undef HAVE_SETENV + /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -/* Define to 1 if you have the <signum.h> header file. */ -#undef HAVE_SIGNUM_H - /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF @@ -52,36 +52,36 @@ typedef struct _itm { U_Short len, code; void *buffer; U_Short *retlen; } Itm; #define CondVal(sts) ((sts)&0x0FFFFFF8) /* strip severity & msg inhibit */ #define Descrip(strdsc,strbuf) Dsc strdsc = {sizeof strbuf - 1, (char *)strbuf} -extern int shell$is_shell P((void)); -extern U_Long lib$find_file P((const Dsc *, Dsc *, void *, ...)); -extern U_Long lib$find_file_end P((void *)); +extern int shell$is_shell(void); +extern U_Long lib$find_file(const Dsc *, Dsc *, void *, ...); +extern U_Long lib$find_file_end(void *); #ifndef NO_TTY_FWRITE -extern U_Long lib$get_ef P((long *)); -extern U_Long sys$assign P((const Dsc *, short *, long, const Dsc *)); -extern U_Long sys$dassgn P((short)); -extern U_Long sys$qio P((U_Long, U_Long, U_Long, void *, +extern U_Long lib$get_ef(long *); +extern U_Long sys$assign(const Dsc *, short *, long, const Dsc *); +extern U_Long sys$dassgn(short); +extern U_Long sys$qio(U_Long, U_Long, U_Long, void *, void (*)(U_Long), U_Long, - const char *, int, int, U_Long, int, int)); -extern U_Long sys$synch P((long, void *)); + const char *, int, int, U_Long, int, int); +extern U_Long sys$synch(long, void *); #endif /*!NO_TTY_FWRITE*/ -extern U_Long lib$spawn P((const Dsc *,const Dsc *,const Dsc *, - const U_Long *,const Dsc *,U_Long *,U_Long *,...)); +extern U_Long lib$spawn(const Dsc *,const Dsc *,const Dsc *, + const U_Long *,const Dsc *,U_Long *,U_Long *,...); /* system services for logical name manipulation */ -extern U_Long sys$trnlnm P((const U_Long *,const Dsc *,const Dsc *, - const unsigned char *,Itm *)); -extern U_Long sys$crelnm P((const U_Long *,const Dsc *,const Dsc *, - const unsigned char *,const Itm *)); -extern U_Long sys$crelog P((int,const Dsc *,const Dsc *,unsigned char)); -extern U_Long sys$dellnm P((const Dsc *,const Dsc *,const unsigned char *)); +extern U_Long sys$trnlnm(const U_Long *,const Dsc *,const Dsc *, + const unsigned char *,Itm *); +extern U_Long sys$crelnm(const U_Long *,const Dsc *,const Dsc *, + const unsigned char *,const Itm *); +extern U_Long sys$crelog(int,const Dsc *,const Dsc *,unsigned char); +extern U_Long sys$dellnm(const Dsc *,const Dsc *,const unsigned char *); -extern void v_add_arg P((int, const char *)); -extern void vms_exit P((int)); -extern char *vms_strerror P((int)); -extern char *vms_strdup P((const char *)); -extern int vms_devopen P((const char *,int)); -extern int vms_execute P((const char *, const char *, const char *)); -extern int vms_gawk P((void)); -extern U_Long Cli_Present P((const char *)); -extern U_Long Cli_Get_Value P((const char *, char *, int)); -extern U_Long Cli_Parse_Command P((const void *, const char *)); +extern void v_add_arg(int, const char *); +extern void vms_exit(int); +extern char *vms_strerror(int); +extern char *vms_strdup(const char *); +extern int vms_devopen(const char *,int); +extern int vms_execute(const char *, const char *, const char *); +extern int vms_gawk(void); +extern U_Long Cli_Present(const char *); +extern U_Long Cli_Get_Value(const char *, char *, int); +extern U_Long Cli_Parse_Command(const void *, const char *); diff --git a/vms/vms_fwrite.c b/vms/vms_fwrite.c index 5e8669eb..f38bf634 100644 --- a/vms/vms_fwrite.c +++ b/vms/vms_fwrite.c @@ -1,6 +1,6 @@ /* vms_fwrite.c - augmentation for the fwrite() function. - Copyright (C) 1991-1996 the Free Software Foundation, Inc. + Copyright (C) 1991-1996, 2010 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 @@ -50,6 +50,9 @@ static int prev_file_num; * unless fflush() is always called first. Also, this routine * will not detect that a freopen() call has finished with the * original terminal; tty_fclose() should be used to close a file. + * + * When running gawk's debugging version we stick with normal + * fwrite because dgawk also uses other stdio calls for output. */ #ifdef fwrite # undef fwrite @@ -73,9 +76,11 @@ 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 */ + if (isatty(file_num) > 0 /* isatty: 1=yes, 0=no, -1=problem */ + && which_gawk != exe_debugging) { Dsc device; char devnam[255+1]; + fgetname(file, devnam); /* get 'file's name */ device.len = strlen(device.adr = devnam); /* create descriptor */ if (vmswork(sys$assign(&device, &chan, 0, (Dsc *)0))) { @@ -86,13 +91,16 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file ) /* store channel for later use; -1 => don't repeat failed init attempt */ channel[file_num] = (chan > 0 ? chan : -1); } - if (chan > 0) { /* chan > 0 iff 'file' is a terminal */ + + /* chan > 0 iff 'file' is a terminal and we're not running as dgawk */ + if (chan > 0) { struct _iosbw { U_Short status, count; U_Long rt_kludge; } iosb; register U_Long sts = 1; register char *pt = (char *)buf; register int offset, pos, count = size * number; U_Long cc_fmt, io_func = IO$_WRITEVBLK; int extra = 0; + result = 0; if (is_stderr(file_num)) /* if it's SYS$ERROR (stderr)... */ io_func |= IO$M_CANCTRLO; /* cancel ^O (resume tty output) */ @@ -160,6 +168,7 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file ) #endif /*NO_ALLOCA*/ register char *pt = (char *)buf; register int pos, count = number; + if (pt[count] != '\0') { /*(out of bounds, but relatively safe)*/ pt = (char *)alloca(count + 1); memcpy(pt, buf, count), pt[count] = '\0'; @@ -191,6 +200,7 @@ tty_fclose( FILE *file ) if (file && *file) { /* note: VAXCRTL stdio has extra level of indirection */ int file_num = fileno(file); short chan = file_num < _NFILE ? channel[file_num] : -1; + if (chan > 0) (void)sys$dassgn(chan); /* deassign the channel (ie, close) */ if (file_num < _NFILE) diff --git a/vms/vms_misc.c b/vms/vms_misc.c index a27b47ce..c6298c7a 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, 2003, 2009 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996-1997, 2001, 2003, 2009, 2010 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 @@ -37,7 +37,7 @@ #ifdef strerror # undef strerror #endif -extern char *strerror P((int,...)); +extern char *strerror(int,...); /* vms_strerror() -- convert numeric error code into text string */ char * @@ -88,8 +88,8 @@ unlink( const char *file_spec ) { #ifdef open # undef open #endif -extern int creat P((const char *,int,...)); -extern int open P((const char *,int,unsigned,...)); +extern int creat(const char *,int,...); +extern int open(const char *,int,unsigned,...); /* vms_open() - open a file, possibly creating it */ int diff --git a/vms/vms_popen.c b/vms/vms_popen.c index 599713fc..5a0f2993 100644 --- a/vms/vms_popen.c +++ b/vms/vms_popen.c @@ -1,6 +1,6 @@ /* [.vms]vms_popen.c -- substitute routines for missing pipe calls. - Copyright (C) 1991-1993, 1996 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996, 2010 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 @@ -64,14 +64,14 @@ fork( void ) #include <lnmdef.h> /* logical name definitions */ #ifndef STDC_HEADERS -extern int strcmp P((const char*, const char *)); +extern int strcmp(const char*, const char *); #endif -extern char *mktemp P((char *)); +extern char *mktemp(char *); -static void push_logicals P((void)); -static void pop_logicals P((void)); -static Itm *save_translation P((const Dsc *)); -static void restore_translation P((const Dsc *, const Itm *)); +static void push_logicals(void); +static void pop_logicals(void); +static Itm *save_translation(const Dsc *); +static void restore_translation(const Dsc *, const Itm *); typedef enum { unopened = 0, reading, writing } pipemode; typedef struct pipe_info { diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com index c56f1a8d..a6674371 100644 --- a/vms/vmsbuild.com +++ b/vms/vmsbuild.com @@ -8,6 +8,7 @@ $! gawk 3.0.1 revised, Nov'96 $! gawk 3.1.0 revised, Mar'01 $! gawk 3.1.1 revised, Apr'02 $! gawk 3.1.6 revised, Mar'07 +$! gawk-bytecode revd, Jan'10 $! $ REL = "3.1" !release version number $ PATCHLVL = "8" @@ -54,11 +55,19 @@ $config_ok: $ if f$search("awkgram.c").nes."" then goto awkgram_ok $ write sys$output " You must process `awkgram.y' with ""yacc"" or ""bison""" $ if f$search("awkgram_tab.c").nes."" then - !bison was run manually - write sys$output " or else rename `awkgram_tab.c' to `awkgramtab.c'." + write sys$output " or else rename `awkgram_tab.c' to `awkgram.c'." $ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc - write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgramtab.c'." + write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgram.c'." $ exit $awkgram_ok: +$ if f$search("command.c").nes."" then goto command_ok +$ write sys$output " You must process `command.y' with ""yacc"" or ""bison""" +$ if f$search("command_tab.c").nes."" then - !bison was run manually + write sys$output " or else rename `command_tab.c' to `command.c'." +$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc + write sys$output " or else rename `ytab.c' or `y_tab.c' to `command.c'." +$ exit +$command_ok: $ v = f$verify(1) $ cc array.c $ cc awkgram.c @@ -81,8 +90,11 @@ $ 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 [.vms]vms_misc.c $ cc [.vms]vms_popen.c $ cc [.vms]vms_fwrite.c @@ -123,8 +135,25 @@ $ 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 |