/*- * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * * This module is believed to contain source code proprietary to AT&T. * Use and redistribution is subject to the Berkeley Software License * Agreement and your Software Agreement with AT&T (Western Electric). */ #ifndef lint static char sccsid[] = "@(#)ioctl.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include "uucp.h" #include <sgtty.h> /******* * ioctl(fn, com, ttbuf) for machines without ioctl * int fn, com; * struct sgttyb *ttbuf; * * return codes - same as stty and gtty */ ioctl(fn, com, ttbuf) register int fn, com; struct sgttyb *ttbuf; { struct sgttyb tb; switch (com) { case TIOCHPCL: gtty(fn, &tb); tb.sg_flags |= 1; return(stty(fn, &tb)); case TIOCGETP: return(gtty(fn, ttbuf)); case TIOCSETP: return(stty(fn, ttbuf)); case TIOCEXCL: case TIOCNXCL: default: return(-1); } }