-static void print_gen_doctype(struct html *);
-static void print_gen_head(struct html *);
-static void print_mdoc(MDOC_ARGS);
-static void print_mdoc_head(MDOC_ARGS);
-static void print_mdoc_title(MDOC_ARGS);
-static void print_mdoc_node(MDOC_ARGS);
-static void print_mdoc_nodelist(MDOC_ARGS);
-static void print_man(MAN_ARGS);
-static void print_man_head(MAN_ARGS);
-static void print_man_body(MAN_ARGS);
-static struct tag *print_otag(struct html *, enum htmltag,
- int, const struct htmlpair *);
-static void print_tagq(struct html *, const struct tag *);
-static void print_stagq(struct html *, const struct tag *);
-static void print_ctag(struct html *, enum htmltag);
-static void print_encode(struct html *, const char *);
-static void print_escape(struct html *, const char **);
-static void print_text(struct html *, const char *);
-static void print_res(struct html *, const char *, int);
-static void print_spec(struct html *, const char *, int);
-
-static int a2width(const char *);
-static int a2offs(const char *);
-static int a2list(const struct mdoc_node *);
-
-static void mdoc_root_post(MDOC_ARGS);
-static int mdoc_root_pre(MDOC_ARGS);
-static int mdoc_tbl_pre(MDOC_ARGS, int);
-static int mdoc_tbl_block_pre(MDOC_ARGS, int, int, int, int);
-static int mdoc_tbl_body_pre(MDOC_ARGS, int, int);
-static int mdoc_tbl_head_pre(MDOC_ARGS, int, int);
-
-static void mdoc_aq_post(MDOC_ARGS);
-static int mdoc_aq_pre(MDOC_ARGS);
-static int mdoc_ar_pre(MDOC_ARGS);
-static int mdoc_bd_pre(MDOC_ARGS);
-static void mdoc_bl_post(MDOC_ARGS);
-static int mdoc_bl_pre(MDOC_ARGS);
-static int mdoc_d1_pre(MDOC_ARGS);
-static void mdoc_dq_post(MDOC_ARGS);
-static int mdoc_dq_pre(MDOC_ARGS);
-static int mdoc_fl_pre(MDOC_ARGS);
-static int mdoc_em_pre(MDOC_ARGS);
-static int mdoc_ex_pre(MDOC_ARGS);
-static int mdoc_it_pre(MDOC_ARGS);
-static int mdoc_nd_pre(MDOC_ARGS);
-static int mdoc_nm_pre(MDOC_ARGS);
-static int mdoc_ns_pre(MDOC_ARGS);
-static void mdoc_op_post(MDOC_ARGS);
-static int mdoc_op_pre(MDOC_ARGS);
-static int mdoc_pa_pre(MDOC_ARGS);
-static int mdoc_pp_pre(MDOC_ARGS);
-static void mdoc_pq_post(MDOC_ARGS);
-static int mdoc_pq_pre(MDOC_ARGS);
-static void mdoc_qq_post(MDOC_ARGS);
-static int mdoc_qq_pre(MDOC_ARGS);
-static int mdoc_sh_pre(MDOC_ARGS);
-static void mdoc_sq_post(MDOC_ARGS);
-static int mdoc_sq_pre(MDOC_ARGS);
-static int mdoc_ss_pre(MDOC_ARGS);
-static int mdoc_sx_pre(MDOC_ARGS);
-static int mdoc_xr_pre(MDOC_ARGS);
-static int mdoc_xx_pre(MDOC_ARGS);
-
-#ifdef __linux__
-extern size_t strlcpy(char *, const char *, size_t);
-extern size_t strlcat(char *, const char *, size_t);
-#endif
-
-static const struct htmlmdoc mdocs[MDOC_MAX] = {
- {mdoc_pp_pre, NULL}, /* Ap */
- {NULL, NULL}, /* Dd */
- {NULL, NULL}, /* Dt */
- {NULL, NULL}, /* Os */
- {mdoc_sh_pre, NULL }, /* Sh */
- {mdoc_ss_pre, NULL }, /* Ss */
- {mdoc_pp_pre, NULL}, /* Pp */
- {mdoc_d1_pre, NULL}, /* D1 */
- {mdoc_d1_pre, NULL}, /* Dl */
- {mdoc_bd_pre, NULL}, /* Bd */
- {NULL, NULL}, /* Ed */
- {mdoc_bl_pre, mdoc_bl_post}, /* Bl */
- {NULL, NULL}, /* El */
- {mdoc_it_pre, NULL}, /* It */
- {NULL, NULL}, /* Ad */
- {NULL, NULL}, /* An */
- {mdoc_ar_pre, NULL}, /* Ar */
- {NULL, NULL}, /* Cd */
- {NULL, NULL}, /* Cm */
- {NULL, NULL}, /* Dv */
- {NULL, NULL}, /* Er */
- {NULL, NULL}, /* Ev */
- {mdoc_ex_pre, NULL}, /* Ex */
- {NULL, NULL}, /* Fa */
- {NULL, NULL}, /* Fd */
- {mdoc_fl_pre, NULL}, /* Fl */
- {NULL, NULL}, /* Fn */
- {NULL, NULL}, /* Ft */
- {NULL, NULL}, /* Ic */
- {NULL, NULL}, /* In */
- {NULL, NULL}, /* Li */
- {mdoc_nd_pre, NULL}, /* Nd */
- {mdoc_nm_pre, NULL}, /* Nm */
- {mdoc_op_pre, mdoc_op_post}, /* Op */
- {NULL, NULL}, /* Ot */
- {mdoc_pa_pre, NULL}, /* Pa */
- {NULL, NULL}, /* Rv */
- {NULL, NULL}, /* St */
- {NULL, NULL}, /* Va */
- {NULL, NULL}, /* Vt */
- {mdoc_xr_pre, NULL}, /* Xr */
- {NULL, NULL}, /* %A */
- {NULL, NULL}, /* %B */
- {NULL, NULL}, /* %D */
- {NULL, NULL}, /* %I */
- {NULL, NULL}, /* %J */
- {NULL, NULL}, /* %N */
- {NULL, NULL}, /* %O */
- {NULL, NULL}, /* %P */
- {NULL, NULL}, /* %R */
- {NULL, NULL}, /* %T */
- {NULL, NULL}, /* %V */
- {NULL, NULL}, /* Ac */
- {mdoc_aq_pre, mdoc_aq_post}, /* Ao */
- {mdoc_aq_pre, mdoc_aq_post}, /* Aq */
- {NULL, NULL}, /* At */
- {NULL, NULL}, /* Bc */
- {NULL, NULL}, /* Bf */
- {NULL, NULL}, /* Bo */
- {NULL, NULL}, /* Bq */
- {mdoc_xx_pre, NULL}, /* Bsx */
- {NULL, NULL}, /* Bx */
- {NULL, NULL}, /* Db */
- {NULL, NULL}, /* Dc */
- {NULL, NULL}, /* Do */
- {mdoc_dq_pre, mdoc_dq_post}, /* Dq */
- {NULL, NULL}, /* Ec */
- {NULL, NULL}, /* Ef */
- {mdoc_em_pre, NULL}, /* Em */
- {NULL, NULL}, /* Eo */
- {mdoc_xx_pre, NULL}, /* Fx */
- {NULL, NULL}, /* Ms */
- {NULL, NULL}, /* No */
- {mdoc_ns_pre, NULL}, /* Ns */
- {mdoc_xx_pre, NULL}, /* Nx */
- {mdoc_xx_pre, NULL}, /* Ox */
- {NULL, NULL}, /* Pc */
- {NULL, NULL}, /* Pf */
- {mdoc_pq_pre, mdoc_pq_post}, /* Po */
- {mdoc_pq_pre, mdoc_pq_post}, /* Pq */
- {NULL, NULL}, /* Qc */
- {NULL, NULL}, /* Ql */
- {mdoc_qq_pre, mdoc_qq_post}, /* Qo */
- {mdoc_qq_pre, mdoc_qq_post}, /* Qq */
- {NULL, NULL}, /* Re */
- {NULL, NULL}, /* Rs */
- {NULL, NULL}, /* Sc */
- {mdoc_sq_pre, mdoc_sq_post}, /* So */
- {mdoc_sq_pre, mdoc_sq_post}, /* Sq */
- {NULL, NULL}, /* Sm */
- {mdoc_sx_pre, NULL}, /* Sx */
- {NULL, NULL}, /* Sy */
- {NULL, NULL}, /* Tn */
- {mdoc_xx_pre, NULL}, /* Ux */
- {NULL, NULL}, /* Xc */
- {NULL, NULL}, /* Xo */
- {NULL, NULL}, /* Fo */
- {NULL, NULL}, /* Fc */
- {NULL, NULL}, /* Oo */
- {NULL, NULL}, /* Oc */
- {NULL, NULL}, /* Bk */
- {NULL, NULL}, /* Ek */
- {NULL, NULL}, /* Bt */
- {NULL, NULL}, /* Hf */
- {NULL, NULL}, /* Fr */
- {NULL, NULL}, /* Ud */
- {NULL, NULL}, /* Lb */
- {NULL, NULL}, /* Lp */
- {NULL, NULL}, /* Lk */
- {NULL, NULL}, /* Mt */
- {NULL, NULL}, /* Brq */
- {NULL, NULL}, /* Bro */
- {NULL, NULL}, /* Brc */
- {NULL, NULL}, /* %C */
- {NULL, NULL}, /* Es */
- {NULL, NULL}, /* En */
- {mdoc_xx_pre, NULL}, /* Dx */
- {NULL, NULL}, /* %Q */
- {NULL, NULL}, /* br */
- {NULL, NULL}, /* sp */
-};