<sys/ttydefaults.h>

Change-Id: I237e141e2a6409c7100db4adb14a90fbb46294b4
This commit is contained in:
Ben Gras 2013-12-10 20:04:02 +01:00 committed by Lionel Sambuc
parent 6cf86998df
commit 09fab4dc04

View file

@ -45,14 +45,14 @@
/* /*
* Defaults on "first" open. * Defaults on "first" open.
*/ */
#define TTYDEF_IFLAG (BRKINT | ICRNL | IXON | IXANY) #define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
#define TTYDEF_OFLAG (OPOST | ONLCR ) #define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE) #define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL) #define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#ifdef __minix #ifdef __minix
#define TTYDEF_SPEED (B115200) #define TTYDEF_SPEED (B115200)
#else #else
#define TTYDEF_SPEED (B9600) #define TTYDEF_SPEED (B9600)
#endif #endif
/* /*
@ -60,8 +60,8 @@
*/ */
#define CTRL(x) (x&037) #define CTRL(x) (x&037)
#define CEOF CTRL('d') #define CEOF CTRL('d')
#define CEOL _POSIX_VDISABLE #define CEOL ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */
#define CERASE CTRL('h') #define CERASE 0177
#define CINTR CTRL('c') #define CINTR CTRL('c')
#define CSTATUS CTRL('t') #define CSTATUS CTRL('t')
#define CKILL CTRL('u') #define CKILL CTRL('u')
@ -82,4 +82,38 @@
#define CRPRNT CREPRINT #define CRPRNT CREPRINT
#define CFLUSH CDISCARD #define CFLUSH CDISCARD
#endif /* _SYS_TTYDEFAULTS_H_ */ /* PROTECTED INCLUSION ENDS HERE */
#endif /* !_SYS_TTYDEFAULTS_H_ */
/*
* #define TTYDEFCHARS to include an array of default control characters.
*/
#ifdef _KERNEL
#ifdef TTYDEFCHARS
const cc_t ttydefchars[NCCS] = {
[VEOF] = CEOF,
[VEOL] = CEOL,
[VEOL2] = CEOL,
[VERASE] = CERASE,
[VWERASE] = CWERASE,
[VKILL] = CKILL,
[VREPRINT] = CREPRINT,
[7] = _POSIX_VDISABLE, /* spare */
[VINTR] = CINTR,
[VQUIT] = CQUIT,
[VSUSP] = CSUSP,
[VDSUSP] = CDSUSP,
[VSTART] = CSTART,
[VSTOP] = CSTOP,
[VLNEXT] = CLNEXT,
[VDISCARD] = CDISCARD,
[VMIN] = CMIN,
[VTIME] = CTIME,
[VSTATUS] = CSTATUS,
[19] = _POSIX_VDISABLE, /* spare */
};
#undef TTYDEFCHARS
#else
extern const cc_t ttydefchars[NCCS];
#endif
#endif /* _KERNEL */