Remove {GET,SET}_TERMIOS macros.
authorayin <ayin>
Fri, 21 Dec 2007 16:21:06 +0000 (16:21 +0000)
committerayin <ayin>
Fri, 21 Dec 2007 16:21:06 +0000 (16:21 +0000)
src/init.C
src/init.h

index e4bce8d4eed6462cf5920752d93f684441931fcf..e280a6c86d39f7ff1280663ff108064998298910 100644 (file)
@@ -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 */
index 413d98a509a41af11e6235f749e8de22b24a4a8d..a90dbd20f5d9f9921ac3ca1df3cef25c4196ef5d 100644 (file)
@@ -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