Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f3b818391c5a6078b7e9d5f61e5f3bf6327613bd
Ticket: 5adc3506834c2aacc613cd0df7de6f07a728c0aa
'gets' repeated after EOF doesn't work
User & Date: dgp on 2014-10-29 20:34:09
Changes

  1. icomment:
    
    The key routine here is GetInput().  Every caller
    of GetInput() has to (when otherwise warranted) make
    at least one call to GetInput() -- even if EOF is
    already set on the channel -- in order to enable
    the moving past EOF, and reading whatever new data
    may be available now.
    
    On the other hand, every caller of GetInput() must
    not make an additional call to GetInput() after
    a call to GetInput() has left EOF set in the channel.
    As soon as a call to GetInput() leaves EOF set in
    the channel, the caller must be on a path to return
    to its caller without calling GetInput() again.  This
    must be achieved so that a fleeting EOF condition
    is not missed by the caller.
    
    There are 4 callers of GetInput(): TclGetsObjBinary(),
    FilterInputBytes(), DoReadChars(), and DoRead().
    
  2. login: "dgp"
  3. mimetype: "text/plain"