diff options
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 8f8938fd..0becd3b5 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -115,7 +115,7 @@ static int termp_rs_pre(DECL_ARGS); static int termp_sh_pre(DECL_ARGS); static int termp_skip_pre(DECL_ARGS); static int termp_sm_pre(DECL_ARGS); -static int termp_sp_pre(DECL_ARGS); +static int termp_pp_pre(DECL_ARGS); static int termp_ss_pre(DECL_ARGS); static int termp_sy_pre(DECL_ARGS); static int termp_tag_pre(DECL_ARGS); @@ -130,7 +130,7 @@ static const struct termact __termacts[MDOC_MAX - MDOC_Dd] = { { NULL, NULL }, /* Os */ { termp_sh_pre, termp_sh_post }, /* Sh */ { termp_ss_pre, termp_ss_post }, /* Ss */ - { termp_sp_pre, NULL }, /* Pp */ + { termp_pp_pre, NULL }, /* Pp */ { termp_d1_pre, termp_bl_post }, /* D1 */ { termp_d1_pre, termp_bl_post }, /* Dl */ { termp_bd_pre, termp_bd_post }, /* Bd */ @@ -232,7 +232,7 @@ static const struct termact __termacts[MDOC_MAX - MDOC_Dd] = { { termp_under_pre, NULL }, /* Fr */ { NULL, NULL }, /* Ud */ { NULL, termp_lb_post }, /* Lb */ - { termp_sp_pre, NULL }, /* Lp */ + { termp_pp_pre, NULL }, /* Lp */ { termp_lk_pre, NULL }, /* Lk */ { termp_under_pre, NULL }, /* Mt */ { termp_quote_pre, termp_quote_post }, /* Brq */ @@ -243,7 +243,6 @@ static const struct termact __termacts[MDOC_MAX - MDOC_Dd] = { { termp_quote_pre, termp_quote_post }, /* En */ { termp_xx_pre, termp_xx_post }, /* Dx */ { NULL, termp____post }, /* %Q */ - { termp_sp_pre, NULL }, /* sp */ { NULL, termp____post }, /* %U */ { NULL, NULL }, /* Ta */ }; @@ -1495,9 +1494,9 @@ termp_bd_pre(DECL_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: @@ -1644,37 +1643,10 @@ termp_in_post(DECL_ARGS) } static int -termp_sp_pre(DECL_ARGS) +termp_pp_pre(DECL_ARGS) { - struct roffsu su; - int i, len; - - switch (n->tok) { - case MDOC_sp: - if (n->child) { - if ( ! a2roffsu(n->child->string, &su, SCALE_VS)) - su.scale = 1.0; - len = term_vspan(p, &su); - } else - len = 1; - break; - case ROFF_br: - len = 0; - break; - default: - len = 1; - fn_prio = 0; - break; - } - - if (0 == len) - term_newln(p); - else if (len < 0) - p->skipvsp -= len; - else - for (i = 0; i < len; i++) - term_vspace(p); - + fn_prio = 0; + term_vspace(p); return 0; } |