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.6 by pcg, Sat Mar 6 00:05:01 2004 UTC vs.
Revision 1.9 by root, Tue Jan 17 11:02:10 2006 UTC

16#if defined(PTYS_ARE_PTMX) && !defined(__CYGWIN32__) 16#if defined(PTYS_ARE_PTMX) && !defined(__CYGWIN32__)
17# include <sys/resource.h> /* for struct rlimit */ 17# include <sys/resource.h> /* for struct rlimit */
18# define _NEW_TTY_CTRL /* to get proper defines in <termios.h> */ 18# define _NEW_TTY_CTRL /* to get proper defines in <termios.h> */
19#endif 19#endif
20 20
21#ifdef __QNX__ /* autoconf someday */
22# include <process.h>
23#endif
24
25#ifdef TTY_GID_SUPPORT 21#ifdef TTY_GID_SUPPORT
26# include <grp.h> 22# include <grp.h>
27#endif 23#endif
28 24
29/* ways to deal with getting/setting termios structure */ 25/* ways to deal with getting/setting termios structure */
31#ifdef HAVE_TERMIOS_H 27#ifdef HAVE_TERMIOS_H
32/* termios interface */ 28/* termios interface */
33# ifdef TCSANOW /* POSIX */ 29# ifdef TCSANOW /* POSIX */
34# define GET_TERMIOS(fd,tios) tcgetattr (fd, tios) 30# define GET_TERMIOS(fd,tios) tcgetattr (fd, tios)
35# define SET_TERMIOS(fd,tios) \ 31# define SET_TERMIOS(fd,tios) \
36 cfsetospeed (tios, BAUDRATE), \ 32 cfsetospeed (tios, BAUDRATE), \
37 cfsetispeed (tios, BAUDRATE), \ 33 cfsetispeed (tios, BAUDRATE), \
38 tcsetattr (fd, TCSANOW, tios) 34 tcsetattr (fd, TCSANOW, tios)
39# else 35# else
40# ifdef TIOCSETA 36# ifdef TIOCSETA
41# define GET_TERMIOS(fd,tios) ioctl (fd, TIOCGETA, tios) 37# define GET_TERMIOS(fd,tios) ioctl (fd, TIOCGETA, tios)
42# define SET_TERMIOS(fd,tios) \ 38# define SET_TERMIOS(fd,tios) \
43 tios->c_cflag |= BAUDRATE, \ 39 tios->c_cflag |= BAUDRATE, \
44 ioctl (fd, TIOCSETA, tios) 40 ioctl (fd, TIOCSETA, tios)
45# else 41# else
46# define GET_TERMIOS(fd,tios) ioctl (fd, TCGETS, tios) 42# define GET_TERMIOS(fd,tios) ioctl (fd, TCGETS, tios)
47# define SET_TERMIOS(fd,tios) \ 43# define SET_TERMIOS(fd,tios) \
48 tios->c_cflag |= BAUDRATE, \ 44 tios->c_cflag |= BAUDRATE, \
49 ioctl (fd, TCSETS, tios) 45 ioctl (fd, TCSETS, tios)
50# endif 46# endif
51# endif 47# endif
52# define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios) 48# define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios)
53#else 49#else
54/* sgtty interface */ 50/* sgtty interface */
55 51
56# define SET_TTYMODE(fd,tt) \ 52# define SET_TTYMODE(fd,tt) \
57 tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \ 53 tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \
58 ioctl (fd, TIOCSETP, & (tt->sg)), \ 54 ioctl (fd, TIOCSETP, & (tt->sg)), \
59 ioctl (fd, TIOCSETC, & (tt->tc)), \ 55 ioctl (fd, TIOCSETC, & (tt->tc)), \
60 ioctl (fd, TIOCSLTC, & (tt->lc)), \ 56 ioctl (fd, TIOCSLTC, & (tt->lc)), \
61 ioctl (fd, TIOCSETD, & (tt->line)), \ 57 ioctl (fd, TIOCSETD, & (tt->line)), \
62 ioctl (fd, TIOCLSET, & (tt->local)) 58 ioctl (fd, TIOCLSET, & (tt->local))
63#endif /* HAVE_TERMIOS_H */ 59#endif /* HAVE_TERMIOS_H */
64 60
65/* use the fastest baud-rate */ 61/* use the fastest baud-rate */
66#ifdef B38400 62#ifdef B38400
67# define BAUDRATE B38400 63# define BAUDRATE B38400
141 137
142#ifndef O_NOCTTY 138#ifndef O_NOCTTY
143# define O_NOCTTY 0 139# define O_NOCTTY 0
144#endif 140#endif
145#ifndef ONLCR 141#ifndef ONLCR
146# define ONLCR 0 /* QNX, at least */ 142# define ONLCR 0
147#endif 143#endif
148 144
149#define CONSOLE "/dev/console" /* console device */ 145#define CONSOLE "/dev/console" /* console device */
150 146
151#include "init.intpro" /* PROTOS for internal routines */
152#endif /* _INIT_H_ */ 147#endif /* _INIT_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines