summaryrefslogtreecommitdiffstats
path: root/charset.h
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-02-02 15:47:44 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-02-02 15:47:44 +0000
commitbe3b539741a3293ea5369c6817b2fbad28628c51 (patch)
tree6f80a6e005d49de6328e9258bb5cd1bb8248eb9b /charset.h
parent7403d5e81d9463c16c7f3ce19009460ef8816353 (diff)
Merging the external character set patch into unstable.
Additionally, this change introduces a M_CHARCONV state flag which gives us some more control about when character set conversions are actually done. Current versions of mutt would happily apply character set conversions when, e.g., saving a text/plain attachment to a file. (We had at least one corrupt russing translation file due to this mis-feature.) Additionally, we clean up some of the character set related code in handler.c. Most of that is now done by the decoder functions in charset.c.
Diffstat (limited to 'charset.h')
-rw-r--r--charset.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/charset.h b/charset.h
index cfb64f0c..08f73a1b 100644
--- a/charset.h
+++ b/charset.h
@@ -53,6 +53,19 @@ typedef struct
}
CHARSET;
+/* this one could be made a bit smaller with two levels
+ * of nested unions and structs. It's not worth the effort.
+ */
+
+typedef struct decoder
+{
+ STATE *s;
+ short is_utf8;
+ CHARSET_MAP *map;
+ CHARSET *chs;
+ struct utf8_state *sfu;
+}
+DECODER;
CHARSET *mutt_get_charset(const char *);
CHARSET_MAP *mutt_get_translation(const char *, const char *);
@@ -64,7 +77,10 @@ int mutt_is_utf8(const char *);
void mutt_decode_utf8_string(char *, CHARSET *);
-void state_fput_utf8(STATE *, char, CHARSET *);
+DECODER *mutt_open_decoder (STATE *, BODY *, int);
+void mutt_close_decoder (DECODER **);
+
+void mutt_decoder_putc (DECODER *, char);
#endif