]> diplodocus.org Git - nmh/blobdiff - h/mime.h
Garbage collect unused code.
[nmh] / h / mime.h
index 3e50ce2cb27f01a9d9cdf731021cbf1054a6478c..2ed5378c9f3b055105a83e7c71d86775f7ca3083 100644 (file)
--- a/h/mime.h
+++ b/h/mime.h
 #define        DESCR_FIELD     "Content-Description"
 #define        DISPO_FIELD     "Content-Disposition"
 #define        MD5_FIELD       "Content-MD5"
+#define        ATTACH_FIELD    "Attach"
 
-#define        isatom(c)   (!isspace (c) && !iscntrl (c) && (c) != '(' \
+#define        isatom(c)   (isascii((unsigned char) c) \
+                     && !isspace ((unsigned char) c) \
+                    && !iscntrl ((unsigned char) c) && (c) != '(' \
                     && (c) != ')' && (c) != '<'  && (c) != '>' \
                     && (c) != '@' && (c) != ','  && (c) != ';' \
                     && (c) != ':' && (c) != '\\' && (c) != '"' \
@@ -23,7 +26,9 @@
  * Test for valid characters used in "token"
  * as defined in RFC2045
  */
-#define        istoken(c)  (!isspace (c) && !iscntrl (c) && (c) != '(' \
+#define        istoken(c)  (isascii((unsigned char) c) \
+                     && !isspace ((unsigned char) c) \
+                    && !iscntrl ((unsigned char) c) && (c) != '(' \
                     && (c) != ')' && (c) != '<'  && (c) != '>' \
                     && (c) != '@' && (c) != ','  && (c) != ';' \
                     && (c) != ':' && (c) != '\\' && (c) != '"' \