From 435e0fb79416aa764cb4f1b197ecbe24887f3de4 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sat, 15 May 2010 16:18:23 +0000 Subject: Make the output width an option for ascii_alloc and use that to compute the default margin. Hard-code 80 chars/line for now. --- man_term.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'man_term.c') 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: -- cgit