gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2401-g0c3c1a


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2401-g0c3c1a2
Date: Sun, 15 Jan 2017 17:06:25 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  0c3c1a2aa8318e0035f90fc3a5d30de470d949b3 (commit)
       via  2fd82e70b4a9b85427a126f103841ebcb8e8bb16 (commit)
      from  aa4a2c09d9b438e628254238e184ebff2c6b7acc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=0c3c1a2aa8318e0035f90fc3a5d30de470d949b3

commit 0c3c1a2aa8318e0035f90fc3a5d30de470d949b3
Merge: aa4a2c0 2fd82e7
Author: Andrew J. Schorr <address@hidden>
Date:   Sun Jan 15 12:06:17 2017 -0500

    Merge branch 'gawk-4.1-stable'

diff --cc ChangeLog
index d362fa6,3ce1ffe..ea490ad
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,308 -1,10 +1,315 @@@
+ 2017-01-15         Andrew J. Schorr     <address@hidden>
+ 
+       * interpret.h (r_interpret): Fix bug in Op_assign_concat reported
+       on Cygwin mailing list. The string concatenation optimization was
+       not updating the node correctly by setting STRING and STRCUR flags
+       and setting stfmt.
+ 
 +2017-01-04         Arnold Robbins        <address@hidden>
 +
 +      * config.guess, config.sub, compile, depcomp: Sync from latest
 +      in GNULIB.
 +
 +2016-12-27         Juergen Kahrs         <address@hidden>
 +
 +      * CMakeLists.txt: Updated after adding support library.
 +
 +2016-12-23         Arnold D. Robbins     <address@hidden>
 +
 +      * configure.ac (GNUPG_CHECK_MPFR): Don't call on PowerPC
 +      Macintosh.  C99 and the last version of MPFR that works on
 +      that platform don't get along. Sigh.
 +
 +2016-12-22         Arnold D. Robbins     <address@hidden>
 +
 +      * dfa.c: Sync with GNULIB.
 +      * intprops.h: New file.
 +      * Makefile.am (base_sources): Add intprops.h.
 +
 +      Unrelated.  Import GNULIB fix for regex: fix integer-overflow
 +      bug in never-used code.
 +      Problem reported by Clément Pit–Claudel in:
 +      http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00654.html
 +      Fix by Paul Eggert  <address@hidden>:
 +
 +      * regex_internal.h: Include intprops.h.
 +      * regexec.c (re_search_2_stub): Use it to avoid undefined
 +      behavior on integer overflow.
 +
 +      Unrelated. Set up a support directory for externally obtained
 +      support files.
 +
 +      * Makefile.am (base_sources, EXTRA_DIST): Edit lists.
 +      (SUBDIRS): Get ordering right.
 +      (LDADD): Add support/libsupport.a.
 +      (DEFS): Add -I for support directory.
 +      * dfa.c, dfa.h, getopt.c, getopt.h, getopt1.c, getopt_int.h,
 +      intprops.h, localeinfo.c, localeinfo.h, random.c, random.h,
 +      regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
 +      regexec.c, verify.h, xalloc.h: Moved to support.
 +
 +      Unrelated: Totally break binary compatibility in the API
 +      after merging in API min/max changes and REGEX and STRNUM
 +      support in the API:
 +
 +      * gawkapi.c (valtype2str): New function.
 +      (node_to_awk_value): Minor simplification in a switch.
 +      (api_flatten_array): Removed.
 +      (api_flatten_array_typed): Use valtype2str in error message.
 +      (api_impl): Reorder functions to group related ones together again.
 +      * gawkapi.h (awk_valtype_t): Reorder enum values.
 +      (struct gawk_api): Remove api_flatten_array field.  Reorder
 +      functions to group related ones together again.
 +
 +2016-12-17         Arnold D. Robbins     <address@hidden>
 +
 +      * gawkapi.h (api_add_ext_func): Add comment about point to
 +      awk_ext_func_t not being const but gawk doesn't use it.
 +      * * interpret.h (Op_ext_builtin): Simplify code, check only
 +      if do_lint and ! f->suppress_lint and num_args > max_expected.
 +
 +2016-12-16         Arnold D. Robbins     <address@hidden>
 +
 +      * gawkapi.h (awk_ext_func_t): Put max back before min. Restores
 +      source compatibility, although there will be compile warnings
 +      because of the 3rd argument for the C function being missing.
 +      * interpret.h (Op_ext_builtin): Used size_t instead of int for
 +      the various variables. Add a check that max expected > 0.
 +
 +2016-12-14         Arnold D. Robbins     <address@hidden>
 +
 +      MAJOR BREAKING API CHANGE.
 +
 +      * awk.h (INSTRUCTION): Update extension function pointer to
 +      take 3rd argument of pointer to struct awk_ext_func.
 +      * gawkapi.c (api_add_ext_func): Update third arg to not be const.
 +      * gawkapi.h (awk_ext_func_t): Put min before max. Add suppress_lint
 +      and data pointer.
 +      [gawk_api_major_version]: Update to 2.
 +      [gawk_api_minor_version]: Reset to 0.
 +      (api_add_ext_func): Update third arg to not be const.
 +      * interpret.h (Op_ext_symbol): Revise lint check.
 +
 +2016-12-12         Arnold D. Robbins     <address@hidden>
 +
 +      * awk.h (INSTRUCTION): Replace min_required and max_expected
 +      with a pointer to the extension functions awk_ext_func_t struct.
 +      * ext.c (make_builtin): Store a pointer to the extension function
 +      struct into the INSTRUCTION instead of the min and max.
 +      * gawkapi.h (awk_ext_func): Use size_t instead of unsigned short.
 +      Put min second, which preserves source code compatibility.
 +      * interpret.h (Op_ext_builtin): Use the pointer for the info
 +      directly. If lint and max_expected > 0 and args > max_expected
 +      print a message and set max_expected to zero so we only print once
 +      per function. Remove special case of both min and max being zero.
 +      (Op_ext_func): Adjust creation of the data structures.
 +
 +2016-12-11         Arnold D. Robbins     <address@hidden>
 +
 +      * dfa.c: Sync with GNULIB.
 +
 +2016-12-05         Andrew J. Schorr     <address@hidden>
 +
 +      Add API support for strnum values.
 +      * gawkapi.c (awk_value_to_node): Add AWK_STRNUM.
 +      (assign_string): Add a type argument so we can use this for AWK_STRING
 +      or AWK_STRNUM.
 +      (node_to_awk_value): When AWK_NUMBER is requested, a regex value
 +      should return false, as per the header file documentation.
 +      Add support for AWK_STRNUM requests. When AWK_REGEX is requested,
 +      implement the cases properly instead of always returning true.
 +      Fix AWK_SCALAR logic. For AWK_UNDEFINED, rewrite using a switch
 +      and support AWK_STRNUM.
 +      (api_sym_update): Add AWK_STRNUM.
 +      (api_sym_update_scalar): Add optimized support for updating AWK_STRNUM.
 +      (valid_subscript_type): Add AWK_STRNUM.
 +      (api_create_value): Add AWK_STRNUM.
 +      * gawkapi.h (awk_valtype_t): Add AWK_STRNUM.
 +      (strnum_value): New macro.
 +      (Value fetching table): Updated.
 +
 +2016-12-04         Andrew J. Schorr     <address@hidden>
 +
 +      * gawkapi.c (assign_regex): Do not call assign_string, since we
 +      know that a REGEX value is not an unterminated field string.
 +      * gawkapi.h (make_regex): Delete macro.
 +      (make_const_regex, make_malloced_regex): Add new macros to replace
 +      make_regex with necessary memory management support.
 +
 +2016-12-04         Andrew J. Schorr     <address@hidden>
 +
 +      * awk.h (fixtype): Remove conditional checking if the node type
 +      is Node_val. This is already covered by the assert, and if it's not
 +      true, we have serious bugs.
 +      * builtin.c (do_typeof): Do not treat Node_var the same way as
 +      Node_val, since they are different beasts. In reality, the argument
 +      to this function will never have type Node_var.
 +
 +2016-12-04         Andrew J. Schorr     <address@hidden>
 +
 +      * gawkapi.h (awk_element_t): Remove obsolete comment claiming that
 +      the index will always be a string.
 +      (gawk_api_t): Add new api_flatten_array_typed function and indicate
 +      that api_flatten_array has been superseded.
 +      (flatten_array_typed): New macro to call api_flatten_array_typed.
 +      (flatten_array): Redefine using the new flatten_array_typed macro.
 +      * gawkapi.c (api_flatten_array_typed): New function renamed from
 +      api_flatten_array to flatten an array with the types requested by the
 +      caller. Also update the comments and error messages.
 +      (api_flatten_array): Now a wrapper around api_flatten_array_typed.
 +      (api_impl): Add new api_flatten_array_typed hook.
 +
 +2016-12-06         Arnold D. Robbins     <address@hidden>
 +
 +      Add minimum required and maximum expected number of arguments
 +      to the API.
 +
 +      * awk.h (INSTRUCTION): Add new members min_required and max_expected.
 +      * ext.c (make_builtin): Store values from extension function struct
 +      into the INSTRUCTION.
 +      * gawkapi.h (awk_ext_func): Add min_required args. Make both it and
 +      max_expected_args into unsigned short to match type in INSTRUCTION.
 +      * interpret.h (Op_ext_builtin): Store min_required and max_expected
 +      in instructions. Add checking code and lint checks.
 +      (Op_ext_func): Copy min_required and max_expected from function info.
 +
 +
 +2016-12-04         Andrew J. Schorr     <address@hidden>
 +
 +      * gawkapi.h (r_make_string_type): New inline function to create strings
 +      of any type, currently AWK_STRING or AWK_REGEX.
 +      (r_make_string): Now a wrapper around r_make_string_type.
 +      (make_regex): Convert from an inline function to a macro that
 +      calls r_make_string_type.
 +
 +2016-11-30         Arnold D. Robbins     <address@hidden>
 +
 +      * dfa.c: Sync with fixes in GNULIB.
 +
 +      Unrelated:
 +
 +      * gawkapi.h (make_regex): New function.
 +
 +2016-11-29         Arnold D. Robbins     <address@hidden>
 +
 +      Add support for typed regex variables to the API.
 +
 +      * awk.h (make_typed_regex): Declare function.
 +      * awkgram.y (typed_regexp): Call make_typed_regex instead of
 +      using inline code.
 +      * gawkapi.h (AWK_REGEX): New value type.
 +      (regex_value): New macro.
 +      (Value fetching table): Updated.
 +      * gawkapi.c (awk_value_to_node, node_to_awk_value, api_sym_update,
 +      api_sym_update_scalar, valid_subscript_type, api_create_value):
 +      Add support for AWK_REGEX.
 +      (assign_regex): New function.
 +      (api_flatten_array): Adjust comment.
 +      * node.c (make_typed_regex): New function; moved code from grammar.
 +
 +2016-11-29         Arnold D. Robbins     <address@hidden>
 +
 +      Remove redundant flag from dfa:
 +
 +      * dfa.c (dfasyntax): Use RE_ICASE instead of DFA_CASE_FOLD.
 +      * dfa.h (DFA_CASE_FOLD): Removed.
 +      * re.c (make_regexp): Use RE_ICASE for regex and dfa. Yay!
 +
 +      Unrelated: Don't have to recompute syntax stuff every time
 +      we compile a regexp.
 +
 +      * dfa.c (dfacopysyntax): New function.
 +      (dfaalloc): Zero out the newly allocated memory.
 +      * dfa.h (dfacopysyntax): Declare it.
 +      * re.c (make_regexp): Declare two static dfaregs, one for
 +      with and without ignorecase. Compute the syntax once for each,
 +      then use dfacopysyntax to copy the settings when compiling
 +      a regexp.
 +
 +2016-11-28         Arnold D. Robbins     <address@hidden>
 +
 +      Make gawk compile on HP-UX 11.33.
 +
 +      * debug.c (serialize_list): Renamed from `serialize'.
 +      (unserialize_list): Renamed from `unserialize', for consistency.
 +
 +      Unrelated:
 +
 +      * dfa.c: Sync with GNULIB. Twice in one day.
 +
 +2016-11-21         Arnold D. Robbins     <address@hidden>
 +
 +      * dfa.c: Sync with GNULIB.
 +
 +2016-11-17         Arnold D. Robbins     <address@hidden>
 +
 +      General cleanup for zero termination of strings.
 +
 +      * array.c (do_delete): Use %.*s.
 +      (value_info): Get length and use %.*s.
 +      (asort_actual): Save and restore character after end.
 +      * awkgram.y (split_comment): Use make_string, not make_str_node.
 +      * builtin.c (do_fflush): Use %.*s.
 +      (locale_category_from_argument, do_dcgettext, do_dcngettext,
 +      do_bindtextdomain): Save and restore character after end.
 +      * debug.c (do_info, print_array, print_subscript, do_print_var,
 +      do_set_var, display, do_watch, print_watch_item, serialize_subscript,
 +      do_print_f): Use %.*s.
 +      * eval.c (cmp_nodes, fmt_index): Save and restore character after end.
 +      * interpret.h (r_interpret): Fix compuation for concatenation of
 +      wide strings.
 +      * io.c (is_non_fatal_redirect): Add length parameter; save and
 +      restore character after last. Adjust all other declarations and calls.
 +      (do_close): Save and restore character after end.
 +      * mpfr.c (ieee_fmts): Adjust table indentation.
 +      (do_mpfr_strtonum): Clear wide string members of the union.
 +      * msg.c (err): Use %.*s.
 +
 +2016-11-07         Arnold D. Robbins     <address@hidden>
 +
 +      * awk.h [USER_INPUT]: Renamed from MAYBE_NUM.
 +      * builtin.c, eval.c, field.c, int_array.c, io.c, main.c,
 +      mpfr.c, node.c: Change all uses.
 +
 +2016-11-15         Arnold D. Robbins     <address@hidden>
 +
 +      Finish reworking typed regexes.
 +
 +      * awk.h (typed_re): Replaces tre_reg.
 +      * awkgram.y (typed_regexp production): Node_val points to a regular
 +      Node_regex and also has string value and length.
 +      (make_regnode): Simplified back to its original form.
 +      * builtin.c (call_sub, call_match, call_split_func): For REGEX,
 +      get n->typed_re.
 +      * field.c (do_split, do_patsplit): Ditto, for separator regexp.
 +      * profile.c (pprint): Op_match_rec, handle REGEX correctly.
 +      * re.c (re_update): If REGEX, get t->typed_re->re_reg.
 +
 +2016-11-15         Arnold D. Robbins     <address@hidden>
 +
 +      Start reworking typed regexes.
 +
 +      * awk.h (Node_typedregex): Nuked.
 +      [REGEX]: New flag.
 +      (tre_reg): New member in val part of NODE union.
 +      (force_string, force_number, fixtype): Remove use of Node_typedregex.
 +      * awkgram.y (grammer): Use REGEX flag instead of node type.
 +      (valinfo); Ditto.
 +      (make_regnode): Adjust creation based on node type.
 +      * builtin.c (do_length, do_print, call_sub, call_match,
 +      call_split_func, do_typeof): Adjust code.
 +      * debug.c (watchpoint_triggered, initialize_watch_item,
 +      print_memory): Adjust code.
 +      * eval.c (nodetypes): Remove Node_typedregex.
 +      (flags2str): Add REGEX.
 +      (setup_frame): Adjust code after removal of Node_typedregex.
 +      * interpret.h (r_interpret): Adjust code after removal
 +      of Node_typedregex.
 +      * profile.c (pp_typed_regex): Renamed from pp_strong_regex.
 +      (pp_string_or_strong_regex): Renamed from pp_string_or_strong_regex.
 +      (pprint): Adjust code after removal of Node_typedregex.
 +      * re.c (re_update): Adjust code after removal of Node_typedregex.
 +
  2016-11-04  Eli Zaretskii  <address@hidden>
  
        * builtin.c (efwrite) [__MINGW32__]: Call w32_maybe_set_errno if
diff --cc interpret.h
index 1399e72,90573af..3526325
--- a/interpret.h
+++ b/interpret.h
@@@ -718,14 -706,16 +718,16 @@@ mod
                                *lhs = dupnode(t1);
                        }
  
-                       if (t1 != t2 && t1->valref == 1 && (t1->flags & MPFN) 
== 0) {
+                       if (t1 != t2 && t1->valref == 1 && (t1->flags & 
(MPFN|MPZN)) == 0) {
                                size_t nlen = t1->stlen + t2->stlen;
  
 -                              erealloc(t1->stptr, char *, nlen + 2, 
"r_interpret");
 +                              erealloc(t1->stptr, char *, nlen + 1, 
"r_interpret");
                                memcpy(t1->stptr + t1->stlen, t2->stptr, 
t2->stlen);
                                t1->stlen = nlen;
                                t1->stptr[nlen] = '\0';
-                               t1->flags &= ~(NUMCUR|NUMBER|NUMINT);
 -                              t1->flags &= 
~(NUMCUR|NUMBER|MAYBE_NUM|NUMINT|INTIND);
++                              t1->flags &= 
~(NUMCUR|NUMBER|USER_INPUT|NUMINT|INTIND);
+                               t1->flags |= (STRING|STRCUR);
+                               t1->stfmt = -1;
  
                                if ((t1->flags & WSTRCUR) != 0 && (t2->flags & 
WSTRCUR) != 0) {
                                        size_t wlen = t1->wstlen + t2->wstlen;
diff --cc test/ChangeLog
index d2b0cf7,d07a062..5122534
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@@ -1,17 -1,9 +1,23 @@@
+ 2017-01-15         Andrew J. Schorr     <address@hidden>
+ 
+       * Makefile.am (concat5): New test.
+       * concat5.awk, concat5.ok: New files.
+       Check for bug forwarded by Corinna Vinschen from Cygwin mailing list.
+ 
 +2016-12-05         Andrew J. Schorr     <address@hidden>
 +
 +      * rwarray.awk: Check that strnum is recreated correctly.
 +
 +2016-11-30         Arnold D. Robbins     <address@hidden>
 +
 +      * rwarray.awk: Use typeof() to verify that typed regex is
 +      created correctly upon reading.
 +
 +2016-11-29         Arnold D. Robbins     <address@hidden>
 +
 +      * rwarray.awk: Add a typed regex into the array before
 +      writing it out and reading it back.
 +
  2016-11-21         Arnold D. Robbins     <address@hidden>
  
        * Makefile.am (EXTRA_DIST): Add valgrind.awk to the list.
diff --cc test/Makefile.am
index 035e96e,f63c02a..cc9f6d1
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@@ -1165,10 -1074,10 +1167,10 @@@ BASIC_TESTS = 
        aryprm8 aryprm9 arysubnm asgext awkpath \
        back89 backgsub badassign1 badbuild \
        callparam childin clobber closebad clsflnam compare compare2 concat1 
concat2 \
-       concat3 concat4 convfmt \
+       concat3 concat4 concat5 convfmt \
        datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress 
dynlj \
        eofsplit exit2 exitval1 exitval2 exitval3 \
 -      fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \
 +      fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray 
fnarray2 \
        fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln 
\
        fstabplus funsemnl funsmnam funstack \
        getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \
diff --cc test/Makefile.in
index ac0bdc1,2fad102..a45e26e
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@@ -1422,10 -1330,10 +1424,10 @@@ BASIC_TESTS = 
        aryprm8 aryprm9 arysubnm asgext awkpath \
        back89 backgsub badassign1 badbuild \
        callparam childin clobber closebad clsflnam compare compare2 concat1 
concat2 \
-       concat3 concat4 convfmt \
+       concat3 concat4 concat5 convfmt \
        datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress 
dynlj \
        eofsplit exit2 exitval1 exitval2 exitval3 \
 -      fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \
 +      fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray 
fnarray2 \
        fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln 
\
        fstabplus funsemnl funsmnam funstack \
        getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    7 +++++++
 interpret.h      |    6 ++++--
 test/ChangeLog   |    6 ++++++
 test/Makefile.am |    4 +++-
 test/Makefile.in |    9 ++++++++-
 test/Maketests   |    5 +++++
 test/concat5.awk |    7 +++++++
 test/concat5.ok  |    1 +
 8 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 test/concat5.awk
 create mode 100644 test/concat5.ok


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]