7 static char *
rcsid=
"@(#)$Id$";
9 #include <sys/termios.h> 25 {
if (isint(x))
return(
intval(x));
27 else if (pisiostream(x)) x=x->c.iostream.in;
29 return(
intval(x->c.fstream.fd));}
41 unsigned long ctlcode;
47 buf=
getbuf(n,argv[1],bufsize);
54 unsigned long ctlcode;
60 intarg=ckintval(argv[1]);
61 stat=ioctl(fd,ctlcode, &intarg);
175 #if sun3 || sun4 || Linux || alpha || IRIX || Solaris2 181 {
return(
ioctl_struct(n,argv,TCGETS,
sizeof(
struct termios)));}
187 {
return(
ioctl_struct(n,argv,TCSETS,
sizeof(
struct termios)));}
193 {
return(
ioctl_struct(n,argv,TCSETSW,
sizeof(
struct termios)));}
199 {
return(
ioctl_struct(n,argv,TCSETSF,
sizeof(
struct termios)));}
206 {
return(
ioctl_struct(n,argv,TCGETA,
sizeof(
struct termio)));}
212 {
return(
ioctl_struct(n,argv,TCSETA,
sizeof(
struct termio)));}
218 {
return(
ioctl_struct(n,argv,TCSETAF,
sizeof(
struct termio)));}
223 {
return(
ioctl_struct(n,argv,TCSETAW,
sizeof(
struct termio)));}
233 buf=
getbuf(n,argv[1],
sizeof(
struct termios));
234 stat=tcgetattr(
getfd(argv[0]),(
struct termios *)buf->
c.
str.
chars);
244 buf=
getbuf(n,argv[2],
sizeof(
struct termios));
245 if (n>=2) optact=ckintval(argv[1]);
246 stat=tcsetattr(
getfd(argv[0]),optact,(
struct termios *)buf->
c.
str.
chars);
277 #if sun3 || sun4 || Linux || alpha || IRIX || Solaris2 static char buf[CHAR_SIZE]
pointer TCSETATTR(context *ctx, int n, argv)
pointer IOCTL_TCSETSW(context *ctx, int n, argv)
pointer IOCTL_TCSETS(context *ctx, int n, argv)
static pointer ioctl_int(int n, argv, unsigned long ctlcode)
pointer defunpkg(context *, char *, pointer, pointer(*)(), pointer)
static pointer getbuf(int n, pointer x, int bufsize)
pointer IOCTL_TCSETSF(context *ctx, int n, argv)
static int getfd(pointer x)
static pointer ioctl_struct(int n, argv, unsigned long ctlcode, int bufsize)
pointer IOCTL_TCGETA(context *ctx, int n, argv)
pointer IOCTL_TCSETAF(context *ctx, int n, argv)
void eusioctl(context *ctx, pointer mod)
pointer IOCTL_TCGETS(context *ctx, int n, argv)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer IOCTL_TCSETAW(int n, argv)
pointer IOCTL_TCSETA(context *ctx, int n, argv)
pointer TCGETATTR(context *ctx, int n, argv)