gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-922


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-922-gb2ebebd
Date: Sun, 26 Jun 2016 15:10:37 +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, gawk-4.1-stable has been updated
       via  b2ebebda055fb7e9cd02c03e394decdbcf63afd3 (commit)
      from  a0c2e0d3db233ed416f2a4346f2820ce79e46db6 (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=b2ebebda055fb7e9cd02c03e394decdbcf63afd3

commit b2ebebda055fb7e9cd02c03e394decdbcf63afd3
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Jun 26 18:10:08 2016 +0300

    Fix handling of MAYBE_NUM; fixes change of 2015-08-25.

diff --git a/ChangeLog b/ChangeLog
index d794cae..990b4b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-06-26         Arnold D. Robbins     <address@hidden>
+
+       Repair change of 2015-08-25 to handling of MAYBE_NUM.
+       * mpfr.c (mpg_force_number): Just clear MAYBE_NUM.
+       * node.c (r_force_number): Clear STRING separately after
+       setting NUMBER.
+
+       Thanks to Andrew Schorr for reporting the problem.
+       A test case will eventually be merged into master.
+
 2016-06-16         Arnold D. Robbins     <address@hidden>
 
        * awk.h: Add comment headers for several functions.
diff --git a/mpfr.c b/mpfr.c
index 6770a16..533ec9d 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -347,7 +347,7 @@ mpg_force_number(NODE *n)
                return n;
 
        if ((n->flags & MAYBE_NUM) != 0) {
-               n->flags &= ~(MAYBE_NUM|STRING);
+               n->flags &= ~MAYBE_NUM;
                newflags = NUMBER;
        }
 
diff --git a/node.c b/node.c
index 23199c5..4154575 100644
--- a/node.c
+++ b/node.c
@@ -90,8 +90,9 @@ r_force_number(NODE *n)
                        return n;
                } else if (n->stlen == 4 && is_ieee_magic_val(n->stptr)) {
                        if ((n->flags & MAYBE_NUM) != 0)
-                               n->flags &= ~(MAYBE_NUM|STRING);
+                               n->flags &= ~MAYBE_NUM;
                        n->flags |= NUMBER|NUMCUR;
+                       n->flags &= ~STRING;
                        n->numbr = get_ieee_magic_val(n->stptr);
 
                        return n;
@@ -116,7 +117,7 @@ r_force_number(NODE *n)
 
        if ((n->flags & MAYBE_NUM) != 0) {
                newflags = NUMBER;
-               n->flags &= ~(MAYBE_NUM|STRING);
+               n->flags &= ~MAYBE_NUM;
        } else
                newflags = 0;
 
@@ -125,6 +126,7 @@ r_force_number(NODE *n)
                        n->numbr = (AWKNUM)(*cp - '0');
                        n->flags |= newflags;
                        n->flags |= NUMCUR;
+                       n->flags &= ~STRING;
                        if (cp == n->stptr)             /* no leading spaces */
                                n->flags |= NUMINT;
                }
@@ -136,6 +138,7 @@ r_force_number(NODE *n)
                if (! do_traditional && get_numbase(cp, true) != 10) {
                        n->numbr = nondec2awknum(cp, cpend - cp);
                        n->flags |= NUMCUR;
+                       n->flags &= ~STRING;
                        ptr = cpend;
                        goto finish;
                }

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

Summary of changes:
 ChangeLog |   10 ++++++++++
 mpfr.c    |    2 +-
 node.c    |    7 +++++--
 3 files changed, 16 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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