home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume8
/
help.jn
/
nocbreak.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1989-08-19
|
308 b
|
23 lines
#ifdef sequent
#include <sgtty.h>
nocbreak()
{
int i;
struct sgttyb ttystatus;
char *a;
a= &ttystatus.sg_ispeed;
i=ioctl(0,TIOCGETP,a);
if(i<0)exit(5);
#define F ttystatus.sg_flags
F ^= CBREAK;
i=ioctl(0,TIOCSETP,a);
if(i<0)exit(6);
}
#else
nocbreak(){
while(getchar()!='\n') /*null*/ ;
}
#endif