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.13 by ayin, Mon Jun 25 13:50:41 2007 UTC

9# include <X11/Xlocale.h> 9# include <X11/Xlocale.h>
10#else 10#else
11# ifdef HAVE_SETLOCALE 11# ifdef HAVE_SETLOCALE
12# include <clocale> 12# include <clocale>
13# endif 13# endif
14#endif /* HAVE_XLOCALE */ 14#endif
15 15
16#ifdef TTY_GID_SUPPORT 16#ifdef TTY_GID_SUPPORT
17# include <grp.h> 17# include <grp.h>
18#endif 18#endif
19 19
20/* ways to deal with getting/setting termios structure */ 20/* ways to deal with getting/setting termios structure */
21 21
22#ifdef HAVE_TERMIOS_H
23/* termios interface */ 22/* termios interface */
24# ifdef TCSANOW /* POSIX */
25# define GET_TERMIOS(fd,tios) tcgetattr (fd, tios) 23#define GET_TERMIOS(fd,tios) tcgetattr (fd, tios)
26# define SET_TERMIOS(fd,tios) \ 24#define SET_TERMIOS(fd,tios) \
27 cfsetospeed (tios, BAUDRATE), \ 25 cfsetospeed (tios, BAUDRATE), \
28 cfsetispeed (tios, BAUDRATE), \ 26 cfsetispeed (tios, BAUDRATE), \
29 tcsetattr (fd, TCSANOW, tios) 27 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 28
56/* use the fastest baud-rate */ 29/* use the fastest baud-rate */
57#ifdef B38400 30#ifdef B38400
58# define BAUDRATE B38400 31# define BAUDRATE B38400
59#else 32#else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines