-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchar.h
95 lines (94 loc) · 6.09 KB
/
char.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef CHAR_H
#define CHAR_H
#define ISWHITESPACE 1
#define ISSINGLEESCAPE 2
#define ISMULTIPLEESCAPE 4
#define ISTERMMACRO 8
#define ISNTERMMACRO 16
#define ISCONSTITUENT 32
#define ISDIGIT 64
#define ISHEXA 64
unsigned char chrmap[]={
0 /* NUL Null character */,
0 /* SOH Start of Header */,
0 /* STX Start of Text */,
0 /* ETX End of Text */,
0 /* EOT End of Transmission */,
0 /* ENQ Enquiry */,
0 /* ACK Acknowledgment */,
0 /* BEL Bell */,
0 /* BS Backspace[d][e] */,
1 /* HT Horizontal Tab[f] */,
1 /* LF Line feed */,
1 /* VT Vertical Tab */,
1 /* FF Form feed */,
1 /* CR Carriage return[g] */,
0 /* SO Shift Out */,
0 /* SI Shift In */,
0 /* DLE Data Link Escape */,
0 /* DC1 Device Control 1 (oft. XON) */,
0 /* DC2 Device Control 2 */,
0 /* DC3 Device Control 3 (oft. XOFF) */,
0 /* DC4 Device Control 4 */,
0 /* NAK Negative Acknowledgement */,
0 /* SYN Synchronous idle */,
0 /* ETB End of Transmission Block */,
0 /* CAN Cancel */,
0 /* EM End of Medium */,
0 /* SUB Substitute */,
0 /* ESC Escape[i] */,
0 /* FS File Separator */,
0 /* GS Group Separator */,
0 /* RS Record Separator */,
0 /* US Unit Separator */,
1 /* SPACE Space */,
32 /* ! */, 4 /* " */, 16 /* # */, 32 /* $ */, 32 /* % */, 32 /* & */,
8 /* ' */, 8 /* ( */, 8 /* ) */, 32 /* * */, 32 /* + */, 8 /* , */,
32 /* - */, 32 /* . */, 32 /* / */, 224 /* 0 */, 224 /* 1 */, 224 /* 2 */,
224 /* 3 */, 224 /* 4 */, 224 /* 5 */, 224 /* 6 */, 224 /* 7 */, 224 /* 8 */,
224 /* 9 */, 32 /* : */, 8 /* ; */, 32 /* < */, 32 /* = */, 32 /* > */,
32 /* ? */, 32 /* @ */, 160 /* A */, 160 /* B */, 160 /* C */, 160 /* D */,
160 /* E */, 160 /* F */, 32 /* G */, 32 /* H */, 32 /* I */, 32 /* J */,
32 /* K */, 32 /* L */, 32 /* M */, 32 /* N */, 32 /* O */, 32 /* P */,
32 /* Q */, 32 /* R */, 32 /* S */, 32 /* T */, 32 /* U */, 32 /* V */,
32 /* W */, 32 /* X */, 32 /* Y */, 32 /* Z */, 8 /* [ */, 2 /* \ */,
8 /* ] */, 32 /* ^ */, 32 /* _ */, 8 /* ` */, 160 /* a */, 160 /* b */,
160 /* c */, 160 /* d */, 160 /* e */, 160 /* f */, 32 /* g */, 32 /* h */,
32 /* i */, 32 /* j */, 32 /* k */, 32 /* l */, 32 /* m */, 32 /* n */,
32 /* o */, 32 /* p */, 32 /* q */, 32 /* r */, 32 /* s */, 32 /* t */,
32 /* u */, 32 /* v */, 32 /* w */, 32 /* x */, 32 /* y */, 32 /* z */,
8 /* { */, 8 /* | */, 8 /* } */, 32 /* ~ */, 0 /* */, 0 /* 128 */,
0 /* 129 */, 0 /* 130 */, 0 /* 131 */, 0 /* 132 */, 0 /* 133 */,
0 /* 134 */, 0 /* 135 */, 0 /* 136 */, 0 /* 137 */, 0 /* 138 */,
0 /* 139 */, 0 /* 140 */, 0 /* 141 */, 0 /* 142 */, 0 /* 143 */,
0 /* 144 */, 0 /* 145 */, 0 /* 146 */, 0 /* 147 */, 0 /* 148 */,
0 /* 149 */, 0 /* 150 */, 0 /* 151 */, 0 /* 152 */, 0 /* 153 */,
0 /* 154 */, 0 /* 155 */, 0 /* 156 */, 0 /* 157 */, 0 /* 158 */,
0 /* 159 */, 0 /* 160 */, 0 /* 161 */, 0 /* 162 */, 0 /* 163 */,
0 /* 164 */, 0 /* 165 */, 0 /* 166 */, 0 /* 167 */, 0 /* 168 */,
0 /* 169 */, 0 /* 170 */, 0 /* 171 */, 0 /* 172 */, 0 /* 173 */,
0 /* 174 */, 0 /* 175 */, 0 /* 176 */, 0 /* 177 */, 0 /* 178 */,
0 /* 179 */, 0 /* 180 */, 0 /* 181 */, 0 /* 182 */, 0 /* 183 */,
0 /* 184 */, 0 /* 185 */, 0 /* 186 */, 0 /* 187 */, 0 /* 188 */,
0 /* 189 */, 0 /* 190 */, 0 /* 191 */, 0 /* 192 */, 0 /* 193 */,
0 /* 194 */, 0 /* 195 */, 0 /* 196 */, 0 /* 197 */, 0 /* 198 */,
0 /* 199 */, 0 /* 200 */, 0 /* 201 */, 0 /* 202 */, 0 /* 203 */,
0 /* 204 */, 0 /* 205 */, 0 /* 206 */, 0 /* 207 */, 0 /* 208 */,
0 /* 209 */, 0 /* 210 */, 0 /* 211 */, 0 /* 212 */, 0 /* 213 */,
0 /* 214 */, 0 /* 215 */, 0 /* 216 */, 0 /* 217 */, 0 /* 218 */,
0 /* 219 */, 0 /* 220 */, 0 /* 221 */, 0 /* 222 */, 0 /* 223 */,
0 /* 224 */, 0 /* 225 */, 0 /* 226 */, 0 /* 227 */, 0 /* 228 */,
0 /* 229 */, 0 /* 230 */, 0 /* 231 */, 0 /* 232 */, 0 /* 233 */,
0 /* 234 */, 0 /* 235 */, 0 /* 236 */, 0 /* 237 */, 0 /* 238 */,
0 /* 239 */, 0 /* 240 */, 0 /* 241 */, 0 /* 242 */, 0 /* 243 */,
0 /* 244 */, 0 /* 245 */, 0 /* 246 */, 0 /* 247 */, 0 /* 248 */,
0 /* 249 */, 0 /* 250 */, 0 /* 251 */, 0 /* 252 */, 0 /* 253 */,
0 /* 254 */, 0 /* 255 */
};
unsigned char schrmap[]={
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 13, 0, 9, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
short int chr2hex[]={
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
#endif /* CHAR_H */