From: Ragnar Kellari <kellari AT swipnet DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Redirecting cprintf
Date: Sun, 25 Jan 1998 21:57:46 -0800
Organization: A customer of Tele2
Lines: 13
Message-ID: <34CC25D9.61F6@swipnet.se>
NNTP-Posting-Host: mn8.swip.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cache-Post-Path: mn8!s-281819 AT dialup211-2-27 DOT swipnet DOT se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Precedence: bulk

In compiled Qbasic the output of a program can be redirected to a file 
(with the ">"-sign) even if I use colored text. The colors are 
automaticaly filtered off the text. 
This is the problem:
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.
Does anyone have a smart solution to this problem?
(I wonder how the COLOR-statement in Qbasic works?)