148654Sbostic /*-
2*62391Sbostic * Copyright (c) 1985, 1993
3*62391Sbostic * The Regents of the University of California. All rights reserved.
448654Sbostic *
548654Sbostic * %sccs.include.proprietary.c%
648654Sbostic */
748654Sbostic
813659Ssam #ifndef lint
9*62391Sbostic static char sccsid[] = "@(#)ioctl.c 8.1 (Berkeley) 06/06/93";
1048654Sbostic #endif /* not lint */
1113659Ssam
1213659Ssam #include "uucp.h"
1313659Ssam #include <sgtty.h>
1413659Ssam
1513659Ssam /*******
1613659Ssam * ioctl(fn, com, ttbuf) for machines without ioctl
1713659Ssam * int fn, com;
1813659Ssam * struct sgttyb *ttbuf;
1913659Ssam *
2013659Ssam * return codes - same as stty and gtty
2113659Ssam */
2213659Ssam
ioctl(fn,com,ttbuf)2313659Ssam ioctl(fn, com, ttbuf)
2413659Ssam register int fn, com;
2513659Ssam struct sgttyb *ttbuf;
2613659Ssam {
2713659Ssam struct sgttyb tb;
2813659Ssam
2913659Ssam switch (com) {
3013659Ssam case TIOCHPCL:
3113659Ssam gtty(fn, &tb);
3213659Ssam tb.sg_flags |= 1;
3313659Ssam return(stty(fn, &tb));
3413659Ssam case TIOCGETP:
3513659Ssam return(gtty(fn, ttbuf));
3613659Ssam case TIOCSETP:
3713659Ssam return(stty(fn, ttbuf));
3813659Ssam case TIOCEXCL:
3917835Sralph case TIOCNXCL:
4013659Ssam default:
4113659Ssam return(-1);
4213659Ssam }
4313659Ssam }
44