Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/vis
On Sun, Feb 17, 2013 at 08:58:41PM +0200, Alan Barrett wrote:
> On Thu, 14 Feb 2013, Christos Zoulas wrote:
> >Modified Files:
> > src/usr.bin/vis: vis.c
> >
> >More fixes from J.R. Oldroyd:
>
> >- In the call to strvisx() the count must be 1, not mbilen
> > which can be 2 or 3 etc for a multibyte character. This
> > value is a count of characters - not bytes - to process.
> > It even says characters in the man page. In vis(3) I
> > am interpreting this value to mean multibyte characters.
>
> In general, the caller of str[n]vis[x] knows how many bytes of data
> they have, but they do not know how many multibyte characters that
> might represent. If the man page talks about characters, that's
> because it was written at a time when vis did not attempt to deal
> with multibyte characters. I think that we should revert to the
> original semantics of lengths being measured in bytes, and adjust
> both the man pages and callers appropriately.
concur
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index