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 / both.c next >
Encoding:
C/C++ Source or Header  |  1995-10-29  |  328 b   |  19 lines

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