implement mbtowc directly, not as a wrapper for mbrtowc
authorRich Felker <dalias@aerifal.cx>
Tue, 9 Apr 2013 03:01:32 +0000 (23:01 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 9 Apr 2013 03:01:32 +0000 (23:01 -0400)
commitea34b1b90ca5ba3b87725662f6a1ff03b7a88a1f
treef9289a7c3a981755b54860555a65a6afde26ba72
parenta49e038bab7b3927b6a9c7d0c52f9e1a9cb82629
implement mbtowc directly, not as a wrapper for mbrtowc

the interface contract for mbtowc admits a much faster implementation
than mbrtowc can achieve; wrapping mbrtowc with an extra call frame
only made the situation worse.

since the regex implementation uses mbtowc already, this change should
improve regex performance too. it may be possible to improve
performance in other places internally by switching from mbrtowc to
mbtowc.
src/multibyte/mbtowc.c