projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2abf2f
)
CR-LF support broken for formats
author
Gurusamy Sarathy
<gsar@cpan.org>
Thu, 30 Dec 1999 04:36:12 +0000
(
04:36
+0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Thu, 30 Dec 1999 04:36:12 +0000
(
04:36
+0000)
p4raw-id: //depot/perl@4738
toke.c
patch
|
blob
|
history
diff --git
a/toke.c
b/toke.c
index
18e95bd
..
452b20c
100644
(file)
--- a/
toke.c
+++ b/
toke.c
@@
-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) {