home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJTST200.ZIP / tests / libc / dos / io / ctrlc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-09  |  245 b   |  16 lines

  1. #include <stdio.h>
  2. #include <io.h>
  3. #include <fcntl.h>
  4. #include <pc.h>
  5. #include <dos.h>
  6.  
  7. int
  8. main(void)
  9. {
  10.   int key;
  11.   setmode(fileno(stdin), O_BINARY);
  12.   while ((key=getkey()) != 'q')
  13.     printf("key is %d\n", key);
  14.   return 0;
  15. }
  16.