summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2009-07-26 23:32:26 +0000
committerschwarze <schwarze@openbsd.org>2009-07-26 23:32:26 +0000
commitf21ae07920319bf443e542093840fb20f1886718 (patch)
tree7ae3ec8a36df868f47537d4da7d926824dd501c3
parentsync to 1.8.1: describe corrected handling of quoted literals, (diff)
downloadwireguard-openbsd-f21ae07920319bf443e542093840fb20f1886718.tar.xz
wireguard-openbsd-f21ae07920319bf443e542093840fb20f1886718.zip
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.c9
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))