summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-10 08:05:17 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-10 08:05:17 +0000
commitbed4998695cb74458a9807c5d4904d4cafe6df51 (patch)
tree5fc5bf3cf422acc74a6c6223ac5c7295dffedba7
parentec394264f288d5b965e81e12e6cbee8fb190ab13 (diff)
downloadmandoc-bed4998695cb74458a9807c5d4904d4cafe6df51.tar.gz
-man also now has unbound margins for literal context.
-rw-r--r--man_term.c6
-rw-r--r--mdoc_term.c4
-rw-r--r--term.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/man_term.c b/man_term.c
index 1715ff26..65d46f75 100644
--- a/man_term.c
+++ b/man_term.c
@@ -260,7 +260,6 @@ static int
pre_fi(DECL_ARGS)
{
- p->rmargin = p->maxrmargin = 65;
mt->fl &= ~MANT_LITERAL;
return(1);
}
@@ -271,10 +270,7 @@ static int
pre_nf(DECL_ARGS)
{
- p->rmargin = p->maxrmargin = 78;
- term_newln(p);
mt->fl |= MANT_LITERAL;
-
return(MAN_Vb != n->tok);
}
@@ -820,8 +816,10 @@ print_man_node(DECL_ARGS)
/* FIXME: this means that macro lines are munged! */
if (MANT_LITERAL & mt->fl) {
+ p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
p->flags |= TERMP_NOSPACE;
term_flushln(p);
+ p->rmargin = p->maxrmargin = 65;
}
break;
default:
diff --git a/mdoc_term.c b/mdoc_term.c
index 282d271a..b175c784 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1659,7 +1659,7 @@ termp_bd_pre(DECL_ARGS)
rm = p->rmargin;
rmax = p->maxrmargin;
- p->rmargin = p->maxrmargin = 100000; /* FIXME */
+ p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
for (nn = n->child; nn; nn = nn->next) {
p->flags |= TERMP_NOSPACE;
@@ -1695,7 +1695,7 @@ termp_bd_post(DECL_ARGS)
rmax = p->maxrmargin;
if (MDOC_Literal == type || MDOC_Unfilled == type)
- p->rmargin = p->maxrmargin = 100000; /* FIXME */
+ p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
p->flags |= TERMP_NOSPACE;
term_flushln(p);
diff --git a/term.h b/term.h
index 865bf4d4..f048e091 100644
--- a/term.h
+++ b/term.h
@@ -29,6 +29,8 @@ enum termfont {
TERMFONT_UNDER
};
+#define TERM_MAXMARGIN 100000 /* FIXME */
+
struct termp {
size_t rmargin; /* Current right margin. */
size_t maxrmargin; /* Max right margin. */