printf, data presentation

flint at gistdev.UUCP flint at gistdev.UUCP
Sat Jan 7 07:14:00 AEST 1989


I've found ioctl to be about the least portable thing in UNIX.  (FIONREAD
isn't in the SVID, or at least I couldn't find it in TERMIO(BA_ENV) or
IOCTL(BA_OS), so if it is in SVID & I missed it, I'd appreciate being
enlightened.) 

I think the main thrust of the inkey() request is requesting a _portable_
way to do a non-blocking read.  I'd like to extend the request one step
further, to request a _portable_ way to do efficient timed reads.  (I don't
see any reason why inkey() can't do both: inkey(0) would be non-blocking,
while inkey(10) would block until either a key arrived or 1 second
elapsed.)  You can't do this with ioctl() right now, simply because ioctl()
is too slow to call on every keypress.  (For example, if I want my user
to type as many keys as they want to within 10 seconds, and then evaluate
that amount of input, I'm stuck: I have to change the timelimit with each
successive keypress to be "10 - time_used_so_far", and the only way to do
so is with an incredibly slow ioctl() call on each keypress.  Some Guru
out there might know some neat way to do this I haven't heard about:
if you know how to do it in Sys V without having to go way out of your
way with something like writing your own device driver, I'd like to hear
your solution.)

Flint Pellett, Global Information Systems Technology, Inc.
1800 Woodfield Drive, Savoy, IL  61874     (217) 352-1165
INTERNET: flint%gistdev at uxc.cso.uiuc.edu
UUCP:     {uunet,pur-ee,convex}!uiucuxc!gistdev!flint



More information about the Comp.unix.wizards mailing list