aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-19 21:07:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-19 21:07:51 +0000
commite1d31d6d50d56c1f92cea2def5aea58251d983bc (patch)
tree619537102cab730dcb9b3aa27b74fe81812a4350 /mdoc_man.c
parent4c45e269ea164dca71f9a933c067b64485ea075f (diff)
downloadmandoc-e1d31d6d50d56c1f92cea2def5aea58251d983bc.tar.gz
mandoc-e1d31d6d50d56c1f92cea2def5aea58251d983bc.tar.zst
mandoc-e1d31d6d50d56c1f92cea2def5aea58251d983bc.zip
Move printing of the .RS macro into print_offs() such that print_offs()
takes care of printing the whole line. This reduces code duplication - in particular after the upcoming commit to repair .Bl -offset - and makes print_offs() more similar to what print_width() does. No functional change.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 44ea270a..953ddee9 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.47 2012/12/31 22:34:48 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.48 2013/05/19 21:07:51 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -408,6 +408,8 @@ print_offs(const char *v)
struct roffsu su;
size_t sz;
+ print_line(".RS", MMAN_Bk_susp);
+
/* Convert v into a number (of characters). */
if (NULL == v || '\0' == *v || 0 == strcmp(v, "left"))
sz = 0;
@@ -427,6 +429,7 @@ print_offs(const char *v)
* in terms of different units.
*/
print_word(v);
+ outflags |= MMAN_nl;
return;
}
} else
@@ -441,6 +444,7 @@ print_offs(const char *v)
snprintf(buf, sizeof(buf), "%ldn", sz);
print_word(buf);
+ outflags |= MMAN_nl;
}
/*
@@ -825,9 +829,7 @@ pre_bd(DECL_ARGS)
print_line(".nf", 0);
if (0 == n->norm->Bd.comp && NULL != n->parent->prev)
outflags |= MMAN_sp;
- print_line(".RS", MMAN_Bk_susp);
print_offs(n->norm->Bd.offs);
- outflags |= MMAN_nl;
return(1);
}
@@ -981,9 +983,7 @@ static int
pre_dl(DECL_ARGS)
{
- print_line(".RS", MMAN_Bk_susp);
print_offs("6n");
- outflags |= MMAN_nl;
return(1);
}