gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4161-g3f0c8b4


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4161-g3f0c8b4
Date: Thu, 29 Oct 2020 11:47:37 -0400 (EDT)

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-5.1-stable has been updated
       via  3f0c8b44b1c8326bf83a290832f557ad350927fd (commit)
      from  5ee58847061487a0fa9aa5ce0492cd4afb7aaa72 (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=3f0c8b44b1c8326bf83a290832f557ad350927fd

commit 3f0c8b44b1c8326bf83a290832f557ad350927fd
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Thu Oct 29 17:47:18 2020 +0200

    Bug fix in eval.c:setup_frame.

diff --git a/ChangeLog b/ChangeLog
index 45025d4..ffc1e12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-29         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * eval.c (setup_frame): Handle the case of values from FUNCTAB.
+       Thanks to Denis Shirokov <cosmogen@gmail.com> for the report.
+
 2020-10-12         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawkapi.c (api_lintwarn): Fix comparison, should be to check
diff --git a/eval.c b/eval.c
index 9b3342c..558c021 100644
--- a/eval.c
+++ b/eval.c
@@ -1337,6 +1337,13 @@ setup_frame(INSTRUCTION *pc)
                        r->var_value = m;
                        break;
 
+               case Node_func:
+               case Node_builtin_func:
+               case Node_ext_func:
+                       r->type = Node_var;
+                       r->var_value = make_string(m->vname, strlen(m->vname));
+                       break;
+
                default:
                        cant_happen();
                }
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 7735fd1..2576639 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -237,7 +237,7 @@ LOCALE_CHARSET_TESTS = \
 
 SHLIB_TESTS = \
        apiterm \
-       filefuncs fnmatch fork fork2 fts functab4 \
+       filefuncs fnmatch fork fork2 fts functab4 functab5 \
        getfile \
        inplace1 inplace2 inplace2bcomp inplace3 inplace3bcomp \
        ordchr ordchr2 \
@@ -3488,6 +3488,11 @@ functab4:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+functab5:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 ordchr:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 6bd4dd1..3817087 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2020-10-29         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.am (EXTRA_DIST): functab5, new test.
+       (SHLIB_TESTS): Ditto.
+       * functab5.awk, functab5.ok: New files.
+
 2020-10-09         Arnold D. Robbins     <arnold@skeeve.com>
 
        * xref.awk: Bug fix: Identifiers can have underscore in the middle.
diff --git a/test/Makefile.am b/test/Makefile.am
index 3880c5b..d6bf7c2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -407,6 +407,8 @@ EXTRA_DIST = \
        functab3.ok \
        functab4.awk \
        functab4.ok \
+       functab5.awk \
+       functab5.ok \
        funlen.awk \
        funlen.in \
        funlen.ok \
@@ -1461,7 +1463,7 @@ LOCALE_CHARSET_TESTS = \
 
 SHLIB_TESTS = \
        apiterm \
-       filefuncs fnmatch fork fork2 fts functab4 \
+       filefuncs fnmatch fork fork2 fts functab4 functab5 \
        getfile \
        inplace1 inplace2 inplace2bcomp inplace3 inplace3bcomp \
        ordchr ordchr2 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 28566ae..884d353 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -670,6 +670,8 @@ EXTRA_DIST = \
        functab3.ok \
        functab4.awk \
        functab4.ok \
+       functab5.awk \
+       functab5.ok \
        funlen.awk \
        funlen.in \
        funlen.ok \
@@ -1720,7 +1722,7 @@ LOCALE_CHARSET_TESTS = \
 
 SHLIB_TESTS = \
        apiterm \
-       filefuncs fnmatch fork fork2 fts functab4 \
+       filefuncs fnmatch fork fork2 fts functab4 functab5 \
        getfile \
        inplace1 inplace2 inplace2bcomp inplace3 inplace3bcomp \
        ordchr ordchr2 \
@@ -5123,6 +5125,11 @@ functab4:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+functab5:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 ordchr:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
diff --git a/test/Maketests b/test/Maketests
index b01e0c5..2cf7133 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -2217,6 +2217,11 @@ functab4:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+functab5:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 ordchr:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
diff --git a/test/functab5.awk b/test/functab5.awk
new file mode 100644
index 0000000..7d6da1f
--- /dev/null
+++ b/test/functab5.awk
@@ -0,0 +1,12 @@
+@load "filefuncs"
+
+BEGIN {
+       PROCINFO["sorted_in"] = "sort"
+       for (i in FUNCTAB)
+               print i "'"
+}
+
+function sort(i1, v1, i2, v2)
+{
+       return i1 == i2 ? 0 : i1 < i2 ? -1 : +1
+}
diff --git a/test/functab5.ok b/test/functab5.ok
new file mode 100644
index 0000000..9ac4295
--- /dev/null
+++ b/test/functab5.ok
@@ -0,0 +1,46 @@
+and'
+asort'
+asorti'
+atan2'
+bindtextdomain'
+chdir'
+close'
+compl'
+cos'
+dcgettext'
+dcngettext'
+exp'
+fflush'
+fts'
+gensub'
+gsub'
+index'
+int'
+isarray'
+length'
+log'
+lshift'
+match'
+mktime'
+or'
+patsplit'
+rand'
+rshift'
+sin'
+sort'
+split'
+sprintf'
+sqrt'
+srand'
+stat'
+statvfs'
+strftime'
+strtonum'
+sub'
+substr'
+system'
+systime'
+tolower'
+toupper'
+typeof'
+xor'

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

Summary of changes:
 ChangeLog         |  5 +++++
 eval.c            |  7 +++++++
 pc/Makefile.tst   |  7 ++++++-
 test/ChangeLog    |  6 ++++++
 test/Makefile.am  |  4 +++-
 test/Makefile.in  |  9 ++++++++-
 test/Maketests    |  5 +++++
 test/functab5.awk | 12 ++++++++++++
 test/functab5.ok  | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 98 insertions(+), 3 deletions(-)
 create mode 100644 test/functab5.awk
 create mode 100644 test/functab5.ok


hooks/post-receive
-- 
gawk



reply via email to

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