Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!agate!ucbvax!decwrl!sun!thetone!swilson From: swilson%thetone@Sun.COM (Scott Wilson) Newsgroups: comp.lang.c Subject: Re: INKEY$ [Was: printf, data presentation] Message-ID: <84920@sun.uucp> Date: 11 Jan 89 21:41:49 GMT References: <19@xenlink.UUCP> <225800106@uxe.cso.uiuc.edu> <686@vector.UUCP> Sender: news@sun.uucp Reply-To: swilson@sun.UUCP (Scott Wilson) Organization: Sun Microsystems, Mountain View Lines: 26 In article <686@vector.UUCP> chip@vector.UUCP (Chip Rosenthal) writes: >In article <225800106@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: >>>From my recollection of BASIC, INKEY$ has two main uses: >>/* (long discussion deleted) */ >>The important point is that some such function should be a >>STANDARD C (ANSI C) function > >No, that isn't the important point. Such a procedure is generally used >for busy loops, and this is a bad idea. If you are waiting for a keystroke, >then use c_cc[VMIN]=1. If you are waiting for a one of a number of >assynchronous events, then fork processes to block on the various events >and signal the parent to handle it. Who said anything about UNIX? This is comp.lang.c not comp.lang.c.on.unix. And yes C does run in environments other than UNIX which is probably why the original poster would like to see inkey() standardized. And even if this was comp.lang.c.on.unix why assume everyone is using a UNIX that has SV style tty drivers? Sorry for being snotty, but I get tired of people spitting out "simple" solutions that don't necessarily make sense in the scope of a newsgroup. -- Scott Wilson arpa: swilson@sun.com Sun Microsystems uucp: ...!sun!swilson Mt. View, CA