Re: Redirect C's printf

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

 




Peter "Firefly" Lund wrote:
On Fri, 25 Jul 2003, Joao Rainha wrote:


I have some functions working in C.
I'de liked to make a GUI for it.
It's possible to redirect all the printf's that I have in my code for a
specific text widget?
Or I have to rewrite them using gtk_text_insert?


Fork your program and use pipes.

(but using gtk_text_insert is perhaps easier)


Indeed, using a series of `#define printf`s might show a little easier. Everyone being through with `unix II` programming lectures should however be able to use a combination of dup/pipe constructs, and seperating the gui from the worker in different process contexts, well, that's might be better anyway - but again, it requires a good deal of knowledge on unix process managment and child signaling..., so it'd be about going to the heart of unix but if this project shall run non-unix platforms as well (which gtk can do), then... ;-)

cheers, guido



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux