From: ayin Date: Fri, 21 Dec 2007 16:21:06 +0000 (+0000) Subject: Remove {GET,SET}_TERMIOS macros. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=db097ee211bcfc20197e16c723b08574e5aad921;p=dana%2Furxvt.git Remove {GET,SET}_TERMIOS macros. --- diff --git a/src/init.C b/src/init.C index e4bce8d4..e280a6c8 100644 --- a/src/init.C +++ b/src/init.C @@ -1148,7 +1148,7 @@ rxvt_get_ttymode (ttymode_t *tio, int erase) /* * standard System V termios interface */ - if (GET_TERMIOS (STDIN_FILENO, tio) < 0) + if (tcgetattr (STDIN_FILENO, tio) < 0) { // return error - use system defaults, // where possible, and zero elsewhere @@ -1341,7 +1341,10 @@ rxvt_term::run_command (const char *const *argv) er = -1; rxvt_get_ttymode (&tio, er); - SET_TERMIOS (pty->tty, &tio); /* init terminal attributes */ + /* init terminal attributes */ + cfsetospeed (&tio, BAUDRATE); + cfsetispeed (&tio, BAUDRATE); + tcsetattr (pty->tty, TCSANOW, &tio); pty->set_utf8_mode (enc_utf8); /* set initial window size */ diff --git a/src/init.h b/src/init.h index 413d98a5..a90dbd20 100644 --- a/src/init.h +++ b/src/init.h @@ -4,15 +4,6 @@ #undef CERASE /* TODO */ #define CERASE '\010' /* ^H */ -/* ways to deal with getting/setting termios structure */ - -/* termios interface */ -#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 # define BAUDRATE B38400