mirror of https://github.com/mkerrisk/man-pages
Modify requirements for example programs a little.
This commit is contained in:
parent
4594917527
commit
5998eb256a
|
@ -41,7 +41,6 @@ for authors writing man pages for other projects.
|
||||||
.SS Sections of the Manual Pages
|
.SS Sections of the Manual Pages
|
||||||
.PP
|
.PP
|
||||||
The manual Sections are traditionally defined as follows:
|
The manual Sections are traditionally defined as follows:
|
||||||
.RS
|
|
||||||
.TP 10
|
.TP 10
|
||||||
.B 1 Commands (Programs)
|
.B 1 Commands (Programs)
|
||||||
Those commands that can be executed by the user from within
|
Those commands that can be executed by the user from within
|
||||||
|
@ -82,7 +81,6 @@ many of which only root can execute.
|
||||||
.\" that exists is outdated already.
|
.\" that exists is outdated already.
|
||||||
.\" There are better sources of
|
.\" There are better sources of
|
||||||
.\" information for kernel developers.
|
.\" information for kernel developers.
|
||||||
.RE
|
|
||||||
.SS Macro package
|
.SS Macro package
|
||||||
New manual pages should be marked up using the
|
New manual pages should be marked up using the
|
||||||
.B groff tmac.an
|
.B groff tmac.an
|
||||||
|
@ -451,22 +449,8 @@ input read by the program).
|
||||||
.TP
|
.TP
|
||||||
*
|
*
|
||||||
Example programs should be laid out according to Kernighan and
|
Example programs should be laid out according to Kernighan and
|
||||||
Ritchie style, with a few concessions:
|
Ritchie style, with 4-space indents.
|
||||||
.RS
|
|
||||||
.TP 3
|
|
||||||
\(bu
|
|
||||||
4-space indents are preferred.
|
|
||||||
(Avoid the use of TAB characters in source code!)
|
(Avoid the use of TAB characters in source code!)
|
||||||
.TP
|
|
||||||
\(bu
|
|
||||||
In the interests of keeping a program short, compressing
|
|
||||||
error-handling code such as in the following is acceptable:
|
|
||||||
.nf
|
|
||||||
|
|
||||||
if (func(...) == -1)
|
|
||||||
{ perror("func"); exit(EXIT_FAILURE); }
|
|
||||||
.fi
|
|
||||||
.RE
|
|
||||||
.PP
|
.PP
|
||||||
For some examples of what example programs should look like, see
|
For some examples of what example programs should look like, see
|
||||||
.BR wait (2)
|
.BR wait (2)
|
||||||
|
|
Loading…
Reference in New Issue