--- rxvt-unicode/src/init.h 2003/11/24 17:31:27 1.2 +++ rxvt-unicode/src/init.h 2011/01/11 13:32:33 1.18 @@ -1,80 +1,20 @@ -/* - * $Id: init.h,v 1.2 2003/11/24 17:31:27 pcg Exp $ - */ - -#ifndef _INIT_H_ -#define _INIT_H_ - -#undef CERASE /* TODO */ -#define CERASE '\010' /* ^H */ - -#ifdef HAVE_XSETLOCALE -# define X_LOCALE -# include -#else -# ifdef HAVE_SETLOCALE -# include -# endif -#endif /* HAVE_XLOCALE */ - -#if defined(PTYS_ARE_PTMX) && !defined(__CYGWIN32__) -# include /* for struct rlimit */ -# define _NEW_TTY_CTRL /* to get proper defines in */ -#endif - -#ifdef __QNX__ /* autoconf someday */ -# include -#endif - -#ifdef TTY_GID_SUPPORT -# include -#endif - -/* ways to deal with getting/setting termios structure */ - -#ifdef HAVE_TERMIOS_H -/* termios interface */ -# ifdef TCSANOW /* POSIX */ -# define GET_TERMIOS(fd,tios) tcgetattr (fd, tios) -# define SET_TERMIOS(fd,tios) \ - cfsetospeed (tios, BAUDRATE), \ - cfsetispeed (tios, BAUDRATE), \ - tcsetattr (fd, TCSANOW, tios) -# else -# ifdef TIOCSETA -# define GET_TERMIOS(fd,tios) ioctl (fd, TIOCGETA, tios) -# define SET_TERMIOS(fd,tios) \ - tios->c_cflag |= BAUDRATE, \ - ioctl (fd, TIOCSETA, tios) -# else -# define GET_TERMIOS(fd,tios) ioctl (fd, TCGETS, tios) -# define SET_TERMIOS(fd,tios) \ - tios->c_cflag |= BAUDRATE, \ - ioctl (fd, TCSETS, tios) -# endif -# endif -# define SET_TTYMODE(fd,tios) SET_TERMIOS (fd, tios) -#else -/* sgtty interface */ - -# define SET_TTYMODE(fd,tt) \ - tt->sg.sg_ispeed = tt->sg.sg_ospeed = BAUDRATE, \ - ioctl (fd, TIOCSETP, &(tt->sg)), \ - ioctl (fd, TIOCSETC, &(tt->tc)), \ - ioctl (fd, TIOCSLTC, &(tt->lc)), \ - ioctl (fd, TIOCSETD, &(tt->line)), \ - ioctl (fd, TIOCLSET, &(tt->local)) -#endif /* HAVE_TERMIOS_H */ +#ifndef INIT_H_ +#define INIT_H_ /* use the fastest baud-rate */ -#ifdef B38400 +//#if defined(B4000000) +//# define BAUDRATE B4000000 +//#elif defined(B921600) +//# define BAUDRATE B921600 +//#elif defined(B115200) +//# define BAUDRATE B115200 +//#elif defined(B38400) +#if defined(B38400) # define BAUDRATE B38400 +#elif defined(B19200) +# define BAUDRATE B19200 #else -# ifdef B19200 -# define BAUDRATE B19200 -# else -# define BAUDRATE B9600 -# endif +# define BAUDRATE B9600 #endif /* Disable special character functions */ @@ -146,14 +86,10 @@ #ifndef O_NOCTTY # define O_NOCTTY 0 #endif -#ifndef O_NDELAY -# define O_NDELAY O_NONBLOCK /* QNX, at least */ -#endif #ifndef ONLCR -# define ONLCR 0 /* QNX, at least */ +# define ONLCR 0 #endif #define CONSOLE "/dev/console" /* console device */ -#include "init.intpro" /* PROTOS for internal routines */ -#endif /* _INIT_H_ */ +#endif /* _INIT_H_ */