From 2909302dd9444108fb5c704bcc18c52c87ac537d Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 20 Aug 2009 13:32:09 +0000 Subject: [PATCH] Synchronised man.7, mdoc.7, mdoc.template manual structure. --- man.7 | 14 ++++++++++++-- mdoc.7 | 3 ++- mdoc.h | 6 +++--- mdoc.template | 1 + mdoc_strings.c | 6 ++++-- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/man.7 b/man.7 index e491a1bf..f95b3a13 100644 --- a/man.7 +++ b/man.7 @@ -1,4 +1,4 @@ -.\" $Id: man.7,v 1.32 2009/08/20 12:08:40 kristaps Exp $ +.\" $Id: man.7,v 1.33 2009/08/20 13:32:09 kristaps Exp $ .\" .\" Copyright (c) 2009 Kristaps Dzonsons .\" @@ -139,18 +139,27 @@ are generally structured as follows: \&. \&.SH NAME \efBfoo\efR \e(en a description goes here +\&.\e\*q The next is for sections 2 & 3 only. +\&.\e\*q .SH LIBRARY \&. \&.SH SYNOPSIS \efBfoo\efR [\efB\e-options\efR] arguments... \&. \&.SH DESCRIPTION -The \efBfoo\efR utility does... +The \efBfoo\efR utility processes files... \&. +\&.\e\*q .SH IMPLEMENTATION NOTES +\&.\e\*q The next is for sections 1 & 8 only. +\&.\e\*q .SH EXIT STATUS +\&.\e\*q The next is for sections 2, 3, & 9 only. \&.\e\*q .SH RETURN VALUES +\&.\e\*q The next is for sections 1, 6, 7, & 8 only. \&.\e\*q .SH ENVIRONMENT \&.\e\*q .SH FILES \&.\e\*q .SH EXAMPLES +\&.\e\*q The next is for sections 1, 4, 6, 7, & 8 only. \&.\e\*q .SH DIAGNOSTICS +\&.\e\*q The next is for sections 2, 3, & 9 only. \&.\e\*q .SH ERRORS \&.\e\*q .SH SEE ALSO \&.\e\*q \efBbar\efR(1) @@ -159,6 +168,7 @@ The \efBfoo\efR utility does... \&.\e\*q .SH AUTHORS \&.\e\*q .SH CAVEATS \&.\e\*q .SH BUGS +\&.\e\*q .SH SECURITY CONSIDERATIONS .Ed . . diff --git a/mdoc.7 b/mdoc.7 index ea263c2f..f0864db8 100644 --- a/mdoc.7 +++ b/mdoc.7 @@ -1,4 +1,4 @@ -.\" $Id: mdoc.7,v 1.58 2009/08/20 13:22:48 kristaps Exp $ +.\" $Id: mdoc.7,v 1.59 2009/08/20 13:32:09 kristaps Exp $ .\" .\" Copyright (c) 2009 Kristaps Dzonsons .\" @@ -241,6 +241,7 @@ followed by The \&.Nm utility processes files ... +\&.\e\*q .Sh IMPLEMENTATION NOTES \&.\e\*q The next is for sections 1 & 8 only. \&.\e\*q .Sh EXIT STATUS \&.\e\*q The next is for sections 2, 3, & 9 only. diff --git a/mdoc.h b/mdoc.h index 334faee4..4741bc49 100644 --- a/mdoc.h +++ b/mdoc.h @@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.68 2009/08/20 13:22:48 kristaps Exp $ */ +/* $Id: mdoc.h,v 1.69 2009/08/20 13:32:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -200,7 +200,7 @@ enum mdoc_sec { SEC_SYNOPSIS, SEC_DESCRIPTION, SEC_IMPLEMENTATION, - /* FIXME: EXIT STATUS */ + SEC_EXIT_STATUS, SEC_RETURN_VALUES, SEC_ENVIRONMENT, SEC_FILES, @@ -214,7 +214,7 @@ enum mdoc_sec { SEC_AUTHORS, SEC_CAVEATS, SEC_BUGS, - /* FIXME: SECURITY CONSIDERATIONS */ + SEC_SECURITY, SEC_CUSTOM /* User-defined. */ }; diff --git a/mdoc.template b/mdoc.template index 9dcf5893..5122f882 100644 --- a/mdoc.template +++ b/mdoc.template @@ -18,6 +18,7 @@ .\" .Sh LIBRARY .Sh SYNOPSIS .Sh DESCRIPTION +.\" .Sh IMPLEMENTATION NOTES .\" The next is for sections 1 & 8 only. .\" .Sh EXIT STATUS .\" The next is for sections 2, 3, & 9 only. diff --git a/mdoc_strings.c b/mdoc_strings.c index c299ccfd..d83551d6 100644 --- a/mdoc_strings.c +++ b/mdoc_strings.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_strings.c,v 1.9 2009/07/04 09:01:55 kristaps Exp $ */ +/* $Id: mdoc_strings.c,v 1.10 2009/08/20 13:32:09 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -30,7 +30,7 @@ struct mdoc_secname { enum mdoc_sec sec; /* Corresponding section. */ }; -#define SECNAME_MAX (18) +#define SECNAME_MAX (20) static const struct mdoc_secname secnames[SECNAME_MAX] = { { "NAME", SEC_NAME }, @@ -38,6 +38,7 @@ static const struct mdoc_secname secnames[SECNAME_MAX] = { { "SYNOPSIS", SEC_SYNOPSIS }, { "DESCRIPTION", SEC_DESCRIPTION }, { "IMPLEMENTATION NOTES", SEC_IMPLEMENTATION }, + { "EXIT STATUS", SEC_EXIT_STATUS }, { "RETURN VALUES", SEC_RETURN_VALUES }, { "ENVIRONMENT", SEC_ENVIRONMENT }, { "FILES", SEC_FILES }, @@ -51,6 +52,7 @@ static const struct mdoc_secname secnames[SECNAME_MAX] = { { "AUTHORS", SEC_AUTHORS }, { "CAVEATS", SEC_CAVEATS }, { "BUGS", SEC_BUGS }, + { "SECURITY CONSIDERATIONS", SEC_SECURITY } }; #ifdef __linux__ -- 2.47.1