This is patch 6 to gawk 3.0. Changes to files that can be regenerated (such as bison output and Info files) have been omitted. Apply the patch with cd .../gawk-3.0.5 patch -p1 < this_file Arnold Robbins ------------------------------------------------------------------- diff -crN gawk-3.0.5/ChangeLog gawk-3.0.6/ChangeLog *** gawk-3.0.5/ChangeLog Sun Jun 25 05:09:02 2000 --- gawk-3.0.6/ChangeLog Mon Aug 7 15:23:28 2000 *************** *** 1,3 **** --- 1,62 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + + Thu Aug 3 17:47:53 2000 Greg McGary + + * regex.c: patches for gcc bounded pointer handling. + + Thu Aug 3 13:09:09 2000 Arnold D. Robbins + + * array.c (in_array, do_delete): fix tests for index equality + when searching through the array to work correctly when + index is "". + + Fri Jul 14 21:40:17 2000 Pat Rankin + + * builtin.c (format_tree): Workaround a DEC C V5.7 bug by + splitting `strcpy() + 3' into two expressions (the builtin + inline strcpy evidently has erroneous return type of void * + instead of char *; reputedly fixed in V6.1). + + * eval.c (C): New macro. + [casetable]: Use it to add explicit casts for the character + values outside the range of 0 to 127. + * missing/strncasecmp.c [C, charmap]: Likewise. + + * io.c (redirect): Add EIO check on failed open for VMS. + + Fri Jul 14 11:57:23 2000 Arnold D. Robbins + + Efficiency hack: turn `for (iggy in foo) delete foo[iggy]' + into moral equivalent of `delete foo'. + * array.c (do_delete_loop): new routine. + * awk.h [NODETYPE]: new Node_K_delete_loop value. + Add declaration of do_delete_loop. + * awk.y [LEX_FOR]: Fix code to recognize special case. + * eval.c (nodetypes): new entry for Node_K_delete_loop. + (interpret): add case for Node_K_delete_loop, add more + diagnostic info in default (cant_happen) case. + + Tue Jul 11 22:15:10 2000 Pat Rankin + + * awk.y (nextc): Recast unsigned char values back to int to + prevent VAX C from truncating EOF to 255. + + Tue Jul 11 14:08:23 2000 Arnold D. Robbins + + * array.c (do_delete): switch to string comparison, not + cmp_nodes. + (assoc_find): add call to force_string on subscript. + * eval.c (interpret): Case Node_K_arrayfor: check for + Node_array_ref and fetch original_array. Yowser. + + Fri Jun 30 21:57:00 2000 Arnold D. Robbins + + * array.c (assoc_lookup): Don't force the subscript + to be a string. Not a good idea after the change + to using dupnode. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/NEWS gawk-3.0.6/NEWS *** gawk-3.0.5/NEWS Tue May 2 00:12:39 2000 --- gawk-3.0.6/NEWS Thu Aug 3 14:56:43 2000 *************** *** 1,3 **** --- 1,24 ---- + Changes from 3.0.5 to 3.0.6 + --------------------------- + + This is a bug fix release only, pending further development on 3.1.0. + + Bugs fixed and changes made: + + 1. Subscripting an array with a variable that is just a number no + longer magically converts the variable into a string. + + 2. Similarly, running a `for (iggy in foo)' loop where `foo' is a + function parameter now works correctly. + + 3. Similarly, `i = ""; v[i] = a; if (v in a) ...' now works again. + + 4. Gawk now special cases `for (iggy in foo) delete foo[iggy]' and + treats it as the moral equivalent of `delete foo'. This should be + a major efficiency win when portably deleting large arrays. + + 5. VMS port brought up to date. + Changes from 3.0.4 to 3.0.5 --------------------------- *************** *** 45,50 **** --- 66,73 ---- 16. Global arrays passed to functions are now managed better. In particular, test/arynocls.awk won't crash referencing freed memory. + + 17. In obscure cases, `getline var' can no longer clobber $0. Changes from 3.0.3 to 3.0.4 --------------------------- diff -crN gawk-3.0.5/README gawk-3.0.6/README *** gawk-3.0.5/README Sun Apr 9 04:53:55 2000 --- gawk-3.0.6/README Thu Jul 6 10:22:48 2000 *************** *** 1,6 **** README: ! This is GNU Awk 3.0.5. It should be upwardly compatible with the Bell Labs research version of awk. It is almost completely compliant with the 1993 POSIX 1003.2 standard for awk. (See the note below about POSIX.) --- 1,6 ---- README: ! This is GNU Awk 3.0.6. It should be upwardly compatible with the Bell Labs research version of awk. It is almost completely compliant with the 1993 POSIX 1003.2 standard for awk. (See the note below about POSIX.) diff -crN gawk-3.0.5/README_d/README.beos gawk-3.0.6/README_d/README.beos *** gawk-3.0.5/README_d/README.beos Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/README_d/README.beos Sun Jul 23 14:25:55 2000 *************** *** 0 **** --- 1,30 ---- + From mc@whoever.com Sun Jul 23 17:06:38 2000 + Date: Sun, 23 Jul 2000 07:23:49 +0100 + Subject: Re: gawk-3.0.5 results on BeOS + From: Martin C Brown + To: Aharon Robbins , + + Arnold/Bruno, + + > This is a known BeOS problem. I am cc'ing the BeOS port person. + > Sorry I don't have a fix. + + This problem is directly related to the FOPEN_MAX/OPEN_MAX parameter used in + the stdio library by the BeOS. It seems that the BeOS strictly enforces this + number to the point that opening the 128th file causes all previously opened + files (except stdin/out/err) to be closed - hence the bad number. + + I've tried this outside of gawk and the same thing happens, so it's not a + gawk problem. + + I've spent the past few days trying to find a suitable workaround, but it's + obviously difficult trying to patch a kernel from the outside :)) + + I'll be reporting this as a bug to Be shortly. + + MC + + -- + Martin 'MC' Brown, mc@mcslp.com http://www.mcwords.com + Writer, Author, Consultant + 'Life is pain, anyone who says differently is selling something' diff -crN gawk-3.0.5/array.c gawk-3.0.6/array.c *** gawk-3.0.5/array.c Wed Jun 7 01:45:32 2000 --- gawk-3.0.6/array.c Thu Aug 3 10:08:01 2000 *************** *** 223,233 **** * Array indexes are strings; compare as such, always! */ s1 = bucket->ahname; s2 = subs; ! if (s1->stlen == s2->stlen ! && STREQN(s1->stptr, s2->stptr, s1->stlen)) ! return bucket; } return NULL; } --- 223,236 ---- * Array indexes are strings; compare as such, always! */ s1 = bucket->ahname; + s1 = force_string(s1); s2 = subs; ! if (s1->stlen == s2->stlen) { ! if (s1->stlen == 0 /* "" is a valid index */ ! || STREQN(s1->stptr, s2->stptr, s1->stlen)) ! return bucket; ! } } return NULL; } *************** *** 324,332 **** bucket->ahname = dupnode(subs); free_temp(subs); - /* array subscripts are strings */ - bucket->ahname->flags &= ~NUMBER; - bucket->ahname->flags |= STRING; bucket->ahvalue = Nnull_string; bucket->ahnext = symbol->var_array[hash1]; symbol->var_array[hash1] = bucket; --- 327,332 ---- *************** *** 367,375 **** last = NULL; for (bucket = symbol->var_array[hash1]; bucket != NULL; ! last = bucket, bucket = bucket->ahnext) ! if (cmp_nodes(bucket->ahname, subs) == 0) ! break; if (bucket == NULL) { if (do_lint) warning("delete: index `%s' not in array `%s'", --- 367,390 ---- last = NULL; for (bucket = symbol->var_array[hash1]; bucket != NULL; ! last = bucket, bucket = bucket->ahnext) { ! /* ! * This used to use cmp_nodes() here. That's wrong. ! * Array indexes are strings; compare as such, always! ! */ ! NODE *s1, *s2; ! ! s1 = bucket->ahname; ! s1 = force_string(s1); ! s2 = subs; ! ! if (s1->stlen == s2->stlen) { ! if (s1->stlen == 0 /* "" is a valid index */ ! || STREQN(s1->stptr, s2->stptr, s1->stlen)) ! break; ! } ! } ! if (bucket == NULL) { if (do_lint) warning("delete: index `%s' not in array `%s'", *************** *** 396,401 **** --- 411,460 ---- } } + /* do_delete_loop --- simulate ``for (iggy in foo) delete foo[iggy]'' */ + + /* + * The primary hassle here is that `iggy' needs to have some arbitrary + * array index put in it before we can clear the array, we can't + * just replace the loop with `delete foo'. + */ + + void + do_delete_loop(symbol, tree) + NODE *symbol, *tree; + { + size_t i; + NODE *n, **lhs; + Func_ptr after_assign = NULL; + + if (symbol->type == Node_param_list) { + symbol = stack_ptr[symbol->param_cnt]; + if (symbol->type == Node_var) + return; + } + if (symbol->type == Node_array_ref) + symbol = symbol->orig_array; + if (symbol->type == Node_var_array) { + if (symbol->var_array == NULL) + return; + } else + fatal("delete: illegal use of variable `%s' as array", + symbol->vname); + + /* get first index value */ + for (i = 0; i < symbol->array_size; i++) { + if (symbol->var_array[i] != NULL) { + lhs = get_lhs(tree->lnode, & after_assign); + unref(*lhs); + *lhs = dupnode(symbol->var_array[i]->ahname); + break; + } + } + + /* blast the array in one shot */ + assoc_clear(symbol); + } + /* assoc_scan --- start a ``for (iggy in foo)'' loop */ void *************** *** 558,579 **** NODE *bucket; if (symbol->var_array == NULL) { ! printf("%s: empty\n", symbol->vname); return tmp_number((AWKNUM) 0); } for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = bucket->ahnext) { ! printf("%s: i: (%p, %ld, %s) %.*s, v: ", symbol->vname, bucket->ahname, bucket->ahname->stref, flags2str(bucket->ahname->flags), (int) bucket->ahname->stlen, bucket->ahname->stptr); pr_node(bucket->ahvalue); ! printf("\n"); } } --- 617,647 ---- NODE *bucket; if (symbol->var_array == NULL) { ! printf("%s: empty (null)\n", symbol->vname); ! return tmp_number((AWKNUM) 0); ! } ! ! if (symbol->table_size == 0) { ! printf("%s: empty (zero)\n", symbol->vname); return tmp_number((AWKNUM) 0); } + printf("%s: table_size = %d, array_size = %d\n", symbol->vname, + symbol->table_size, symbol->array_size); + for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = bucket->ahnext) { ! printf("%s: I: [(%p, %ld, %s) len %d <%.*s>] V: [", symbol->vname, bucket->ahname, bucket->ahname->stref, flags2str(bucket->ahname->flags), (int) bucket->ahname->stlen, + (int) bucket->ahname->stlen, bucket->ahname->stptr); pr_node(bucket->ahvalue); ! printf("]\n"); } } *************** *** 589,594 **** --- 657,674 ---- NODE *r, *a; a = tree->lnode; + + if (a->type == Node_param_list) { + printf("%s: is paramater\n", a->vname); + a = stack_ptr[a->param_cnt]; + } + + if (a->type == Node_array_ref) { + printf("%s: array_ref to %s\n", a->vname, + a->orig_array->vname); + a = a->orig_array; + } + r = assoc_dump(a); return r; diff -crN gawk-3.0.5/atari/ChangeLog gawk-3.0.6/atari/ChangeLog *** gawk-3.0.5/atari/ChangeLog Sun Jun 25 05:09:32 2000 --- gawk-3.0.6/atari/ChangeLog Mon Aug 7 15:23:40 2000 *************** *** 1,3 **** --- 1,7 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/awk.h gawk-3.0.6/awk.h *** gawk-3.0.5/awk.h Wed Jun 7 10:59:07 2000 --- gawk-3.0.6/awk.h Sun Jul 16 06:52:37 2000 *************** *** 293,298 **** --- 293,299 ---- Node_K_do, /* lnode is conditional, rnode stuff to run */ Node_K_return, /* lnode is return value */ Node_K_delete, /* lnode is array, rnode is subscript */ + Node_K_delete_loop, /* lnode is array, rnode is subscript */ Node_K_getline, /* lnode is opt var, rnode is redirection */ Node_K_function, /* lnode is statement list, rnode is params */ Node_K_nextfile, /* no subs */ *************** *** 718,723 **** --- 719,725 ---- extern int in_array P((NODE *symbol, NODE *subs)); extern NODE **assoc_lookup P((NODE *symbol, NODE *subs)); extern void do_delete P((NODE *symbol, NODE *tree)); + extern void do_delete_loop P((NODE *symbol, NODE *tree)); extern void assoc_scan P((NODE *symbol, struct search *lookat)); extern void assoc_next P((struct search *lookat)); extern NODE *assoc_dump P((NODE *symbol)); diff -crN gawk-3.0.5/awk.y gawk-3.0.6/awk.y *** gawk-3.0.5/awk.y Wed Jun 7 11:00:47 2000 --- gawk-3.0.6/awk.y Sun Jul 16 08:29:50 2000 *************** *** 385,393 **** { $$ = node($6, Node_K_do, $3); } | LEX_FOR '(' NAME LEX_IN NAME r_paren opt_nls statement { ! $$ = node($8, Node_K_arrayfor, ! make_for_loop(variable($3, CAN_FREE, Node_var), ! (NODE *) NULL, variable($5, CAN_FREE, Node_var_array))); } | LEX_FOR '(' opt_exp semi exp semi opt_exp r_paren opt_nls statement { --- 385,414 ---- { $$ = node($6, Node_K_do, $3); } | LEX_FOR '(' NAME LEX_IN NAME r_paren opt_nls statement { ! /* ! * Efficiency hack. Recognize the special case of ! * ! * for (iggy in foo) ! * delete foo[iggy] ! * ! * and treat it as if it were ! * ! * delete foo ! * ! * Check that the body is a `delete a[i]' statement, ! * and that both the loop var and array names match. ! */ ! if ($8->type == Node_K_delete ! && $8->rnode != NULL ! && strcmp($3, $8->rnode->var_value->vname) == 0 ! && strcmp($5, $8->lnode->vname) == 0) { ! $8->type = Node_K_delete_loop; ! $$ = $8; ! } else { ! $$ = node($8, Node_K_arrayfor, ! make_for_loop(variable($3, CAN_FREE, Node_var), ! (NODE *) NULL, variable($5, CAN_FREE, Node_var_array))); ! } } | LEX_FOR '(' opt_exp semi exp semi opt_exp r_paren opt_nls statement { *************** *** 1216,1224 **** int c; if (lexptr && lexptr < lexend) ! c = (unsigned char) *lexptr++; else if (get_src_buf()) ! c = (unsigned char) *lexptr++; else c = EOF; --- 1237,1245 ---- int c; if (lexptr && lexptr < lexend) ! c = (int) (unsigned char) *lexptr++; else if (get_src_buf()) ! c = (int) (unsigned char) *lexptr++; else c = EOF; *************** *** 1226,1233 **** } #else #define nextc() ((lexptr && lexptr < lexend) ? \ ! ((unsigned char) *lexptr++) : \ ! (get_src_buf() ? ((unsigned char) *lexptr++) : EOF) \ ) #endif --- 1247,1254 ---- } #else #define nextc() ((lexptr && lexptr < lexend) ? \ ! ((int) (unsigned char) *lexptr++) : \ ! (get_src_buf() ? ((int) (unsigned char) *lexptr++) : EOF) \ ) #endif diff -crN gawk-3.0.5/awklib/ChangeLog gawk-3.0.6/awklib/ChangeLog *** gawk-3.0.5/awklib/ChangeLog Sun Jun 25 05:09:43 2000 --- gawk-3.0.6/awklib/ChangeLog Mon Aug 7 15:23:50 2000 *************** *** 1,3 **** --- 1,7 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/builtin.c gawk-3.0.6/builtin.c *** gawk-3.0.5/builtin.c Wed Jun 7 01:45:35 2000 --- gawk-3.0.6/builtin.c Sat Jul 15 20:13:57 2000 *************** *** 811,817 **** *cp++ = '#'; if (zero_flag) *cp++ = '0'; ! cp = strcpy(cp, "*.*") + 3; *cp++ = cs1; *cp = '\0'; #ifndef GFMT_WORKAROUND --- 811,818 ---- *cp++ = '#'; if (zero_flag) *cp++ = '0'; ! strcpy(cp, "*.*"); ! cp += 3; *cp++ = cs1; *cp = '\0'; #ifndef GFMT_WORKAROUND diff -crN gawk-3.0.5/doc/ChangeLog gawk-3.0.6/doc/ChangeLog *** gawk-3.0.5/doc/ChangeLog Sun Jun 25 05:09:06 2000 --- gawk-3.0.6/doc/ChangeLog Mon Aug 7 15:23:32 2000 *************** *** 1,3 **** --- 1,7 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/doc/awkcard.in gawk-3.0.6/doc/awkcard.in *** gawk-3.0.5/doc/awkcard.in Wed May 17 09:04:49 2000 --- gawk-3.0.6/doc/awkcard.in Thu Jul 6 10:20:24 2000 *************** *** 1504,1510 **** .ES .nf \*(CDHost: \*(FCgnudist.gnu.org\*(FR ! File: \*(FC/gnu/gawk/gawk-3.0.5.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. --- 1504,1510 ---- .ES .nf \*(CDHost: \*(FCgnudist.gnu.org\*(FR ! File: \*(FC/gnu/gawk/gawk-3.0.6.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. diff -crN gawk-3.0.5/doc/gawk.1 gawk-3.0.6/doc/gawk.1 *** gawk-3.0.5/doc/gawk.1 Wed Jun 7 01:49:04 2000 --- gawk-3.0.6/doc/gawk.1 Mon Aug 7 15:53:54 2000 *************** *** 2574,2580 **** .SH VERSION INFORMATION This man page documents .IR gawk , ! version 3.0.5. .SH AUTHORS The original version of \*(UX .I awk --- 2574,2580 ---- .SH VERSION INFORMATION This man page documents .IR gawk , ! version 3.0.6. .SH AUTHORS The original version of \*(UX .I awk *************** *** 2605,2614 **** If you find a bug in .IR gawk , please send electronic mail to ! .BR bug-gnu-utils@gnu.org , ! .I with ! a carbon copy to ! .BR arnold@gnu.org . Please include your operating system and its revision, the version of .IR gawk , what C compiler you used to compile it, and a test program --- 2605,2611 ---- If you find a bug in .IR gawk , please send electronic mail to ! .BR bug-gawk@gnu.org . Please include your operating system and its revision, the version of .IR gawk , what C compiler you used to compile it, and a test program diff -crN gawk-3.0.5/doc/gawk.texi gawk-3.0.6/doc/gawk.texi *** gawk-3.0.5/doc/gawk.texi Tue Jun 20 04:34:19 2000 --- gawk-3.0.6/doc/gawk.texi Mon Aug 7 15:57:43 2000 *************** *** 21,30 **** @c applies to, and when the document was updated. @set TITLE Effective AWK Programming @set SUBTITLE A User's Guide for GNU Awk ! @set PATCHLEVEL 5 @set EDITION 1.0.@value{PATCHLEVEL} @set VERSION 3.0 ! @set UPDATE-MONTH June, 2000 @iftex @set DOCUMENT book @end iftex --- 21,30 ---- @c applies to, and when the document was updated. @set TITLE Effective AWK Programming @set SUBTITLE A User's Guide for GNU Awk ! @set PATCHLEVEL 6 @set EDITION 1.0.@value{PATCHLEVEL} @set VERSION 3.0 ! @set UPDATE-MONTH July, 2000 @iftex @set DOCUMENT book @end iftex *************** *** 19493,19514 **** @code{gawk} gave you. Also say what you expected to occur; this will help us decide whether the problem was really in the documentation. ! Once you have a precise problem, there are two email addresses you ! can send mail to. ! @table @asis ! @item Internet: ! @samp{bug-gnu-utils@@gnu.org} ! ! @item UUCP: ! @samp{uunet!gnu.org!bug-gnu-utils} ! @end table ! ! Please include the ! version number of @code{gawk} you are using. You can get this information ! with the command @samp{gawk --version}. ! You should send a carbon copy of your mail to Arnold Robbins, who can ! be reached at @samp{arnold@@gnu.org}. @cindex @code{comp.lang.awk} @strong{Important!} Do @emph{not} try to report bugs in @code{gawk} by --- 19493,19505 ---- @code{gawk} gave you. Also say what you expected to occur; this will help us decide whether the problem was really in the documentation. ! Once you have a precise problem, send email to @email{bug-gawk@@gnu.org}. ! Please include the version number of @code{gawk} you are using. ! You can get this information with the command @samp{gawk --version}. ! Using this address will automatically send a carbon copy of your ! mail to Arnold Robbins. If necessary, he can be reached directly at ! @email{arnold@@gnu.org}. @cindex @code{comp.lang.awk} @strong{Important!} Do @emph{not} try to report bugs in @code{gawk} by diff -crN gawk-3.0.5/eval.c gawk-3.0.6/eval.c *** gawk-3.0.5/eval.c Wed Jun 7 01:45:37 2000 --- gawk-3.0.6/eval.c Sun Jul 16 06:54:12 2000 *************** *** 66,71 **** --- 66,76 ---- static jmp_buf func_tag; extern int exiting, exit_val; + /* This rather ugly macro is for VMS C */ + #ifdef C + #undef C + #endif + #define C(c) ((char)c) /* * This table is used by the regexp routines to do case independant * matching. Basically, every ascii character maps to itself, except *************** *** 108,152 **** /* 'x' 'y' 'z' '{' '|' '}' '~' */ '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', #ifndef USE_PURE_ASCII ! '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', ! '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', ! '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', ! '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', ! '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', ! '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', ! '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', ! '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', ! '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', ! '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', ! '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', ! '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', ! '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', ! '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', ! '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', ! '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', #else ! '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', ! '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', ! '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', ! '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', ! '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', ! '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', ! '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', ! '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', ! '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', ! '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', ! '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', ! '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', ! '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', ! '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', ! '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', ! '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', #endif }; #else #include "You lose. You will need a translation table for your character set." #endif /* * This table maps node types to strings for debugging. * KEEP IN SYNC WITH awk.h!!!! --- 113,159 ---- /* 'x' 'y' 'z' '{' '|' '}' '~' */ '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', #ifndef USE_PURE_ASCII ! C('\200'), C('\201'), C('\202'), C('\203'), C('\204'), C('\205'), C('\206'), C('\207'), ! C('\210'), C('\211'), C('\212'), C('\213'), C('\214'), C('\215'), C('\216'), C('\217'), ! C('\220'), C('\221'), C('\222'), C('\223'), C('\224'), C('\225'), C('\226'), C('\227'), ! C('\230'), C('\231'), C('\232'), C('\233'), C('\234'), C('\235'), C('\236'), C('\237'), ! C('\240'), C('\241'), C('\242'), C('\243'), C('\244'), C('\245'), C('\246'), C('\247'), ! C('\250'), C('\251'), C('\252'), C('\253'), C('\254'), C('\255'), C('\256'), C('\257'), ! C('\260'), C('\261'), C('\262'), C('\263'), C('\264'), C('\265'), C('\266'), C('\267'), ! C('\270'), C('\271'), C('\272'), C('\273'), C('\274'), C('\275'), C('\276'), C('\277'), ! C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), ! C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), ! C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\327'), ! C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\337'), ! C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), ! C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), ! C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'), ! C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'), #else ! C('\200'), C('\201'), C('\202'), C('\203'), C('\204'), C('\205'), C('\206'), C('\207'), ! C('\210'), C('\211'), C('\212'), C('\213'), C('\214'), C('\215'), C('\216'), C('\217'), ! C('\220'), C('\221'), C('\222'), C('\223'), C('\224'), C('\225'), C('\226'), C('\227'), ! C('\230'), C('\231'), C('\232'), C('\233'), C('\234'), C('\235'), C('\236'), C('\237'), ! C('\240'), C('\241'), C('\242'), C('\243'), C('\244'), C('\245'), C('\246'), C('\247'), ! C('\250'), C('\251'), C('\252'), C('\253'), C('\254'), C('\255'), C('\256'), C('\257'), ! C('\260'), C('\261'), C('\262'), C('\263'), C('\264'), C('\265'), C('\266'), C('\267'), ! C('\270'), C('\271'), C('\272'), C('\273'), C('\274'), C('\275'), C('\276'), C('\277'), ! C('\300'), C('\301'), C('\302'), C('\303'), C('\304'), C('\305'), C('\306'), C('\307'), ! C('\310'), C('\311'), C('\312'), C('\313'), C('\314'), C('\315'), C('\316'), C('\317'), ! C('\320'), C('\321'), C('\322'), C('\323'), C('\324'), C('\325'), C('\326'), C('\327'), ! C('\330'), C('\331'), C('\332'), C('\333'), C('\334'), C('\335'), C('\336'), C('\337'), ! C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), ! C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), ! C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'), ! C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'), #endif }; #else #include "You lose. You will need a translation table for your character set." #endif + #undef C + /* * This table maps node types to strings for debugging. * KEEP IN SYNC WITH awk.h!!!! *************** *** 205,210 **** --- 212,218 ---- "Node_K_do", "Node_K_return", "Node_K_delete", + "Node_K_delete_loop", "Node_K_getline", "Node_K_function", "Node_K_nextfile", *************** *** 481,486 **** --- 489,496 ---- t = tree->arrvar; if (t->type == Node_param_list) t = stack_ptr[t->param_cnt]; + if (t->type == Node_array_ref) + t = t->orig_array; stable_tree = tree; if ((t->flags & SCALAR) != 0) fatal("attempt to use scalar as array"); *************** *** 564,569 **** --- 574,583 ---- do_delete(tree->lnode, tree->rnode); break; + case Node_K_delete_loop: + do_delete_loop(tree->lnode, tree->rnode); + break; + case Node_K_next: if (in_begin_rule) fatal("`next' cannot be called from a BEGIN rule"); *************** *** 1606,1611 **** --- 1620,1627 ---- case Node_builtin: fatal("assignment is not allowed to result of builtin function"); default: + fprintf(stderr, "type = %s\n", nodetype2str(ptr->type)); + fflush(stderr); cant_happen(); } return aptr; diff -crN gawk-3.0.5/io.c gawk-3.0.6/io.c *** gawk-3.0.5/io.c Wed Jun 7 01:45:47 2000 --- gawk-3.0.6/io.c Sat Jul 15 20:13:59 2000 *************** *** 498,503 **** --- 498,510 ---- else if (errno == 0) /* HACK! */ close_one(); #endif + #ifdef VMS + /* Alpha/VMS V7.1's C RTL is returning this instead + of EMFILE (haven't tried other post-V6.2 systems) */ + #define SS$_EXQUOTA 0x001C + else if (errno == EIO && vaxc$errno == SS$_EXQUOTA) + close_one(); + #endif else { /* * Some other reason for failure. diff -crN gawk-3.0.5/missing/strncasecmp.c gawk-3.0.6/missing/strncasecmp.c *** gawk-3.0.5/missing/strncasecmp.c Wed Nov 24 17:01:54 1993 --- gawk-3.0.6/missing/strncasecmp.c Sat Jul 15 20:16:43 2000 *************** *** 25,30 **** --- 25,35 ---- #define u_char unsigned char #endif + /* This rather ugly macro is for VMS C */ + #ifdef C + #undef C + #endif + #define C(c) ((u_char)c) /* * This array is designed for mapping upper and lower case letter * together for a case independent comparison. The mappings are *************** *** 47,69 **** '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', ! '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', ! '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', ! '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', ! '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', ! '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', ! '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', ! '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', ! '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', ! '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', ! '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', ! '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', ! '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', ! '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', ! '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', ! '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', ! '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', }; int strcasecmp(s1, s2) --- 52,76 ---- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', ! C('\200'), C('\201'), C('\202'), C('\203'), C('\204'), C('\205'), C('\206'), C('\207'), ! C('\210'), C('\211'), C('\212'), C('\213'), C('\214'), C('\215'), C('\216'), C('\217'), ! C('\220'), C('\221'), C('\222'), C('\223'), C('\224'), C('\225'), C('\226'), C('\227'), ! C('\230'), C('\231'), C('\232'), C('\233'), C('\234'), C('\235'), C('\236'), C('\237'), ! C('\240'), C('\241'), C('\242'), C('\243'), C('\244'), C('\245'), C('\246'), C('\247'), ! C('\250'), C('\251'), C('\252'), C('\253'), C('\254'), C('\255'), C('\256'), C('\257'), ! C('\260'), C('\261'), C('\262'), C('\263'), C('\264'), C('\265'), C('\266'), C('\267'), ! C('\270'), C('\271'), C('\272'), C('\273'), C('\274'), C('\275'), C('\276'), C('\277'), ! C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), ! C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), ! C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\327'), ! C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\337'), ! C('\340'), C('\341'), C('\342'), C('\343'), C('\344'), C('\345'), C('\346'), C('\347'), ! C('\350'), C('\351'), C('\352'), C('\353'), C('\354'), C('\355'), C('\356'), C('\357'), ! C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'), ! C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'), }; + + #undef C int strcasecmp(s1, s2) diff -crN gawk-3.0.5/patchlevel.h gawk-3.0.6/patchlevel.h *** gawk-3.0.5/patchlevel.h Tue Jun 20 08:17:18 2000 --- gawk-3.0.6/patchlevel.h Mon Aug 7 15:17:33 2000 *************** *** 1 **** ! #define PATCHLEVEL 5 --- 1 ---- ! #define PATCHLEVEL 6 diff -crN gawk-3.0.5/pc/ChangeLog gawk-3.0.6/pc/ChangeLog *** gawk-3.0.5/pc/ChangeLog Sun Jun 25 05:09:13 2000 --- gawk-3.0.6/pc/ChangeLog Mon Aug 7 15:23:35 2000 *************** *** 1,3 **** --- 1,7 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/pc/Makefile.tst gawk-3.0.6/pc/Makefile.tst *** gawk-3.0.5/pc/Makefile.tst Wed Jun 21 06:44:08 2000 --- gawk-3.0.6/pc/Makefile.tst Thu Jul 13 18:01:26 2000 *************** *** 70,76 **** # Using EMXSHELL=/bin/sh with emx versions can exhaust lower mem. # Lower mem can also be exhausted on some of the tests even with MSC gawk. # The .SWAP setting forces (DOS-only) dmake to swap itself out. ! .SWAP: childin fflush getlnhd tweakfld pipeio1 pipeio2 # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have --- 70,76 ---- # Using EMXSHELL=/bin/sh with emx versions can exhaust lower mem. # Lower mem can also be exhausted on some of the tests even with MSC gawk. # The .SWAP setting forces (DOS-only) dmake to swap itself out. ! .SWAP: childin fflush getlnhd tweakfld pipeio1 pipeio2 getlnbuf # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have *************** *** 134,140 **** back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ noparms funstack clobber delarprm prdupval nasty zeroflag \ getnr2tm getnr2tb printf1 funsmnam fnamedat numindex subslash \ ! opasnslf opasnidx arynocls getlnbuf unix-tests: poundba fflush getlnhd pipeio1 pipeio2 strftlng pid --- 134,140 ---- back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ noparms funstack clobber delarprm prdupval nasty zeroflag \ getnr2tm getnr2tb printf1 funsmnam fnamedat numindex subslash \ ! opasnslf opasnidx arynocls getlnbuf arysubnm fnparydl unix-tests: poundba fflush getlnhd pipeio1 pipeio2 strftlng pid *************** *** 662,667 **** --- 662,675 ---- @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ $(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ + + arysubnm:: + @-AWKPATH=$(srcdir) $(AWK) -f arysubnm.awk >_$@ + $(CMP) $(srcdir)/arysubnm.ok _$@ && rm -f _$@ + + fnparydl:: + @-AWKPATH=$(srcdir) $(AWK) -f fnparydl.awk >_$@ + $(CMP) $(srcdir)/fnparydl.ok _$@ && rm -f _$@ clean: rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ diff -crN gawk-3.0.5/posix/ChangeLog gawk-3.0.6/posix/ChangeLog *** gawk-3.0.5/posix/ChangeLog Sun Jun 25 05:09:40 2000 --- gawk-3.0.6/posix/ChangeLog Mon Aug 7 15:23:47 2000 *************** *** 1,3 **** --- 1,7 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/regex.c gawk-3.0.6/regex.c *** gawk-3.0.5/regex.c Wed Jun 7 01:46:52 2000 --- gawk-3.0.6/regex.c Thu Aug 3 14:47:30 2000 *************** *** 1576,1581 **** --- 1576,1601 ---- reset the pointers that pointed into the old block to point to the correct places in the new one. If extending the buffer results in it being larger than MAX_BUF_SIZE, then flag memory exhausted. */ + #if __BOUNDED_POINTERS__ + # define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated) + # define MOVE_BUFFER_POINTER(P) \ + (__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr) + # define ELSE_EXTEND_BUFFER_HIGH_BOUND \ + else \ + { \ + SET_HIGH_BOUND (b); \ + SET_HIGH_BOUND (begalt); \ + if (fixup_alt_jump) \ + SET_HIGH_BOUND (fixup_alt_jump); \ + if (laststart) \ + SET_HIGH_BOUND (laststart); \ + if (pending_exact) \ + SET_HIGH_BOUND (pending_exact); \ + } + #else + # define MOVE_BUFFER_POINTER(P) (P) += incr + # define ELSE_EXTEND_BUFFER_HIGH_BOUND + #endif #define EXTEND_BUFFER() \ do { \ unsigned char *old_buffer = bufp->buffer; \ *************** *** 1590,1604 **** /* If the buffer moved, move all the pointers into it. */ \ if (old_buffer != bufp->buffer) \ { \ ! b = (b - old_buffer) + bufp->buffer; \ ! begalt = (begalt - old_buffer) + bufp->buffer; \ if (fixup_alt_jump) \ ! fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\ if (laststart) \ ! laststart = (laststart - old_buffer) + bufp->buffer; \ if (pending_exact) \ ! pending_exact = (pending_exact - old_buffer) + bufp->buffer; \ } \ } while (0) --- 1610,1626 ---- /* If the buffer moved, move all the pointers into it. */ \ if (old_buffer != bufp->buffer) \ { \ ! int incr = bufp->buffer - old_buffer; \ ! MOVE_BUFFER_POINTER (b); \ ! MOVE_BUFFER_POINTER (begalt); \ if (fixup_alt_jump) \ ! MOVE_BUFFER_POINTER (fixup_alt_jump); \ if (laststart) \ ! MOVE_BUFFER_POINTER (laststart); \ if (pending_exact) \ ! MOVE_BUFFER_POINTER (pending_exact); \ } \ + ELSE_EXTEND_BUFFER_HIGH_BOUND \ } while (0) diff -crN gawk-3.0.5/test/ChangeLog gawk-3.0.6/test/ChangeLog *** gawk-3.0.5/test/ChangeLog Sun Jun 25 05:09:47 2000 --- gawk-3.0.6/test/ChangeLog Mon Aug 7 15:23:58 2000 *************** *** 1,3 **** --- 1,22 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + + Thu Aug 3 17:51:56 2000 Arnold D. Robbins + + * Makefile.in (nlstrina): new test case. + * nlstrina.awk, nlstrina.ok: new files. + + Tue Jul 11 14:22:55 2000 Arnold D. Robbins + + * Makefile.in (fnparydl): new test case. + * fnparydl.awk, fnparydl.ok: new files. + + Fri Jun 30 22:00:03 2000 Arnold D. Robbins + + * Makefile.in (arysubnm): new test case. + * arysubnm.awk, arysubnm.ok: new files. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/test/Makefile.in gawk-3.0.6/test/Makefile.in *** gawk-3.0.5/test/Makefile.in Wed Jun 14 03:18:53 2000 --- gawk-3.0.6/test/Makefile.in Thu Aug 3 14:51:51 2000 *************** *** 39,45 **** back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ noparms funstack clobber delarprm prdupval nasty zeroflag \ getnr2tm getnr2tb printf1 funsmnam fnamedat numindex subslash \ ! opasnslf opasnidx arynocls getlnbuf unix-tests: poundbang fflush getlnhd pipeio1 pipeio2 strftlng pid --- 39,45 ---- back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ noparms funstack clobber delarprm prdupval nasty zeroflag \ getnr2tm getnr2tb printf1 funsmnam fnamedat numindex subslash \ ! opasnslf opasnidx arynocls getlnbuf arysubnm fnparydl nlstrina unix-tests: poundbang fflush getlnhd pipeio1 pipeio2 strftlng pid *************** *** 500,505 **** --- 500,517 ---- @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ $(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ + + arysubnm:: + @-AWKPATH=$(srcdir) $(AWK) -f arysubnm.awk >_$@ + $(CMP) $(srcdir)/arysubnm.ok _$@ && rm -f _$@ + + fnparydl:: + @-AWKPATH=$(srcdir) $(AWK) -f fnparydl.awk >_$@ + $(CMP) $(srcdir)/fnparydl.ok _$@ && rm -f _$@ + + nlstrina:: + @-AWKPATH=$(srcdir) $(AWK) -f nlstrina.awk >_$@ + $(CMP) $(srcdir)/nlstrina.ok _$@ && rm -f _$@ clean: rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ diff -crN gawk-3.0.5/test/arysubnm.awk gawk-3.0.6/test/arysubnm.awk *** gawk-3.0.5/test/arysubnm.awk Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/test/arysubnm.awk Fri Jun 30 18:58:44 2000 *************** *** 0 **** --- 1 ---- + BEGIN { n = 11 ; foo[n] = n; print (2 <= n) } diff -crN gawk-3.0.5/test/arysubnm.ok gawk-3.0.6/test/arysubnm.ok *** gawk-3.0.5/test/arysubnm.ok Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/test/arysubnm.ok Fri Jun 30 18:58:55 2000 *************** *** 0 **** --- 1 ---- + 1 diff -crN gawk-3.0.5/test/fnparydl.awk gawk-3.0.6/test/fnparydl.awk *** gawk-3.0.5/test/fnparydl.awk Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/test/fnparydl.awk Tue Jul 11 11:21:37 2000 *************** *** 0 **** --- 1,31 ---- + # fnparydl.awk --- check that deleting works with arrays + # that are parameters. + # + # Tue Jul 11 14:20:58 EDT 2000 + + function delit(a, k) + { + print "BEFORE LOOP" + for (k in a) { + print "DELETING KEY", k + delete a[k] + } + print "AFTER LOOP" + } + + BEGIN { + for (i = 1 ; i <= 7; i++) { + q[i] = sprintf("element %d", i) + x[i] = i + y[i] = q[i] + } + # adump(q) + delit(q) + # for (i in q) + # delete q[i] + j = 0; + for (i in q) + j++ + print j, "elements still in q[]" + # adump(q) + } diff -crN gawk-3.0.5/test/fnparydl.ok gawk-3.0.6/test/fnparydl.ok *** gawk-3.0.5/test/fnparydl.ok Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/test/fnparydl.ok Tue Jul 11 11:22:00 2000 *************** *** 0 **** --- 1,10 ---- + BEFORE LOOP + DELETING KEY 4 + DELETING KEY 5 + DELETING KEY 6 + DELETING KEY 7 + DELETING KEY 1 + DELETING KEY 2 + DELETING KEY 3 + AFTER LOOP + 0 elements still in q[] diff -crN gawk-3.0.5/test/nlstrina.awk gawk-3.0.6/test/nlstrina.awk *** gawk-3.0.5/test/nlstrina.awk Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/test/nlstrina.awk Fri Aug 4 05:50:44 2000 *************** *** 0 **** --- 1,77 ---- + # From E.Ab@chem.rug.nl Wed Aug 2 13:16:53 2000 + # Received: from mail.actcom.co.il + # by localhost with POP3 (fetchmail-5.1.2) + # for arnold@localhost (single-drop); Wed, 02 Aug 2000 13:16:53 -0400 (EDT) + # Received: from lmail.actcom.co.il by actcom.co.il with ESMTP + # (8.9.1a/actcom-0.2) id MAA21699 for ; + # Wed, 2 Aug 2000 12:20:38 +0300 (EET DST) + # (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) + # Received: from freefriends.org (freefriends.org [63.85.55.109]) + # by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id LAA22723 + # for ; Wed, 2 Aug 2000 11:23:22 +0300 + # Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21]) + # by freefriends.org (8.9.3/8.9.3) with ESMTP id FAA23582 + # for ; Wed, 2 Aug 2000 05:18:59 -0400 + # Received: from dep.chem.rug.nl (dep.chem.rug.nl [129.125.7.81]) + # by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id FAA30670; + # Wed, 2 Aug 2000 05:20:24 -0400 + # Received: from rugmd34.chem.rug.nl (rugmd34.chem.rug.nl [129.125.42.34]) + # by dep.chem.rug.nl (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA17089; + # Wed, 2 Aug 2000 11:20:23 +0200 + # Received: from chem.rug.nl (localhost [127.0.0.1]) by rugmd34.chem.rug.nl (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id LAA25392; Wed, 2 Aug 2000 11:20:22 +0200 (MDT) + # Sender: E.Ab@chem.rug.nl + # Message-ID: <3987E7D5.2BDC5FD3@chem.rug.nl> + # Date: Wed, 02 Aug 2000 11:20:21 +0200 + # From: Eiso AB + # X-Mailer: Mozilla 4.72C-SGI [en] (X11; I; IRIX 6.5 IP32) + # X-Accept-Language: en + # MIME-Version: 1.0 + # To: bug-gnu-utils@gnu.org, arnold@gnu.org + # Subject: bug? [GNU Awk 3.0.5] + # + # Content-Type: text/plain; charset=us-ascii + # Content-Transfer-Encoding: 7bit + # X-UIDL: \f8"!(8G!!ZL$#!h>X!! + # Status: R + # + # hi Arnold, + # + # + # Please try the script beneath... + # I'm not sure if this is a bug or not, but I would expect + # the empty string as an array index just to be treated + # like any other string + # + # so if ("" in ta) would be true, and for ( i in ta ) should loop only once. + # + BEGIN { + v="" + ta[v]++ + if ( v in ta) print "a",v,++ta[v],ta[v] + print "b",v,++ta[v],ta[v] + for( i in ta) print "c",++c,i,ta[i] + } + # + # goodluck, Eiso + # + # -- + # _________ + # _______________________________/ Eiso AB \_________________________ + # + # o + # + # o Dept. of Biochemistry + # University of Groningen + # The Netherlands + # o + # . . + # o ^ mailto:eiso@chem.rug.nl + # | - _ mailto:eiso@dds.nl + # \__|__/ http://md.chem.rug.nl/~eiso + # | tel 4326 + # | + # / \ + # / \ + # | | + # ________ ._| |_. ________________________________________________ + # diff -crN gawk-3.0.5/test/nlstrina.ok gawk-3.0.6/test/nlstrina.ok *** gawk-3.0.5/test/nlstrina.ok Wed Dec 31 16:00:00 1969 --- gawk-3.0.6/test/nlstrina.ok Fri Aug 4 05:52:53 2000 *************** *** 0 **** --- 1,3 ---- + a 2 2 + b 3 3 + c 1 3 diff -crN gawk-3.0.5/vms/ChangeLog gawk-3.0.6/vms/ChangeLog *** gawk-3.0.5/vms/ChangeLog Sun Jun 25 05:09:38 2000 --- gawk-3.0.6/vms/ChangeLog Mon Aug 7 15:23:44 2000 *************** *** 1,3 **** --- 1,15 ---- + Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + + Sat Jul 15 20:52:09 2000 Pat Rankin + + * vmstest.com (printf1, fusmnam, fnamedat, numindex, + subslash, opasnslf, opasnidx, arynocls, getlnbuf, + arysubnm, fnparydl): New basic tests. + (igncdym): New gawk.extensions test. + (nondec): Old gawk.extensions test commented out. + Sun Jun 25 15:08:19 2000 Arnold D. Robbins * Release 3.0.5: Release tar file made. diff -crN gawk-3.0.5/vms/descrip.mms gawk-3.0.6/vms/descrip.mms *** gawk-3.0.5/vms/descrip.mms Sun Jun 18 05:01:31 2000 --- gawk-3.0.6/vms/descrip.mms Thu Jul 6 10:21:31 2000 *************** *** 129,135 **** # Release of gawk REL=3.0 ! PATCHLVL=5 # generic target all : gawk --- 129,135 ---- # Release of gawk REL=3.0 ! PATCHLVL=6 # generic target all : gawk diff -crN gawk-3.0.5/vms/gawk.hlp gawk-3.0.6/vms/gawk.hlp *** gawk-3.0.5/vms/gawk.hlp Thu May 25 04:15:41 2000 --- gawk-3.0.6/vms/gawk.hlp Thu Jul 6 10:21:53 2000 *************** *** 1086,1092 **** Source text for it is present in the file GAWK.TEXI. A postscript version is available via anonymous FTP from host gnudist.gnu.org in directory /gnu/gawk, file gawk-{version}-doc.tar.gz where {version} ! would be the current version number, such as 3.0.5. Another source of documentation is "The AWK Programming Language" by Aho, Weinberger, and Kernighan (1988), published by Addison-Wesley. --- 1086,1092 ---- Source text for it is present in the file GAWK.TEXI. A postscript version is available via anonymous FTP from host gnudist.gnu.org in directory /gnu/gawk, file gawk-{version}-doc.tar.gz where {version} ! would be the current version number, such as 3.0.6. Another source of documentation is "The AWK Programming Language" by Aho, Weinberger, and Kernighan (1988), published by Addison-Wesley. *************** *** 1200,1206 **** 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 ! Changes between version 3.0.5 and 2.15.6 General RS can contain multiple characters or be a regexp --- 1200,1206 ---- 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 ! Changes between version 3.0.6 and 2.15.6 General RS can contain multiple characters or be a regexp diff -crN gawk-3.0.5/vms/vmsbuild.com gawk-3.0.6/vms/vmsbuild.com *** gawk-3.0.5/vms/vmsbuild.com Sun Jun 18 05:00:24 2000 --- gawk-3.0.6/vms/vmsbuild.com Thu Jul 6 10:21:37 2000 *************** *** 7,13 **** $! gawk 3.0.1 revised, Nov'96 $! $ REL = "3.0" !release version number ! $ PATCHLVL = "5" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" --- 7,13 ---- $! gawk 3.0.1 revised, Nov'96 $! $ REL = "3.0" !release version number ! $ PATCHLVL = "6" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" diff -crN gawk-3.0.5/vms/vmstest.com gawk-3.0.6/vms/vmstest.com *** gawk-3.0.5/vms/vmstest.com Sun May 9 04:28:32 1999 --- gawk-3.0.6/vms/vmstest.com Sun Jul 16 08:17:44 2000 *************** *** 42,48 **** + " substr eofsplit prt1eval splitwht back89 tradanch" $ basic_lst2 = "nlfldsep splitvar intest nfldstr nors" - + " fnarydel noparms funstack clobber delarprm prdupval" - ! + " nasty zeroflag getnr2tm getnr2tb" $ echo "basic" $basic_loop1: basic_test = f$element(0," ",basic_lst1) $ basic_lst1 = basic_lst1 - basic_test - " " --- 42,50 ---- + " substr eofsplit prt1eval splitwht back89 tradanch" $ basic_lst2 = "nlfldsep splitvar intest nfldstr nors" - + " fnarydel noparms funstack clobber delarprm prdupval" - ! + " nasty zeroflag getnr2tm getnr2tb printf1" - ! + " funsmnam fnamedat numindex subslash opasnslf" - ! + " opasnidx arynocls getlnbuf arysubnm fnparydl" $ echo "basic" $basic_loop1: basic_test = f$element(0," ",basic_lst1) $ basic_lst1 = basic_lst1 - basic_test - " " *************** *** 65,71 **** $ $gawk_ext: gawk_ext_list = "fieldwdth ignrcase posix manyfiles" - + " igncfs argtest badargs strftime gensub gnureops reint" - ! + " nondec" $ echo "gawk_ext (gawk.extensions)" $gawk_ext_loop: gawk_ext_test = f$element(0," ",gawk_ext_list) $ gawk_ext_list = gawk_ext_list - gawk_ext_test - " " --- 67,73 ---- $ $gawk_ext: gawk_ext_list = "fieldwdth ignrcase posix manyfiles" - + " igncfs argtest badargs strftime gensub gnureops reint" - ! + " igncdym" ! + " nondec" $ echo "gawk_ext (gawk.extensions)" $gawk_ext_loop: gawk_ext_test = f$element(0," ",gawk_ext_list) $ gawk_ext_list = gawk_ext_list - gawk_ext_test - " " *************** *** 354,362 **** $strftime: echo "strftime" $ ! this test could fail on slow machines or on a second boundary, $ ! so if it does, double check the actual results ! $!! date | gawk -- "{$3 = sprintf(""%02d"",$3+0); print >""strftime.ok""; print strftime() >""tmp.""}" ! $ ! note: original test is too Unix-specific, so substitute an easier one ! $ gawk -- "BEGIN {""show time"" | getline; print >""strftime.ok""; print strftime("" %v %T"") >""tmp.""}" $ set noOn $ cmp strftime.ok tmp. $ if $status then rm tmp.;,strftime.ok;* --- 356,365 ---- $strftime: echo "strftime" $ ! this test could fail on slow machines or on a second boundary, $ ! so if it does, double check the actual results ! $!! date | gawk -v "OUTPUT"=tmp. -f strftime.awk ! $ ! note: this test is simpler to implement for VMS ! $ gawk -v "OUTPUT"=tmp. - ! "BEGIN {""show time"" | getline; print >""strftime.ok""; print strftime("" %v %T"") >OUTPUT}" $ set noOn $ cmp strftime.ok tmp. $ if $status then rm tmp.;,strftime.ok;* *************** *** 425,431 **** $childin: echo "childin: currently fails for the VMS port, so skipped" $ return $! note: this `childin' test currently [gawk 3.0.3] fails for vms ! $childin: echo "childin" $ echo "note: type ``hi'",- "' if testing appears to hang in `childin'" $!! @echo hi | gawk "BEGIN { ""cat"" | getline; print; close(""cat"") }" >tmp. --- 428,434 ---- $childin: echo "childin: currently fails for the VMS port, so skipped" $ return $! note: this `childin' test currently [gawk 3.0.3] fails for vms ! $!!childin: echo "childin" $ echo "note: type ``hi'",- "' if testing appears to hang in `childin'" $!! @echo hi | gawk "BEGIN { ""cat"" | getline; print; close(""cat"") }" >tmp. *************** *** 742,747 **** --- 745,837 ---- $getnr2tb: echo "getnr2tb" $ gawk -f getnr2tb.awk getnr2tb.in >tmp. $ cmp getnr2tb.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $printf1: echo "printf1" + $ gawk -f printf1.awk >tmp. + $ cmp printf1.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $funsmnam: echo "funsmnam" + $ set noOn + $ gawk -f funsmnam.awk >tmp. 2>&1 + $ set On + $ cmp funsmnam.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $fnamedat: echo "fnamedat" + $ set noOn + $ gawk -f fnamedat.awk < fnamedat.in >tmp. 2>&1 + $ set On + $ cmp fnamedat.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $numindex: echo "numindex" + $ set noOn + $ gawk -f numindex.awk < numindex.in >tmp. 2>&1 + $ set On + $ cmp numindex.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $subslash: echo "subslash" + $ set noOn + $ gawk -f subslash.awk >tmp. 2>&1 + $ set On + $ cmp subslash.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $opasnslf: echo "opasnslf" + $ set noOn + $ gawk -f opasnslf.awk >tmp. 2>&1 + $ set On + $ cmp opasnslf.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $opasnidx: echo "opasnidx" + $ set noOn + $ gawk -f opasnidx.awk >tmp. 2>&1 + $ set On + $ cmp opasnidx.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $arynocls: echo "arynocls" + $ gawk -v "INPUT"=arynocls.in -f arynocls.awk >tmp. + $ cmp arynocls.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $igncdym: echo "igncdym" + $ gawk -f igncdym.awk igncdym.in >tmp. + $ cmp igncdym.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $getlnbuf: echo "getlnbuf" + $ gawk -f getlnbuf.awk getlnbuf.in >tmp. + $ gawk -f gtlnbufv.awk getlnbuf.in >tmp2. + $ cmp getlnbuf.ok tmp. + $ if $status then rm tmp.; + $ cmp getlnbuf.ok tmp2. + $ if $status then rm tmp2.; + $ return + $ + $arysubnm: echo "arysubnm" + $ gawk -f arysubnm.awk >tmp. + $ cmp arysubnm.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $fnparydl: echo "fnparydl" + $ gawk -f fnparydl.awk >tmp. + $ cmp fnparydl.ok tmp. $ if $status then rm tmp.; $ return $