Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5a135730d2f0c663d619499e7f8de26714be2058
Ticket: 930851ffffffffffffffffffffffffffffffffff
eofchar change: strange buffer limit ?
User & Date: dgp on 2004-04-07 05:01:14
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Annotated interactive tclsh session:
    
    % set f [open ../generic/tclVar.c r]
    file3
    
               open a file I know aku has.
    
    % fconfigure $f
    -blocking 1 -buffering full -buffersize 4096 -encoding
    iso8859-1 -eofchar {} -translation auto
    % fconfigure $f -eofchar =
    
               set eof char to something unusual
    
    % read $f; tell $f
    834
    
                read to "EOF"  -- the first eof char
    
    % fconfigure $f -eofchar {}
    
                Change back to no eof char
    
    % read $f 1
    =
    
                 See, we read up to that =
    
                 Now lets read the rest of the file:
    
    % read $f; tell $f
    4096
    
                 What's this?  It looks like only one
                 buffer got filled, and then it quit.
    
    % seek $f 0 start
    % read $f; tell $f
    147065
    
                  A [seek] to the beginning of the file
                  restores normal [read] to EOF.
    
    Bug, undocumented feature, or pilot error?
    
    
  4. foundin changed to: "obsolete: 8.5a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "25. Channel System"
  10. title changed to: "eofchar change: strange buffer limit ?"
  11. type changed to: "Bug"