www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/10/22:59:03

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can I catch stderr output in my own code?
Date: Thu, 10 Apr 1997 07:17:51 -0700
Organization: Two pounds of chaos and a pinch of salt
Lines: 24
Message-ID: <334CF68F.5A65@cs.com>
References: <5iichm$418 AT info DOT service DOT rug DOT nl>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp223.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Doug Eleveld wrote:
> 
> I' know how to redirect stderr to a file and such, but what I'd like
> to do is have my program process all the text that would normally
> go to stderr (or stdout or from stdin) and display it in a window
> in graphics mode.  Do I have to take over a FILE* and then redirect to
> that FILE*?  Is there a more sensible way?  Does anyone do this kind of
> stuff with DJGPP?

RHIDE does it.  Emacs does it.  'redir', obviously, does it.  ;)  The
source for all of these is readily available.  Check out the libc docs
on 'dup' and 'dup2', for starters.

-- 
John M. Aldrich <fighteer AT cs DOT com>                      

* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
  causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
  again.
* It doesn't necessarily do it in chronological order, though.
 
                                       --- Douglas Adams

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019