Subject: Re: Why there's no unread-byte?
From: Erik Naggum <erik@naggum.no>
Date: 1999/03/11
Newsgroups: comp.lang.lisp
Message-ID: <3130103987436896@naggum.no>

* "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
| What is the reason behind having PEEK-CHAR and UNREAD-CHAR in the
| standard, but not PEEK-BYTE and UNREAD-BYTE.  If I want to read a file
| with possibly mixed CR, LF and CRLF end-of-lines in binary mode (meaning
| C-speak "binary", i.e. stream element type (unsigned-byte 8)), how can I
| peek at the possible LF after the CR?

  you read the entire file (or a reasonable fraction thereof) into a vector
  with READ-SEQUENCE first.  (I hope we get memory-mapped file I/O soon.)

#:Erik