man-pages.7: Add indent(1) command that produces desired formatting for example code

Reported-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-03-09 08:48:57 +01:00
parent a98b2e1b98
commit b1f800c6d2
1 changed files with 4 additions and 0 deletions

View File

@ -857,6 +857,10 @@ input read by the program).
Example programs should be laid out according to Kernighan and Example programs should be laid out according to Kernighan and
Ritchie style, with 4-space indents. Ritchie style, with 4-space indents.
(Avoid the use of TAB characters in source code!) (Avoid the use of TAB characters in source code!)
The following command can be used to format your source code to
the preferred style:
indent \-npro \-kr \-i4 \-ts4 \-sob \-l80 \-ss \-nut \-psl prog.c
.IP * .IP *
For consistency, all example programs should terminate using either of: For consistency, all example programs should terminate using either of: