gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, master, updated. gawk-4.1.0-5310-g45615b52


From: Arnold Robbins
Subject: [SCM] gawk branch, master, updated. gawk-4.1.0-5310-g45615b52
Date: Thu, 22 Jun 2023 05:15:47 -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, master has been updated
       via  45615b52f6346d0258f0e572ae1cc225aacb5b41 (commit)
       via  638d52402fa56c37f55b5cc30c63713a8286f35f (commit)
       via  be8731bfc60c034c505949b6d5c8181101e0add9 (commit)
      from  966cc681f30c9ceddcfc36c83998c0bc17525ccb (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=45615b52f6346d0258f0e572ae1cc225aacb5b41

commit 45615b52f6346d0258f0e572ae1cc225aacb5b41
Merge: 638d5240 be8731bf
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Thu Jun 22 12:15:31 2023 +0300

    Merge branch 'feature/docit'


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

commit 638d52402fa56c37f55b5cc30c63713a8286f35f
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Thu Jun 22 12:14:46 2023 +0300

    Fix a bug in CSV parsing.

diff --git a/ChangeLog b/ChangeLog
index c8a5d2a4..a15b1055 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-22         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * field.c (comma_parse_field): Don't set the field if len
+       is zero. Kudos to BWK's awk for finding this gawk bug.
+
 2023-06-12         Arnold D. Robbins     <arnold@skeeve.com>
 
        * main.c (cmdline_fs): Add ELIDE_BACK_NL to flags in call
diff --git a/field.c b/field.c
index 6d07faab..d4e6b1ff 100644
--- a/field.c
+++ b/field.c
@@ -812,7 +812,9 @@ comma_parse_field(long up_to,       /* parse only up to 
this field number */
                nf = 0;
 
        if (len == 0) {
-               (*set)(++nf, newfield, 0L, n);
+               // Don't set the field.
+               //      echo | gawk --csv '{ print NF }'
+               // should print 0.
                return nf;
        }
 
diff --git a/test/ChangeLog b/test/ChangeLog
index be7ab891..e3475f3f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2023-06-22         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * csv1.ok: Updated after code fix.
+
 2023-06-12         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (EXTRA_DIST): New test, cmdlinefsbacknl.
diff --git a/test/csv1.ok b/test/csv1.ok
index e25c3cb8..e67a21e5 100644
--- a/test/csv1.ok
+++ b/test/csv1.ok
@@ -19,4 +19,4 @@
        "",     [][]
        ,       [][]
        "abc",def       [abc][def]
-               []
+               

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

Summary of changes:
 ChangeLog          |  5 +++++
 doc/it/ChangeLog   |  4 ++++
 doc/it/gawktexi.in | 47 +++++++++++++++++++++++++++++++++++++++++++----
 field.c            |  4 +++-
 test/ChangeLog     |  4 ++++
 test/csv1.ok       |  2 +-
 6 files changed, 60 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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