[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty.c between version 1.149 and 1.150

version 1.149, 2013/03/21 18:44:47 version 1.150, 2013/03/22 10:29:31
Line 267 
Line 267 
         if (tcsetattr(tty->fd, TCSANOW, &tty->tio) == -1)          if (tcsetattr(tty->fd, TCSANOW, &tty->tio) == -1)
                 return;                  return;
   
         setblocking(tty->fd, 1);  
   
         tty_raw(tty, tty_term_string2(tty->term, TTYC_CSR, 0, ws.ws_row - 1));          tty_raw(tty, tty_term_string2(tty->term, TTYC_CSR, 0, ws.ws_row - 1));
         if (tty_use_acs(tty))          if (tty_use_acs(tty))
                 tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));                  tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));
Line 288 
Line 286 
                 tty_raw(tty, "\033[?1000l");                  tty_raw(tty, "\033[?1000l");
   
         tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));          tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));
   
           setblocking(tty->fd, 1);
 }  }
   
 void  void
Line 332 
Line 332 
 void  void
 tty_raw(struct tty *tty, const char *s)  tty_raw(struct tty *tty, const char *s)
 {  {
         write(tty->fd, s, strlen(s));          ssize_t n, slen;
           u_int   i;
   
           slen = strlen(s);
           for (i = 0; i < 5; i++) {
                   n = write(tty->fd, s, slen);
                   if (n >= 0) {
                           s += n;
                           slen -= n;
                           if (slen == 0)
                                   break;
                   } else if (n == -1 && errno != EAGAIN)
                           break;
                   usleep(100);
           }
 }  }
   
 void  void

Legend:
Removed from v.1.149  
changed lines
  Added in v.1.150