Initialize the gmime for upstream
[platform/upstream/gmime.git] / gmime / gmime-table-private.h
1 /* THIS FILE IS AUTOGENERATED: DO NOT EDIT! */
2
3 /**
4  * To regenerate:
5  * make gen-table
6  * ./gen-table > gmime-table-private.h
7  **/
8
9 static unsigned short gmime_special_table[256] = {
10         1029,1029,1029,1029,1029,1029,1029,1029,1029,3175,1031,1029,1029,1063,1029,1029,
11         1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,
12         3314,1984,1100,1728,1728,1216,1728,1216,1100,1100,1472,1984,1100,1984,1608,1348,
13         1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1100,1100,1100,1284,1100,1092,
14         1100,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,
15         1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1132,1260,1132,1728,1856,
16         1728,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,
17         1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1728,1728,1728,1728,1029,
18            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
19            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
20            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
21            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
22            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
23            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
24            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
25            0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
26 };
27
28 enum {
29         IS_CTRL     = (1 << 0),
30         IS_LWSP     = (1 << 1),
31         IS_TSPECIAL = (1 << 2),
32         IS_SPECIAL  = (1 << 3),
33         IS_SPACE    = (1 << 4),
34         IS_DSPECIAL = (1 << 5),
35         IS_QPSAFE   = (1 << 6),
36         IS_ESAFE    = (1 << 7),  /* encoded word safe */
37         IS_PSAFE    = (1 << 8),  /* encode word in phrase safe */
38         IS_ATTRCHAR = (1 << 9),  /* attribute-char from rfc2184 */
39         
40         /* ctype replacements */
41         IS_ASCII    = (1 << 10), /* ascii */
42         IS_BLANK    = (1 << 11), /* space or tab */
43 };
44
45 #define is_ctrl(x) ((gmime_special_table[(unsigned char)(x)] & IS_CTRL) != 0)
46 #define is_lwsp(x) ((gmime_special_table[(unsigned char)(x)] & IS_LWSP) != 0)
47 #define is_tspecial(x) ((gmime_special_table[(unsigned char)(x)] & IS_TSPECIAL) != 0)
48 #define is_type(x, t) ((gmime_special_table[(unsigned char)(x)] & (t)) != 0)
49 #define is_ttoken(x) ((gmime_special_table[(unsigned char)(x)] & (IS_TSPECIAL|IS_LWSP|IS_CTRL)) == 0)
50 #define is_atom(x) ((gmime_special_table[(unsigned char)(x)] & (IS_SPECIAL|IS_SPACE|IS_CTRL)) == 0)
51 #define is_dtext(x) ((gmime_special_table[(unsigned char)(x)] & IS_DSPECIAL) == 0)
52 #define is_fieldname(x) ((gmime_special_table[(unsigned char)(x)] & (IS_CTRL|IS_SPACE)) == 0)
53 #define is_qpsafe(x) ((gmime_special_table[(unsigned char)(x)] & IS_QPSAFE) != 0)
54 #define is_especial(x) ((gmime_special_table[(unsigned char)(x)] & IS_ESAFE) != 0)
55 #define is_psafe(x) ((gmime_special_table[(unsigned char)(x)] & IS_PSAFE) != 0)
56 #define is_attrchar(x) ((gmime_special_table[(unsigned char)(x)] & IS_ATTRCHAR) != 0)
57
58 /* ctype replacements */
59 #define is_ascii(x) ((gmime_special_table[(unsigned char)(x)] & IS_ASCII) != 0)
60 #define is_blank(x) ((gmime_special_table[(unsigned char)(x)] & IS_BLANK) != 0)
61
62 #define CHARS_LWSP " \t\n\r"               /* linear whitespace chars */
63 #define CHARS_TSPECIAL "()<>@,;:\\\"/[]?="
64 #define CHARS_SPECIAL "()<>@,;:\\\".[]"
65 #define CHARS_CSPECIAL "()\\\r"            /* not in comments */
66 #define CHARS_DSPECIAL "[]\\\r \t"         /* not in domains */
67 #define CHARS_ESPECIAL "()<>@,;:\"/[]?.=_" /* encoded word specials (rfc2047 5.1) */
68 #define CHARS_PSPECIAL "!*+-/=_"           /* encoded phrase specials (rfc2047 5.3) */
69 #define CHARS_ATTRCHAR "*'% "              /* attribute-char from rfc2184 */
70
71 #define GMIME_FOLD_LEN 76