aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-02-24 22:11:39 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-02-24 22:11:39 +0200
commit63cb20557ab9a74eee573d102a753ed34fc0ed59 (patch)
tree9146ff388c3ee948b80e6e73ecca68d699898565 /awkgram.c
parent7804a8c64aa29563134259bb7cb7429046fbd5f7 (diff)
parentefefbfe40342975cc0ddbd69a9b0f2635d905d3c (diff)
downloadegawk-63cb20557ab9a74eee573d102a753ed34fc0ed59.tar.gz
egawk-63cb20557ab9a74eee573d102a753ed34fc0ed59.tar.bz2
egawk-63cb20557ab9a74eee573d102a753ed34fc0ed59.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/awkgram.c b/awkgram.c
index b87a0088..a205246e 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5598,7 +5598,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 {
@@ -5947,6 +5950,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;