[Previous] [Contents] [Next]

cfmakeraw()

Set terminal attributes

Synopsis:

#include <termios.h>

int cfmakeraw( struct termios * termios_p );

Library:

libc

Description:

The cfmakeraw() function sets the terminal attributes as follows:

termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
termios_p->c_cflag &= ~(CSIZE|PARENB);
termios_p->c_cflag |= CS8;

Returns:

0
Success.
-1
An error occurred (errno indicates the reason).

Classification:

Unix

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

errno, cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), tcgetattr(), tcsetattr()


[Previous] [Contents] [Next]