On Mon, 11 Sep 2006, Pavol Severa wrote:

> I'd like text printed with printf() to appear and stay on stdscr. What 
> is a reasonable way to do it?

More context, please.

In general, you shouldn't mix stdio with curses, especially not in 
PDCurses. But there's usually little reason to. Depending on exactly what 
you're trying to do: one approach might be to replace all the printf() 
calls with printw(); or, #define printf printw. printw() can do all that 
printf() can (same format strings).

> So far my plan is (not implemented yet):
> 1.create a temporary file
> 2.redirect stdout to the file using freopen
> 3.read the file and write it to stdscr
> 4.close and delete the file
> Should I do it that way?

No. There's gotta be an easier way than that. :-)

William McBrine <[EMAIL PROTECTED]>

Reply via email to