aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-06 15:01:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-06 15:01:04 +0000
commit1ab4ebe5662ad82d7ab745fdb9c8124e07630673 (patch)
tree4624a848d37ebcc20c00eb4fbebd33ed81c3b593 /mdoc_man.c
parent4a4657f9f40ea60d08ecfb7c12fc46e29440ff58 (diff)
downloadmandoc-1ab4ebe5662ad82d7ab745fdb9c8124e07630673.tar.gz
mandoc-1ab4ebe5662ad82d7ab745fdb9c8124e07630673.tar.zst
mandoc-1ab4ebe5662ad82d7ab745fdb9c8124e07630673.zip
Minimal implementation of the roff(7) .ce request (center a number
of input lines without filling). Contrary to groff, high-level macros abort .ce mode for now.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index afee4466..5e628345 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.117 2017/06/04 22:44:15 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.118 2017/06/06 15:01:04 schwarze Exp $ */
/*
* Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -126,6 +126,7 @@ static void print_node(DECL_ARGS);
static const void_fp roff_manacts[ROFF_MAX] = {
pre_br,
+ pre_onearg,
pre_ft,
pre_onearg,
pre_onearg,
@@ -1582,6 +1583,9 @@ pre_onearg(DECL_ARGS)
if (n->child != NULL)
print_word(n->child->string);
outflags |= MMAN_nl;
+ if (n->tok == ROFF_ce)
+ for (n = n->child->next; n != NULL; n = n->next)
+ print_node(meta, n);
}
static int