4 #undef CERASE /* TODO */
5 #define CERASE '\010' /* ^H */
9 # include <X11/Xlocale.h>
11 # ifdef HAVE_SETLOCALE
14 #endif /* HAVE_XLOCALE */
16 #if defined(PTYS_ARE_PTMX) && !defined(__CYGWIN32__)
17 # include <sys/resource.h> /* for struct rlimit */
18 # define _NEW_TTY_CTRL /* to get proper defines in <termios.h> */
21 #ifdef TTY_GID_SUPPORT
25 /* ways to deal with getting/setting termios structure */
28 /* termios interface */
29 # ifdef TCSANOW /* POSIX */
30 # define GET_TERMIOS(fd,tios) tcgetattr (fd, tios)
31 # define SET_TERMIOS(fd,tios) \
32 cfsetospeed (tios, BAUDRATE), \
33 cfsetispeed (tios, BAUDRATE), \
34 tcsetattr (fd, TCSANOW, tios)
37 # define GET_TERMIOS(fd,tios) ioctl (fd, TIOCGETA, tios)
38 # define SET_TERMIOS(fd,tios) \
39 tios->c_cflag |= BAUDRATE, \
40 ioctl (fd, TIOCSETA, tios)
42 # define GET_TERMIOS(fd,tios) ioctl (fd, TCGETS, tios)
43 # define SET_TERMIOS(fd,tios) \
44 tios->c_cflag |= BAUDRATE, \
45 ioctl (fd, TCSETS, tios)
48 # define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios)
52 # define SET_TTYMODE(fd,tt) \
53 tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \
54 ioctl (fd, TIOCSETP, & (tt->sg)), \
55 ioctl (fd, TIOCSETC, & (tt->tc)), \
56 ioctl (fd, TIOCSLTC, & (tt->lc)), \
57 ioctl (fd, TIOCSETD, & (tt->line)), \
58 ioctl (fd, TIOCLSET, & (tt->local))
59 #endif /* HAVE_TERMIOS_H */
61 /* use the fastest baud-rate */
63 # define BAUDRATE B38400
66 # define BAUDRATE B19200
68 # define BAUDRATE B9600
72 /* Disable special character functions */
73 #ifdef _POSIX_VDISABLE
74 # define VDISABLE _POSIX_VDISABLE
79 /*----------------------------------------------------------------------*
80 * system default characters if defined and reasonable
83 # define CINTR '\003' /* ^C */
86 # define CQUIT '\034' /* ^\ */
90 # define CERASE '\177' /* ^? */
92 # define CERASE '\010' /* ^H */
96 # define CKILL '\025' /* ^U */
99 # define CEOF '\004' /* ^D */
102 # define CSTART '\021' /* ^Q */
105 # define CSTOP '\023' /* ^S */
108 # define CSUSP '\032' /* ^Z */
111 # define CDSUSP '\031' /* ^Y */
114 # define CRPRNT '\022' /* ^R */
117 # define CFLUSH '\017' /* ^O */
120 # define CWERASE '\027' /* ^W */
123 # define CLNEXT '\026' /* ^V */
128 # define VDISCRD VDISCARD
134 # define VWERSE VWERASE
145 #define CONSOLE "/dev/console" /* console device */
147 #endif /* _INIT_H_ */