]> diplodocus.org Git - nmh/blobdiff - h/mime.h
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / h / mime.h
index fad1cf8822e614e4f86619af89cba26ca5ff23df..e389b28463ed41c4820b3b0541aea517c8e0fc7b 100644 (file)
--- a/h/mime.h
+++ b/h/mime.h
@@ -1,6 +1,4 @@
-
-/*
- * mime.h -- definitions for MIME
+/* mime.h -- definitions for MIME
  */
 
 #define        VRSN_FIELD      "MIME-Version"
  */
 
 #define        VRSN_FIELD      "MIME-Version"
 #define        DESCR_FIELD     "Content-Description"
 #define        DISPO_FIELD     "Content-Disposition"
 #define        MD5_FIELD       "Content-MD5"
 #define        DESCR_FIELD     "Content-Description"
 #define        DISPO_FIELD     "Content-Disposition"
 #define        MD5_FIELD       "Content-MD5"
-#define        ATTACH_FIELD    "Attach"
-
-#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) != '"' \
-                    && (c) != '.' && (c) != '['  && (c) != ']')
+#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-"
 
 /*
  * Test for valid characters used in "token"
 
 /*
  * Test for valid characters used in "token"
@@ -46,7 +40,8 @@
 
 #define isparamencode(c)  (!isascii((unsigned char) c) || \
                           iscntrl((unsigned char) c) || istspecial(c) || \
 
 #define isparamencode(c)  (!isascii((unsigned char) c) || \
                           iscntrl((unsigned char) c) || istspecial(c) || \
-                          (c) == '*' || (c) == '\'' || (c) == '%')
+                          (c) == ' ' || (c) == '*' || (c) == '\'' || \
+                          (c) == '%')
 
 #define        MAXTEXTPERLN 78
 #define        MAXLONGLINE 998
 
 #define        MAXTEXTPERLN 78
 #define        MAXLONGLINE 998
@@ -54,4 +49,3 @@
 #define        BPERLIN (CPERLIN / 4)
 #define        LPERMSG 632
 #define        CPERMSG (LPERMSG * CPERLIN)
 #define        BPERLIN (CPERLIN / 4)
 #define        LPERMSG 632
 #define        CPERMSG (LPERMSG * CPERLIN)
-