delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/12:19:47

Date: Wed, 1 Apr 1998 22:55:35 +0530 (IST)
From: "Mahadevan R." <mdevan AT md2 DOT vsnl DOT net DOT in>
Reply-To: mdevan AT iname DOT com
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Subject: Re: "bash"ing "cat"s.
In-Reply-To: <Pine.SUN.3.91.980401173235.7170I-100000@is>
Message-Id: <Pine.OSF.3.95.980401225250.16524A-100000@md2.vsnl.net.in>
Mime-Version: 1.0

> Bit 6 cleared means that stdin is NOT at EOF.  Does that mean that normal
> reads from stdin always return bit 6 set (i.e. stdin IS at EOF)?

The Interrupt List also says bit 6 is "EOF on input", but..

-- isbuggy.c --------------
#include <stdio.h>
#include <sys/ioctl.h>

int main()
{
	printf((ioctl(0, DOS_GETDEVDATA) & 0x40) ? "set\n" : "clr\n");
	return 0;
}
---------------------------

..seems to contradict this.  It prints "clr" when in buggy state.


- Raw text -


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