source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Support the CONTEXT section for kernel manual pages found in
@ 2014-03-31  1:05 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-03-31  1:05 UTC (permalink / raw)
  To: source

Log Message:
-----------
Support the CONTEXT section for kernel manual pages found in Solaris and
OpenBSD manuals.  It describes which contexts you can call functions in.
from dlg@, ok jmc@ deraadt@

Modified Files:
--------------
    mdocml:
        man.7
        mdoc.7
        mdoc.h
        mdoc_validate.c

Revision Data
-------------
Index: man.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.7,v
retrieving revision 1.125
retrieving revision 1.126
diff -Lman.7 -Lman.7 -u -p -r1.125 -r1.126
--- man.7
+++ man.7
@@ -106,6 +106,8 @@ file for a utility
 \efBprogname\efR [\efB\e-options\efR] \efIfile ...\efR
 \&.SH DESCRIPTION
 The \efBfoo\efR utility processes files ...
+\&.\e\(dq .Sh CONTEXT
+\&.\e\(dq For section 9 functions only.
 \&.\e\(dq .SH IMPLEMENTATION NOTES
 \&.\e\(dq Not used in OpenBSD.
 \&.\e\(dq .SH RETURN VALUES
@@ -171,6 +173,9 @@ This expands upon the brief, one-line de
 .Em NAME .
 It usually contains a break-down of the options (if documenting a
 command).
+.It Em CONTEXT
+This section lists the contexts in which functions can be called in section 9.
+The contexts are autoconf, process, or interrupt.
 .It Em IMPLEMENTATION NOTES
 Implementation-specific notes should be kept here.
 This is useful when implementing standard functions that may have side
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.207
retrieving revision 1.208
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.207 -r1.208
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -332,6 +332,7 @@ static	const char * const secnames[SEC__
 	"LIBRARY",
 	"SYNOPSIS",
 	"DESCRIPTION",
+	"CONTEXT",
 	"IMPLEMENTATION NOTES",
 	"RETURN VALUES",
 	"ENVIRONMENT",
@@ -2040,6 +2041,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,
Index: mdoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.h,v
retrieving revision 1.127
retrieving revision 1.128
diff -Lmdoc.h -Lmdoc.h -u -p -r1.127 -r1.128
--- mdoc.h
+++ mdoc.h
@@ -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 */
Index: mdoc.7
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.7,v
retrieving revision 1.227
retrieving revision 1.228
diff -Lmdoc.7 -Lmdoc.7 -u -p -r1.227 -r1.228
--- mdoc.7
+++ mdoc.7
@@ -135,6 +135,8 @@ file for a utility
 The
 \&.Nm
 utility processes files ...
+\&.\e\(dq .Sh CONTEXT
+\&.\e\(dq For section 9 functions only.
 \&.\e\(dq .Sh IMPLEMENTATION NOTES
 \&.\e\(dq Not used in OpenBSD.
 \&.\e\(dq .Sh RETURN VALUES
@@ -318,6 +320,9 @@ macro followed by a non-standard section
 several subsections, like in the present
 .Nm
 manual.
+.It Em CONTEXT
+This section lists the contexts in which functions can be called in section 9.
+The contexts are autoconf, process, or interrupt.
 .It Em IMPLEMENTATION NOTES
 Implementation-specific notes should be kept here.
 This is useful when implementing standard functions that may have side
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-31  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31  1:05 mdocml: Support the CONTEXT section for kernel manual pages found in schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).