On Dec 22, 2003, at 2:48 PM, Melvin Smith wrote:


At 11:02 AM 12/22/2003 -0700, Cory Spencer wrote:
The program I'm writing is passing a ParrotIO object about to various
functions (the ParrotIO object being either stdin or a file handle to a
regular file). Each function can read as many bytes as it likes from the
descriptor. There are times, however, where I might decide that I don't
want the byte I just read, and need to push it back onto the stream. This
brings up (I think) two ways around the problem:


  1) I'd like to be able to peek ahead at a byte, before actually
     consuming it.  ie)

Yes, Parrot will get an "unget" and "peek". Now that the buffering layer is mostly working it should be quite easy.

I assume this would only be allowed to work if a buffering layer is topmost, right? That is, I shouldn't be able to do either to an io_unix layer.


I've had a bad bout with the flu for the last 7 days. As soon as I can sit
up again I'll see about patching it in.

Hope you feel better!


JEff



Reply via email to