Mail Archives: djgpp/1997/02/28/19:38:59
On Fri, 28 Feb 1997 08:37:44 GMT, "X DOT PONS AT UAB DOT ES" <ILGES AT cc DOT uab DOT es> wrote:
>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
The 'istty' function tells you whether or not you are using a char device like
CON:.
Bill Lanam
- Raw text -