home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / S / SMC21LIB.LZH / POLL.C < prev    next >
Text File  |  2000-06-30  |  384b  |  27 lines

  1.  
  2. #define NOCCARGC
  3. #include stdio.h
  4. #include clib.def
  5. /*
  6. ** Poll for console input or interruption
  7. */
  8. poll(pause) int pause; {
  9.   int i;
  10.   i = _bdos(DCONIO, 255);
  11.   if(pause) {
  12.     if(i == PAUSE) {
  13.       while(!(i = _bdos(DCONIO, 255))) ;
  14.       if(i == ABORT) exit(0);
  15.       return (0);
  16.       }
  17.     if(i == ABORT) exit(0);
  18.     }
  19.   return(i);
  20.   }
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.    if(d