SCCS-vsn: lib/libc/gen/termios.c 5.12
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)termios.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)termios.c 5.12 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
struct termios *t;
speed_t speed;
{
struct termios *t;
speed_t speed;
{
t->c_ospeed = speed;
return (0);
}
t->c_ospeed = speed;
return (0);
}
struct termios *t;
speed_t speed;
{
struct termios *t;
speed_t speed;
{
t->c_ispeed = speed;
return (0);
}
t->c_ispeed = speed;
return (0);
}
struct termios *t;
speed_t speed;
{
struct termios *t;
speed_t speed;
{
t->c_ispeed = t->c_ospeed = speed;
return (0);
}
t->c_ispeed = t->c_ospeed = speed;
return (0);
}
cfmakeraw(t)
struct termios *t;
{
cfmakeraw(t)
struct termios *t;
{
t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
t->c_oflag &= ~OPOST;
t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
t->c_oflag &= ~OPOST;
t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- return (ioctl(fd, TIOCDRAIN, 0) == -1 ? -1 : 0);
+
+ return (ioctl(fd, TIOCDRAIN, 0));
errno = EINVAL;
return (-1);
}
errno = EINVAL;
return (-1);
}
- return (ioctl(fd, TIOCFLUSH, &com) == -1 ? -1 : 0);
+ return (ioctl(fd, TIOCFLUSH, &com));
switch (action) {
case TCOOFF:
switch (action) {
case TCOOFF:
- return (ioctl(fd, TIOCSTOP, 0) == -1 ? -1 : 0);
+ return (ioctl(fd, TIOCSTOP, 0));
- return (ioctl(fd, TIOCSTART, 0) == -1 ? -1 : 0);
+ return (ioctl(fd, TIOCSTART, 0));
case TCION:
case TCIOFF:
if (tcgetattr(fd, &term) == -1)
case TCION:
case TCIOFF:
if (tcgetattr(fd, &term) == -1)