home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
223_01
/
poll.c
< prev
next >
Wrap
Text File
|
1979-12-31
|
640b
|
24 lines
#define NOCCARGC /* no argument count passing */
#define ABORT 3
#define PAUSE 19
#include stdio.h
/*
** Poll for console input or interruption
*/
static int i;
poll(pause) int pause; {
i = bdos(6,255);
if(pause) {
if(i == PAUSE) {
while(!(i = bdos(6,255))) ;
if(i == ABORT) abort(0);
return (0);
}
if(i == ABORT) abort(0);
}
return (i);
}