1 /* vi: set sw=4 ts=4: */
3 * Licensed under the GPL version 2, see the file LICENSE in this tarball.
8 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
16 #if !ENABLE_FEATURE_ASSUME_UNICODE
18 # define unicode_strlen(string) strlen(string)
19 # define unicode_status UNICODE_OFF
20 # define init_unicode() ((void)0)
24 size_t FAST_FUNC unicode_strlen(const char *string);
26 UNI_FLAG_PAD = (1 << 0),
28 //UNUSED: unsigned FAST_FUNC unicode_padding_to_width(unsigned width, const char *src);
29 //UNUSED: char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char *src, unsigned width, int flags);
30 char* FAST_FUNC unicode_conv_to_printable(uni_stat_t *stats, const char *src);
31 char* FAST_FUNC unicode_conv_to_printable_maxwidth(uni_stat_t *stats, const char *src, unsigned maxwidth);
32 char* FAST_FUNC unicode_conv_to_printable_fixedwidth(uni_stat_t *stats, const char *src, unsigned width);
34 # if ENABLE_LOCALE_SUPPORT
38 extern uint8_t unicode_status;
39 void init_unicode(void) FAST_FUNC;
43 /* Homegrown Unicode support. It knows only C and Unicode locales. */
45 # if !ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
46 # define unicode_status UNICODE_ON
47 # define init_unicode() ((void)0)
49 extern uint8_t unicode_status;
50 void init_unicode(void) FAST_FUNC;
56 /* Prevent name collisions */
57 # define wint_t bb_wint_t
58 # define mbstate_t bb_mbstate_t
59 # define mbstowcs bb_mbstowcs
60 # define wcstombs bb_wcstombs
61 # define wcrtomb bb_wcrtomb
62 # define iswspace bb_iswspace
63 # define iswalnum bb_iswalnum
64 # define iswpunct bb_iswpunct
65 # define wcwidth bb_wcwidth
67 typedef int32_t wint_t;
72 size_t mbstowcs(wchar_t *dest, const char *src, size_t n) FAST_FUNC;
73 size_t wcstombs(char *dest, const wchar_t *src, size_t n) FAST_FUNC;
74 size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps) FAST_FUNC;
75 int iswspace(wint_t wc) FAST_FUNC;
76 int iswalnum(wint_t wc) FAST_FUNC;
77 int iswpunct(wint_t wc) FAST_FUNC;
80 # endif /* !LOCALE_SUPPORT */
82 #endif /* FEATURE_ASSUME_UNICODE */
84 POP_SAVED_FUNCTION_VISIBILITY