summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-03-02 01:17:21 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-03-02 01:17:21 +0000
commit58c4f21bc4e7b936235ca98f9615e1b54b0c2c53 (patch)
treef0402b266fbebb32bd5c05057311597e2db5dd21 /usr.bin/mandoc
parentc2106c30fc02017f424d0af2aaea8733129851a9 (diff)
For -man -Tascii, limit the width of normal text to 65 characters,
and effectively unlimit the width of literal displays. Following this traditional behaviour allows for automatic output comparisons.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/man_term.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index d30823cc11d..b6c7d13b229 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.23 2010/03/02 01:00:39 schwarze Exp $ */
+/* $Id: man_term.c,v 1.24 2010/03/02 01:17:20 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -153,6 +153,7 @@ terminal_man(void *arg, const struct man *man)
if (NULL == p->symtab)
switch (p->enc) {
case (TERMENC_ASCII):
+ p->maxrmargin = 65;
p->symtab = chars_init(CHARS_ASCII);
break;
default:
@@ -245,6 +246,7 @@ static int
pre_fi(DECL_ARGS)
{
+ p->rmargin = p->maxrmargin = 65;
mt->fl &= ~MANT_LITERAL;
return(1);
}
@@ -255,6 +257,7 @@ static int
pre_nf(DECL_ARGS)
{
+ p->rmargin = p->maxrmargin = 160;
term_newln(p);
mt->fl |= MANT_LITERAL;
return(1);