diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-02-24 22:08:45 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-02-24 22:08:45 +0200 |
commit | efefbfe40342975cc0ddbd69a9b0f2635d905d3c (patch) | |
tree | d90f5fc95e6702dadf4cfad6b6f8ec5d592331f3 /awkgram.c | |
parent | 764317bf85e5e63651486933b880a4627529d967 (diff) | |
download | egawk-efefbfe40342975cc0ddbd69a9b0f2635d905d3c.tar.gz egawk-efefbfe40342975cc0ddbd69a9b0f2635d905d3c.tar.bz2 egawk-efefbfe40342975cc0ddbd69a9b0f2635d905d3c.zip |
Fix line continuation with CR-LF.
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -5400,7 +5400,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 { @@ -5731,6 +5734,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; |