1*48654Sbostic /*- 2*48654Sbostic * Copyright (c) 1985 The Regents of the University of California. 3*48654Sbostic * All rights reserved. 4*48654Sbostic * 5*48654Sbostic * %sccs.include.proprietary.c% 6*48654Sbostic */ 7*48654Sbostic 813659Ssam #ifndef lint 9*48654Sbostic static char sccsid[] = "@(#)ioctl.c 5.3 (Berkeley) 04/24/91"; 10*48654Sbostic #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 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