ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.h
(Generate patch)

Comparing rxvt-unicode/src/init.h (file contents):
Revision 1.10 by ayin, Wed Jan 18 08:43:48 2006 UTC vs.
Revision 1.18 by root, Tue Jan 11 13:32:33 2011 UTC

1#ifndef INIT_H_ 1#ifndef INIT_H_
2#define INIT_H_ 2#define INIT_H_
3 3
4#undef CERASE /* TODO */ 4/* use the fastest baud-rate */
5#define CERASE '\010' /* ^H */ 5//#if defined(B4000000)
6 6//# define BAUDRATE B4000000
7#ifdef HAVE_XSETLOCALE 7//#elif defined(B921600)
8# define X_LOCALE 8//# define BAUDRATE B921600
9# include <X11/Xlocale.h> 9//#elif defined(B115200)
10//# define BAUDRATE B115200
11//#elif defined(B38400)
12#if defined(B38400)
13# define BAUDRATE B38400
14#elif defined(B19200)
15# define BAUDRATE B19200
10#else 16#else
11# ifdef HAVE_SETLOCALE
12# include <clocale>
13# endif
14#endif /* HAVE_XLOCALE */
15
16#ifdef TTY_GID_SUPPORT
17# include <grp.h>
18#endif
19
20/* ways to deal with getting/setting termios structure */
21
22#ifdef HAVE_TERMIOS_H
23/* termios interface */
24# ifdef TCSANOW /* POSIX */
25# define GET_TERMIOS(fd,tios) tcgetattr (fd, tios)
26# define SET_TERMIOS(fd,tios) \
27 cfsetospeed (tios, BAUDRATE), \
28 cfsetispeed (tios, BAUDRATE), \
29 tcsetattr (fd, TCSANOW, tios)
30# else
31# ifdef TIOCSETA
32# define GET_TERMIOS(fd,tios) ioctl (fd, TIOCGETA, tios)
33# define SET_TERMIOS(fd,tios) \
34 tios->c_cflag |= BAUDRATE, \
35 ioctl (fd, TIOCSETA, tios)
36# else
37# define GET_TERMIOS(fd,tios) ioctl (fd, TCGETS, tios)
38# define SET_TERMIOS(fd,tios) \
39 tios->c_cflag |= BAUDRATE, \
40 ioctl (fd, TCSETS, tios)
41# endif
42# endif
43# define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios)
44#else
45/* sgtty interface */
46
47# define SET_TTYMODE(fd,tt) \
48 tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \
49 ioctl (fd, TIOCSETP, & (tt->sg)), \
50 ioctl (fd, TIOCSETC, & (tt->tc)), \
51 ioctl (fd, TIOCSLTC, & (tt->lc)), \
52 ioctl (fd, TIOCSETD, & (tt->line)), \
53 ioctl (fd, TIOCLSET, & (tt->local))
54#endif /* HAVE_TERMIOS_H */
55
56/* use the fastest baud-rate */
57#ifdef B38400
58# define BAUDRATE B38400
59#else
60# ifdef B19200
61# define BAUDRATE B19200
62# else
63# define BAUDRATE B9600 17# define BAUDRATE B9600
64# endif
65#endif 18#endif
66 19
67/* Disable special character functions */ 20/* Disable special character functions */
68#ifdef _POSIX_VDISABLE 21#ifdef _POSIX_VDISABLE
69# define VDISABLE _POSIX_VDISABLE 22# define VDISABLE _POSIX_VDISABLE
137# define ONLCR 0 90# define ONLCR 0
138#endif 91#endif
139 92
140#define CONSOLE "/dev/console" /* console device */ 93#define CONSOLE "/dev/console" /* console device */
141 94
142#endif /* _INIT_H_ */ 95#endif /* _INIT_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines