[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.233 and 1.234

version 1.233, 2017/02/08 08:50:10 version 1.234, 2017/02/08 08:54:45
Line 439 
Line 439 
 void  void
 tty_puts(struct tty *tty, const char *s)  tty_puts(struct tty *tty, const char *s)
 {  {
           size_t  size = EVBUFFER_LENGTH(tty->event->output);
   
         if (*s == '\0')          if (*s == '\0')
                 return;                  return;
   
         bufferevent_write(tty->event, s, strlen(s));          bufferevent_write(tty->event, s, strlen(s));
           log_debug("%s (%zu): %s", tty->path, size, s);
   
         if (tty_log_fd != -1)          if (tty_log_fd != -1)
                 write(tty_log_fd, s, strlen(s));                  write(tty_log_fd, s, strlen(s));
         log_debug("%s: %s", tty->path, s);  
 }  }
   
 void  void
 tty_putc(struct tty *tty, u_char ch)  tty_putc(struct tty *tty, u_char ch)
 {  {
           size_t           size = EVBUFFER_LENGTH(tty->event->output);
         const char      *acs;          const char      *acs;
   
         if (tty->cell.attr & GRID_ATTR_CHARSET) {          if (tty->cell.attr & GRID_ATTR_CHARSET) {
                 acs = tty_acs_get(tty, ch);                  acs = tty_acs_get(tty, ch);
                 if (acs != NULL) {                  if (acs != NULL) {
                         bufferevent_write(tty->event, acs, strlen(acs));                          bufferevent_write(tty->event, acs, strlen(acs));
                         log_debug("%s: %s", tty->path, acs);                          log_debug("%s (%zu): %s", tty->path, size, acs);
                 } else {                  } else {
                         bufferevent_write(tty->event, &ch, 1);                          bufferevent_write(tty->event, &ch, 1);
                         log_debug("%s: %c", tty->path, ch);                          log_debug("%s (%zu): %c", tty->path, size, ch);
                 }                  }
         } else {          } else {
                 bufferevent_write(tty->event, &ch, 1);                  bufferevent_write(tty->event, &ch, 1);
                 log_debug("%s: %c", tty->path, ch);                  log_debug("%s (%zu): %c", tty->path, size, ch);
         }          }
   
         if (ch >= 0x20 && ch != 0x7f) {          if (ch >= 0x20 && ch != 0x7f) {
Line 491 
Line 495 
 void  void
 tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)  tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)
 {  {
           size_t  size = EVBUFFER_LENGTH(tty->event->output);
   
         bufferevent_write(tty->event, buf, len);          bufferevent_write(tty->event, buf, len);
           log_debug("%s (%zu): %.*s", tty->path, size, (int)len, (char *)buf);
   
         if (tty_log_fd != -1)          if (tty_log_fd != -1)
                 write(tty_log_fd, buf, len);                  write(tty_log_fd, buf, len);
         log_debug("%s: %.*s", tty->path, (int)len, (char *)buf);  
   
         tty->cx += width;          tty->cx += width;
 }  }

Legend:
Removed from v.1.233  
changed lines
  Added in v.1.234