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-3983-g339f21c


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-3983-g339f21c
Date: Mon, 8 Jun 2020 15:23:55 -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  339f21ce25f2144bf6941c925594039bdfe440b4 (commit)
       via  4fdd2362ad9c9a215da4b4a9f2c96b15a5d5d881 (commit)
      from  a950f833d18938c0e2bb9599670eb3eb50f491c0 (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=339f21ce25f2144bf6941c925594039bdfe440b4

commit 339f21ce25f2144bf6941c925594039bdfe440b4
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Jun 8 22:20:46 2020 +0300

    Make profiling counts 64 bits.

diff --git a/ChangeLog b/ChangeLog
index 2b25a9b..92454f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,14 @@
        * awkgram.y: Fix `print $"2"' case. Thanks to Ed Morton
        Morton <mortoneccc@comcast.net> for the report.
 
+       Unrelated:
+
+       * awk.h (INSTRUCTION): Make dl a long long for profiling
+       counts on 32 bit systems. Thanks to Peter Lindgren
+       <lindgren@ameritech.net> for the report.
+       * profile.c (indent): Take a long long parameter and fix
+       the printf format.
+
 2020-06-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * awkgram.y: Allow @/foo/ as return expression in a function.
diff --git a/awk.h b/awk.h
index 3fba240..515b524 100644
--- a/awk.h
+++ b/awk.h
@@ -758,7 +758,7 @@ typedef struct exp_instruction {
                awk_value_t *(*efptr)(int num_actual_args,
                                        awk_value_t *result,
                                        struct awk_ext_func *finfo);
-               long dl;
+               long long dl;
                char *name;
        } d;
 
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 22ac224..2670ae4 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -175,7 +175,8 @@ BASIC_TESTS = \
        rstest1 rstest2 rstest3 rstest4 rstest5 rswhite \
        scalar sclforin sclifin setrec0 setrec1 \
        sigpipe1 sortempty sortglos spacere splitargv splitarr \
-       splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \
+       splitdef splitvar splitwht status-close \
+       strcat1 strfieldnum strnum1 strnum2 strtod \
        subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 
synerr3 \
        tailrecurse tradanch trailbs tweakfld \
        uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \
@@ -2295,6 +2296,11 @@ strcat1:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+strfieldnum:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 || 
echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 strnum1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
diff --git a/profile.c b/profile.c
index 0f77c8a..d3f6f84 100644
--- a/profile.c
+++ b/profile.c
@@ -135,7 +135,7 @@ init_profiling_signals()
 /* indent --- print out enough tabs */
 
 static void
-indent(long count)
+indent(long long count)
 {
        int i;
 
@@ -143,7 +143,7 @@ indent(long count)
                if (count == 0)
                        fprintf(prof_fp, "\t");
                else
-                       fprintf(prof_fp, "%6ld  ", count);
+                       fprintf(prof_fp, "%6lld  ", count);
        }
 
        assert(indent_level >= 0);

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=4fdd2362ad9c9a215da4b4a9f2c96b15a5d5d881

commit 4fdd2362ad9c9a215da4b4a9f2c96b15a5d5d881
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Jun 8 22:18:07 2020 +0300

    Fix `  print $"2"  ' case.

diff --git a/ChangeLog b/ChangeLog
index 9e076e1..2b25a9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-08         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * awkgram.y: Fix `print $"2"' case. Thanks to Ed Morton
+       Morton <mortoneccc@comcast.net> for the report.
+
 2020-06-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * awkgram.y: Allow @/foo/ as return expression in a function.
diff --git a/awkgram.c b/awkgram.c
index b834a65..3e497e0 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -3071,7 +3071,7 @@ regular_loop:
                        if (yyvsp[-1] != NULL) {
                                NODE *n = yyvsp[-1]->nexti->nexti->memory;
 
-                               if (! iszero(n))
+                               if ((n->flags & (STRING|STRCUR)) != 0 || ! 
iszero(n))
                                        goto regular_print;
 
                                bcfree(yyvsp[-1]->lasti);                       
/* Op_field_spec */
diff --git a/awkgram.y b/awkgram.y
index c427a5b..2a141d3 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1154,7 +1154,7 @@ simple_stmt
                        if ($3 != NULL) {
                                NODE *n = $3->nexti->nexti->memory;
 
-                               if (! iszero(n))
+                               if ((n->flags & (STRING|STRCUR)) != 0 || ! 
iszero(n))
                                        goto regular_print;
 
                                bcfree($3->lasti);                      /* 
Op_field_spec */
diff --git a/test/ChangeLog b/test/ChangeLog
index 097f19b..cca09eb 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-08         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.am (EXTRA_DIST): New test, strfieldnum.
+       * strfieldnum.awk, strfieldnum.in, strfieldnum.ok: New files.
+
 2020-05-06         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (EXTRA_DIST): New test, lintplus.
diff --git a/test/Makefile.am b/test/Makefile.am
index 55b1ff3..3c241aa 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1165,6 +1165,9 @@ EXTRA_DIST = \
        status-close.ok \
        strcat1.awk \
        strcat1.ok \
+       strfieldnum.awk \
+       strfieldnum.in \
+       strfieldnum.ok \
        strftime.awk \
        strftlng.awk \
        strftlng.ok \
@@ -1371,7 +1374,8 @@ BASIC_TESTS = \
        rstest1 rstest2 rstest3 rstest4 rstest5 rswhite \
        scalar sclforin sclifin setrec0 setrec1 \
        sigpipe1 sortempty sortglos spacere splitargv splitarr \
-       splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \
+       splitdef splitvar splitwht status-close \
+       strcat1 strfieldnum strnum1 strnum2 strtod \
        subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 
synerr3 \
        tailrecurse tradanch trailbs tweakfld \
        uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \
diff --git a/test/Makefile.in b/test/Makefile.in
index dd1f831..b774c54 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1428,6 +1428,9 @@ EXTRA_DIST = \
        status-close.ok \
        strcat1.awk \
        strcat1.ok \
+       strfieldnum.awk \
+       strfieldnum.in \
+       strfieldnum.ok \
        strftime.awk \
        strftlng.awk \
        strftlng.ok \
@@ -1634,7 +1637,8 @@ BASIC_TESTS = \
        rstest1 rstest2 rstest3 rstest4 rstest5 rswhite \
        scalar sclforin sclifin setrec0 setrec1 \
        sigpipe1 sortempty sortglos spacere splitargv splitarr \
-       splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \
+       splitdef splitvar splitwht status-close \
+       strcat1 strfieldnum strnum1 strnum2 strtod \
        subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 
synerr3 \
        tailrecurse tradanch trailbs tweakfld \
        uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \
@@ -3932,6 +3936,11 @@ strcat1:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+strfieldnum:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 || 
echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 strnum1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
diff --git a/test/Maketests b/test/Maketests
index 4bee1dd..a59771a 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1062,6 +1062,11 @@ strcat1:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+strfieldnum:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 || 
echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 strnum1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
diff --git a/test/strfieldnum.awk b/test/strfieldnum.awk
new file mode 100644
index 0000000..053033c
--- /dev/null
+++ b/test/strfieldnum.awk
@@ -0,0 +1 @@
+{ print $"2" }
diff --git a/test/strfieldnum.in b/test/strfieldnum.in
new file mode 100644
index 0000000..3774da6
--- /dev/null
+++ b/test/strfieldnum.in
@@ -0,0 +1 @@
+a b c
diff --git a/test/strfieldnum.ok b/test/strfieldnum.ok
new file mode 100644
index 0000000..6178079
--- /dev/null
+++ b/test/strfieldnum.ok
@@ -0,0 +1 @@
+b

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

Summary of changes:
 ChangeLog                            | 13 +++++++++++++
 awk.h                                |  2 +-
 awkgram.c                            |  2 +-
 awkgram.y                            |  2 +-
 pc/Makefile.tst                      |  8 +++++++-
 profile.c                            |  4 ++--
 test/ChangeLog                       |  5 +++++
 test/Makefile.am                     |  6 +++++-
 test/Makefile.in                     | 11 ++++++++++-
 test/Maketests                       |  5 +++++
 test/strfieldnum.awk                 |  1 +
 test/strfieldnum.in                  |  1 +
 test/{fsspcoln.ok => strfieldnum.ok} |  0
 13 files changed, 52 insertions(+), 8 deletions(-)
 create mode 100644 test/strfieldnum.awk
 create mode 100644 test/strfieldnum.in
 copy test/{fsspcoln.ok => strfieldnum.ok} (100%)


hooks/post-receive
-- 
gawk



reply via email to

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