summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-04 11:56:49 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-04 11:56:49 +0000
commit941d93d97880208844ddcc7871106a195ee3fc7c (patch)
tree7777dfca7fdc0348bda274815124145dddc0cb77 /usr.bin/mandoc/mdoc_term.c
parent3941eebf23e4f3cb052713707e2d90b7f2e95be2 (diff)
Do not fix the default indent for all subsequent files; some may use
a different macro language and hence require a different indent. You can see the effect with "man -a 1 host hostname".
Diffstat (limited to 'usr.bin/mandoc/mdoc_term.c')
-rw-r--r--usr.bin/mandoc/mdoc_term.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index f176d689de6..c5735362072 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_term.c,v 1.240 2017/01/11 17:39:45 schwarze Exp $ */
+/* $OpenBSD: mdoc_term.c,v 1.241 2017/02/04 11:56:48 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -256,6 +256,7 @@ terminal_mdoc(void *arg, const struct roff_man *mdoc)
{
struct roff_node *n;
struct termp *p;
+ size_t save_defindent;
p = (struct termp *)arg;
p->overstep = 0;
@@ -276,6 +277,7 @@ terminal_mdoc(void *arg, const struct roff_man *mdoc)
n = n->next;
}
} else {
+ save_defindent = p->defindent;
if (p->defindent == 0)
p->defindent = 5;
term_begin(p, print_mdoc_head, print_mdoc_foot,
@@ -288,6 +290,7 @@ terminal_mdoc(void *arg, const struct roff_man *mdoc)
print_mdoc_nodelist(p, NULL, &mdoc->meta, n);
}
term_end(p);
+ p->defindent = save_defindent;
}
}