summaryrefslogtreecommitdiff
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-17 22:58:03 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-03-17 22:58:03 +0200
commit1d8ef985bc59f973895b54057535281b69e557b7 (patch)
tree343305a810b61ff6e0c2ac17d8a38f372043d500 /awkgram.c
parenteb589a106539d8495802088baa2c579189a090a1 (diff)
parentcd2ff61aaf4938092517880ad7655828d99a3cb9 (diff)
downloadgawk-constants.tar.gz
Merge branch 'master' into constantsconstants
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 cbb56daf..b39f5530 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5601,7 +5601,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 {
@@ -5958,6 +5961,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;