Annotation of 43BSD/usr.bin/uucp/ioctl.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.