=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.227 retrieving revision 1.231 diff -u -p -r1.227 -r1.231 --- mandoc/mdoc_html.c 2015/04/02 21:36:50 1.227 +++ mandoc/mdoc_html.c 2015/04/18 16:06:40 1.231 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.227 2015/04/02 21:36:50 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.231 2015/04/18 16:06:40 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -35,8 +35,8 @@ #define INDENT 5 -#define MDOC_ARGS const struct mdoc_meta *meta, \ - struct mdoc_node *n, \ +#define MDOC_ARGS const struct roff_meta *meta, \ + struct roff_node *n, \ struct html *h #ifndef MIN @@ -53,7 +53,7 @@ static void print_mdoc_head(MDOC_ARGS); static void print_mdoc_node(MDOC_ARGS); static void print_mdoc_nodelist(MDOC_ARGS); static void synopsis_pre(struct html *, - const struct mdoc_node *); + const struct roff_node *); static void a2width(const char *, struct roffsu *); @@ -265,7 +265,7 @@ static const char * const lists[LIST_MAX] = { void -html_mdoc(void *arg, const struct mdoc *mdoc) +html_mdoc(void *arg, const struct roff_man *mdoc) { print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc)->child, @@ -293,7 +293,7 @@ a2width(const char *p, struct roffsu *su) * See the same function in mdoc_term.c for documentation. */ static void -synopsis_pre(struct html *h, const struct mdoc_node *n) +synopsis_pre(struct html *h, const struct roff_node *n) { if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) @@ -350,7 +350,9 @@ print_mdoc(MDOC_ARGS) } else t = print_otag(h, TAG_DIV, 1, &tag); + mdoc_root_pre(meta, n, h); print_mdoc_nodelist(meta, n, h); + mdoc_root_post(meta, n, h); print_tagq(h, t); } @@ -391,9 +393,6 @@ print_mdoc_node(MDOC_ARGS) n->flags &= ~MDOC_ENDED; switch (n->type) { - case ROFFT_ROOT: - child = mdoc_root_pre(meta, n, h); - break; case ROFFT_TEXT: /* No tables in this mode... */ assert(NULL == h->tblt); @@ -451,9 +450,6 @@ print_mdoc_node(MDOC_ARGS) print_stagq(h, t); switch (n->type) { - case ROFFT_ROOT: - mdoc_root_post(meta, n, h); - break; case ROFFT_EQN: break; default: @@ -822,7 +818,7 @@ mdoc_it_pre(MDOC_ARGS) struct roffsu su; enum mdoc_list type; struct htmlpair tag[2]; - const struct mdoc_node *bl; + const struct roff_node *bl; bl = n->parent; while (bl && MDOC_Bl != bl->tok) @@ -1126,7 +1122,7 @@ mdoc_bd_pre(MDOC_ARGS) { struct htmlpair tag[2]; int comp, sv; - struct mdoc_node *nn; + struct roff_node *nn; struct roffsu su; if (n->type == ROFFT_HEAD) @@ -1312,7 +1308,7 @@ mdoc_er_pre(MDOC_ARGS) static int mdoc_fa_pre(MDOC_ARGS) { - const struct mdoc_node *nn; + const struct roff_node *nn; struct htmlpair tag; struct tag *t;