aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y22
1 files changed, 22 insertions, 0 deletions
diff --git a/awkgram.y b/awkgram.y
index ecf74d4d..38e8c00c 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3116,8 +3116,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;
@@ -3169,8 +3182,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);