aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-04 11:58:09 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-04 11:58:09 +0000
commite4856730c8ae137f75b06abac3e1d29e98934732 (patch)
treeccd2ad0780985dde993db982ceca6ecfa57905c5 /man_term.c
parent0d727b1fc72e03c96b67adc84456ffbc3e44d6c4 (diff)
downloadmandoc-e4856730c8ae137f75b06abac3e1d29e98934732.tar.gz
mandoc-e4856730c8ae137f75b06abac3e1d29e98934732.tar.zst
mandoc-e4856730c8ae137f75b06abac3e1d29e98934732.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 'man_term.c')
-rw-r--r--man_term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/man_term.c b/man_term.c
index 672ab416..fd2fc993 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,7 +1,7 @@
-/* $Id: man_term.c,v 1.188 2017/01/10 13:47:00 schwarze Exp $ */
+/* $Id: man_term.c,v 1.189 2017/02/04 11:58:09 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
@@ -143,6 +143,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;
@@ -170,6 +171,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);
@@ -177,6 +179,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;
}
}