mbrtowc: Refactor locale charset dispatching.
commit3df90147719110350d9a674cc37e99cbd27a9c3e
authorBruno Haible <bruno@clisp.org>
Fri, 3 Jan 2020 21:34:07 +0000 (3 22:34 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 3 Jan 2020 21:55:26 +0000 (3 22:55 +0100)
treeeeda393f14a00e7301e0ebece02547af2737cc6c
parent190f337b7d997625682666ce7964a8c38b88ae83
mbrtowc: Refactor locale charset dispatching.

* lib/lc-charset-dispatch.h: New file, extracted from lib/mbrtowc.c.
* lib/lc-charset-dispatch.c: New file, extracted from lib/mbrtowc.c.
* lib/mbrtowc.c: Include lc-charset-dispatch.h. Don't include
localcharset.h, streq.h.
(enc_t): Remove type.
(locale_enc): Remove function.
(cached_locale_enc): Remove variable.
(locale_enc_cached): Remove function.
(mbrtowc): Invoke locale_encoding_classification.
* m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Update comment.
* modules/mbrtowc (Files): Add lc-charset-dispatch.h,
lc-charset-dispatch.c.
(configure.ac): Arrange to compile lc-charset-dispatch.c.
ChangeLog
lib/lc-charset-dispatch.c [new file with mode: 0644]
lib/lc-charset-dispatch.h [new file with mode: 0644]
lib/mbrtowc.c
m4/mbrtowc.m4
modules/mbrtowc