aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-05 15:17:32 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-05 15:17:32 +0000
commitac714e0488d7c68718c62be1daa50511092a070d (patch)
tree23603ba00471fb588afdd3b7c5765fab62424249 /mdoc_html.c
parent264209da4a75cf323caf3e1a5e89534f15086b73 (diff)
downloadmandoc-ac714e0488d7c68718c62be1daa50511092a070d.tar.gz
mandoc-ac714e0488d7c68718c62be1daa50511092a070d.tar.zst
mandoc-ac714e0488d7c68718c62be1daa50511092a070d.zip
Move .sp to the roff modules. Enough infrastructure is in place
now that this actually saves code: -70 LOC.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index b492af4a..9819c2ff 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.284 2017/05/05 13:17:55 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.285 2017/05/05 15:17:32 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -108,7 +108,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);
@@ -237,7 +236,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 */
};
@@ -1009,9 +1007,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:
@@ -1326,28 +1324,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;