]> diplodocus.org Git - nmh/blobdiff - h/mime.h
Moved #include of errno.h to h/nmh.h.
[nmh] / h / mime.h
index b741b2f250a011ca729cea1ba7cae8af445151cc..2f8a6a32e78ba2d27df28212a92f1c4cd9b8102f 100644 (file)
--- a/h/mime.h
+++ b/h/mime.h
@@ -1,8 +1,6 @@
 
 /*
  * mime.h -- definitions for MIME
- *
- * $Id$
  */
 
 #define        VRSN_FIELD      "MIME-Version"
 #define        ENCODING_FIELD  "Content-Transfer-Encoding"
 #define        ID_FIELD        "Content-ID"
 #define        DESCR_FIELD     "Content-Description"
+#define        DISPO_FIELD     "Content-Disposition"
 #define        MD5_FIELD       "Content-MD5"
 
-#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) != '"' \
@@ -24,7 +25,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) != '"' \