diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-05 15:17:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-05 15:17:32 +0000 |
commit | 59ff183bfbf2ef15bb6bae96290e8347aef13fb0 (patch) | |
tree | 44bdd5ee7af707828e02619c5b92b76ff63f5a20 /mdoc_html.c | |
parent | 3f8e564abc73c1abd2c1286b5e767b2b101aae57 (diff) | |
download | mandoc-59ff183bfbf2ef15bb6bae96290e8347aef13fb0.tar.gz |
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.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 3c8ebdf8..85dfa5a5 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -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; |