On 11 Dec 2006, at 20:26, Menneteau wrote:

Thanks Mennetau, nice answer.

One more though. What is the difference between fopen and open?

Why is there an fopen call when open seems to do it all, and even better? Is fopen better buffered, or what?

Anyhow, for my case, I don't want any buffering.

Do you have any idea how I can ask the OS what is it's preferred file I/O read/write size?



Theodore H. Smith wrote:
Also, anyone know anything about double-buffering file streams?

So, basically, how I'd like it to work, is that ask for a read into the buffer, and return instantly before the read is complete! The user will process a previously made buffer. By the time he's finished processing it, the last read will be complete. If not, we'll actually just block until the read is complete.

Does fread offer such functionality? OR any standard Unix calls?

fread not, but read yes.
You control the read behavior with fcntl.
Basically, you can make the read asynchronous (O_NONBLOCK), you can be notified when data is available (O_ASYNC), and you can disable data caching (F_NOCACHE). This should work on Unix and Mac OS. I don't know how this works for windows.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to