1*13659Ssam #ifndef lint 2*13659Ssam static char sccsid[] = "@(#)ioctl.c 5.1 (Berkeley) 07/02/83"; 3*13659Ssam #endif 4*13659Ssam 5*13659Ssam #include "uucp.h" 6*13659Ssam #include <sgtty.h> 7*13659Ssam 8*13659Ssam /******* 9*13659Ssam * ioctl(fn, com, ttbuf) for machines without ioctl 10*13659Ssam * int fn, com; 11*13659Ssam * struct sgttyb *ttbuf; 12*13659Ssam * 13*13659Ssam * return codes - same as stty and gtty 14*13659Ssam */ 15*13659Ssam 16*13659Ssam ioctl(fn, com, ttbuf) 17*13659Ssam register int fn, com; 18*13659Ssam struct sgttyb *ttbuf; 19*13659Ssam { 20*13659Ssam struct sgttyb tb; 21*13659Ssam 22*13659Ssam switch (com) { 23*13659Ssam case TIOCHPCL: 24*13659Ssam gtty(fn, &tb); 25*13659Ssam tb.sg_flags |= 1; 26*13659Ssam return(stty(fn, &tb)); 27*13659Ssam case TIOCGETP: 28*13659Ssam return(gtty(fn, ttbuf)); 29*13659Ssam case TIOCSETP: 30*13659Ssam return(stty(fn, ttbuf)); 31*13659Ssam case TIOCEXCL: 32*13659Ssam default: 33*13659Ssam return(-1); 34*13659Ssam } 35*13659Ssam } 36