www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/21/02:38:41

Date: Fri, 21 Apr 1995 02:13:35 -0300 (ADT)
From: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>
Subject: Re: TTY Flags
To: Bob <bob AT xnet DOT com>
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

- Raw text -


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