diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-07-26 23:32:27 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-07-26 23:32:27 +0000 |
commit | 506d084898e3bd3d2d30533c7ac61d8e8d0dee89 (patch) | |
tree | 6930747fd6304f5fda779772e97793a753dbc8d0 | |
parent | b7e37bb390132377954d9417762daa6fb7bea30f (diff) |
sync to 1.8.1: add a comment explaining the non-trivial termpair semantics;
a bug in this very respect was contained in the upstream equivalent
of rev. 1.28, but was squashed while merging into OpenBSD
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index ad8925d3d2f..2bbd0d0e2c8 100644 --- a/usr.bin/mandoc/mdoc_term.c +++ b/usr.bin/mandoc/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.38 2009/07/26 01:59:46 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.39 2009/07/26 23:32:26 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -359,6 +359,13 @@ print_node(DECL_ARGS) npair.flag = 0; npair.count = 0; + /* + * Note on termpair. This allows a pre function to set a termp + * flag that is automatically unset after the body, but before + * the post function. Thus, if a pre uses a termpair flag, it + * must be reapplied in the post for use. + */ + if (MDOC_TEXT != node->type) { if (termacts[node->tok].pre) if ( ! (*termacts[node->tok].pre)(p, &npair, meta, node)) |