bug fixes and changes from Rick Adams
[unix-history] / usr / src / usr.bin / uucp / port / ioctl.c
CommitLineData
01cbf18b 1#ifndef lint
46b15d8a 2static char sccsid[] = "@(#)ioctl.c 5.2 (Berkeley) %G%";
01cbf18b
SL
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
16ioctl(fn, com, ttbuf)
17register int fn, com;
18struct 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:
46b15d8a 32 case TIOCNXCL:
01cbf18b
SL
33 default:
34 return(-1);
35 }
36}