Re: gtk buffuring




Pavel Greenfield writes:
>gtk seems to intercept all printf's until there's a \n. Is there a
>work-around this? What I'm after is printing a prompt like
>
>next>
>
>which is difficult to do without printing a \n.

Gtk has nothing to do with this; it's a normal standard I/O issue.

The general answer is to call "fflush(stdout)" when you want your
output flushed immediately, regardless of line endings.  You can
also, though it is not recommended if you are doing heavy I/O,
call "setbuf(stdout, NULL);" to disable buffering output to standard
out.

michaelkjohnson

"Magazines all too frequently lead to books and should be regarded by the
 prudent as the heavy petting of literature."            -- Fran Lebowitz




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]