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

Diff for /src/usr.bin/tmux/utf8.c between version 1.62 and 1.63

version 1.62, 2023/07/03 08:37:14 version 1.63, 2023/09/01 14:29:11
Line 136 
Line 136 
                 goto fail;                  goto fail;
         if (ud->size <= 3) {          if (ud->size <= 3) {
                 index = (((utf8_char)ud->data[2] << 16)|                  index = (((utf8_char)ud->data[2] << 16)|
                           ((utf8_char)ud->data[1] << 8)|                            ((utf8_char)ud->data[1] << 8)|
                           ((utf8_char)ud->data[0]));                            ((utf8_char)ud->data[0]));
         } else if (utf8_put_item(ud->data, ud->size, &index) != 0)          } else if (utf8_put_item(ud->data, ud->size, &index) != 0)
                 goto fail;                  goto fail;
         *uc = UTF8_SET_SIZE(ud->size)|UTF8_SET_WIDTH(ud->width)|index;          *uc = UTF8_SET_SIZE(ud->size)|UTF8_SET_WIDTH(ud->width)|index;
Line 226 
Line 226 
         case 0:          case 0:
                 return (UTF8_ERROR);                  return (UTF8_ERROR);
         }          }
         log_debug("UTF-8 %.*s is %08X", (int)ud->size, ud->data, (u_int)wc);          log_debug("UTF-8 %.*s is %05X", (int)ud->size, ud->data, (u_int)wc);
         *width = wcwidth(wc);          *width = wcwidth(wc);
         log_debug("wcwidth(%08X) returned %d", (u_int)wc, *width);          log_debug("wcwidth(%05X) returned %d", (u_int)wc, *width);
         if (*width < 0) {          if (*width < 0) {
                 /*                  /*
                  * C1 control characters are nonprintable, so they are always                   * C1 control characters are nonprintable, so they are always

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63