Hard to do, because a separate thread read to the IO buffer which has fixed size, so if you do ungetc() even just after read the buffer could be fully filled. But you can make a wrapper functions for read() and ungetc() in the plugin with one additional byte that remembers if ungetc() was used and what was the char. ungetc() is needed as a callback function to the library?
daper
Fri, 2007-04-13 17:45
Permalink
Hard to do, because a
Hard to do, because a separate thread read to the IO buffer which has fixed size, so if you do ungetc() even just after read the buffer could be fully filled. But you can make a wrapper functions for read() and ungetc() in the plugin with one additional byte that remembers if ungetc() was used and what was the char. ungetc() is needed as a callback function to the library?
--
Damian Pietras - MOC developer
splav
Fri, 2007-04-13 20:30
Permalink
Yes, it's a required
Yes, it's a required callback function. As for wrappers for read/write functions I had the same idea. I'll try to emulate it.