diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-03-31 00:02:46 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-03-31 00:02:46 +0000 |
commit | 9b78037dd349cc1d52a082603c965161d789c80f (patch) | |
tree | 27a640618cff0db458b7572a011e9f06c7662205 | |
parent | c866c332c53011e4fb5d07e8965bf00902248a9b (diff) |
recognise the CONTEXT section. we consider it only applicable to
section 9 manpages for now.
requested by schwartz@ pre 5.5
tweaks by jmc@ schwartz@
ok schwartz@
-rw-r--r-- | usr.bin/mandoc/mdoc.h | 3 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc.h b/usr.bin/mandoc/mdoc.h index 85b08027a77..0f04cf7b5bb 100644 --- a/usr.bin/mandoc/mdoc.h +++ b/usr.bin/mandoc/mdoc.h @@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.51 2014/03/30 19:47:32 schwarze Exp $ */ +/* $Id: mdoc.h,v 1.52 2014/03/31 00:02:45 dlg Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -199,6 +199,7 @@ enum mdoc_sec { SEC_LIBRARY, /* LIBRARY */ SEC_SYNOPSIS, /* SYNOPSIS */ SEC_DESCRIPTION, /* DESCRIPTION */ + SEC_CONTEXT, /* CONTEXT */ SEC_IMPLEMENTATION, /* IMPLEMENTATION NOTES */ SEC_RETURN_VALUES, /* RETURN VALUES */ SEC_ENVIRONMENT, /* ENVIRONMENT */ diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 934381bd358..0986ef42fd5 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.125 2014/03/30 19:47:32 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.126 2014/03/31 00:02:45 dlg Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -328,6 +328,7 @@ static const char * const secnames[SEC__MAX] = { "LIBRARY", "SYNOPSIS", "DESCRIPTION", + "CONTEXT", "IMPLEMENTATION NOTES", "RETURN VALUES", "ENVIRONMENT", @@ -2036,6 +2037,8 @@ post_sh_head(POST_ARGS) break; if (*mdoc->meta.msec == '3') break; + /* FALLTHROUGH */ + case (SEC_CONTEXT): if (*mdoc->meta.msec == '9') break; mandoc_msg(MANDOCERR_SECMSEC, mdoc->parse, |