Research V7 development
[unix-history] / usr / src / cmd / uucp / ioctl.c
CommitLineData
808bd6eb
N
1#include "uucp.h"
2#include <sgtty.h>
3
4/*******
5 * ioctl(fn, com, ttbuf) for machines without ioctl
6 * int fn, com;
7 * struct sgttyb *ttbuf;
8 *
9 * return codes - same as stty and gtty
10 */
11
12ioctl(fn, com, ttbuf)
13int fn, com;
14struct sgttyb *ttbuf;
15{
16 struct sgttyb tb;
17
18 switch (com) {
19 case TIOCHPCL:
20 gtty(fn, &tb);
21 tb.sg_flags |= 1;
22 return(stty(fn, &tb));
23 case TIOCGETP:
24 return(gtty(fn, ttbuf));
25 case TIOCSETP:
26 return(stty(fn, ttbuf));
27 case TIOCEXCL:
28 default:
29 return(-1);
30 }
31}