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-4302-g0bc0253


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4302-g0bc0253
Date: Sun, 12 Sep 2021 02:56:46 -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  0bc02532d7fa333ac7067c1cb91506ad16485916 (commit)
       via  b62e78e6d7e4307678fa172488302375559dcbf2 (commit)
      from  dab291a6bd1b7a202758747da70fa125ffeb75ed (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=0bc02532d7fa333ac7067c1cb91506ad16485916

commit 0bc02532d7fa333ac7067c1cb91506ad16485916
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Sep 12 09:56:19 2021 +0300

    Small fix in builtin.c.

diff --git a/ChangeLog b/ChangeLog
index abef0ef..aff57a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 
        * interpret.h: Remove subscript_in_array variable.
 
+       Unrelated:
+
+       * builtin.c (add_thousands): Fix insertion of thousands_sep
+       string. Do it in reverse order.
+
 2021-09-10         Arnold D. Robbins     <arnold@skeeve.com>
 
        * interpret.h: For Op_subscript, don't allow references into
diff --git a/builtin.c b/builtin.c
index 73a404e..cf0c98e 100644
--- a/builtin.c
+++ b/builtin.c
@@ -4419,9 +4419,10 @@ add_thousands(const char *original, struct lconv *loc)
                if (loc->grouping[ii] && ++jj == loc->grouping[ii]) {
                        if (src >= original) {  /* only add if more digits 
coming */
                                const char *ts = loc->thousands_sep;
+                               int k;
 
-                               while (*ts != '\0')
-                                       *dest++ = *ts++;
+                               for (k = strlen(ts) - 1; k >= 0; k--)
+                                       *dest++ = ts[k];
                        }
                        if (loc->grouping[ii+1] == 0)
                                jj = 0;         /* keep using current val in 
loc.grouping[ii] */

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

commit b62e78e6d7e4307678fa172488302375559dcbf2
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Sep 12 09:44:06 2021 +0300

    Small fix in interpret.h.

diff --git a/ChangeLog b/ChangeLog
index 6ee3c92..abef0ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-09-12         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * interpret.h: Remove subscript_in_array variable.
+
 2021-09-10         Arnold D. Robbins     <arnold@skeeve.com>
 
        * interpret.h: For Op_subscript, don't allow references into
diff --git a/interpret.h b/interpret.h
index 4495d8c..d52d537 100644
--- a/interpret.h
+++ b/interpret.h
@@ -67,7 +67,6 @@ r_interpret(INSTRUCTION *code)
        Regexp *rp;
        NODE *set_array = NULL; /* array with a post-assignment routine */
        NODE *set_idx = NULL;   /* the index of the array element */
-       bool subscript_in_array;
 
 
 /* array subscript */
@@ -266,9 +265,7 @@ uninitialized_scalar:
                        t2 = mk_sub(pc->sub_count);
                        t1 = POP_ARRAY(false);
 
-                       subscript_in_array = (in_array(t1, t2) != NULL);
-
-                       if (! subscript_in_array) {
+                       if (in_array(t1, t2) == NULL) {
                                t2 = force_string(t2);
 
                                if (t1 == func_table) {

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

Summary of changes:
 ChangeLog   | 9 +++++++++
 builtin.c   | 5 +++--
 interpret.h | 5 +----
 3 files changed, 13 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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