aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-08 21:28:29 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-03-08 21:28:29 +0200
commit22af5b89f1f31f31b53ef2dd17637ed77353e762 (patch)
tree79cb470247e0518e10f3a67358aae08920b17d44 /awkgram.c
parent777dd64615dd9067d16634af3eb08ad36123d7eb (diff)
parentb6c957dae27d5f10393572391c75c51c85a3a68c (diff)
downloadegawk-22af5b89f1f31f31b53ef2dd17637ed77353e762.tar.gz
egawk-22af5b89f1f31f31b53ef2dd17637ed77353e762.tar.bz2
egawk-22af5b89f1f31f31b53ef2dd17637ed77353e762.zip
Merge branch 'master' into wasted-byte
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 4d9c13c4..0baf5070 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;