Thorsten Glaser dixit:
>Modified files:
> lib/libc/i18n : wcsrtombs.c
>
>Log message:
>* rewrite from scratch (different algo, found in the restroom ;)
> to fix regression test errors, is now fully restarting, properly
>* heavily optimise (even shrinks code size)
This (wcsrtombs(3), but also wcrtomb(3) - the other two will
follow) also reduces the amount of 'goto' in the code (there
still are some, but bear with me, they're more efficient and
make the code easier to read) by removing and remove some of
the special handling for the 'C' locale, making it, effecti-
vely, a subset of the 'UTF-8' locale (as done in the towTYPE
and iswTYPE functions earlier when I wrote my implementation
from scratch).
Also, these functions are now less heavy on the stack, redu-
ced number of local variables, except for access to the 'ps'
argument (mbstate_t) where I used local variables for speed,
because accessing a 16-bit bit field split into 12:4 bits is
not the fastest operation...
wcrtomb(3) now also returns the correct number of bytes (had
an off-by-one).
//mirabile
--
> emacs als auch vi zum Kotzen finde (joe rules) und pine für den einzig
> bedienbaren textmode-mailclient halte (und ich hab sie alle ausprobiert). ;)
Hallooooo, ich bin der Holger ("Hallo Holger!"), und ich bin ebenfalls
... pine-User, und das auch noch gewohnheitsmäßig ("Oooooooohhh"). [aus dasr]
|