diff options
author | 2013-05-19 21:05:29 +0000 | |
---|---|---|
committer | 2013-05-19 21:05:29 +0000 | |
commit | f7135bb70b7649f3ca40aededa2c510f8fc01416 (patch) | |
tree | 53123efca6bdf7a184aa5ebcfbc2f554ae356d16 /usr.bin/mandoc/mdoc_man.c | |
parent | If pid<0, kill() won't fail with EPERM unless none of the target processes (diff) | |
download | wireguard-openbsd-f7135bb70b7649f3ca40aededa2c510f8fc01416.tar.xz wireguard-openbsd-f7135bb70b7649f3ca40aededa2c510f8fc01416.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 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_man.c | 10 |
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); } |