>>>>> "RT" == RT Happe <rthappe@web.de> writes:
RT> * Documentation and implementation (0.6.3 beta 4) of set-port-buffering
RT> diverge. In section 3.2.7
RT> The size argument requests an I/O buffer of size bytes. If not given, a
RT> reasonable default is used; if given and zero, buffering is turned off
RT> (i.e., size = 0 for any policy is equivalent to policy = bufpol/none).
RT> But
RT> (close-after (open-output-file "/dev/null")
RT> (lambda (op)
RT> (set-port-buffering op bufpol/none 0)))
RT> raises the
RT> Error: size must be at least 1
The manual and the code were both not correct on this topic. The
minimum length of a port buffer is 0 for output ports and 1 for input
ports (because we have to support peek-char). I added some explanation
to the manual and fixed the argument checking in the code.
Comments welcome...
RT> [ Note that several procedures in scsh/rw.scm call s.p.b. with
RT> size = (max n 0), where n>=0 by contract, and s.p.b. would presently
RT> error anyway if n<1. I would rather dismiss the max and perhaps add
RT> explicit input validation.
RT> ]
I reintroduced checks for the indices. They got lost on a previous
code rewrite.
RT> * Chapter 3 of the html manual contains several ``string - length'', note
RT> the blanks.
Sorry, I don't know how to fix this without completely obfuscating the
source code. This is either some TeX obscurity I don't understand or a
bug in tex2page. I put it on my TODO list.
--
Martin
|