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.2-stable, updated. gawk-4.1.0-295


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-2957-gdde5bd1
Date: Tue, 17 Apr 2018 08:45:17 -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-4.2-stable has been updated
       via  dde5bd1c2baadf2c34f15187efb481694043d606 (commit)
      from  0690ca31fad162d869544246b4d2693942c8fec9 (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=dde5bd1c2baadf2c34f15187efb481694043d606

commit dde5bd1c2baadf2c34f15187efb481694043d606
Author: Arnold D. Robbins <address@hidden>
Date:   Tue Apr 17 15:44:57 2018 +0300

    Fix problem with rebuilding records if using API parser.

diff --git a/ChangeLog b/ChangeLog
index 986eb8f..ba52b7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-14         Manuel Collado       <address@hidden>
+
+       * field.c (reset_record): Disable fieldwidth from API
+       get_record() if $0 is explicitly assigned a new value.
+
 2018-04-02         Arnold D. Robbins     <address@hidden>
 
        * config.guess, config.sub, install-sh: Updated from GNULIB.
diff --git a/field.c b/field.c
index 0d7e633..5296324 100644
--- a/field.c
+++ b/field.c
@@ -338,6 +338,11 @@ reset_record()
 {
        fields_arr[0] = force_string(fields_arr[0]);
        purge_record();
+       if (api_parser_override) {
+               api_parser_override = false;
+               parse_field = normal_parse_field;
+               update_PROCINFO_str("FS", current_field_sep_str());
+       }
 }
 
 static void
diff --git a/test/ChangeLog b/test/ChangeLog
index 5f806e1..7934f64 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-14         Manuel Collado       <address@hidden>
+
+       * Makefile.am (readdir_retest): Add new test.
+       * readdir_retest.awk: New file.
+
 2018-04-01         Arnold D. Robbins     <address@hidden>
 
        * Makefile.am (EXTRA_DIST): Add files for mpfrfield.
diff --git a/test/Makefile.am b/test/Makefile.am
index fe4fd81..5baa906 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -910,6 +910,7 @@ EXTRA_DIST = \
        readbuf.ok \
        readdir.awk \
        readdir0.awk \
+       readdir_retest.awk \
        readfile2.awk \
        readfile2.ok \
        rebrackloc.awk \
@@ -1326,7 +1327,7 @@ SHLIB_TESTS = \
        getfile \
        inplace1 inplace2 inplace3 \
        ordchr ordchr2 \
-       readdir readdir_test readfile readfile2 revout \
+       readdir readdir_test readdir_retest readfile readfile2 revout \
        revtwoway rwarray \
        testext time
 
@@ -2271,6 +2272,12 @@ readdir_test:
        @$(AWK) -lreaddir_test '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, 
$$4}' "$(top_srcdir)" > _$@
        @-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
 
+readdir_retest:
+       @echo $@
+       @$(AWK) -lreaddir -F/ -f address@hidden "$(top_srcdir)" > address@hidden
+       @$(AWK) -lreaddir_test -F/ -f address@hidden "$(top_srcdir)" > _$@
+       @-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
+
 fts:
        @case `uname` in \
        IRIX) \
@@ -2492,6 +2499,7 @@ Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
 clean-local:
        rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \
        seq *~ readfile.ok fork.tmp.* testext.awk fts.ok readdir.ok \
+       readdir_test.ok readdir_retest.ok \
        profile1.ok
 
 # An attempt to print something that can be grepped for in build logs
diff --git a/test/Makefile.in b/test/Makefile.in
index 33e2b0b..c827340 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1168,6 +1168,7 @@ EXTRA_DIST = \
        readbuf.ok \
        readdir.awk \
        readdir0.awk \
+       readdir_retest.awk \
        readfile2.awk \
        readfile2.ok \
        rebrackloc.awk \
@@ -1579,7 +1580,7 @@ SHLIB_TESTS = \
        getfile \
        inplace1 inplace2 inplace3 \
        ordchr ordchr2 \
-       readdir readdir_test readfile readfile2 revout \
+       readdir readdir_test readdir_retest readfile readfile2 revout \
        revtwoway rwarray \
        testext time
 
@@ -2711,6 +2712,12 @@ readdir_test:
        @$(AWK) -lreaddir_test '{printf "[%s] [%s] [%s] [%s]\n", $$1, $$2, $$3, 
$$4}' "$(top_srcdir)" > _$@
        @-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
 
+readdir_retest:
+       @echo $@
+       @$(AWK) -lreaddir -F/ -f address@hidden "$(top_srcdir)" > address@hidden
+       @$(AWK) -lreaddir_test -F/ -f address@hidden "$(top_srcdir)" > _$@
+       @-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
+
 fts:
        @case `uname` in \
        IRIX) \
@@ -4666,6 +4673,7 @@ Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
 clean-local:
        rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \
        seq *~ readfile.ok fork.tmp.* testext.awk fts.ok readdir.ok \
+       readdir_test.ok readdir_retest.ok \
        profile1.ok
 
 # An attempt to print something that can be grepped for in build logs
diff --git a/test/readdir_retest.awk b/test/readdir_retest.awk
new file mode 100644
index 0000000..079a993
--- /dev/null
+++ b/test/readdir_retest.awk
@@ -0,0 +1,7 @@
+# Test field values after reparsing
+FNR == 1 { record1 = $0 }
+{
+       printf "[%s] [%s] [%s] [%s]\n", $1, $2, $3, $4
+       $0 = record1
+       printf "[%s] [%s] [%s] [%s]\n", $1, $2, $3, $4
+}

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

Summary of changes:
 ChangeLog               |  5 +++++
 field.c                 |  5 +++++
 test/ChangeLog          |  5 +++++
 test/Makefile.am        | 10 +++++++++-
 test/Makefile.in        | 10 +++++++++-
 test/readdir_retest.awk |  7 +++++++
 6 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 test/readdir_retest.awk


hooks/post-receive
-- 
gawk



reply via email to

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