isblank() implementation.
[minix.git] / lib / libc / posix / _tcsetattr.c
blobd43088f7f57bbeefd8f2f1a292f6bdd635470e23
1 /*
2 posix/_tcsetattr.c
4 Created: June 11, 1993 by Philip Homburg
5 */
7 #define tcsetattr _tcsetattr
8 #define ioctl _ioctl
9 #include <errno.h>
10 #include <termios.h>
11 #include <sys/ioctl.h>
13 int tcsetattr(fd, opt_actions, termios_p)
14 int fd;
15 int opt_actions;
16 _CONST struct termios *termios_p;
18 int request;
20 switch(opt_actions)
22 case TCSANOW: request = TCSETS; break;
23 case TCSADRAIN: request = TCSETSW; break;
24 case TCSAFLUSH: request = TCSETSF; break;
25 default: errno = EINVAL; return(-1);
27 return(ioctl(fd, request, (void *) termios_p));