diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-03 21:00:07 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-03 21:00:07 +0000 |
commit | 6198783e61c4a31dc43b4bde75b1b4367f461eaf (patch) | |
tree | affc5e7e519eaa22ae558ff80ada8ff4a886d21d /usr.bin/mandoc/mdoc_html.c | |
parent | d845afc6d38cee89409d4b87922ffdc793b0916f (diff) |
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 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index e8926d1791b..5e6f7eabb04 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.190 2018/10/04 13:22:35 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.191 2018/12/03 21:00:06 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org> @@ -60,6 +60,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); @@ -152,7 +153,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 */ @@ -225,7 +226,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 */ @@ -966,7 +967,6 @@ mdoc_bd_pre(MDOC_ARGS) case MDOC_Bl: case MDOC_D1: case MDOC_Dl: - case MDOC_Lp: case MDOC_Pp: continue; default: @@ -1806,3 +1806,9 @@ mdoc_eo_post(MDOC_ARGS) else if ( ! tail) h->flags &= ~HTML_NOSPACE; } + +static int +mdoc_abort_pre(MDOC_ARGS) +{ + abort(); +} |