summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@netbsd.org>2010-05-15 16:18:23 +0000
committerJoerg Sonnenberger <joerg@netbsd.org>2010-05-15 16:18:23 +0000
commit435e0fb79416aa764cb4f1b197ecbe24887f3de4 (patch)
treedb54c83ce33284706e8ee9dbf8c04c6ede4465ab /man_term.c
parentb9297c29623c1e4db9a654cff80d1ac016fdbaee (diff)
downloadmandoc-435e0fb79416aa764cb4f1b197ecbe24887f3de4.tar.gz
Make the output width an option for ascii_alloc and use that to compute
the default margin. Hard-code 80 chars/line for now.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/man_term.c b/man_term.c
index f2410527..bde7680a 100644
--- a/man_term.c
+++ b/man_term.c
@@ -163,7 +163,7 @@ terminal_man(void *arg, const struct man *man)
p = (struct termp *)arg;
p->overstep = 0;
- p->maxrmargin = 65;
+ p->maxrmargin = p->defrmargin;
if (NULL == p->symtab)
switch (p->enc) {
@@ -803,6 +803,7 @@ post_RS(DECL_ARGS)
static void
print_man_node(DECL_ARGS)
{
+ size_t rm, rmax;
int c;
c = 1;
@@ -819,10 +820,13 @@ print_man_node(DECL_ARGS)
/* FIXME: this means that macro lines are munged! */
if (MANT_LITERAL & mt->fl) {
+ rm = p->rmargin;
+ rmax = p->maxrmargin;
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
p->flags |= TERMP_NOSPACE;
term_flushln(p);
- p->rmargin = p->maxrmargin = 65;
+ p->rmargin = rm;
+ p->maxrmargin = rmax;
}
break;
default: