Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!gistdev!flint From: flint@gistdev.UUCP Newsgroups: comp.unix.wizards Subject: Re: printf, data presentation Message-ID: <8800006@gistdev> Date: 6 Jan 89 21:14:00 GMT References: <19@xenlink.UUCP> Lines: 26 Nf-ID: #R:xenlink.UUCP:19:gistdev:8800006:000:1478 Nf-From: gistdev.UUCP!flint Jan 6 15:14:00 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@uxc.cso.uiuc.edu UUCP: {uunet,pur-ee,convex}!uiucuxc!gistdev!flint