summaryrefslogtreecommitdiffstats
path: root/charset.h
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-05-09 15:19:26 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-05-09 15:19:26 +0000
commit3de049372c8ca458e096b8c8ece2d4f95da0fe82 (patch)
treebedf3c7648d8815163ff60f0a557a554fdc32545 /charset.h
parentee09e5f42399a6016f3e96dcbd03bab1effa07ff (diff)
Edmund Grimley Evans' UTF-8 patch.
Diffstat (limited to 'charset.h')
-rw-r--r--charset.h58
1 files changed, 16 insertions, 42 deletions
diff --git a/charset.h b/charset.h
index 4943da14..d76da234 100644
--- a/charset.h
+++ b/charset.h
@@ -19,35 +19,7 @@
#ifndef _CHARSET_H
#define _CHARSET_H
-typedef int CHARSET_MAP[256];
-
-typedef struct descr
-{
- char *symbol;
- int repr;
-}
-CHARDESC;
-
-typedef struct
-{
- char *charset;
- char escape_char;
- char comment_char;
- short multbyte;
- LIST *aliases;
-}
-CHARMAP;
-
-typedef struct
-{
- size_t n_symb;
- size_t u_symb;
-
- short multbyte;
- HASH *symb_to_repr;
- CHARDESC **description;
-}
-CHARSET;
+#include <iconv.h>
#define DECODER_BUFFSIZE 4096
@@ -59,16 +31,14 @@ struct decoder_buff
typedef struct decoder
{
- short src_is_utf8;
+ /*short src_is_utf8;*/
short just_take_id;
short forced;
-
- /* used for utf-8 decoding */
- CHARSET *chs;
+ char *outrepl;
+
+ /* conversion descriptor */
+ iconv_t cd;
- /* used for 8-bit to 8-bit recoding */
- CHARSET_MAP *chm;
-
/* the buffers */
struct decoder_buff in;
struct decoder_buff out;
@@ -83,12 +53,16 @@ void mutt_decoder_pop_to_state (DECODER *, STATE *);
void mutt_free_decoder (DECODER **);
int mutt_decoder_push_one (DECODER *, char);
-CHARSET *mutt_get_charset(const char *);
-CHARSET_MAP *mutt_get_translation(const char *, const char *);
-int mutt_display_string(char *, CHARSET_MAP *);
-int mutt_is_utf8(const char *);
int mutt_recode_file (const char *, const char *, const char *);
-unsigned char mutt_display_char(unsigned char, CHARSET_MAP *);
-void mutt_decode_utf8_string(char *, CHARSET *);
+
+int mutt_convert_string (char *, size_t, const char *, const char *);
+
+size_t mutt_iconv (iconv_t, const char **, size_t *, char **, size_t *, const char **, const char *);
+
+typedef void * FGETCONV;
+
+FGETCONV *fgetconv_open (FILE *, const char *, const char *);
+int fgetconv (FGETCONV *);
+void fgetconv_close (FGETCONV *);
#endif /* _CHARSET_H */