CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2019/02/23 21:54:36

Modified files:
        usr.bin/less   : line.c 

Log message:
To measure the display width of a wide character in pwidth(), use
the standard function wcwidth(3) instead of several hand-rolled
functions accessing outdated local character tables, making this
part of the code conform to our in-tree Unicode 10.

Of course, with the current hand-rolled (and buggy) UTF-8 parser
contained in less(1), this only works if wchar_t stores UCS-4 values
and is more than 31 bits wide, but both will always be true on
OpenBSD, and ultmately, we shall switch to mbtowc(3) for parsing
anyway, lifting these restrictuons.

The existence of the outdated character tables was originally
called out by Evan Silberman on bugs@.

OK stsp@

Reply via email to