1 /* $Id: html.h,v 1.29 2007/05/23 12:01:43 inu 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
207 #define HTML_SELECT_INT 120
208 #define HTML_N_SELECT_INT 121
209 #define HTML_OPTION_INT 122
210 #define HTML_TEXTAREA_INT 123
211 #define HTML_N_TEXTAREA_INT 124
212 #define HTML_TABLE_ALT 125
213 #define HTML_SYMBOL 126
214 #define HTML_N_SYMBOL 127
215 #define HTML_PRE_INT 128
216 #define HTML_N_PRE_INT 129
217 #define HTML_TITLE_ALT 130
218 #define HTML_FORM_INT 131
219 #define HTML_N_FORM_INT 132
220 #define HTML_DL_COMPACT 133
221 #define HTML_INPUT_ALT 134
222 #define HTML_N_INPUT_ALT 135
223 #define HTML_IMG_ALT 136
224 #define HTML_N_IMG_ALT 137
226 #define HTML_PRE_PLAIN 139
227 #define HTML_N_PRE_PLAIN 140
228 #define HTML_INTERNAL 141
229 #define HTML_N_INTERNAL 142
230 #define HTML_DIV_INT 143
231 #define HTML_N_DIV_INT 144
233 #define MAX_HTMLTAG 145
237 #define ATTR_UNKNOWN 0
238 #define ATTR_ACCEPT 1
239 #define ATTR_ACCEPT_CHARSET 2
240 #define ATTR_ACTION 3
243 #define ATTR_ARCHIVE 6
244 #define ATTR_BACKGROUND 7
245 #define ATTR_BORDER 8
246 #define ATTR_CELLPADDING 9
247 #define ATTR_CELLSPACING 10
248 #define ATTR_CHARSET 11
249 #define ATTR_CHECKED 12
251 #define ATTR_COLSPAN 14
252 #define ATTR_CONTENT 15
253 #define ATTR_ENCTYPE 16
254 #define ATTR_HEIGHT 17
256 #define ATTR_HTTP_EQUIV 19
259 #define ATTR_MAXLENGTH 22
260 #define ATTR_METHOD 23
261 #define ATTR_MULTIPLE 24
263 #define ATTR_NOWRAP 26
264 #define ATTR_PROMPT 27
266 #define ATTR_ROWSPAN 29
269 #define ATTR_TARGET 32
271 #define ATTR_USEMAP 34
272 #define ATTR_VALIGN 35
273 #define ATTR_VALUE 36
274 #define ATTR_VSPACE 37
275 #define ATTR_WIDTH 38
276 #define ATTR_COMPACT 39
277 #define ATTR_START 40
278 #define ATTR_SELECTED 41
279 #define ATTR_LABEL 42
280 #define ATTR_READONLY 43
281 #define ATTR_SHAPE 44
282 #define ATTR_COORDS 45
283 #define ATTR_ISMAP 46
286 #define ATTR_TITLE 49
287 #define ATTR_ACCESSKEY 50
289 /* Internal attribute */
290 #define ATTR_XOFFSET 60
291 #define ATTR_YOFFSET 61
292 #define ATTR_TOP_MARGIN 62
293 #define ATTR_BOTTOM_MARGIN 63
296 #define ATTR_FOR_TABLE 66
297 #define ATTR_FRAMENAME 67
298 #define ATTR_HBORDER 68
300 #define ATTR_NO_EFFECT 70
301 #define ATTR_REFERER 71
302 #define ATTR_SELECTNUMBER 72
303 #define ATTR_TEXTAREANUMBER 73
304 #define ATTR_PRE_INT 74
306 #define MAX_TAGATTR 75
308 /* HTML Tag Information Table */
310 typedef struct html_tag_info {
312 unsigned char *accept_attribute;
313 unsigned char max_attribute;
320 /* HTML Tag Attribute Information Table */
322 typedef struct tag_attribute_info {
332 #define VTYPE_NUMBER 2
333 #define VTYPE_LENGTH 3
334 #define VTYPE_ALIGN 4
335 #define VTYPE_VALIGN 5
336 #define VTYPE_ACTION 6
337 #define VTYPE_ENCTYPE 7
338 #define VTYPE_METHOD 8
339 #define VTYPE_MLENGTH 9
340 #define VTYPE_TYPE 10
342 #define SHAPE_UNKNOWN 0
343 #define SHAPE_DEFAULT 1
345 #define SHAPE_CIRCLE 3
348 extern TagInfo TagMAP[];
349 extern TagAttrInfo AttrMAP[];
358 #define MAX_ENV_LEVEL 20
359 #define MAX_INDENT_LEVEL 10
361 #define INDENT_INCR IndentIncr
363 #define SCM_UNKNOWN 255
364 #define SCM_MISSING 254
370 #define SCM_LOCAL_CGI 5
373 #define SCM_NNTP_GROUP 8
375 #define SCM_NEWS_GROUP 10
377 #define SCM_MAILTO 12