summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-05-05 15:16:27 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-05-05 15:16:27 +0000
commit6cd94f10b75222b100778c63c74f4e65cdae907d (patch)
tree99a82d80e2b2d7eda42d7e3b503194fa85a6f2e8 /usr.bin/mandoc/mdoc_html.c
parent97f312d6506cec9c05d150482378eb6e09e824d6 (diff)
Move .sp to the roff modules. Enough infrastructure is in place
now that this actually saves code: -70 LOC.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index f5d8f0da901..77a30751688 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.159 2017/05/05 13:17:04 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.160 2017/05/05 15:16:25 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -106,7 +106,6 @@ static int mdoc_rs_pre(MDOC_ARGS);
static int mdoc_sh_pre(MDOC_ARGS);
static int mdoc_skip_pre(MDOC_ARGS);
static int mdoc_sm_pre(MDOC_ARGS);
-static int mdoc_sp_pre(MDOC_ARGS);
static int mdoc_ss_pre(MDOC_ARGS);
static int mdoc_st_pre(MDOC_ARGS);
static int mdoc_sx_pre(MDOC_ARGS);
@@ -235,7 +234,6 @@ static const struct htmlmdoc __mdocs[MDOC_MAX - MDOC_Dd] = {
{mdoc_quote_pre, mdoc_quote_post}, /* En */
{mdoc_xx_pre, NULL}, /* Dx */
{mdoc__x_pre, mdoc__x_post}, /* %Q */
- {mdoc_sp_pre, NULL}, /* sp */
{mdoc__x_pre, mdoc__x_post}, /* %U */
{NULL, NULL}, /* Ta */
};
@@ -1007,9 +1005,9 @@ mdoc_bd_pre(MDOC_ARGS)
* anyway, so don't sweat it.
*/
switch (nn->tok) {
- case MDOC_Sm:
case ROFF_br:
- case MDOC_sp:
+ case ROFF_sp:
+ case MDOC_Sm:
case MDOC_Bl:
case MDOC_D1:
case MDOC_Dl:
@@ -1324,28 +1322,6 @@ mdoc_pp_pre(MDOC_ARGS)
}
static int
-mdoc_sp_pre(MDOC_ARGS)
-{
- struct roffsu su;
-
- SCALE_VS_INIT(&su, 1);
- if (NULL != (n = n->child)) {
- if ( ! a2roffsu(n->string, &su, SCALE_VS))
- su.scale = 1.0;
- else if (su.scale < 0.0)
- su.scale = 0.0;
- }
-
- print_otag(h, TAG_DIV, "suh", &su);
-
- /* So the div isn't empty: */
- print_text(h, "\\~");
-
- return 0;
-
-}
-
-static int
mdoc_lk_pre(MDOC_ARGS)
{
struct tag *t;