Mail Archives: djgpp-workers/2003/03/08/12:03:40
> I think there are bits there that tell this. These are those two
> bits which `isatty' currently uses.
>
> Why do you think these bits are not enough?
The two bits are defined as "is stdin" and "is stdout". At the very
least, we should be checking for *either* of those bits, not *both* of
them.
And there are no bits for the AUX device, which should be considered a
terminal.
> Even if we couldn't find a single program where the distinction
> between clock$ and a real terminal device would matter, I think it
> still could make sense to make that distinction, simply because clock$
> is not a terminal device.
Perhaps. Do we have any other call that looks at just the "is a
device" bit in that dos call?
> > In the case of redirected stdout, for example, we still can't tell the
> > difference between anything other than devices (stdout$, clock$, com1,
> > null, etc) and files
>
> Unless I misunderstand what you are saying, I think we _can_ tell the
> difference: DOS knows the difference, and `isatty' and `stat'/`fstat'
> tell us about it.
Here's Ralf's list for those bits. If a device doesn't fit into one
of the four that have their own bits, we can't tell. There is no
generic "is a console-type device" bit.
character device
14 device driver can process IOCTL requests (see AX=4402h"DOS 2+")
13 output until busy supported
11 driver supports OPEN/CLOSE calls
8 ??? (set by MS-DOS 6.2x KEYB)
7 set (indicates device)
6 EOF on input
5 raw (binary) mode
4 device is special (uses INT 29)
3 clock device
2 NUL device
1 standard output
0 standard input
- Raw text -