Subject: bin/9220: Updates for indent man page
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ginsbach@spacestar.net>
List: netbsd-bugs
Date: 01/17/2000 17:56:36
>Number: 9220
>Category: bin
>Synopsis: Updates for indent man page
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 17 17:54:00 2000
>Last-Modified:
>Originator: Brian Ginsbach
>Organization:
None
>Release: 1.4
>Environment:
N.A.
>Description:
The indent man page does not list all of the possible options.
It is also not very consistent about how defaults are listed
for each option. Some are listed and some are not. Some say
"The default is ..." and others "Default:". Also some of the
descriptions are misleading or wrong.
>How-To-Repeat:
Read the man page and look at the indent source.
>Fix:
*** indent.1.orig Wed Mar 24 06:22:03 1999
--- indent.1 Mon Jan 17 18:05:59 2000
***************
*** 48,53 ****
--- 48,56 ----
.Op Ar input-file Op Ar output-file
.Ek
.Bk -words
+ .Op Fl bacc | Fl nbacc
+ .Ek
+ .Bk -words
.Op Fl bad | Fl nbad
.Ek
.Bk -words
***************
*** 112,118 ****
program in the
.Ar input-file
according to the switches. The switches which can be
! specified are described below. They may appear before or after the file
names.
.Pp
.Sy NOTE :
--- 115,121 ----
program in the
.Ar input-file
according to the switches. The switches which can be
! specified are described below. They may appear before or after the file
names.
.Pp
.Sy NOTE :
***************
*** 140,145 ****
--- 143,156 ----
The options listed below control the formatting style imposed by
.Nm "" .
.Bl -tag -width Op
+ .It Fl bacc , nbacc
+ If
+ .Fl bacc
+ is specified, a blank line is forced around every conditional
+ compilation block.
+ For example, in from of every #ifdef and after every #endif.
+ Other blank lines surrounding such blocks will be swallowed. Default:
+ .Fl nbacc .
.It Fl bad , nbad
If
.Fl bad
***************
*** 150,167 ****
If
.Fl bap
is specified, a blank line is forced after every procedure body. Default:
! .Fl nbap .
.It Fl bbb , nbbb
If
.Fl bbb
is specified, a blank line is forced before every block comment. Default:
! .Fl nbbb .
.It Fl \&bc , nbc
If
.Fl \&bc
is specified, then a newline is forced after each comma in a declaration.
.Fl nbc
! turns off this option. The default is
.Fl \&bc .
.It Fl \&br , \&bl
Specifying
--- 161,178 ----
If
.Fl bap
is specified, a blank line is forced after every procedure body. Default:
! .Fl nbap .
.It Fl bbb , nbbb
If
.Fl bbb
is specified, a blank line is forced before every block comment. Default:
! .Fl nbbb .
.It Fl \&bc , nbc
If
.Fl \&bc
is specified, then a newline is forced after each comma in a declaration.
.Fl nbc
! turns off this option. Default:
.Fl \&bc .
.It Fl \&br , \&bl
Specifying
***************
*** 185,193 ****
}
.Ed
.Pp
! .It Fl c n
! The column in which comments on code start. The default is 33.
! .It Fl cd n
The column in which comments on declarations start. The default
is for these comments to start in the same column as those on code.
.It Fl cdb , ncdb
--- 196,212 ----
}
.Ed
.Pp
! .It Fl bs , Fl nbs
! If
! .Fl bs
! is specified, a blank is forced after
! .Ic sizeof .
! Default:
! .Fl nbs .
! .It Fl c Ns Ar n
! The column in which comments on code start. Default:
! .Fl c33 .
! .It Fl cd Ns Ar n
The column in which comments on declarations start. The default
is for these comments to start in the same column as those on code.
.It Fl cdb , ncdb
***************
*** 205,215 ****
.Ed
.Pp
This only affects block comments, not comments to the right of
! code. The default is
.Fl cdb .
.It Fl ce , nce
Enables (disables) forcing `else's to cuddle up to the immediately preceding
! `}'. The default is
.Fl \&ce .
.It Fl \&ci Ns Ar n
Sets the continuation indent to be
--- 224,234 ----
.Ed
.Pp
This only affects block comments, not comments to the right of
! code. Default:
.Fl cdb .
.It Fl ce , nce
Enables (disables) forcing `else's to cuddle up to the immediately preceding
! `}'. Default:
.Fl \&ce .
.It Fl \&ci Ns Ar n
Sets the continuation indent to be
***************
*** 229,256 ****
tab stops to the right of the containing
.Ic switch
statement.
! .Fl cli0 .5
! causes case labels to be indented half a tab stop. The
! default is
.Fl cli0 .
.It Fl d Ns Ar n
Controls the placement of comments which are not to the
! right of code. The default
.Fl \&d\&1
means that such comments are placed one indentation level to the
! left of code. Specifying
.Fl \&d\&0
lines up these comments with the code. See the section on comment
indentation below.
.It Fl \&di Ns Ar n
Specifies the indentation, in character positions, from a declaration keyword
! to the following identifier. The default is
.Fl di16 .
.It Fl dj , ndj
.Fl \&dj
left justifies declarations.
.Fl ndj
! indents declarations the same as code. The default is
.Fl ndj .
.It Fl \&ei , nei
Enables (disables) special
--- 248,274 ----
tab stops to the right of the containing
.Ic switch
statement.
! .Fl cli0.5
! causes case labels to be indented half a tab stop. Default:
.Fl cli0 .
.It Fl d Ns Ar n
Controls the placement of comments which are not to the
! right of code. For example,
.Fl \&d\&1
means that such comments are placed one indentation level to the
! left of code. Specifying the default
.Fl \&d\&0
lines up these comments with the code. See the section on comment
indentation below.
.It Fl \&di Ns Ar n
Specifies the indentation, in character positions, from a declaration keyword
! to the following identifier. Default:
.Fl di16 .
.It Fl dj , ndj
.Fl \&dj
left justifies declarations.
.Fl ndj
! indents declarations the same as code. Default:
.Fl ndj .
.It Fl \&ei , nei
Enables (disables) special
***************
*** 261,283 ****
.Ic else
will have the same indentation as the preceding
.Ic \&if
! statement.
.It Fl fc1 , nfc1
Enables (disables) the formatting of comments that start in column 1.
Often, comments whose leading `/' is in column 1 have been carefully
hand formatted by the programmer. In such cases,
.Fl nfc1
should be
! used. The default is
.Fl fc1 .
.It Fl i Ns Ar n
! The number of spaces for one indentation level. The default is 4.
.It Fl \&ip , nip
Enables (disables) the indentation of parameter declarations from the left
! margin. The default is
.Fl \&ip .
.It Fl l Ns Ar n
! Maximum length of an output line. The default is 75.
.It Fl \&lp , nlp
Lines up code surrounded by parenthesis in continuation lines. If a line
has a left paren which is not closed on that line, then continuation lines
--- 279,313 ----
.Ic else
will have the same indentation as the preceding
.Ic \&if
! statement. Default:
! .Fl ei .
! .It Fl eei , neei
! Enables (disables) extra indentation on continuation lines of
! the expression part of
! .Ic if
! and
! .Ic while
! statements. These continuation
! lines will be indented one extra level. Default:
! .Fl neei .
.It Fl fc1 , nfc1
Enables (disables) the formatting of comments that start in column 1.
Often, comments whose leading `/' is in column 1 have been carefully
hand formatted by the programmer. In such cases,
.Fl nfc1
should be
! used. Default:
.Fl fc1 .
.It Fl i Ns Ar n
! The number of spaces for one indentation level. Default:
! .Fl i8 .
.It Fl \&ip , nip
Enables (disables) the indentation of parameter declarations from the left
! margin. Default:
.Fl \&ip .
.It Fl l Ns Ar n
! Maximum length of an output line. Default:
! .Fl l78 .
.It Fl \&lp , nlp
Lines up code surrounded by parenthesis in continuation lines. If a line
has a left paren which is not closed on that line, then continuation lines
***************
*** 318,335 ****
If true
.Pq Fl pcs
all procedure calls will have a space inserted between
! the name and the `('. The default is
.Fl npcs .
.It Fl psl , npsl
If true
.Pq Fl psl
the names of procedures being defined are placed in
! column 1 \- their types, if any, will be left on the previous lines. The
! default is
.Fl psl .
.It Fl \&sc , nsc
Enables (disables) the placement of asterisks (`*'s) at the left edge of all
! comments.
.It Fl sob , nsob
If
.Fl sob
--- 348,366 ----
If true
.Pq Fl pcs
all procedure calls will have a space inserted between
! the name and the `('. Default:
.Fl npcs .
.It Fl psl , npsl
If true
.Pq Fl psl
the names of procedures being defined are placed in
! column 1 \- their types, if any, will be left on the previous lines.
! Default:
.Fl psl .
.It Fl \&sc , nsc
Enables (disables) the placement of asterisks (`*'s) at the left edge of all
! comments. Default:
! .Fl sc .
.It Fl sob , nsob
If
.Fl sob
***************
*** 376,382 ****
turns it off. When in verbose mode,
.Nm
reports when it splits one line of input into two or more lines of output,
! and gives some size statistics at completion. The default is
.Fl \&nv .
.El
.Pp
--- 407,413 ----
turns it off. When in verbose mode,
.Nm
reports when it splits one line of input into two or more lines of output,
! and gives some size statistics at completion. Default:
.Fl \&nv .
.El
.Pp
***************
*** 396,407 ****
.Sq Em Box
.Em comments .
.Nm
! assumes that any comment with a dash, star, or newline immediately after
! the start of comment (that is, `/*\-', `/**' or `/*' followed
! immediately by a newline character) is a comment surrounded
! by a box of stars. Each line of such a comment is left unchanged, except
! that its indentation may be adjusted to account for the change in indentation
! of the first line
of the comment.
.Pp
.Em Straight text .
--- 427,436 ----
.Sq Em Box
.Em comments .
.Nm
! assumes that any comment with a dash or star immediately after the start of
! comment (that is, `/*\-' or `/**') is a comment surrounded by a box of stars.
! Each line of such a comment is left unchanged, except that its indentation
! may be adjusted to account for the change in indentation of the first line
of the comment.
.Pp
.Em Straight text .
>Audit-Trail:
>Unformatted: