mbyte.h 1.06 KB
Newer Older
1 2
#ifndef _MBYTE_H
# define _MBYTE_H
3

4 5 6 7 8 9 10 11
# ifdef HAVE_WC_FUNCS
#  ifdef HAVE_WCHAR_H
#   include <wchar.h>
#  endif
#  ifdef HAVE_WCTYPE_H
#   include <wctype.h>
#  endif
# endif
12

13
# ifndef HAVE_WC_FUNCS
14
#ifdef towupper
15
# undef towupper
16 17
#endif
#ifdef towlower
18
# undef towlower
19
#endif
20
#ifdef iswprint
21
# undef iswprint
22 23
#endif
#ifdef iswspace
24
# undef iswspace
25 26
#endif
#ifdef iswalnum
27
# undef iswalnum
28 29
#endif
#ifdef iswalpha
30
# undef iswalpha
31 32
#endif
#ifdef iswupper
33
# undef iswupper
34
#endif
35 36 37 38 39 40 41 42 43 44 45 46
size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
int iswprint (wint_t wc);
int iswspace (wint_t wc);
int iswalnum (wint_t wc);
int iswalpha (wint_t wc);
int iswupper (wint_t wc);
wint_t towupper (wint_t wc);
wint_t towlower (wint_t wc);
int wcwidth (wchar_t wc);
# endif /* !HAVE_WC_FUNCS */

47

48
void mutt_set_charset (char *charset);
49
extern int Charset_is_utf8;
50 51 52
size_t utf8rtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *_ps);
wchar_t replacement_char (void);
int is_display_corrupting_utf8 (wchar_t wc);
53

54
#endif /* _MBYTE_H */