Changeset 1716:e537695cd77b for charset.h
Legend:
- Unmodified
- Added
- Removed
-
charset.h
r1625 r1716 20 20 #define _CHARSET_H 21 21 22 typedef int CHARSET_MAP[256]; 23 24 typedef struct descr 25 { 26 char *symbol; 27 int repr; 28 } 29 CHARDESC; 30 31 typedef struct 32 { 33 char *charset; 34 char escape_char; 35 char comment_char; 36 short multbyte; 37 LIST *aliases; 38 } 39 CHARMAP; 40 41 typedef struct 42 { 43 size_t n_symb; 44 size_t u_symb; 45 46 short multbyte; 47 HASH *symb_to_repr; 48 CHARDESC **description; 49 } 50 CHARSET; 22 #include <iconv.h> 51 23 52 24 #define DECODER_BUFFSIZE 4096 … … 60 32 typedef struct decoder 61 33 { 62 short src_is_utf8;34 /*short src_is_utf8;*/ 63 35 short just_take_id; 64 36 short forced; 65 66 /* used for utf-8 decoding */ 67 CHARSET *chs; 37 char *outrepl; 68 38 69 /* used for 8-bit to 8-bit recoding*/70 CHARSET_MAP *chm;71 39 /* conversion descriptor */ 40 iconv_t cd; 41 72 42 /* the buffers */ 73 43 struct decoder_buff in; … … 84 54 int mutt_decoder_push_one (DECODER *, char); 85 55 86 CHARSET *mutt_get_charset(const char *);87 CHARSET_MAP *mutt_get_translation(const char *, const char *);88 int mutt_display_string(char *, CHARSET_MAP *);89 int mutt_is_utf8(const char *);90 56 int mutt_recode_file (const char *, const char *, const char *); 91 unsigned char mutt_display_char(unsigned char, CHARSET_MAP *); 92 void mutt_decode_utf8_string(char *, CHARSET *); 57 58 int mutt_convert_string (char *, size_t, const char *, const char *); 59 60 size_t mutt_iconv (iconv_t, const char **, size_t *, char **, size_t *, const char **, const char *); 61 62 typedef void * FGETCONV; 63 64 FGETCONV *fgetconv_open (FILE *, const char *, const char *); 65 int fgetconv (FGETCONV *); 66 void fgetconv_close (FGETCONV *); 93 67 94 68 #endif /* _CHARSET_H */
