aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-03 21:00:10 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-03 21:00:10 +0000
commit820b4d56427ff6a0f1e3399ac7e4aea447dd5c20 (patch)
tree021019d37963c18cc8553ccaff918c1f9ea1441f /mdoc_html.c
parent17e67c5cb10de07302a0f0ad1a0da7af23788f98 (diff)
downloadmandoc-820b4d56427ff6a0f1e3399ac7e4aea447dd5c20.tar.gz
mandoc-820b4d56427ff6a0f1e3399ac7e4aea447dd5c20.tar.zst
mandoc-820b4d56427ff6a0f1e3399ac7e4aea447dd5c20.zip
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.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index b78014d2..02842650 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.315 2018/10/04 13:23:04 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.316 2018/12/03 21:00:10 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -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();
+}