=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_html.c,v retrieving revision 1.107 retrieving revision 1.108 diff -c -r1.107 -r1.108 *** src/usr.bin/mandoc/man_html.c 2018/08/16 23:40:19 1.107 --- src/usr.bin/mandoc/man_html.c 2018/08/17 20:31:52 1.108 *************** *** 1,4 **** ! /* $OpenBSD: man_html.c,v 1.107 2018/08/16 23:40:19 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: man_html.c,v 1.108 2018/08/17 20:31:52 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze *************** *** 37,43 **** const struct roff_node *n, \ struct html *h ! struct htmlman { int (*pre)(MAN_ARGS); int (*post)(MAN_ARGS); }; --- 37,43 ---- const struct roff_node *n, \ struct html *h ! struct man_html_act { int (*pre)(MAN_ARGS); int (*post)(MAN_ARGS); }; *************** *** 68,74 **** static void man_root_pre(const struct roff_meta *, struct html *); ! static const struct htmlman __mans[MAN_MAX - MAN_TH] = { { NULL, NULL }, /* TH */ { man_SH_pre, NULL }, /* SH */ { man_SS_pre, NULL }, /* SS */ --- 68,74 ---- static void man_root_pre(const struct roff_meta *, struct html *); ! static const struct man_html_act man_html_acts[MAN_MAX - MAN_TH] = { { NULL, NULL }, /* TH */ { man_SH_pre, NULL }, /* SH */ { man_SS_pre, NULL }, /* SS */ *************** *** 107,113 **** { man_UR_pre, NULL }, /* MT */ { NULL, NULL }, /* ME */ }; - static const struct htmlman *const mans = __mans - MAN_TH; /* --- 107,112 ---- *************** *** 316,323 **** } assert(n->tok >= MAN_TH && n->tok < MAN_MAX); ! if (mans[n->tok].pre) ! child = (*mans[n->tok].pre)(man, n, h); /* Some block macros resume .nf in the body. */ if (save_fillmode && n->type == ROFFT_BODY) --- 315,323 ---- } assert(n->tok >= MAN_TH && n->tok < MAN_MAX); ! if (man_html_acts[n->tok - MAN_TH].pre != NULL) ! child = (*man_html_acts[n->tok - MAN_TH].pre)(man, ! n, h); /* Some block macros resume .nf in the body. */ if (save_fillmode && n->type == ROFFT_BODY)