From 1a6fb9ab8807f8ad8c8f79ba1cc4fa7a015c08d6 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 1 Jun 2004 10:07:13 +0000 Subject: ** A few fixes for better rfc compliance, and cleaner code. 2004-06-01 Not Zed ** A few fixes for better rfc compliance, and cleaner code. * camel-mime-utils.c (header_encode_param): a bunch of logic cleanups with new util functions. (header_decode_init): setup a new type ATTR_CHAR, for attribute-char. * tests/misc/test2.c (main): new test for rfc2184 stuff. * camel-mime-utils.c (header_convert): helper to convert between charsets. (rfc2184_decode): fix a bunch of logic problems and use the helper above to simplify code. (decode_param_token): removed, not needed. (header_decode_rfc2184_param): removed, not needed. (header_decode_param): removed, not needed. ugh. (header_decode_param_list): completely rewritten, hence lack of need of above. svn path=/trunk/; revision=26140 --- camel/camel-mime-utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'camel/camel-mime-utils.h') diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h index d4e3012d95..5fb23be36f 100644 --- a/camel/camel-mime-utils.h +++ b/camel/camel-mime-utils.h @@ -263,6 +263,7 @@ enum { CAMEL_MIME_IS_QPSAFE = 1<<6, CAMEL_MIME_IS_ESAFE = 1<<7, /* encoded word safe */ CAMEL_MIME_IS_PSAFE = 1<<8, /* encoded word in phrase safe */ + CAMEL_MIME_IS_ATTRCHAR = 1<<9, /* attribute-char safe (rfc2184) */ }; extern unsigned short camel_mime_special_table[256]; @@ -278,6 +279,7 @@ extern unsigned short camel_mime_special_table[256]; #define camel_mime_is_qpsafe(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_QPSAFE) != 0) #define camel_mime_is_especial(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_ESPECIAL) != 0) #define camel_mime_is_psafe(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_PSAFE) != 0) +#define camel_mime_is_attrchar(x) ((camel_mime_special_table[(unsigned char)(x)] & CAMEL_MIME_IS_ATTRCHAR) != 0) #ifdef __cplusplus } -- cgit v1.2.3