aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--awkgram.c6
-rw-r--r--awkgram.y6
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am8
-rw-r--r--test/Makefile.in8
-rw-r--r--test/sourcesplit.ok1
7 files changed, 29 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index eccda54c..858a5fce 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-24 Arnold D. Robbins <arnold@skeeve.com>
* awk.h (NODE): Additional cleanups. Removed `aq' and `param_list'
diff --git a/awkgram.c b/awkgram.c
index aa7b4a49..b63a4efd 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5526,12 +5526,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 6e4d6c3b..d24565c0 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3106,12 +3106,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 ecac0519..b0130945 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2017-04-12 Manuel Collado <m-collado@users.sourceforge.net>
* Makefile.am (fpat6): New test.
diff --git a/test/Makefile.am b/test/Makefile.am
index 7b1b4946..161082e7 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 \
@@ -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..52924b84 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 \
@@ -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