summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2013-05-19 21:05:30 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2013-05-19 21:05:30 +0000
commit34c372a3097ff834e96ec1755a592aff3963fe29 (patch)
tree79c939f80442f8a9cec35af869e11498b026ea4c
parent0e8f0837b41fad88831c4f2ae9e4c7d770ce4274 (diff)
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.
-rw-r--r--usr.bin/mandoc/mdoc_man.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index e8cf9c82a86..eb2b0da45db 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.46 2012/12/31 22:34:01 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.47 2013/05/19 21:05:29 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -404,6 +404,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;
@@ -423,6 +425,7 @@ print_offs(const char *v)
* in terms of different units.
*/
print_word(v);
+ outflags |= MMAN_nl;
return;
}
} else
@@ -437,6 +440,7 @@ print_offs(const char *v)
snprintf(buf, sizeof(buf), "%ldn", sz);
print_word(buf);
+ outflags |= MMAN_nl;
}
/*
@@ -821,9 +825,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);
}
@@ -977,9 +979,7 @@ static int
pre_dl(DECL_ARGS)
{
- print_line(".RS", MMAN_Bk_susp);
print_offs("6n");
- outflags |= MMAN_nl;
return(1);
}