X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=h%2Fprototypes.h;h=e6e7dc14b1e71d57113876e2ae5b4281a00f4b75;hb=e2c50b4a7530bceb52dec5e65fcccbc929fc7bc2;hp=42767f571e00c258fc7780ff77c8c3cba41c715c;hpb=4c30d368bca8b3f108a7e86a5b890e33470cdebf;p=mmh diff --git a/h/prototypes.h b/h/prototypes.h index 42767f5..e6e7dc1 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -177,3 +177,20 @@ int is_readonly(struct msgs *); void set_readonly(struct msgs *); int other_files(struct msgs *); void set_other_files(struct msgs *); + +/* + * Encode a message header using RFC 2047 encoding. If the message contains + * no non-ASCII characters, then leave the header as-is. + * + * Arguments include: + * + * name - Message header name + * value - Message header content; must point to allocated memory + * (may be changed if encoding is necessary) + * charset - Charset used for encoding. If NULL, obtain from system + * locale. + * + * Returns 0 on success, any other value on failure. + */ + +int encode_rfc2047(const char *name, char **value, const char *charset);