Changeset 827:08dd55cf4de1 for charset.h

Show
Ignore:
Timestamp:
1999-02-02 07:47:44 (10 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • charset.h

    r703 r827  
    5454CHARSET; 
    5555 
     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 */ 
     59 
     60typedef struct decoder 
     61{ 
     62  STATE *s; 
     63  short is_utf8; 
     64  CHARSET_MAP *map; 
     65  CHARSET *chs; 
     66  struct utf8_state *sfu; 
     67} 
     68DECODER;     
    5669 
    5770CHARSET *mutt_get_charset(const char *); 
     
    6578void mutt_decode_utf8_string(char *, CHARSET *); 
    6679 
    67 void state_fput_utf8(STATE *, char, CHARSET *); 
     80DECODER *mutt_open_decoder (STATE *, BODY *, int); 
     81void mutt_close_decoder (DECODER **); 
     82 
     83void mutt_decoder_putc (DECODER *, char); 
    6884 
    6985#endif