2 * $Id: init.h,v 1.2 2003-11-24 17:31:27 pcg Exp $
8 #undef CERASE /* TODO */
9 #define CERASE '\010' /* ^H */
11 #ifdef HAVE_XSETLOCALE
13 # include <X11/Xlocale.h>
15 # ifdef HAVE_SETLOCALE
18 #endif /* HAVE_XLOCALE */
20 #if defined(PTYS_ARE_PTMX) && !defined(__CYGWIN32__)
21 # include <sys/resource.h> /* for struct rlimit */
22 # define _NEW_TTY_CTRL /* to get proper defines in <termios.h> */
25 #ifdef __QNX__ /* autoconf someday */
29 #ifdef TTY_GID_SUPPORT
33 /* ways to deal with getting/setting termios structure */
36 /* termios interface */
37 # ifdef TCSANOW /* POSIX */
38 # define GET_TERMIOS(fd,tios) tcgetattr (fd, tios)
39 # define SET_TERMIOS(fd,tios) \
40 cfsetospeed (tios, BAUDRATE), \
41 cfsetispeed (tios, BAUDRATE), \
42 tcsetattr (fd, TCSANOW, tios)
45 # define GET_TERMIOS(fd,tios) ioctl (fd, TIOCGETA, tios)
46 # define SET_TERMIOS(fd,tios) \
47 tios->c_cflag |= BAUDRATE, \
48 ioctl (fd, TIOCSETA, tios)
50 # define GET_TERMIOS(fd,tios) ioctl (fd, TCGETS, tios)
51 # define SET_TERMIOS(fd,tios) \
52 tios->c_cflag |= BAUDRATE, \
53 ioctl (fd, TCSETS, tios)
56 # define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios)
60 # define SET_TTYMODE(fd,tt) \
61 tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \
62 ioctl (fd, TIOCSETP, &(tt->sg)), \
63 ioctl (fd, TIOCSETC, &(tt->tc)), \
64 ioctl (fd, TIOCSLTC, &(tt->lc)), \
65 ioctl (fd, TIOCSETD, &(tt->line)), \
66 ioctl (fd, TIOCLSET, &(tt->local))
67 #endif /* HAVE_TERMIOS_H */
69 /* use the fastest baud-rate */
71 # define BAUDRATE B38400
74 # define BAUDRATE B19200
76 # define BAUDRATE B9600
80 /* Disable special character functions */
81 #ifdef _POSIX_VDISABLE
82 # define VDISABLE _POSIX_VDISABLE
87 /*----------------------------------------------------------------------*
88 * system default characters if defined and reasonable
91 # define CINTR '\003' /* ^C */
94 # define CQUIT '\034' /* ^\ */
98 # define CERASE '\177' /* ^? */
100 # define CERASE '\010' /* ^H */
104 # define CKILL '\025' /* ^U */
107 # define CEOF '\004' /* ^D */
110 # define CSTART '\021' /* ^Q */
113 # define CSTOP '\023' /* ^S */
116 # define CSUSP '\032' /* ^Z */
119 # define CDSUSP '\031' /* ^Y */
122 # define CRPRNT '\022' /* ^R */
125 # define CFLUSH '\017' /* ^O */
128 # define CWERASE '\027' /* ^W */
131 # define CLNEXT '\026' /* ^V */
136 # define VDISCRD VDISCARD
142 # define VWERSE VWERASE
150 # define O_NDELAY O_NONBLOCK /* QNX, at least */
153 # define ONLCR 0 /* QNX, at least */
156 #define CONSOLE "/dev/console" /* console device */
158 #include "init.intpro" /* PROTOS for internal routines */
159 #endif /* _INIT_H_ */