[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-300
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-3002-gc1f670b |
Date: |
Tue, 31 Jul 2018 14:41:12 -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 c1f670b26671cc8d60d967bbcb42cb8deb3baf2b (commit)
from 86b063b99d78df97fcd761073f437ce00b018712 (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=c1f670b26671cc8d60d967bbcb42cb8deb3baf2b
commit c1f670b26671cc8d60d967bbcb42cb8deb3baf2b
Author: Arnold D. Robbins <address@hidden>
Date: Tue Jul 31 21:40:49 2018 +0300
Fix assigning $0 from a number.
diff --git a/ChangeLog b/ChangeLog
index 904e984..6821005 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2018-07-31 Arnold D. Robbins <address@hidden>
+ * interpret.h (unfield): Add a call to force_string() on
+ new value. See test/assignnumfield.awk. Thanks to
+ Ralph Corderoy <address@hidden> for the bug report.
+
+2018-07-31 Arnold D. Robbins <address@hidden>
+
Handle newlines in -v and fix \-<newline>. Thanks to
Samy Mahmoudi <address@hidden> for the report.
diff --git a/interpret.h b/interpret.h
index 8408a53..fed0078 100644
--- a/interpret.h
+++ b/interpret.h
@@ -46,6 +46,7 @@ unfield(NODE **l, NODE **r)
(*l) = dupnode(*r);
DEREF(*r);
}
+ force_string(*l);
}
#define UNFIELD(l, r) unfield(& (l), & (r))
diff --git a/test/ChangeLog b/test/ChangeLog
index 392d593..2af89e6 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,10 @@
2018-07-31 Arnold D. Robbins <address@hidden>
+ * Makefile.am (EXTRA_DIST): Add assignnumfield files.
+ * assignnumfield.awk, assignnumfield.in, assignnumfield.ok: New files.
+
+2018-07-31 Arnold D. Robbins <address@hidden>
+
* Makefile.am (EXTRA_DIST): Add arraysort2 files.
* arraysort2.awk, arraysort2.ok: New files.
diff --git a/test/Makefile.am b/test/Makefile.am
index e6f1e22..774424f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -121,6 +121,9 @@ EXTRA_DIST = \
asort.ok \
asorti.awk \
asorti.ok \
+ assignnumfield.awk \
+ assignnumfield.in \
+ assignnumfield.ok \
awkpath.ok \
back89.awk \
back89.in \
@@ -1235,7 +1238,7 @@ BASIC_TESTS = \
addcomma anchgsub anchor argarray arrayind1 arrayind2 arrayind3
arrayparm \
arrayprm2 arrayprm3 arrayref arrymem1 arryref2 arryref3 arryref4
arryref5 \
arynasty arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6
aryprm7 \
- aryprm8 aryprm9 arysubnm aryunasgn asgext awkpath \
+ aryprm8 aryprm9 arysubnm aryunasgn asgext awkpath assignnumfield \
back89 backgsub badassign1 badbuild \
callparam childin clobber closebad clsflnam compare compare2 \
concat1 concat2 concat3 concat4 concat5 convfmt \
diff --git a/test/Makefile.in b/test/Makefile.in
index 532aca0..69b86d0 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -379,6 +379,9 @@ EXTRA_DIST = \
asort.ok \
asorti.awk \
asorti.ok \
+ assignnumfield.awk \
+ assignnumfield.in \
+ assignnumfield.ok \
awkpath.ok \
back89.awk \
back89.in \
@@ -1493,7 +1496,7 @@ BASIC_TESTS = \
addcomma anchgsub anchor argarray arrayind1 arrayind2 arrayind3
arrayparm \
arrayprm2 arrayprm3 arrayref arrymem1 arryref2 arryref3 arryref4
arryref5 \
arynasty arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6
aryprm7 \
- aryprm8 aryprm9 arysubnm aryunasgn asgext awkpath \
+ aryprm8 aryprm9 arysubnm aryunasgn asgext awkpath assignnumfield \
back89 backgsub badassign1 badbuild \
callparam childin clobber closebad clsflnam compare compare2 \
concat1 concat2 concat3 concat4 concat5 convfmt \
@@ -2787,6 +2790,11 @@ asgext:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+assignnumfield:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
back89:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 8c60422..eb7c465 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -140,6 +140,11 @@ asgext:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+assignnumfield:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
back89:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/assignnumfield.awk b/test/assignnumfield.awk
new file mode 100644
index 0000000..3a056cb
--- /dev/null
+++ b/test/assignnumfield.awk
@@ -0,0 +1 @@
+{$0 = ++i} 1
diff --git a/test/assignnumfield.in b/test/assignnumfield.in
new file mode 100644
index 0000000..b82c4b2
--- /dev/null
+++ b/test/assignnumfield.in
@@ -0,0 +1,5 @@
+a b c
+a b c
+a b c
+a b c
+a b c
diff --git a/test/assignnumfield.ok b/test/assignnumfield.ok
new file mode 100644
index 0000000..8a1218a
--- /dev/null
+++ b/test/assignnumfield.ok
@@ -0,0 +1,5 @@
+1
+2
+3
+4
+5
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
interpret.h | 1 +
test/ChangeLog | 5 +++++
test/Makefile.am | 5 ++++-
test/Makefile.in | 10 +++++++++-
test/Maketests | 5 +++++
test/assignnumfield.awk | 1 +
test/assignnumfield.in | 5 +++++
test/{fwtest5.ok => assignnumfield.ok} | 3 ++-
9 files changed, 38 insertions(+), 3 deletions(-)
create mode 100644 test/assignnumfield.awk
create mode 100644 test/assignnumfield.in
copy test/{fwtest5.ok => assignnumfield.ok} (60%)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-3002-gc1f670b,
Arnold Robbins <=