cbreak, nocbreak - set/clear cbreak mode
The routine puts the terminal into CBREAK mode. In this mode, charac‐
ters typed by the user are immediately available to the program and
erase/kill character processing is not performed. Interrupt and flow
control characters are unaffected by this mode.
The routine disables CBREAK. In this case the terminal driver will
buffer input until a newline or carriage return is typed.
The initial settings that determine whether or not a terminal is in
CBREAK mode are dependent on the terminal driver implementation. As a
result of this, it is not possible to determine if a terminal is in
CBREAK mode, as it is an inherited characteristic. It is necessary to
call to ensure that the terminal is set to the correct mode for the
The and functions return OK on success and ERR on error.