X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2e768e3cc0ce768373d3320eca4cdd08b8cf646a..303e8387acecca26329e939f228f78ca805b7a15:/h/mime.h?ds=inline diff --git a/h/mime.h b/h/mime.h index 2f8a6a32..9cac94e5 100644 --- a/h/mime.h +++ b/h/mime.h @@ -12,6 +12,11 @@ #define DESCR_FIELD "Content-Description" #define DISPO_FIELD "Content-Disposition" #define MD5_FIELD "Content-MD5" +#define PSEUDOHEADER_PREFIX "Nmh-" +#define ATTACH_FIELD PSEUDOHEADER_PREFIX "Attach" +#define ATTACH_FIELD_ALT "Attach" +#define MHBUILD_FILE_PSEUDOHEADER PSEUDOHEADER_PREFIX "mhbuild-file-" +#define MHBUILD_ARGS_PSEUDOHEADER PSEUDOHEADER_PREFIX "mhbuild-args-" #define isatom(c) (isascii((unsigned char) c) \ && !isspace ((unsigned char) c) \ @@ -34,6 +39,22 @@ && (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 #define BPERLIN (CPERLIN / 4) #define LPERMSG 632