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

Diff for /src/usr.bin/tmux/tty-keys.c between version 1.77 and 1.78

version 1.77, 2015/11/12 22:04:37 version 1.78, 2015/11/14 10:56:31
Line 472 
Line 472 
         const char              *buf;          const char              *buf;
         size_t                   len, size;          size_t                   len, size;
         cc_t                     bspace;          cc_t                     bspace;
         int                      delay, expired = 0;          int                      delay, expired = 0, more;
         key_code                 key;          key_code                 key;
         struct utf8_data         ud;          struct utf8_data         ud;
         u_int                    i;          u_int                    i;
Line 547 
Line 547 
                         goto partial_key;                          goto partial_key;
                 }                  }
                 for (i = 1; i < size; i++)                  for (i = 1; i < size; i++)
                         utf8_append(&ud, (u_char)buf[i]);                          more = utf8_append(&ud, (u_char)buf[i]);
                   if (more != 0)
                           goto discard_key;
                 key = utf8_combine(&ud);                  key = utf8_combine(&ud);
                 log_debug("UTF-8 key %.*s %#llx", (int)size, buf, key);                  log_debug("UTF-8 key %.*s %#llx", (int)size, buf, key);
                 goto complete_key;                  goto complete_key;
Line 653 
Line 655 
         struct utf8_data         ud;          struct utf8_data         ud;
         u_int                    i, value, x, y, b, sgr_b;          u_int                    i, value, x, y, b, sgr_b;
         u_char                   sgr_type, c;          u_char                   sgr_type, c;
           int                      more;
   
         /*          /*
          * Standard mouse sequences are \033[M followed by three characters           * Standard mouse sequences are \033[M followed by three characters
Line 699 
Line 702 
                                         (*size)++;                                          (*size)++;
                                         if (len <= *size)                                          if (len <= *size)
                                                 return (1);                                                  return (1);
                                         utf8_append(&ud, buf[*size]);                                          more = utf8_append(&ud, buf[*size]);
                                           if (more != 0)
                                                   return (-1);
                                         value = utf8_combine(&ud);                                          value = utf8_combine(&ud);
                                 } else                                  } else
                                         value = (u_char)buf[*size];                                          value = (u_char)buf[*size];

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78