Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-unix!quintus!sun!pitstop!sundc!seismo!uunet!mcvax!cernvax!ethz!forty2!eschle From: eschle@forty2.UUCP (Patrik Eschle) Newsgroups: comp.lang.c Subject: keypressed() Message-ID: <136@forty2.UUCP> Date: 10 Feb 88 16:31:33 GMT Reply-To: eschle@forty2.UUCP (Patrik Eschle) Organization: Exp. Physics University Zuerich Lines: 9 How do I write a function keypressed(), that returns 0 if no char is in the input queue and returns the character otherwise? Keypressed() should not block, and should leave the terminal in its initial state after returning. I can't use curses and have played around with ioctl, but its really slow. Any suggestions? Patrik