diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-30 04:36:12 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-30 04:36:12 +0000 |
commit | 2dc4c65bf2b389aa184a8e8590cd1ee37ec953bc (patch) | |
tree | ecd94abb7044889439b817566d970685563bb4a6 /toke.c | |
parent | f2abf2f9e52d9e6e8083b87a5890e0f10f018510 (diff) | |
download | perl-2dc4c65bf2b389aa184a8e8590cd1ee37ec953bc.tar.gz |
CR-LF support broken for formats
p4raw-id: //depot/perl@4738
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -6894,6 +6894,14 @@ S_scan_formline(pTHX_ register char *s) needargs = TRUE; } sv_catpvn(stuff, s, eol-s); +#ifndef PERL_STRICT_CR + if (eol-s > 1 && eol[-2] == '\r' && eol[-1] == '\n') { + char *end = SvPVX(stuff) + SvCUR(stuff); + end[-2] = '\n'; + end[-1] = '\0'; + SvCUR(stuff)--; + } +#endif } s = eol; if (PL_rsfp) { |