diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-03 21:00:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-03 21:00:10 +0000 |
commit | d504e7480ce979e924b1c4fe82bdbcaa790ca153 (patch) | |
tree | bf04b3cdea5ee4c901f9affaca31b1278bbb3272 /mdoc_html.c | |
parent | b612c0fc16de6270d13910388974b03b6bf27af8 (diff) | |
download | mandoc-d504e7480ce979e924b1c4fe82bdbcaa790ca153.tar.gz |
In the validators, translate obsolete macro aliases (Lp, Ot, LP, P)
to the standard forms (Pp, Ft, PP) up front, such that later code
does not need to look for the obsolete versions.
This reduces the risk of incomplete handling.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 073aee35..4b9c7eb0 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -62,6 +62,7 @@ static int mdoc_root_pre(const struct roff_meta *, static void mdoc__x_post(MDOC_ARGS); static int mdoc__x_pre(MDOC_ARGS); +static int mdoc_abort_pre(MDOC_ARGS); static int mdoc_ad_pre(MDOC_ARGS); static int mdoc_an_pre(MDOC_ARGS); static int mdoc_ap_pre(MDOC_ARGS); @@ -154,7 +155,7 @@ static const struct mdoc_html_act mdoc_html_acts[MDOC_MAX - MDOC_Dd] = { {mdoc_nd_pre, NULL}, /* Nd */ {mdoc_nm_pre, NULL}, /* Nm */ {mdoc_quote_pre, mdoc_quote_post}, /* Op */ - {mdoc_ft_pre, NULL}, /* Ot */ + {mdoc_abort_pre, NULL}, /* Ot */ {mdoc_pa_pre, NULL}, /* Pa */ {mdoc_ex_pre, NULL}, /* Rv */ {mdoc_st_pre, NULL}, /* St */ @@ -227,7 +228,7 @@ static const struct mdoc_html_act mdoc_html_acts[MDOC_MAX - MDOC_Dd] = { {mdoc_em_pre, NULL}, /* Fr */ {NULL, NULL}, /* Ud */ {mdoc_lb_pre, NULL}, /* Lb */ - {mdoc_pp_pre, NULL}, /* Lp */ + {mdoc_abort_pre, NULL}, /* Lp */ {mdoc_lk_pre, NULL}, /* Lk */ {mdoc_mt_pre, NULL}, /* Mt */ {mdoc_quote_pre, mdoc_quote_post}, /* Brq */ @@ -968,7 +969,6 @@ mdoc_bd_pre(MDOC_ARGS) case MDOC_Bl: case MDOC_D1: case MDOC_Dl: - case MDOC_Lp: case MDOC_Pp: continue; default: @@ -1808,3 +1808,9 @@ mdoc_eo_post(MDOC_ARGS) else if ( ! tail) h->flags &= ~HTML_NOSPACE; } + +static int +mdoc_abort_pre(MDOC_ARGS) +{ + abort(); +} |