date and time created 85/01/22 13:04:37 by ralph
[unix-history] / usr / src / usr.bin / uucp / port / ioctl.c
#ifndef lint
static char sccsid[] = "@(#)ioctl.c 5.1 (Berkeley) %G%";
#endif
#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:
default:
return(-1);
}
}