-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 mdoc_root_pre(MDOC_ARGS);
-
-static int mdoc_ar_pre(MDOC_ARGS);
-static int mdoc_fl_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 int mdoc_op_pre(MDOC_ARGS);
-static void mdoc_op_post(MDOC_ARGS);
-static int mdoc_pp_pre(MDOC_ARGS);
-static int mdoc_sh_pre(MDOC_ARGS);
-static int mdoc_ss_pre(MDOC_ARGS);
-static int mdoc_xr_pre(MDOC_ARGS);
-
-static const struct htmlmdoc mdocs[MDOC_MAX] = {
- {NULL, 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 */
- {NULL, NULL}, /* D1 */
- {NULL, NULL}, /* Dl */
- {NULL, NULL}, /* Bd */
- {NULL, NULL}, /* Ed */
- {NULL, NULL}, /* Bl */
- {NULL, NULL}, /* El */
- {NULL, 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 */
- {NULL, 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 */
- {NULL, 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 */
- {NULL, NULL}, /* Ao */
- {NULL, NULL}, /* Aq */
- {NULL, NULL}, /* At */
- {NULL, NULL}, /* Bc */
- {NULL, NULL}, /* Bf */
- {NULL, NULL}, /* Bo */
- {NULL, NULL}, /* Bq */
- {NULL, NULL}, /* Bsx */
- {NULL, NULL}, /* Bx */
- {NULL, NULL}, /* Db */
- {NULL, NULL}, /* Dc */
- {NULL, NULL}, /* Do */
- {NULL, NULL}, /* Dq */
- {NULL, NULL}, /* Ec */
- {NULL, NULL}, /* Ef */
- {NULL, NULL}, /* Em */
- {NULL, NULL}, /* Eo */
- {NULL, NULL}, /* Fx */
- {NULL, NULL}, /* Ms */
- {NULL, NULL}, /* No */
- {mdoc_ns_pre, NULL}, /* Ns */
- {NULL, NULL}, /* Nx */
- {NULL, NULL}, /* Ox */
- {NULL, NULL}, /* Pc */
- {NULL, NULL}, /* Pf */
- {NULL, NULL}, /* Po */
- {NULL, NULL}, /* Pq */
- {NULL, NULL}, /* Qc */
- {NULL, NULL}, /* Ql */
- {NULL, NULL}, /* Qo */
- {NULL, NULL}, /* Qq */
- {NULL, NULL}, /* Re */
- {NULL, NULL}, /* Rs */
- {NULL, NULL}, /* Sc */
- {NULL, NULL}, /* So */
- {NULL, NULL}, /* Sq */
- {NULL, NULL}, /* Sm */
- {NULL, NULL}, /* Sx */
- {NULL, NULL}, /* Sy */
- {NULL, NULL}, /* Tn */
- {NULL, 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 */
- {NULL, NULL}, /* Dx */
- {NULL, NULL}, /* %Q */
- {NULL, NULL}, /* br */
- {NULL, NULL}, /* sp */
-};
+static void print_doctype(struct html *);
+static void print_xmltype(struct html *);
+static int print_encode(struct html *, const char *, int);
+static void print_metaf(struct html *, enum roffdeco);
+static void print_attr(struct html *,
+ const char *, const char *);
+static void *ml_alloc(char *, enum htmltype);