In perl.git, the branch tonyc/readline-fixed has been created
<http://perl5.git.perl.org/perl.git/commitdiff/596a6cbd6bcaa8e6a414f466dc748513439de5da?hp=0000000000000000000000000000000000000000>
at 596a6cbd6bcaa8e6a414f466dc748513439de5da (commit)
- Log -----------------------------------------------------------------
commit 596a6cbd6bcaa8e6a414f466dc748513439de5da
Author: Craig A. Berry <[email protected]>
Date: Fri Mar 16 14:20:29 2012 -0500
Only handle PL_rs differently on VMS for record-oriented files.
For stream-oriented files, the effects of buffering and other
layers should be exactly as they are on other platforms. For true,
record-oriented files, though, setting $/ = \number must provide
exactly one low-level read per record. If a read were ever to
return less than a full record (due to, for example, filling up
the perlio buffer), a subsequent read would get the *next* record,
losing whatever data remained in the partially-read record.
M sv.c
commit 265c4172cf0ecfa267652bbdb8e7fb7919f14656
Author: Tony Cook <[email protected]>
Date: Sat Mar 17 13:10:29 2012 +1100
no need to FIXME, it behaves like read() which is the intent
except read() doesn't complain about the invalid characters like
sv_gets().
M sv.c
commit a1aea1fe12c11cc8f3650979df95e88a810f3238
Author: Tony Cook <[email protected]>
Date: Sat Mar 17 12:54:17 2012 +1100
fix another boundary case and hopefully improve performance
The fix: the if we found ourselves at a charstart with only one
character to read, readsize would be zero, handle that correctly.
Performance: originally I read just the first byte of the next
character, which meant as many extra read calls as there are
characters left to read after the initial read. So O(Nleft) reads
where Nleft is the number of characters left to read after the initial
read.
Now read as many bytes as there are characters left to read, which
should mean the number of reads comes down to O(log(Nleft**2)) I think
(but don't ask me to justify that.)
M sv.c
M t/io/utf8.t
commit 90f6536b6e4fefdbe12a64f4201c9f73580aab88
Author: Tony Cook <[email protected]>
Date: Sat Mar 17 01:10:36 2012 +1100
fix a fencepost error I found trying to fall asleep
M sv.c
M t/io/utf8.t
commit ca93b89efc0dce911b48015df02eaeaeb3d52572
Author: Tony Cook <[email protected]>
Date: Sat Dec 8 10:23:20 2012 +1100
Incomplete implementation of $/ = \number acting like read()
It's under tested, and incomplete
- readline appears to ignore IN_BYTES, so this code continues to do so.
- currently :utf8 will return invalid utf8, which means this can too,
if we can be sure of :utf8 returning only valud utf-8 the FIXME can
be ignored
- VMS is the elephant in the room - the conditional means that the new
code is completely ignored for reading from files. If we can detect
record-oriented files in some way this could change.
M sv.c
M t/io/utf8.t
commit 65e57681567f7050a009d3fdaaa9863f369c9449
Author: Tony Cook <[email protected]>
Date: Sat Dec 8 10:19:42 2012 +1100
die, evil [IU]32
It's still not as dead as I'd like.
M sv.c
-----------------------------------------------------------------------
--
Perl5 Master Repository