diff options
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |