Add cfmakeraw. Like cf{get/set}{i/o}speed, it iisn't POSIx standard but is used
often enough and simple enough to write that we should allow it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42865 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -146,3 +146,15 @@ cfsetospeed(struct termios *termios, speed_t speed)
|
||||
termios->c_cflag |= speed;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
cfmakeraw(struct termios *termios)
|
||||
{
|
||||
termios->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR
|
||||
| ICRNL | IXON);
|
||||
termios->c_oflag &= ~OPOST;
|
||||
termios->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
|
||||
termios->c_cflag &= ~(CSIZE | PARENB);
|
||||
termios->c_cflag |= CS8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user