home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / SMALL_C / POLL.C < prev    next >
Text File  |  1987-10-04  |  384b  |  20 lines

  1. #define NOCCARGC  /* no argument count passing */
  2. #include stdio.h
  3. #include clib.def
  4. /*
  5. ** Poll for console input or interruption
  6. */
  7. poll(pause) int pause; {
  8.   int i;
  9.   i = Dcio(255);
  10.   if(pause) {
  11.     if(i == PAUSE) {
  12.       while(!(i = Dcio(255))) ;
  13.       if(i == ABORT) exit(0);
  14.       return (0);
  15.       }
  16.     if(i == ABORT) exit(0);
  17.     }
  18.   return (i);
  19.   }
  20.