Mail Archives: djgpp/1998/01/26/00:00:27
> When I use printf the output goes to stdout and may then be redirected to
> a file but the only way I can use colors with printf is by sending
> escape-sequences to ansi.sys. Then when the output is redirected to a
> file the escape-sequence goes there aswell.
> With cprintf, redirection is not possible as the output goes directly to
> the screen.
It seems to me that the reason you want to use cprintf() is for the
colors, but you cannot save colors to a file. So if you plan on using
redirection as the normal operation, then you are not getting any
benefit from cprintf() even if you could redirect it to a file. If you
need to use cprintf(), then you should just make your program capture
the screen and write it to a file (use gettext() and strip every second
byte, which is the color byte).
--
/*
pneyz / Smoof Team pneyz AT bethany DOT edu
"Fine Malt Coding" http://ns.bethany.edu/pneyz/
*/
- Raw text -