#define NSTACK 100 /* html grammar is not recursive, so 30 or so should do */
#define NHBUF 8192 /* Input buffer size */
#define NPEEKC 3 /* Maximum lookahead */
-#define NTOKEN 1024 /* Maximum token length */
+#define NTOKEN 4096 /* Maximum token length */
#define NATTR 512 /* Maximum number of attributes of a tag */
typedef struct Pair Pair;
typedef struct Tag Tag;
int indent; /* extra indent at paragraph start */
int number; /* paragraph number */
int ismap; /* flag of <img> */
+ int isscript; /* inside <script> */
+ int strike; /* flag of <strike> */
int width; /* size of image */
int height;
- int table; /* depth of table nesting */
char image[NNAME]; /* arg of <img> */
char link[NNAME]; /* arg of <a href=...> */
char name[NNAME]; /* arg of <a name=...> */
ENORMOUS,
};
+/*
+ * length direction
+ */
+enum{
+ HORIZ,
+ VERT,
+};
+int strtolength(Hglob *g, int dir, char *str);
+
/*
* Token names for the html parser.
* Tag_end corresponds to </end> tags.
*/
enum{
Tag_comment,
+
Tag_a,
+ Tag_abbr,
+ Tag_acronym,
Tag_address,
+ Tag_applet,
+ Tag_audio,
Tag_b,
Tag_base,
Tag_blockquot,
Tag_cite,
Tag_code,
Tag_dd,
+ Tag_del,
+ Tag_div,
Tag_dfn,
Tag_dir,
Tag_dl,
Tag_dt,
Tag_em,
+ Tag_embed,
Tag_font,
Tag_form,
+ Tag_frame, /* rm 5.8.97 */
Tag_h1,
Tag_h2,
Tag_h3,
Tag_hr,
Tag_html,
Tag_i,
+ Tag_iframe,
Tag_img,
Tag_input,
+ Tag_ins,
Tag_isindex,
Tag_kbd,
Tag_key,
Tag_menu,
Tag_meta,
Tag_nextid,
+ Tag_object,
Tag_ol,
Tag_option,
Tag_p,
Tag_plaintext,
Tag_pre,
+ Tag_s,
Tag_samp,
+ Tag_script,
Tag_select,
+ Tag_span,
+ Tag_strike,
Tag_strong,
+ Tag_style,
+ Tag_source,
+ Tag_table, /* rm 3.8.00 */
+ Tag_td,
Tag_textarea,
Tag_title,
+ Tag_tr,
Tag_tt,
Tag_u,
Tag_ul,
Tag_var,
+ Tag_video,
+ Tag_wbr,
Tag_xmp,
- Tag_frame, /* rm 5.8.97 */
- Tag_table, /* rm 3.8.00 */
- Tag_td,
- Tag_tr,
- Tag_script,
- Tag_style,
- Tag_end, /* also used to indicate unrecognized start tag */
+ Tag_end, /* also used to indicate unrecognized start tag */
Tag_text,
};
enum{