home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume8 / help.jn / nocbreak.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-19  |  308 b   |  23 lines

  1. #ifdef sequent
  2. #include <sgtty.h>
  3.  
  4. nocbreak()
  5. {
  6.     int i;
  7.     struct sgttyb ttystatus;
  8.     char *a;
  9.     a= &ttystatus.sg_ispeed;
  10.     i=ioctl(0,TIOCGETP,a);
  11.     if(i<0)exit(5);
  12.  
  13. #define F    ttystatus.sg_flags
  14.     F ^= CBREAK;
  15.     i=ioctl(0,TIOCSETP,a);
  16.     if(i<0)exit(6);
  17. }
  18. #else
  19. nocbreak(){
  20.     while(getchar()!='\n') /*null*/ ;
  21. }
  22. #endif
  23.