aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-05-01 16:05:15 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-05-01 16:05:15 +0300
commit6514a4510c440d0ae45b8aa58221b229b96a5189 (patch)
treeb4020f20f70f4c93553dc29670d0451ffc796a6e
parent31a715930244ddee0eeffb1e0b4799e42c470515 (diff)
parentb2651a80b9a238a0372dc6f89f5ea81c75326914 (diff)
downloadegawk-6514a4510c440d0ae45b8aa58221b229b96a5189.tar.gz
egawk-6514a4510c440d0ae45b8aa58221b229b96a5189.tar.bz2
egawk-6514a4510c440d0ae45b8aa58221b229b96a5189.zip
Merge branch 'master' into feature/api-mpfr
-rw-r--r--ChangeLog6
-rw-r--r--awkgram.c6
-rw-r--r--awkgram.y6
-rw-r--r--test/ChangeLog11
-rw-r--r--test/Makefile.am12
-rw-r--r--test/Makefile.in12
-rw-r--r--test/sourcesplit.ok1
7 files changed, 38 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 08cfa0bd..27febf4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (nextc): Fix to change of 2017-04-24 such that
+ @include works in multibyte locales. Thanks to Hermann
+ Peifer for the bug report.
+
2017-04-26 Andrew J. Schorr <aschorr@telemetry-investments.com>
* awkgram.y (make_regnode): Fix bug -- we should not set valref to 1
diff --git a/awkgram.c b/awkgram.c
index a19c20a8..112a5376 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5528,12 +5528,8 @@ again:
if (lexeof) {
if (sourcefile->next == srcfiles)
return END_FILE;
- else {
+ else
next_sourcefile();
- if (get_src_buf())
- goto again;
- return END_SRC;
- }
}
#endif
if (lexptr == NULL || lexptr >= lexend) {
diff --git a/awkgram.y b/awkgram.y
index b6957806..6bfa47f2 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3108,12 +3108,8 @@ again:
if (lexeof) {
if (sourcefile->next == srcfiles)
return END_FILE;
- else {
+ else
next_sourcefile();
- if (get_src_buf())
- goto again;
- return END_SRC;
- }
}
#endif
if (lexptr == NULL || lexptr >= lexend) {
diff --git a/test/ChangeLog b/test/ChangeLog
index 04077f1e..9cca7b30 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,14 @@
+2017-05-01 Aharon Robbins <aharon.robbins@intel.com>
+
+ * Makefile.am (sourcesplit): New test.
+ * sourcesplit.ok: New file.
+ Thanks to Hermann Peifer for the report.
+
+ Unrelated:
+
+ * Makefile.am (charset-msg-start): Document that having
+ el_GR.iso88597 is helpful.
+
2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
* mpfrsqrt.awk: Add `@load intdiv'.
diff --git a/test/Makefile.am b/test/Makefile.am
index 7b1b4946..29de0b18 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1007,6 +1007,7 @@ EXTRA_DIST = \
sortglos.ok \
sortu.awk \
sortu.ok \
+ sourcesplit.ok \
space.ok \
split_after_fpat.awk \
split_after_fpat.in \
@@ -1246,7 +1247,7 @@ GAWK_EXT_TESTS = \
profile8 profile9 profile10 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
- sortfor sortfor2 sortu split_after_fpat \
+ sortfor sortfor2 sortu sourcesplit split_after_fpat \
splitarg4 strftime strftfld \
strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
symtab7 symtab8 symtab9 symtab10 \
@@ -1419,8 +1420,8 @@ charset-msg-start:
@echo "**************************************************************************"
@echo "* Some or all of these tests may fail if you have inadequate or missing *"
@echo "* locale support. At least en_US.UTF-8, ru_RU.UTF-8 and ja_JP.UTF-8 are *"
- @echo "* needed. However, if you see this message, the Makefile thinks you have *"
- @echo "* what you need ... *"
+ @echo "* needed. The el_GR.iso88597 is optional but helpful. However, if you *"
+ @echo "* see this message, the Makefile thinks you have what you need ... *"
@echo "**************************************************************************"
charset-msg-end:
@@ -2388,6 +2389,11 @@ fwtest3:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/fwtest2.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+sourcesplit:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) --source='BEGIN { a = 5;' --source='print a }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index bdfbdc82..91fb8d8e 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1265,6 +1265,7 @@ EXTRA_DIST = \
sortglos.ok \
sortu.awk \
sortu.ok \
+ sourcesplit.ok \
space.ok \
split_after_fpat.awk \
split_after_fpat.in \
@@ -1503,7 +1504,7 @@ GAWK_EXT_TESTS = \
profile8 profile9 profile10 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
- sortfor sortfor2 sortu split_after_fpat \
+ sortfor sortfor2 sortu sourcesplit split_after_fpat \
splitarg4 strftime strftfld \
strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
symtab7 symtab8 symtab9 symtab10 \
@@ -1861,8 +1862,8 @@ charset-msg-start:
@echo "**************************************************************************"
@echo "* Some or all of these tests may fail if you have inadequate or missing *"
@echo "* locale support. At least en_US.UTF-8, ru_RU.UTF-8 and ja_JP.UTF-8 are *"
- @echo "* needed. However, if you see this message, the Makefile thinks you have *"
- @echo "* what you need ... *"
+ @echo "* needed. The el_GR.iso88597 is optional but helpful. However, if you *"
+ @echo "* see this message, the Makefile thinks you have what you need ... *"
@echo "**************************************************************************"
charset-msg-end:
@@ -2825,6 +2826,11 @@ fwtest3:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/fwtest2.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+sourcesplit:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) --source='BEGIN { a = 5;' --source='print a }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
diff --git a/test/sourcesplit.ok b/test/sourcesplit.ok
new file mode 100644
index 00000000..7ed6ff82
--- /dev/null
+++ b/test/sourcesplit.ok
@@ -0,0 +1 @@
+5