Scieneer Common Lisp 1.3.9 online documentation

ext:buffer-chars stream required &optional waitp[Function]

Attempt to read the required number of characters into the stream input buffer. When waitp is true, wait for at least the required number of characters before returning, and return the number of characters available in the buffer upon success or return -1 if the end of the file is encountered before reading the required number of characters. When waitp is false, return zero if no further input is currently available in which case the function ext:stream-waiting-file-descriptor may be called to find the file descriptor and directions blocked and when ready the function may be called again to continue the operation. The number of required characters is limited to the buffer length so a short count will be returned once the buffer is full. Note that the ext:stream-in-head may be modified, so the caller must reload it if necessary.