[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.59 and 1.60

version 1.59, 2022/12/16 08:19:58 version 1.60, 2023/01/08 22:15:30
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);
         *width = wcwidth(wc);          *width = wcwidth(wc);
         log_debug("UTF-8 %.*s %#x, wcwidth() %d", (int)ud->size, ud->data,          log_debug("wcwidth(%08X) returned %d", (u_int)wc, *width);
             (u_int)wc, *width);          if (*width < 0) {
                   /*
                    * C1 control characters are nonprintable, so they are always
                    * zero width.
                    */
                   *width = (wc >= 0x80 && wc <= 0x9f) ? 0 : 1;
           }
         if (*width >= 0 && *width <= 0xff)          if (*width >= 0 && *width <= 0xff)
                 return (UTF8_DONE);                  return (UTF8_DONE);
         return (UTF8_ERROR);          return (UTF8_ERROR);

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60