diff options
-rwxr-xr-x | ChangeLog | 20 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | builtin.c | 3 | ||||
-rwxr-xr-x | config.rpath | 2 | ||||
-rw-r--r-- | field.c | 22 |
5 files changed, 42 insertions, 10 deletions
@@ -1,3 +1,23 @@ +2018-09-18 Arnold D. Robbins <arnold@skeeve.com> + + * NEWS: Fix typo in gettext version. + + Unrelated: + + * field.c (get_field): Move lint check for field access in an + END rule to top level, make wording more general. + * builtin.c (do_print_rec): Restore check before calling get_field() + and add do_lint to the condition. + + Unrelated: + + * field.c (set_NF): Add lint warning if decrementing NF, which + doesn't work on older Unix awks. + + Unrelated: + + * config.rpath: Sync to GNULIB. + 2018-09-16 gettextize <bug-gnu-gettext@gnu.org> * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.8. @@ -28,7 +28,10 @@ Changes from 4.2.1 to 4.2.2 me to stop carrying forward decades of changes against the original ones from GLIBC. -4. Infrastructure upgrades: Bison 3.1, Automake 1.16.1, Gettext 0.18.1. +4. Infrastructure upgrades: Bison 3.1, Automake 1.16.1, Gettext 0.19.8.1. + +XX. A number of bugs, some of them quite significant, have been fixed. + See the ChangeLog for details. Changes from 4.2.0 to 4.2.1 --------------------------- @@ -2364,7 +2364,8 @@ do_print_rec(int nargs, int redirtype) if (fp == NULL) return; - (void) get_field(0L, NULL); /* rebuild record if necessary */ + if (! field0_valid || do_lint) // lint check for field access in END + (void) get_field(0L, NULL); f0 = fields_arr[0]; diff --git a/config.rpath b/config.rpath index 98183ff2..fc5913d7 100755 --- a/config.rpath +++ b/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2016 Free Software Foundation, Inc. +# Copyright 1996-2018 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # @@ -396,6 +396,13 @@ set_NF() nf = get_number_si(NF_node->var_value); if (nf < 0) fatal(_("NF set to negative value")); + + static bool warned = false; + if (do_lint && NF > nf && ! warned) { + warned = true; + lintwarn(_("decrementing NF is not portable to many awk versions")); + } + NF = nf; if (NF > nf_high_water) @@ -832,18 +839,19 @@ NODE ** get_field(long requested, Func_ptr *assign) { bool in_middle = false; + static bool warned = false; + extern int currule; + + if (do_lint && currule == END && ! warned) { + warned = true; + lintwarn(_("accessing fields from an END rule may not be portable")); + } + /* * if requesting whole line but some other field has been altered, * then the whole line must be rebuilt */ if (requested == 0) { - static bool warned = false; - extern int currule; - - if (do_lint && currule == END && ! warned) { - warned = true; - lintwarn(_("accessing $0 from an END rule may not be portable")); - } if (! field0_valid) { /* first, parse remainder of input record */ if (NF == -1) { |