summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-17 12:40:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-17 12:40:48 +0000
commit5b36c2d81f09cf709b03ffaf2174f9d15cded999 (patch)
tree5efcfa43514e983f64a70259f94735aeb1cb47c8 /mdoc_term.c
parentbf9af2d1aeed5f52cb468d8e1b89e8234e0d20c1 (diff)
downloadmandoc-5b36c2d81f09cf709b03ffaf2174f9d15cded999.tar.gz
`sp' documented: validates & produces correct output.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 016e8a62..e100f376 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -164,6 +164,7 @@ static int termp_rs_pre(DECL_ARGS);
static int termp_rv_pre(DECL_ARGS);
static int termp_sh_pre(DECL_ARGS);
static int termp_sm_pre(DECL_ARGS);
+static int termp_sp_pre(DECL_ARGS);
static int termp_sq_pre(DECL_ARGS);
static int termp_ss_pre(DECL_ARGS);
static int termp_sx_pre(DECL_ARGS);
@@ -294,7 +295,7 @@ static const struct termact termacts[MDOC_MAX] = {
{ termp_xx_pre, NULL }, /* Dx */
{ NULL, NULL }, /* %Q */
{ termp_br_pre, NULL }, /* br */
- { NULL, NULL }, /* sp */
+ { termp_sp_pre, NULL }, /* sp */
};
#ifdef __linux__
@@ -1833,6 +1834,27 @@ termp_in_post(DECL_ARGS)
/* ARGSUSED */
static int
+termp_sp_pre(DECL_ARGS)
+{
+ int i, len;
+
+ if (NULL == node->child) {
+ term_vspace(p);
+ return(0);
+ }
+
+ len = atoi(node->child->string);
+ if (0 == len)
+ term_newln(p);
+ for (i = 0; i < len; i++)
+ term_vspace(p);
+
+ return(0);
+}
+
+
+/* ARGSUSED */
+static int
termp_br_pre(DECL_ARGS)
{