Changeset 985:f6acd0400f18 for charset.h
Legend:
- Unmodified
- Added
- Removed
-
charset.h
r835 r985 54 54 CHARSET; 55 55 56 /* this one could be made a bit smaller with two levels 57 * of nested unions and structs. It's not worth the effort. 58 */ 56 #define DECODER_BUFFSIZE 4096 57 58 struct decoder_buff 59 { 60 size_t size, used; 61 char buff[DECODER_BUFFSIZE]; 62 }; 59 63 60 64 typedef struct decoder 61 65 { 62 STATE *s; 63 short is_utf8; 64 CHARSET_MAP *map; 66 short src_is_utf8; 67 short just_take_id; 68 short forced; 69 70 /* used for utf-8 decoding */ 65 71 CHARSET *chs; 66 struct utf8_state *sfu;67 }68 DECODER;69 72 73 /* used for 8-bit to 8-bit recoding */ 74 CHARSET_MAP *chm; 75 76 /* the buffers */ 77 struct decoder_buff in; 78 struct decoder_buff out; 79 } 80 DECODER; 81 82 DECODER *mutt_open_decoder (const char *, const char *); 83 void mutt_decoder_push (DECODER *, void *, size_t, size_t *); 84 void mutt_decoder_pop (DECODER *, void *, size_t, size_t *); 85 void mutt_decoder_pop_to_state (DECODER *, STATE *); 86 void mutt_free_decoder (DECODER **); 70 87 71 88 CHARSET *mutt_get_charset(const char *); 72 89 CHARSET_MAP *mutt_get_translation(const char *, const char *); 73 DECODER *mutt_open_decoder (STATE *, BODY *, int);74 90 int mutt_display_string(char *, CHARSET_MAP *); 75 91 int mutt_is_utf8(const char *); 76 92 int mutt_recode_file (const char *, const char *, const char *); 77 93 unsigned char mutt_display_char(unsigned char, CHARSET_MAP *); 78 void mutt_close_decoder (DECODER **);79 94 void mutt_decode_utf8_string(char *, CHARSET *); 80 void mutt_decoder_putc (DECODER *, char);81 95 82 96 #endif
