]> diplodocus.org Git - nmh/blobdiff - h/mime.h
Document argsplit changes in mh-profile man page.
[nmh] / h / mime.h
index 3e50ce2cb27f01a9d9cdf731021cbf1054a6478c..2f8a6a32e78ba2d27df28212a92f1c4cd9b8102f 100644 (file)
--- a/h/mime.h
+++ b/h/mime.h
@@ -13,7 +13,9 @@
 #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) != '"' \
@@ -23,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) != '"' \