aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-02-26 20:48:56 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-02-26 20:48:56 +0200
commit9322ab27e20be82722b2db73f74447f2b35c6502 (patch)
tree41150ce4a24f6bd8843b900dbe17674eea1f5246 /awkgram.y
parent64c5b3da1b7ebe73fcfb4edd9450382ccf1159fb (diff)
parent33c16c16e6d33118075b196e16b33b342ee462d3 (diff)
downloadegawk-9322ab27e20be82722b2db73f74447f2b35c6502.tar.gz
egawk-9322ab27e20be82722b2db73f74447f2b35c6502.tar.bz2
egawk-9322ab27e20be82722b2db73f74447f2b35c6502.zip
Merge branch 'master' into non-fatal-io-2
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/awkgram.y b/awkgram.y
index 7b21b39e..274b319d 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3260,7 +3260,10 @@ yylex(void)
pushback();
yyerror(_("unterminated regexp ends with `\\' at end of file"));
goto end_regexp; /* kludge */
- } else if (c == '\n') {
+ }
+ if (c == '\r') /* allow MS-DOS files. bleah */
+ c = nextc(true);
+ if (c == '\n') {
sourceline++;
continue;
} else {
@@ -3609,6 +3612,8 @@ retry:
if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) &&
c == '\\') {
c = nextc(true);
+ if (c == '\r') /* allow MS-DOS files. bleah */
+ c = nextc(true);
if (c == '\n') {
sourceline++;
continue;