|
|
1.1 ! root 1: #include "uucp.h" ! 2: #include <sgtty.h> ! 3: ! 4: /******* ! 5: * ioctl(fn, com, ttbuf) for machines without ioctl ! 6: * int fn, com; ! 7: * struct sgttyb *ttbuf; ! 8: * ! 9: * return codes - same as stty and gtty ! 10: */ ! 11: ! 12: ioctl(fn, com, ttbuf) ! 13: int fn, com; ! 14: struct sgttyb *ttbuf; ! 15: { ! 16: struct sgttyb tb; ! 17: ! 18: switch (com) { ! 19: case TIOCHPCL: ! 20: gtty(fn, &tb); ! 21: tb.sg_flags |= 1; ! 22: return(stty(fn, &tb)); ! 23: case TIOCGETP: ! 24: return(gtty(fn, ttbuf)); ! 25: case TIOCSETP: ! 26: return(stty(fn, ttbuf)); ! 27: case TIOCEXCL: ! 28: default: ! 29: return(-1); ! 30: } ! 31: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.