On Fri, Jun 24, 2011 at 3:03 PM, Kagamin <spam@here.lot> wrote:
Jimmy Cao Wrote:

> No, it writes to stdout which (in this case) is line-buffered.  Whenever
> there's a newline character, it is supposed to flush.

There're no characters in binary data. This is low-level API. If you want the library to care about characters and do various things, maybe you need a high-level text API like printf or even better phobos std.stdio.write?

Actually, low-level is like using cputs from conio.h.
http://www.digitalmars.com/rtl/conio.html 
"They bypass the stdin and stdout buffers and access the console directly."

Anyways, I was using to write an array of characters to stdout.  Since stdout was buffered, when the newline character was encountered, flushing should have occured.
Also, you do realize that std.stdio.write uses fwrite, right?  It's the same thing, except when writing wider chars or when fwide doesn't return 0, in that case something else is used.