Path: utzoo!attcan!uunet!lll-winken!ames!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: inkey$, noecho, and other impossibles Message-ID: <15396@mimsy.UUCP> Date: 11 Jan 89 04:42:51 GMT References: <19@xenlink.UUCP> <225800106@uxe.cso.uiuc.edu> <310@twwells.uucp> <84629@sun.uucp> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 42 ->In article <225800106@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: ->>some such function [like inkey() or kbhit()] should be a ->>STANDARD C (ANSI C) function .... -In article <310@twwells.uucp> bill@twwells.UUCP (T. William Wells) writes: ->And to repeat what has been said by many: IT CAN'T BE DONE! [in some cases where the rest of the dpANS *can*] In article <84629@sun.uucp> swilson%thetone@Sun.COM (Scott Wilson) writes: -This argument is very similar to one I started some time ago related -to echo/no echo on input, etc. The point of standard libraries is -to smooth over OS dependencies to provide a uniform interface. If -inkey() cannot be provided for on some systems, aren't there other -operations mandated by the Standard that are just as hard to provide? No. -For example, what about the legal modes passed to fopen()? Aren't -there some systems where you simply can't open a file for simultaneous -reading and writing? Or open for writing at the end of a file? What -about fseek(), couldn't that be potentially very inefficient to -implement on some brain-damaged systems? There are a number of systems on which stdio might be fairly slow. As far as I know, however, there are *no* systems (other than standalones) in which it cannot be done at all. But since C runs on IBM machines that see only input screens (collected by 3270s) and on systems with half-duplex ASR 33s, it is easy to see that both get-one-character- without getting-a-line and turn-off-echo are indeed sometimes impossible. -... I guess what I'm wondering is: are there operations -already part of the Standard that are there for historical reasons -(i.e., it has always existed for most implementations) that would be -rejected if it was recommended as a new feature because it was "too -operating system dependent?" Possibly. In fact, malloc() might be one (`too machine dependent'). But most things in the standard can be done everywhere, even on those old IBM systems. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris