1 /* vi: set sw=4 ts=4: */
3 * Licensed under the GPL version 2, see the file LICENSE in this tarball.
14 #if !ENABLE_FEATURE_ASSUME_UNICODE
16 # define bb_mbstrlen(string) strlen(string)
17 # define unicode_status UNICODE_OFF
18 # define init_unicode() ((void)0)
22 size_t bb_mbstrlen(const char *string) FAST_FUNC;
24 # if ENABLE_LOCALE_SUPPORT
28 extern uint8_t unicode_status;
29 void init_unicode(void) FAST_FUNC;
33 /* Crude "locale support" which knows only C and Unicode locales */
35 # if !ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
36 # define unicode_status UNICODE_ON
37 # define init_unicode() ((void)0)
39 extern uint8_t unicode_status;
40 void init_unicode(void) FAST_FUNC;
46 /* Prevent name collisions */
47 # define wint_t bb_wint_t
48 # define mbstate_t bb_mbstate_t
49 # define mbstowcs bb_mbstowcs
50 # define wcstombs bb_wcstombs
51 # define wcrtomb bb_wcrtomb
52 # define iswspace bb_iswspace
53 # define iswalnum bb_iswalnum
54 # define iswpunct bb_iswpunct
56 typedef int32_t wint_t;
61 size_t mbstowcs(wchar_t *dest, const char *src, size_t n) FAST_FUNC;
62 size_t wcstombs(char *dest, const wchar_t *src, size_t n) FAST_FUNC;
63 size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps) FAST_FUNC;
64 int iswspace(wint_t wc) FAST_FUNC;
65 int iswalnum(wint_t wc) FAST_FUNC;
66 int iswpunct(wint_t wc) FAST_FUNC;
68 # endif /* !LOCALE_SUPPORT */
70 #endif /* FEATURE_ASSUME_UNICODE */