1.0.43.6: fix overeager input-buffer filling by external-format routines
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 30 Sep 2010 08:23:34 +0000 (08:23 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 30 Sep 2010 08:23:34 +0000 (08:23 +0000)
commit8151587cdfac76dfdebe98caf4790839ff5aaa38
tree905ed0188cfe1519c3d6acfe2d92d154afcf49bb
parenta6da3f313e44f757a24834b347b3beabdc7a5f10
1.0.43.6: fix overeager input-buffer filling by external-format routines

 Fixes lp#643686.

 Previously the character-input functions returned only after filling the
 entire request by fast-read-char-refill, or if an EOF was reached.

 This meant that on a pipe we would not receive any input until there
 was a buffer's worth of it, or the other end closed.

 Not so good. New the drill is:

   0, N characters requested.

   1. Decode upto N characters from binary buffer to the character
      buffer.

   2. If any characters were decoded or at EOF, return.

   3. Otherwise refill the binary buffer with at most one read()
      and goto 1.

 Previously at #1 we returned only if the entire request was
 satisfied.
src/code/fd-stream.lisp
tests/stream.impure.lisp
version.lisp-expr