[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.19 and 1.20

version 1.19, 2009/08/08 13:29:27 version 1.20, 2009/08/11 19:32:25
Line 149 
Line 149 
         tty->rupper = UINT_MAX;          tty->rupper = UINT_MAX;
   
         tty->mode = MODE_CURSOR;          tty->mode = MODE_CURSOR;
   
           tty->flags |= TTY_STARTED;
 }  }
   
 void  void
Line 156 
Line 158 
 {  {
         struct winsize  ws;          struct winsize  ws;
   
           if (!(tty->flags & TTY_STARTED))
                   return;
           tty->flags &= ~TTY_STARTED;
   
         /*          /*
          * Be flexible about error handling and try not kill the server just           * Be flexible about error handling and try not kill the server just
          * because the fd is invalid. Things like ssh -t can easily leave us           * because the fd is invalid. Things like ssh -t can easily leave us
Line 281 
Line 287 
 }  }
   
 void  void
 tty_close(struct tty *tty, int no_stop)  tty_close(struct tty *tty)
 {  {
         if (tty->fd == -1)          if (tty->fd == -1)
                 return;                  return;
Line 291 
Line 297 
                 tty->log_fd = -1;                  tty->log_fd = -1;
         }          }
   
         if (!no_stop)          tty_stop_tty(tty);
                 tty_stop_tty(tty);  
   
         tty_term_free(tty->term);          tty_term_free(tty->term);
         tty_keys_free(tty);          tty_keys_free(tty);
Line 305 
Line 310 
 }  }
   
 void  void
 tty_free(struct tty *tty, int no_stop)  tty_free(struct tty *tty)
 {  {
         tty_close(tty, no_stop);          tty_close(tty);
   
         if (tty->path != NULL)          if (tty->path != NULL)
                 xfree(tty->path);                  xfree(tty->path);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20