1
/* $Id: html.h,v 1.31 2010/08/14 01:29:40 htrb Exp $ */
5
#include <openssl/bio.h>
6
#include <openssl/x509.h>
7
#include <openssl/ssl.h>
12
#define StrUFgets(f) StrISgets((f)->stream)
13
#define StrmyUFgets(f) StrmyISgets((f)->stream)
14
#define UFgetc(f) ISgetc((f)->stream)
15
#define UFundogetc(f) ISundogetc((f)->stream)
16
#define UFread(f,buf,len) ISread((f)->stream,buf,len)
17
#define UFclose(f) (void)(ISclose((f)->stream) == 0 && ((f)->stream = NULL))
18
#define UFfileno(f) ISfileno((f)->stream)
34
#define MAILCAP_NEEDSTERMINAL 0x01
35
#define MAILCAP_COPIOUSOUTPUT 0x02
36
#define MAILCAP_HTMLOUTPUT 0x04
38
#define MCSTAT_REPNAME 0x01
39
#define MCSTAT_REPTYPE 0x02
40
#define MCSTAT_REPPARAM 0x04
52
typedef struct _ParsedURL {
75
char *ssl_certificate;
81
#define CMP_NOCOMPRESS 0
82
#define CMP_COMPRESS 1
90
#define ENC_UUENCODE 3
92
#define HTML_UNKNOWN 0
106
#define HTML_TITLE 14
107
#define HTML_N_TITLE 15
114
#define HTML_N_PRE 22
116
#define HTML_N_BLQ 24
118
#define HTML_LISTING 26
119
#define HTML_N_LISTING 27
121
#define HTML_N_XMP 29
122
#define HTML_PLAINTEXT 30
123
#define HTML_TABLE 31
124
#define HTML_N_TABLE 32
127
#define HTML_FRAME 35
128
#define HTML_FRAMESET 36
129
#define HTML_N_FRAMESET 37
130
#define HTML_CENTER 38
131
#define HTML_N_CENTER 39
133
#define HTML_N_FONT 41
135
#define HTML_N_FORM 43
136
#define HTML_INPUT 44
137
#define HTML_TEXTAREA 45
138
#define HTML_N_TEXTAREA 46
139
#define HTML_SELECT 47
140
#define HTML_N_SELECT 48
141
#define HTML_OPTION 49
143
#define HTML_N_NOBR 51
145
#define HTML_N_DIV 53
146
#define HTML_ISINDEX 54
148
#define HTML_N_MAP 56
150
#define HTML_SCRIPT 58
151
#define HTML_N_SCRIPT 59
154
#define HTML_N_DEL 62
156
#define HTML_N_INS 64
159
#define HTML_STYLE 67
160
#define HTML_N_STYLE 68
165
#define HTML_N_BODY 73
170
#define HTML_CAPTION 78
171
#define HTML_N_CAPTION 79
174
#define HTML_THEAD 82
175
#define HTML_N_THEAD 83
176
#define HTML_TBODY 84
177
#define HTML_N_TBODY 85
178
#define HTML_TFOOT 86
179
#define HTML_N_TFOOT 87
180
#define HTML_COLGROUP 88
181
#define HTML_N_COLGROUP 89
183
#define HTML_BGSOUND 91
184
#define HTML_APPLET 92
185
#define HTML_EMBED 93
186
#define HTML_N_OPTION 94
188
#define HTML_N_HEAD 96
189
#define HTML_DOCTYPE 97
190
#define HTML_NOFRAMES 98
191
#define HTML_N_NOFRAMES 99
193
#define HTML_N_SUP 101
195
#define HTML_N_SUB 103
196
#define HTML_LINK 104
203
#define HTML_STRONG 111
204
#define HTML_N_STRONG 112
205
#define HTML_SPAN 113
206
#define HTML_N_SPAN 114
207
#define HTML_ABBR 115
208
#define HTML_N_ABBR 116
209
#define HTML_ACRONYM 117
210
#define HTML_N_ACRONYM 118
211
#define HTML_BASEFONT 119
213
#define HTML_N_BDO 121
215
#define HTML_N_BIG 123
216
#define HTML_BUTTON 124
217
#define HTML_FIELDSET 125
218
#define HTML_N_FIELDSET 126
219
#define HTML_IFRAME 127
220
#define HTML_LABEL 128
221
#define HTML_N_LABEL 129
222
#define HTML_LEGEND 130
223
#define HTML_N_LEGEND 131
224
#define HTML_NOSCRIPT 132
225
#define HTML_N_NOSCRIPT 133
226
#define HTML_OBJECT 134
227
#define HTML_OPTGROUP 135
228
#define HTML_N_OPTGROUP 136
229
#define HTML_PARAM 137
230
#define HTML_SMALL 138
231
#define HTML_N_SMALL 139
234
#define HTML_SELECT_INT 160
235
#define HTML_N_SELECT_INT 161
236
#define HTML_OPTION_INT 162
237
#define HTML_TEXTAREA_INT 163
238
#define HTML_N_TEXTAREA_INT 164
239
#define HTML_TABLE_ALT 165
240
#define HTML_SYMBOL 166
241
#define HTML_N_SYMBOL 167
242
#define HTML_PRE_INT 168
243
#define HTML_N_PRE_INT 169
244
#define HTML_TITLE_ALT 170
245
#define HTML_FORM_INT 171
246
#define HTML_N_FORM_INT 172
247
#define HTML_DL_COMPACT 173
248
#define HTML_INPUT_ALT 174
249
#define HTML_N_INPUT_ALT 175
250
#define HTML_IMG_ALT 176
251
#define HTML_N_IMG_ALT 177
253
#define HTML_PRE_PLAIN 179
254
#define HTML_N_PRE_PLAIN 180
255
#define HTML_INTERNAL 181
256
#define HTML_N_INTERNAL 182
257
#define HTML_DIV_INT 183
258
#define HTML_N_DIV_INT 184
260
#define MAX_HTMLTAG 185
264
#define ATTR_UNKNOWN 0
265
#define ATTR_ACCEPT 1
266
#define ATTR_ACCEPT_CHARSET 2
267
#define ATTR_ACTION 3
270
#define ATTR_ARCHIVE 6
271
#define ATTR_BACKGROUND 7
272
#define ATTR_BORDER 8
273
#define ATTR_CELLPADDING 9
274
#define ATTR_CELLSPACING 10
275
#define ATTR_CHARSET 11
276
#define ATTR_CHECKED 12
278
#define ATTR_COLSPAN 14
279
#define ATTR_CONTENT 15
280
#define ATTR_ENCTYPE 16
281
#define ATTR_HEIGHT 17
283
#define ATTR_HTTP_EQUIV 19
286
#define ATTR_MAXLENGTH 22
287
#define ATTR_METHOD 23
288
#define ATTR_MULTIPLE 24
290
#define ATTR_NOWRAP 26
291
#define ATTR_PROMPT 27
293
#define ATTR_ROWSPAN 29
296
#define ATTR_TARGET 32
298
#define ATTR_USEMAP 34
299
#define ATTR_VALIGN 35
300
#define ATTR_VALUE 36
301
#define ATTR_VSPACE 37
302
#define ATTR_WIDTH 38
303
#define ATTR_COMPACT 39
304
#define ATTR_START 40
305
#define ATTR_SELECTED 41
306
#define ATTR_LABEL 42
307
#define ATTR_READONLY 43
308
#define ATTR_SHAPE 44
309
#define ATTR_COORDS 45
310
#define ATTR_ISMAP 46
313
#define ATTR_TITLE 49
314
#define ATTR_ACCESSKEY 50
316
/* Internal attribute */
317
#define ATTR_XOFFSET 60
318
#define ATTR_YOFFSET 61
319
#define ATTR_TOP_MARGIN 62
320
#define ATTR_BOTTOM_MARGIN 63
323
#define ATTR_FOR_TABLE 66
324
#define ATTR_FRAMENAME 67
325
#define ATTR_HBORDER 68
327
#define ATTR_NO_EFFECT 70
328
#define ATTR_REFERER 71
329
#define ATTR_SELECTNUMBER 72
330
#define ATTR_TEXTAREANUMBER 73
331
#define ATTR_PRE_INT 74
333
#define MAX_TAGATTR 75
335
/* HTML Tag Information Table */
337
typedef struct html_tag_info {
339
unsigned char *accept_attribute;
340
unsigned char max_attribute;
347
/* HTML Tag Attribute Information Table */
349
typedef struct tag_attribute_info {
359
#define VTYPE_NUMBER 2
360
#define VTYPE_LENGTH 3
361
#define VTYPE_ALIGN 4
362
#define VTYPE_VALIGN 5
363
#define VTYPE_ACTION 6
364
#define VTYPE_ENCTYPE 7
365
#define VTYPE_METHOD 8
366
#define VTYPE_MLENGTH 9
367
#define VTYPE_TYPE 10
369
#define SHAPE_UNKNOWN 0
370
#define SHAPE_DEFAULT 1
372
#define SHAPE_CIRCLE 3
375
extern TagInfo TagMAP[];
376
extern TagAttrInfo AttrMAP[];
385
#define MAX_ENV_LEVEL 20
386
#define MAX_INDENT_LEVEL 10
388
#define INDENT_INCR IndentIncr
390
#define SCM_UNKNOWN 255
391
#define SCM_MISSING 254
397
#define SCM_LOCAL_CGI 5
400
#define SCM_NNTP_GROUP 8
402
#define SCM_NEWS_GROUP 10
404
#define SCM_MAILTO 12