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-907


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-907-gb504b27
Date: Wed, 8 Jun 2016 19:57:09 +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  b504b2707e0780d5f0b347aef9bead0e516813a2 (commit)
       via  98c043ed84ea6fe877561da25e1bf94f68374a67 (commit)
      from  af38e153c3de3710b7e828f52869b446c73c808d (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=b504b2707e0780d5f0b347aef9bead0e516813a2

commit b504b2707e0780d5f0b347aef9bead0e516813a2
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Jun 8 22:56:35 2016 +0300

    New helper file, changed-files.awk.

diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index 7ffbe62..256ff0b 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-08         Arnold D. Robbins     <address@hidden>
+
+       * changed-files.awk: New program. Helps find files that need
+       copyright updates by scanning ChangeLog files.
+
 2016-03-07         Arnold D. Robbins     <address@hidden>
 
        * fixdump.awk (translate): Remove extraneous spaces in
diff --git a/helpers/changed-files.awk b/helpers/changed-files.awk
new file mode 100644
index 0000000..937ecd5
--- /dev/null
+++ b/helpers/changed-files.awk
@@ -0,0 +1,19 @@
+#! /usr/bin/gawk -f
+
+/^2014-/       { nextfile }
+
+/^\t\*/        {
+       sub(/^\t\*[[:space:]]*/, "")
+       sub(/[:\[(].*/, "")
+       gsub(/,/, "")
+       for (i = 1; i <= NF; i++) {
+               fname = $i
+               if (! (fname in names))
+                       names[fname]++
+       }
+}
+
+END {
+       for (i in names)
+               print i
+}

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=98c043ed84ea6fe877561da25e1bf94f68374a67

commit 98c043ed84ea6fe877561da25e1bf94f68374a67
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Jun 8 22:54:54 2016 +0300

    Bug fix in symbol lookup, could break watchpoints.

diff --git a/ChangeLog b/ChangeLog
index bbc4c94..922f4f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-06-08         Arnold D. Robbins     <address@hidden>
+
+       * symbol.c (lookup): If got Node_val, it's a non-variable
+       in SYMTAB, return NULL. Can affect watchpoints in the debugger,
+       maybe other places. Thanks to Hermann Peifer for the
+       test case and report.
+
 2016-06-05         Arnold D. Robbins     <address@hidden>
 
        * dfa.c: Sync with GNU grep.
diff --git a/symbol.c b/symbol.c
index 84574e7..8533fad 100644
--- a/symbol.c
+++ b/symbol.c
@@ -117,7 +117,9 @@ lookup(const char *name)
        }
 
        unref(tmp);
-       return n;       /* NULL or new place */
+       if (n == NULL || n->type == Node_val)   /* non-variable in SYMTAB */
+               return NULL;
+       return n;       /* new place */
 }
 
 /* make_params --- allocate function parameters for the symbol table */
diff --git a/test/ChangeLog b/test/ChangeLog
index 02f083d..83b4546 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-08         Arnold D. Robbins     <address@hidden>
+
+       * symtab10.awk, symtab10.in, symtab10.ok: New files.
+       * Makefile.am (symtab10): New test.
+       Thanks to Hermann Peifer for the report.
+
 2016-06-01         Arnold D. Robbins     <address@hidden>
 
        * Makefile.am (hex2): New test.
diff --git a/test/Makefile.am b/test/Makefile.am
index 7cd37fd..1f1646e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -986,6 +986,9 @@ EXTRA_DIST = \
        symtab8.ok \
        symtab9.awk \
        symtab9.ok \
+       symtab10.awk \
+       symtab10.in \
+       symtab10.ok \
        synerr1.awk \
        synerr1.ok \
        synerr2.awk \
@@ -1117,7 +1120,7 @@ GAWK_EXT_TESTS = \
        rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
        splitarg4 strftime \
        strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
-       symtab7 symtab8 symtab9 \
+       symtab7 symtab8 symtab9 symtab10 \
        watchpoint1
 
 EXTRA_TESTS = inftest regtest
@@ -2159,6 +2162,11 @@ rscompat:
        @AWKPATH="$(srcdir)" $(AWK) --traditional -f address@hidden 
"$(srcdir)/address@hidden" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+symtab10:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)/address@hidden" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 # Targets generated for other tests:
 include Maketests
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 23f50af..df874d1 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1243,6 +1243,9 @@ EXTRA_DIST = \
        symtab8.ok \
        symtab9.awk \
        symtab9.ok \
+       symtab10.awk \
+       symtab10.in \
+       symtab10.ok \
        synerr1.awk \
        synerr1.ok \
        synerr2.awk \
@@ -1373,7 +1376,7 @@ GAWK_EXT_TESTS = \
        rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
        splitarg4 strftime \
        strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
-       symtab7 symtab8 symtab9 \
+       symtab7 symtab8 symtab9 symtab10 \
        watchpoint1
 
 EXTRA_TESTS = inftest regtest
@@ -2597,6 +2600,11 @@ rscompat:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) --traditional -f address@hidden 
"$(srcdir)/address@hidden" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+symtab10:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)/address@hidden" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 Gt-dummy:
 # file Maketests, generated from Makefile.am by the Gentests program
 addcomma:
diff --git a/test/symtab10.awk b/test/symtab10.awk
new file mode 100644
index 0000000..6fbd399
--- /dev/null
+++ b/test/symtab10.awk
@@ -0,0 +1 @@
+BEGIN { SYMTAB["x"] ; y=1 ; y++ }
diff --git a/test/symtab10.in b/test/symtab10.in
new file mode 100644
index 0000000..d9afcd6
--- /dev/null
+++ b/test/symtab10.in
@@ -0,0 +1,4 @@
+watch y
+run
+watch x
+continue
diff --git a/test/symtab10.ok b/test/symtab10.ok
new file mode 100644
index 0000000..b0cabd7
--- /dev/null
+++ b/test/symtab10.ok
@@ -0,0 +1,11 @@
+Watchpoint 1: y
+Starting program: 
+Stopping in BEGIN ...
+Watchpoint 1: y
+  Old value: untyped variable
+  New value: 1
+main() at `symtab10.awk':1
+1       BEGIN { SYMTAB["x"] ; y=1 ; y++ }
+no symbol `x' in current context
+Program exited normally with exit value: 0
+EXIT CODE: 2

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

Summary of changes:
 ChangeLog                 |    7 +++++++
 helpers/ChangeLog         |    5 +++++
 helpers/changed-files.awk |   19 +++++++++++++++++++
 symbol.c                  |    4 +++-
 test/ChangeLog            |    6 ++++++
 test/Makefile.am          |   10 +++++++++-
 test/Makefile.in          |   10 +++++++++-
 test/symtab10.awk         |    1 +
 test/symtab10.in          |    4 ++++
 test/symtab10.ok          |   11 +++++++++++
 10 files changed, 74 insertions(+), 3 deletions(-)
 create mode 100644 helpers/changed-files.awk
 create mode 100644 test/symtab10.awk
 create mode 100644 test/symtab10.in
 create mode 100644 test/symtab10.ok


hooks/post-receive
-- 
gawk



reply via email to

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