]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/mothra/html.h
exec(2): fix prototypes
[plan9front.git] / sys / src / cmd / mothra / html.h
index f9d4926ad0a9c260a582a952942eab9c2e0e7522..242f7947e82e7a641c6a71e7d6c916f13bcc8365 100644 (file)
@@ -4,7 +4,7 @@
 #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;
@@ -33,9 +33,10 @@ struct Stack{
        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=...> */
@@ -111,6 +112,15 @@ enum{
        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.
@@ -119,8 +129,13 @@ enum{
  */
 enum{
        Tag_comment,
+
        Tag_a,
+       Tag_abbr,
+       Tag_acronym,
        Tag_address,
+       Tag_applet,
+       Tag_audio,
        Tag_b,
        Tag_base,
        Tag_blockquot,
@@ -131,13 +146,17 @@ enum{
        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,
@@ -148,8 +167,10 @@ enum{
        Tag_hr,
        Tag_html,
        Tag_i,
+       Tag_iframe,
        Tag_img,
        Tag_input,
+       Tag_ins,
        Tag_isindex,
        Tag_kbd,
        Tag_key,
@@ -159,29 +180,35 @@ enum{
        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{