summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_term.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-02-04 11:56:48 +0000
committerschwarze <schwarze@openbsd.org>2017-02-04 11:56:48 +0000
commit0b7c4dd875b4710ffb99d1cf01f4bdfe0bdb9440 (patch)
treeb6199cfbc213d389ca0a11e11355d3fa50881327 /usr.bin/mandoc/man_term.c
parentUpdate usage for ps/w to match previous commit (diff)
downloadwireguard-openbsd-0b7c4dd875b4710ffb99d1cf01f4bdfe0bdb9440.tar.xz
wireguard-openbsd-0b7c4dd875b4710ffb99d1cf01f4bdfe0bdb9440.zip
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/man_term.c')
-rw-r--r--usr.bin/mandoc/man_term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index 5e581a7884b..c1db2c0dd47 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: man_term.c,v 1.141 2017/01/10 13:46:53 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.142 2017/02/04 11:56:48 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -141,6 +141,7 @@ terminal_man(void *arg, const struct roff_man *man)
struct termp *p;
struct roff_node *n;
struct mtermp mt;
+ size_t save_defindent;
p = (struct termp *)arg;
p->overstep = 0;
@@ -168,6 +169,7 @@ terminal_man(void *arg, const struct roff_man *man)
n = n->next;
}
} else {
+ save_defindent = p->defindent;
if (p->defindent == 0)
p->defindent = 7;
term_begin(p, print_man_head, print_man_foot, &man->meta);
@@ -175,6 +177,7 @@ terminal_man(void *arg, const struct roff_man *man)
if (n != NULL)
print_man_nodelist(p, &mt, n, &man->meta);
term_end(p);
+ p->defindent = save_defindent;
}
}