summaryrefslogtreecommitdiff
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-04-23 22:26:53 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-04-23 22:26:53 +0300
commita4ad1c093108ffa014aa59fe462bd3c063427216 (patch)
tree5a0b5e0137149071623bd87491195af6f8195e1d /awkgram.c
parent631da910c29e4008f6e7094f60eb1e88a42e03b2 (diff)
parent09149c00e701d265efb08cec1040841aa40d6fcf (diff)
downloadgawk-a4ad1c093108ffa014aa59fe462bd3c063427216.tar.gz
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/awkgram.c b/awkgram.c
index fc935dc4..6d3ea7e7 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5521,8 +5521,21 @@ nextc(bool check_for_bad)
{
if (gawk_mb_cur_max > 1) {
again:
+#ifdef NO_CONTINUE_SOURCE_STRINGS
if (lexeof)
return END_FILE;
+#else
+ if (lexeof) {
+ if (sourcefile->next == srcfiles)
+ return END_FILE;
+ else {
+ next_sourcefile();
+ if (get_src_buf())
+ goto again;
+ return END_SRC;
+ }
+ }
+#endif
if (lexptr == NULL || lexptr >= lexend) {
if (get_src_buf())
goto again;
@@ -5574,8 +5587,17 @@ again:
return (int) (unsigned char) *lexptr++;
} else {
do {
+#ifdef NO_CONTINUE_SOURCE_STRINGS
if (lexeof)
return END_FILE;
+#else
+ if (lexeof) {
+ if (sourcefile->next == srcfiles)
+ return END_FILE;
+ else
+ next_sourcefile();
+ }
+#endif
if (lexptr && lexptr < lexend) {
if (check_for_bad || *lexptr == '\0')
check_bad_char(*lexptr);