]> diplodocus.org Git - nmh/blob - h/mime.h
Garbage collect unused code.
[nmh] / h / mime.h
1
2 /*
3 * mime.h -- definitions for MIME
4 */
5
6 #define VRSN_FIELD "MIME-Version"
7 #define VRSN_VALUE "1.0"
8 #define XXX_FIELD_PRF "Content-"
9 #define TYPE_FIELD "Content-Type"
10 #define ENCODING_FIELD "Content-Transfer-Encoding"
11 #define ID_FIELD "Content-ID"
12 #define DESCR_FIELD "Content-Description"
13 #define DISPO_FIELD "Content-Disposition"
14 #define MD5_FIELD "Content-MD5"
15 #define ATTACH_FIELD "Attach"
16
17 #define isatom(c) (isascii((unsigned char) c) \
18 && !isspace ((unsigned char) c) \
19 && !iscntrl ((unsigned char) c) && (c) != '(' \
20 && (c) != ')' && (c) != '<' && (c) != '>' \
21 && (c) != '@' && (c) != ',' && (c) != ';' \
22 && (c) != ':' && (c) != '\\' && (c) != '"' \
23 && (c) != '.' && (c) != '[' && (c) != ']')
24
25 /*
26 * Test for valid characters used in "token"
27 * as defined in RFC2045
28 */
29 #define istoken(c) (isascii((unsigned char) c) \
30 && !isspace ((unsigned char) c) \
31 && !iscntrl ((unsigned char) c) && (c) != '(' \
32 && (c) != ')' && (c) != '<' && (c) != '>' \
33 && (c) != '@' && (c) != ',' && (c) != ';' \
34 && (c) != ':' && (c) != '\\' && (c) != '"' \
35 && (c) != '/' && (c) != '[' && (c) != ']' \
36 && (c) != '?' && (c) != '=')
37
38 #define CPERLIN 76
39 #define BPERLIN (CPERLIN / 4)
40 #define LPERMSG 632
41 #define CPERMSG (LPERMSG * CPERLIN)
42