summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-06-27 21:54:43 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-06-27 21:54:43 +0000
commitdae22b2a7b046070a5972b52c5be5ab23c603ce7 (patch)
tree04d8a2c11e8943c412d5e1de74ee8881754a9d61 /usr.bin/mandoc/mdoc_validate.c
parentd41b978186af813a0930f71b4972e6e4750be2c5 (diff)
Full .nr nS support, unbreaking the kernel manuals.
Kristaps coded this from scratch after reading my .nr patch; it is simpler and more powerful. Registers live in struct regset in regs.h, struct man and struct mdoc contain pointers to it. The nS register is cleared when parsing .Sh. Frontends respect the MDOC_SYNPRETTY flag set in mdoc node_alloc.
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r--usr.bin/mandoc/mdoc_validate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index a445b03c59c..3fb8d30cb56 100644
--- a/usr.bin/mandoc/mdoc_validate.c
+++ b/usr.bin/mandoc/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.62 2010/06/27 17:49:58 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.63 2010/06/27 21:54:42 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -802,6 +802,8 @@ pre_sh(PRE_ARGS)
if (MDOC_BLOCK != n->type)
return(1);
+
+ mdoc->regs->regs[(int)REG_nS].set = 0;
return(check_parent(mdoc, n, MDOC_MAX, MDOC_ROOT));
}