[PATCH] ls: clean up memory leak
Rob Landley
rob at landley.net
Tue May 2 19:53:02 UTC 2006
On Monday 01 May 2006 8:28 pm, Rich Felker wrote:
> > B) ICK. This is the sort of thing platform.h is for, although not having
> > seen the patch I don't know what what exactly would be required. Some
> > kind of utf8_strlen() macro seems called for, though...
>
> Please be aware that the needed number is the WIDTH, not the string
> length in characters... wcwidth/wcswidth is needed or else you might
> as well just use strlen since it will be wrong anyway. :)
I know. Which is why a naieve switch of bb_strlen() for a utf-8 aware version
isn't appropriate. However, neither is having #ifdefs for each usage, nor is
requiring internationalization support in our C library for the common
case...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list