Artifacts Associated With Ticket 217793ffffffffffffffffffffffffffffffffff
Ticket change [540c8e8136] (rid 93869) by nobody on 2000-10-26 00:43:45:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 923 Bug Version: 8.1a2 SubmitDate: '1998-12-04' LastModified: '1998-12-07' Severity: SER Status: Closed Submitter: welch ChangedBy: stanton RelatedBugIDs: 887 OS: Windows NT Machine: X86 FixedDate: '2000-10-25' ClosedDate: '1998-12-07' Name: Syd Polk CVS: 12-02-1998 tclIO.c revision 1.1.2.4 ReproducibleScript: # Test 1 - Case that works set bigstring {} for {set i 0} {$i < 10000} {incr i} { append bigstring "0" } set f [open foo.out w] fconfigure $f -translation crlf puts $f $bigstring nonewline close $f set f [open foo.out] fconfigure $f -translation crlf set readstring [read $f] close $f catch {file delete -force foo.out} if {[string compare $bigstring $readstring] != 0} { puts "Test 1 did not work" } # Test 2 - Fails set bigstring {} for {set i 0} {$i < 10000} {incr i} { append bigstring "000000000\n" } set f [open foo.out w] fconfigure $f -translation crlf puts $f $bigstring nonewline close $f set f [open foo.out] fconfigure $f -translation crlf set readstring [read $f] close $f catch {file delete -force foo.out} if {[string compare $bigstring $readstring] != 0} { puts "Test 2 did not work" } ObservedBehavior: The script complains that the data read in does not match the data written out. DesiredBehavior: No complaints. Patch: *** tclIO.cWed Dec 2 18:49:57 1998 --- tclIO.new.cWed Dec 2 18:49:32 1998 *************** *** 2561,2566 **** --- 2561,2567 ---- total += dstWrote; stage += stageRead; stageLen -= stageRead; + sawLF = 0; } } return total; *************** *** 2672,2678 **** srcStart = src; ! for (dstEnd = dst + srcLen; dst < dstEnd; ) { if (*src == '\n') { if (dstEnd < dstMax) { dstEnd++; --- 2673,2680 ---- srcStart = src; ! for (dstEnd = dst + (srcLen < *dstLenPtr ? srcLen : *dstLenPtr); ! dst < dstEnd; ) { if (*src == '\n') { if (dstEnd < dstMax) { dstEnd++; PatchFiles: generic/tclIO.c Your bug form spellls concatentate wrong in step 9. - foundin initialized to: "obsolete: 8.1a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Writing to a channel fconfigure with -crlf sometimes corrupt
- type initialized to: "Bug"
Ticket change [d5d38687a7] (rid 123698) by welch on 2000-10-26 07:49:18:
- closedate changed to: "2000-10-26T00:49:18"
- closer changed to: "welch"
- priority changed to: "1 Zero"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
Ticket change [d4bf8d7b11] (rid 123501) by dgp on 2001-04-13 22:52:43:
- closedate changed to: "2001-04-13T15:52:43"
- closer changed to: "dgp"
- subsystem changed to: "25. Channel System"