www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/28/02:44:03

Date: Fri, 28 Feb 1997 08:37:44 +0000
From: "X DOT PONS AT UAB DOT ES" <ILGES AT cc DOT uab DOT es>
Subject: Is stdout the console?
To: djgpp AT delorie DOT com
Message-id: <01IFXYQFJ23Q00I1MD@cc.uab.es>
Organization: Universitat Autonoma de Barcelona
MIME-version: 1.0

I need to know if stdout is the console, i.e., if it has not been
redirected to a file through

   MY_PROGRAM  > FILE

In TC, I do it by checking the field "flag" of the FILE structute associated
with stdout: if stdout is the console, this flag indicates _F_TERM.
In DJGPP the FILE structure semms to be different and I cannot find this
flag. In fact, if you know some other portable way to know if stdout is the
console or a file it will also be useful to me.

Thanks in advance!

XP

- Raw text -


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