* 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:
Corinna Vinschen
2002-03-05 08:15:28 +00:00
parent 8cd4824313
commit ad2864f4c8
3 changed files with 29 additions and 13 deletions

View File

@ -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;