X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1691e80890e5d8ba258c51c214a3e91880e1db2b..3b5cb2c248fa8fbdefe9bb9d6aa791070ba5ea28:/h/mime.h?ds=inline diff --git a/h/mime.h b/h/mime.h index b741b2f2..2f8a6a32 100644 --- a/h/mime.h +++ b/h/mime.h @@ -1,8 +1,6 @@ /* * mime.h -- definitions for MIME - * - * $Id$ */ #define VRSN_FIELD "MIME-Version" @@ -12,9 +10,12 @@ #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) != '"' \