* include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
* fhandler_termios.cc: Include <sys/termios.h>. (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when not in ICANON mode.
This commit is contained in:
@ -195,6 +195,14 @@ details. */
|
||||
|
||||
#define NCCS 18
|
||||
|
||||
/* `c_cc' member of 'struct termios' structure can be disabled by
|
||||
using the value _POSIX_VDISABLE. */
|
||||
#define _POSIX_VDISABLE '\0'
|
||||
|
||||
/* Compare a character C to a value VAL from the `c_cc' array in a
|
||||
`struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */
|
||||
#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
typedef unsigned int speed_t;
|
||||
|
Reference in New Issue
Block a user