Path: utzoo!attcan!uunet!husc6!uwvax!rutgers!bellcore!tness7!tness1!sugar!ficc!peter
From: peter@ficc.UUCP (Peter da Silva)
Newsgroups: comp.unix.wizards
Subject: Re: How can I read keyboard without stopping
Keywords: curses keyboard
Message-ID: <1267@ficc.UUCP>
Date: 16 Aug 88 18:46:09 GMT
References: <813@ms3.UUCP> <1246@mcgill-vision.UUCP> <1988Aug15.130550.8571@ateng.uucp>
Organization: SCADA
Lines: 16

In article ... chip@ateng.uucp (Chip Salzenberg) writes:
> According to mouse@mcgill-vision.UUCP (der Mouse):
> >3) FIONREAD.  BSD systems have an ioctl you can apply to a terminal
> >   line to get the number of characters queued available for a read().

> [Xenix] it's a system call all its own: rdchk(fildes).

I believe that once upon a time on some system a stat() on a pipe would
return the number of characters in a pipe. Wouldn't it make sense to
have stat() on a terminal device return the number of characters available?
(and a stat() on /dev/mem return memory size, and...)
-- 
Peter da Silva, Ferranti International Controls Corporation, sugar!ficc!peter.
"You made a TIME MACHINE out of a VOLKSWAGEN BEETLE?"
"Well, I couldn't afford another deLorean."
"But how do you ever get it up to 88 miles per hour????"