From eb2748233e12853881bc324489781d03b08fbae1 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 20 Jan 2007 00:51:31 +0000 Subject: [PATCH] remove non-POSIX termios support --- Changes | 1 + src/init.C | 2 +- src/init.h | 25 +++++-------------------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index 68ac3ba8..052d22d3 100644 --- a/Changes +++ b/Changes @@ -42,6 +42,7 @@ TODO: fix rounding of colors when !xft (#aaaaaa => #a9a900) (do not use correct, set so its value does not get lost (reported and analysed by Andrei Paskevich). - rip out support for obsolete sgtty.h interface. + - rip out support for non-POSIX termios variants. 8.1 Thu Dec 7 22:27:25 CET 2006 - ケリスマスプレゼント - zomg!!1, it's too early!!! diff --git a/src/init.C b/src/init.C index f65d14a3..7d1bbbcc 100644 --- a/src/init.C +++ b/src/init.C @@ -1280,7 +1280,7 @@ rxvt_term::run_command (const char *const *argv) rxvt_get_ttymode (&tio, er); pty->set_utf8_mode (enc_utf8); - SET_TTYMODE (pty->tty, &tio); /* init terminal attributes */ + SET_TERMIOS (pty->tty, &tio); /* init terminal attributes */ /* set initial window size */ tt_winch (); diff --git a/src/init.h b/src/init.h index 745d853e..474c36eb 100644 --- a/src/init.h +++ b/src/init.h @@ -20,26 +20,11 @@ /* ways to deal with getting/setting termios structure */ /* 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) +#define GET_TERMIOS(fd,tios) tcgetattr (fd, tios) +#define SET_TERMIOS(fd,tios) \ + cfsetospeed (tios, BAUDRATE), \ + cfsetispeed (tios, BAUDRATE), \ + tcsetattr (fd, TCSANOW, tios) /* use the fastest baud-rate */ #ifdef B38400 -- 2.34.1