2 * Copyright notice from original mutt:
3 * Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
5 * This file is part of mutt-ng, see http://www.muttng.org/.
6 * It's licensed under the GNU General Public License,
7 * please see the file GPL in the top level source directory.
22 extern int Charset_is_utf8;
24 #ifndef HAVE_ICONV_T_DEF
25 typedef void *iconv_t;
29 # define iconv_open(a, b) ((iconv_t)(-1))
30 # define my_iconv(a,b,c,d,e) 0
31 # define iconv_close(a) 0
33 static inline ssize_t my_iconv(iconv_t ict, const char **inbuf, ssize_t *ilen,
34 char **outbuf, ssize_t *olen)
36 return iconv(ict, (char **)inbuf, (size_t*)ilen, outbuf, (size_t*)olen);
40 int mutt_convert_string (char **, const char *, const char *, int);
41 const char *mutt_get_first_charset (const char *);
42 int mutt_convert_nonmime_string (char **);
44 iconv_t mutt_iconv_open (const char *, const char *, int);
45 ssize_t mutt_iconv (iconv_t, const char **, ssize_t *, char **, ssize_t *,
46 const char **, const char *);
48 typedef void *FGETCONV;
50 FGETCONV *fgetconv_open (FILE *, const char *, const char *, int);
51 int fgetconv (FGETCONV *);
52 char *fgetconvs (char *, ssize_t, FGETCONV *);
53 void fgetconv_close (FGETCONV **);
55 void mutt_set_langinfo_charset (void);
57 #define M_ICONV_HOOK_FROM 1
58 #define M_ICONV_HOOK_TO 2
60 void mutt_set_charset(char *charset);
61 wchar_t replacement_char(void);
63 #endif /* _CHARSET_H */