]> diplodocus.org Git - nmh/blobdiff - h/mime.h
More cleaned and conversion to the new parameter API.
[nmh] / h / mime.h
index d152094a8a113fd8e16d128df43df81626d777fc..92d6462a828e2c0671177de62fc8e9b1e45a3c7a 100644 (file)
--- a/h/mime.h
+++ b/h/mime.h
                     && (c) != '/' && (c) != '['  && (c) != ']' \
                     && (c) != '?' && (c) != '=')
 
+/*
+ * Definitions for RFC 2231 encoding
+ */
+#define istspecial(c)  ((c) == '(' || (c) == ')' || (c) == '<' || (c) == '>' \
+                       || (c) == '@' || (c) == ',' || (c) == ';' \
+                       || (c) == ':' || (c) == '\\' || (c) == '"' \
+                       || (c) == '/' || (c) == '[' || (c) == ']' \
+                       || (c) == '?' || (c) == '=')
+
+#define isparamencode(c)  (!isascii((unsigned char) c) || \
+                          iscntrl((unsigned char) c) || istspecial(c) || \
+                          (c) == ' ' || (c) == '*' || (c) == '\'' || \
+                          (c) == '%')
+
 #define        MAXTEXTPERLN 78
 #define        MAXLONGLINE 998
 #define        CPERLIN 76