Date: Fri, 21 Apr 1995 02:13:35 -0300 (ADT) From: Bill Davidson Subject: Re: TTY Flags To: Bob Cc: djgpp AT sun DOT soe DOT clarkson DOT edu On Thu, 20 Apr 1995, Bob wrote: > i have a program where i allow redirecting of stdin/out but the reset either or > both for output at certain times to the screen [i realize that i could use > other output functions, but there's a reason that i can't remember offhand] > is there another way to check if output is to the screen/input from the > keyboard? If you don't mind hacking a bit of assembly, you can use the DOS IOCTL interface for this. In fact, I found a little asm program for this on SimTel once, isconsol.asm (it might have been .zip). The source is only about 650 bytes. Have a look, if you can't find it I'll mail it to you, but you'll have to translate it to gcc; I haven't ported it. Bill Davidson bdavidson AT ra DOT isisnet DOT com