home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!valois!bernt
- From: bernt@valois (Bernt Skottun)
- Newsgroups: comp.unix.wizards
- Subject: Keyboard hit in C programs
- Date: 9 Nov 1992 23:29:54 GMT
- Organization: University of California, Berkeley
- Lines: 16
- Distribution: world
- Message-ID: <1dms9iINNa6m@agate.berkeley.edu>
- NNTP-Posting-Host: 128.32.157.154
- Keywords: Keyboard hit, C programs, UNIX
-
-
- I am in the process of adapting a C program from the PC for
- the UNIX environment (for SUN 3 running SUNOS 4.1.1).
- In this program it is essential that
- the user be able to stop certain parts of the program
- (e.g. an inner loop) by hitting the keyboard (any key
- is fine) while as long as the keyboard is not touched the execution
- of the program will continue un-interupted (thus a procedure
- which requires, or expects, the user to type in a key stroke at certain
- intervals will not do). In the DOS environment
- I have been able to do this with the "kbhit()" function.
- My question is: what is the equivalent function in the UNIX
- environment? or how does one go about creating such a function?
- Any suggestions will be very welcome. Thanks a lot.
- Bernt Skottun, bernt@valois.berkeley.edu
-
-