From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: cprinf REdirected Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <9bf6nsseur50auc08a2u1pb61in2oum79j AT 4ax DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 X-Trace: /K49oFffVrq55EPOzziKRwxGHlromln0BZA68gVKNbdwJjRHsTNPlNkbzn7pAbq7QAH+S0ek4jZR!BPpw3BYe+X9WCx0vaPBeX3PIy5p5TjVcmccofLVIAiKU+46wpEf+hJb8awYvhc6SPwop9t/3+CFT!pis= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Mon, 17 Jul 2000 19:08:43 GMT Distribution: world Date: Mon, 17 Jul 2000 19:08:43 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mon, 17 Jul 2000 13:12:58 -0400, Radical NetSurfer wrote: >This is the second time I've posted this (it wasn't noticed; or no >response given the first time): > >I was wondering if anyone out there knew how to get the proper >behavior from cprinf such that when DOS re-direction is used, >the ascii text (no attribute of course) is STILL CAPTURED, as if >ordinary printf was used. >I get the impression by looking over the material in the libc docs, >and/or GCC docs that this is (could be) possible given the proper set >up, system inter-ception, etc. of the re-direction and cprintf text >"trapping" if re-direction is detected.... >IF SOMEONE knows how to accomplish this, PLEASE provide a working >example either posted here or send it to me via Email thanks! Instead of using cprintf() (which can't be redirected and is not portable), use printf() and ANSI.sys sequences. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/