aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-04-23 22:27:23 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-04-23 22:27:23 +0300
commit3a01684c2edafbcc64db1162f4b99ab6946004e2 (patch)
treed4f4762297ffa6a6d62141978844f8ae629efc8b /awkgram.c
parentcb012bf63a9cb943ff22441d6e10ab8d63c06971 (diff)
parent09149c00e701d265efb08cec1040841aa40d6fcf (diff)
downloadegawk-3a01684c2edafbcc64db1162f4b99ab6946004e2.tar.gz
egawk-3a01684c2edafbcc64db1162f4b99ab6946004e2.tar.bz2
egawk-3a01684c2edafbcc64db1162f4b99ab6946004e2.zip
Merge branch 'master' into feature/fix-comments
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 cce661ff..be93f884 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5544,8 +5544,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;
@@ -5597,8 +5610,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);