1
\input texinfo @c -*-texinfo-*-
3
@setfilename indent.info
4
@settitle @command{indent}: Indent and Format C Program Source
11
@c Note: some of the long options are too long for the index in
12
@c smallbook format. This will need some thought. --rjc
14
@dircategory Indent Code Formatter
16
* Indent: (indent). C code formatter.
21
@setchapternewpage odd
26
This is Edition @value{EDITION} of @cite{The @command{indent} Manual},
27
for Indent Version @value{VERSION}, last updated @value{UPDATED}.
29
@c @vskip 0pt plus 1filll
32
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
33
Copyright (C) 1995, 1996 Joseph Arceneaux.
34
Copyright (C) 1999 Carlo Wood.
35
Copyright (C) 2001 David Ingamells.
37
Permission is granted to make and distribute verbatim copies of
38
this manual provided the copyright notice and this permission notice
39
are preserved on all copies.
42
Permission is granted to copy and distribute modified versions of this
43
manual under the conditions for verbatim copying, provided also that the
44
section entitled ``GNU General Public License'' is included exactly as
45
in the original, and provided that the entire resulting derived work is
46
distributed under the terms of a permission notice identical to this
49
Permission is granted to copy and distribute translations of this manual
50
into another language, under the above conditions for modified versions,
51
except that the section entitled ``GNU General Public License'' may be
52
included in a translation approved by the author instead of in the
60
@subtitle Format C Code
62
@subtitle Edition @value{EDITION}, for Indent Version @value{VERSION}
63
@subtitle @value{UPDATED}
66
@author Joseph Arceneaux
68
@author David Ingamells
72
Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software
75
Copyright @copyright{} 1995, 1996 Joseph Arceneaux.
77
Copyright @copyright{} 1999, Carlo Wood.
79
Copyright @copyright{} 2001, David Ingamells.
81
Permission is granted to make and distribute verbatim copies of
82
this manual provided the copyright notice and this permission notice
83
are preserved on all copies.
85
Permission is granted to copy and distribute modified versions of this
86
manual under the conditions for verbatim copying, provided that the entire
87
resulting derived work is distributed under the terms of a permission
88
notice identical to this one.
90
Permission is granted to copy and distribute translations of this manual
91
into another language, under the above conditions for modified versions,
92
except that this permission notice may be stated in a translation approved
97
@c put the following line in the the file dir in the info directory
98
@c under wherever you have installed emacs (assuming that
99
@c the info file made from this file is in the file "indent")
100
@c * indent:(indent). How to change the appearance of a C program.
103
@node Top, Indent Program, (dir), (dir)
104
@top @command{indent}: Indent and Format C Program Source
106
The @command{indent} program
108
changes the appearance of a C program by inserting or deleting whitespace.
111
This is Edition @value{EDITION}, @value{UPDATED}, of @cite{The @command{indent} Manual},
112
for Indent Version @value{VERSION}.
115
* Indent Program:: The @command{indent} Program
116
* Option Summary:: Option Summary
121
@node Indent Program, Option Summary, Top, Top
122
@chapter The @command{indent} Program
124
@c !BEGIN DESCRIPTION
126
The @command{indent} program changes the appearance of a C program by
127
inserting or deleting whitespace.
130
The @command{indent} program
135
can be used to make code easier to read. It can also convert from one
136
style of writing C to another.
138
@command{indent} understands a substantial amount about the syntax of C,
139
but it also attempts to cope with incomplete and misformed syntax.
141
In version 1.2 and more recent versions, the GNU style of indenting is
146
* Invoking indent:: Invoking @command{indent}
147
* Backup files:: Backup Files
148
* Common styles:: Common styles
149
* Blank lines:: Blank lines
150
* Comments:: Comments
151
* Statements:: Statements
152
* Declarations:: Declarations
153
* Indentation:: Indentation
154
* Breaking long lines:: Breaking long lines
155
* Disabling Formatting:: Disabling Formatting
156
* Miscellaneous options:: Miscellaneous options
158
* Copyright:: Copyright
162
@node Invoking indent, Backup files, , Indent Program
163
@section Invoking @command{indent}
164
@cindex Invoking @command{indent}
165
@cindex Starting @command{indent}
166
@cindex Beginning @command{indent}
168
As of version 1.3, the format of the @command{indent} command is:
173
indent [@var{options}] [@var{input-files}]
175
indent [@var{options}] [@var{single-input-file}] [-o @var{output-file}]
180
This format is different from earlier versions and other versions of
183
In the first form, one or more input files are specified. @command{indent}
184
makes a backup copy of each file, and the original file is replaced with
185
its indented version. @xref{Backup files}, for an explanation of how
188
@cindex Output File Specification
190
@kindex --output-file
191
In the second form, only one input file is specified. In this case, or
192
when the standard input is used, you may specify an output file after
193
the @option{-o} option.
195
@cindex Standard Output
197
@kindex --standard-output
198
To cause @command{indent} to write to standard output, use the @option{-st}
199
option. This is only allowed when there is only one input file, or when
200
the standard input is used.
202
@cindex Using Standard Input
203
If no input files are named, the standard input is read for input.
204
Also, if a filename named @option{-} is specified, then the standard input
207
As an example, each of the following commands will input the program
208
@file{slithy_toves.c} and write its indented text to
209
@file{slithy_toves.out}:
214
indent slithy_toves.c -o slithy_toves.out
216
indent -st slithy_toves.c > slithy_toves.out
218
cat slithy_toves.c | indent -o slithy_toves.out
223
@cindex Long options, use of
224
Most other options to @command{indent} control how programs are formatted.
225
As of version 1.2, @command{indent} also recognizes a long name for each
226
option name. Long options are prefixed by either @option{--} or
228
@footnote{ @option{+} is being superseded by @option{--} to
229
maintain consistency with the POSIX standard.}
230
In most of this document,
231
the traditional, short names are used for the sake of brevity.
232
@xref{Option Summary}, for a list of options, including both long and
235
Here is another example:
238
indent -br test/metabolism.c -l85
241
This will indent the program @file{test/metabolism.c} using the
242
@option{-br} and @option{-l85} options, write the output back to
243
@file{test/metabolism.c}, and write the original contents of
244
@file{test/metabolism.c} to a backup file in the directory @file{test}.
246
Equivalent invocations using long option names for this example would
252
indent --braces-on-if-line --line-length185 test/metabolism.c
254
indent +braces-on-if-line +line-length185 test/metabolism.c
259
@cindex @file{.indent.pro} file
260
@cindex Initialization file
262
@kindex --ignore-profile
263
If you find that you often use @command{indent} with the same options, you
264
may put those options into a file named @file{.indent.pro}.
265
@command{indent} will first look for @file{.indent.pro} in the current
266
directory and use that if found. Otherwise, @command{indent} will search
267
your home directory for @file{.indent.pro} and use that file if it is
268
found. This behaviour is different from that of other versions of
269
@command{indent}, which load both files if they both exist.
271
The format of @file{.indent.pro} is simply a list of options, just as
272
they would appear on the command line, separated by white space (tabs,
273
spaces, and newlines). Options in @file{.indent.pro} may be surrounded by C
274
or C++ comments, in which case they are ignored.
276
Command line switches are handled @emph{after} processing
277
@file{.indent.pro}. Options specified later override arguments
278
specified earlier, with one exception: Explicitly specified options
279
always override background options (@pxref{Common styles}). You can
280
prevent @command{indent} from reading an @file{.indent.pro} file by
281
specifying the @option{-npro} option.@refill
283
@node Backup files, Common styles, Invoking indent, Indent Program
284
@comment node-name, next, previous, up
285
@section Backup Files
288
As of version 1.3, GNU @command{indent} makes GNU-style backup files, the
289
same way GNU Emacs does. This means that either @dfn{simple} or
290
@dfn{numbered} backup filenames may be made.
292
Simple backup file names are generated by appending a suffix to the
293
original file name. The default for this suffix is the
294
one-character string @file{~} (tilde). Thus, the backup file for
295
@file{python.c} would be @file{python.c~}.
297
Instead of the default, you may specify any string as a suffix by
298
setting the environment variable @env{SIMPLE_BACKUP_SUFFIX} to
299
your preferred suffix.
301
Numbered backup versions of a file @file{momeraths.c} look like
302
@file{momeraths.c.~23~}, where 23 is the version of this particular
303
backup. When making a numbered backup of the file @file{src/momeraths.c},
304
the backup file will be named @file{src/momeraths.c.~@var{V}~}, where
305
@var{V} is one greater than the highest version currently existing in
306
the directory @file{src}. The environment variable @env{VERSION_WIDTH}
307
controls the number of digits, using left zero padding when necessary.
308
For instance, setting this variable to "2" will lead to the backup
309
file being named @file{momeraths.c.~04~}.
311
The type of backup file made is controlled by the value of the
312
environment variable @env{VERSION_CONTROL}. If it is the string
313
@samp{simple}, then only simple backups will be made. If its value is
314
the string @samp{numbered}, then numbered backups will be made. If its
315
value is @samp{numbered-existing}, then numbered backups will be made if
316
there @emph{already exist} numbered backups for the file being indented;
317
otherwise, a simple backup is made. If @env{VERSION_CONTROL} is not
318
set, then @command{indent} assumes the behaviour of
319
@samp{numbered-existing}.
321
Other versions of @command{indent} use the suffix @file{.BAK} in naming
322
backup files. This behaviour can be emulated by setting
323
@env{SIMPLE_BACKUP_SUFFIX} to @samp{.BAK}.
325
Note also that other versions of @command{indent} make backups in the
326
current directory, rather than in the directory of the source file as
327
GNU @command{indent} now does.
329
@node Common styles, Blank lines, Backup files, Indent Program
330
@comment node-name, next, previous, up
331
@section Common styles
333
There are several common styles of C code, including the GNU style, the
334
Kernighan & Ritchie style, and the original Berkeley style. A style may
335
be selected with a single @dfn{background} option, which specifies a set
336
of values for all other options. However, explicitly specified options
337
always override options implied by a background option.
342
As of version 1.2, the default style of GNU @command{indent} is the GNU
343
style. Thus, it is no longer necessary to specify the option
344
@option{-gnu} to obtain this format, although doing so will not cause an
345
error. Option settings which correspond to the GNU style are:
349
-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
350
-ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai
355
The GNU coding style is that preferred by the GNU project. It is the
356
style that the GNU Emacs C mode encourages and which is used in the C
357
portions of GNU Emacs. (People interested in writing programs for
358
Project GNU should get a copy of @cite{The GNU Coding Standards}, which
359
also covers semantic and portability issues such as memory usage, the
360
size of integers, etc.)
362
@cindex Kernighan & Ritchie style
364
@kindex --k-and-r-style
365
@comment --kernighan-and-ritchie-style works, too, as does
366
@comment --kernighan-and-ritchie. Which is most intuitive?
367
The Kernighan & Ritchie style is used throughout their well-known book
368
@cite{The C Programming Language}. It is enabled with the @option{-kr}
369
option. The Kernighan & Ritchie style corresponds to the following set
374
-nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0
375
-cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs
376
-nprs -npsl -saf -sai -saw -nsc -nsob -nss
381
Kernighan & Ritchie style does not put comments to the right of code in
382
the same column at all times (nor does it use only one space to the
383
right of the code), so for this style @command{indent} has arbitrarily
386
@cindex Berkeley style
387
@cindex Original Berkeley style
390
The style of the original Berkeley @command{indent} may be obtained by
391
specifying @option{-orig} (or by specifying @option{--original}, using the
392
long option name). This style is equivalent to the following settings:
396
-nbad -nbap -bbo -bc -br -brs -c33 -cd33 -cdb -ce -ci4 -cli0
397
-cp33 -di16 -fc1 -fca -hnl -i4 -ip4 -l75 -lp -npcs -nprs -psl
398
-saf -sai -saw -sc -nsob -nss -ts8
402
@node Blank lines, Comments, Common styles, Indent Program
403
@comment node-name, next, previous, up
407
Various programming styles use blank lines in different places.
408
@command{indent} has a number of options to insert or delete blank lines in
411
The @option{-bad} option causes @command{indent} to force a blank line after
412
every block of declarations. The @option{-nbad} option causes
413
@command{indent} not to force such blank lines.
415
The @option{-bap} option forces a blank line after every procedure body.
416
The @option{-nbap} option forces no such blank line.
419
@kindex --blank-lines-before-block-comments
421
@kindex --no-blank-lines-before-block-comments
422
The @option{-bbb} option forces a blank line before every boxed comment
424
The @option{-nbbb} option does not force such blank lines.
427
@kindex --swallow-optional-blank-lines
429
@kindex --leave-optional-blank-lines
430
The @option{-sob} option causes @command{indent} to swallow optional blank
431
lines (that is, any optional blank lines present in the input will be
432
removed from the output). If the @option{-nsob} is specified, any blank
433
lines present in the input file will be copied to the output file.
437
* -bad:: More on the @option{-bad} option.
438
* -bap:: More on the @option{-bap} option.
442
@node -bad, -bap, , Blank lines
443
@comment node-name, next, previous, up
444
@subsection --blank-lines-after-declarations
446
The @option{-bad} option forces a blank line after every block of
447
declarations. The @option{-nbad} option does not add any such blank
450
For example, given the input
455
/* This separates blocks of declarations. */
461
@kindex --blank-lines-after-declarations
463
@kindex --no-blank-lines-after-declarations
465
@code{indent -bad} produces
472
/* This separates blocks of declarations. */
478
and @code{indent -nbad} produces
484
/* This separates blocks of declarations. */
489
@node -bap, , -bad, Blank lines
490
@comment node-name, next, previous, up
491
@subsection --blank-lines-after-procedures
494
@kindex --blank-lines-after-procedures
496
@kindex --no-blank-lines-after-procedures
497
The @option{-bap} option forces a blank line after every procedure body.
499
For example, given the input
508
/* The procedure bar is even less interesting. */
518
@code{indent -bap} produces
528
/* The procedure bar is even less interesting. */
538
@c A better `group' would be better than `need'.
540
and @code{indent -nbap} produces
549
/* The procedure bar is even less interesting. */
559
No blank line will be added after the procedure @code{foo}.
561
@node Comments, Statements, Blank lines, Indent Program
562
@comment node-name, next, previous, up
566
@command{indent} formats both C and C++ comments. C comments are begun with
567
@samp{/*}, terminated with @samp{*/} and may contain newline characters.
568
C++ comments begin with the delimiter @samp{//} and end at the newline.
570
@command{indent} handles comments differently depending upon their context.
571
@command{indent} attempts to distinguish between comments which follow
572
statements, comments which follow declarations, comments following
573
preprocessor directives, and comments which are not preceded by code of
574
any sort, i.e., they begin the text of the line (although not
575
neccessarily in column 1).
577
@command{indent} further distinguishes between comments found outside of
578
procedures and aggregates, and those found within them. In particular,
579
comments beginning a line found within a procedure will be indented to
580
the column at which code is currently indented. The exception to this a
581
comment beginning in the leftmost column; such a comment is output
584
@command{indent} attempts to leave @dfn{boxed comments} unmodified. The
585
general idea of such a comment is that it is enclosed in a rectangle or
586
``box'' of stars or dashes to visually set it apart. More precisely,
587
boxed comments are defined as those in which the initial @samp{/*} is
588
followed immediately by the character @samp{*}, @samp{=}, @samp{_}, or
589
@samp{-}, or those in which the beginning comment delimiter (@samp{/*})
590
is on a line by itself, and the following line begins with a @samp{*} in
591
the same column as the star of the opening delimiter.
593
Examples of boxed comments are:
597
/**********************
598
* Comment in a box!! *
599
**********************/
602
* A different kind of scent,
603
* for a different kind of comment.
608
@command{indent} attempts to leave boxed comments exactly as they are found
609
in the source file. Thus the indentation of the comment is unchanged,
610
and its length is not checked in any way. The only alteration made is
611
that an embedded tab character may be converted into the appropriate
614
If the @option{-bbb} option is specified, all such boxed comments will be
615
preceded by a blank line, unless such a comment is preceded by code.
618
@kindex --format-all-comments
620
@kindex --dont-format-comments
622
@kindex --format-first-column-comments
624
@kindex --dont-format-first-column-comments
625
Comments which are not boxed comments may be formatted, which means that
626
the line is broken to fit within a right margin and left-filled with
627
whitespace. Single newlines are equivalent to a space, but blank lines
628
(two or more newlines in a row) are taken to mean a paragraph break.
629
Formatting of comments which begin after the first column is enabled
630
with the @option{-fca} option. To format those beginning in column one,
631
specify @option{-fc1}. Such formatting is disabled by default.
633
The right margin for formatting defaults to 78, but may be changed with
634
the @option{-lc} option. If the margin specified does not allow the
635
comment to be printed, the margin will be automatically extended for the
636
duration of that comment. The margin is not respected if the comment is
640
@kindex --line-comments-indentation@var{n}
641
If the comment begins a line (i.e., there is no program text to its
642
left), it will be indented to the column it was found in unless the
643
comment is within a block of code. In that case, such a comment will be
644
aligned with the indented code of that block (unless the comment began
645
in the first column). This alignment may be affected by the @option{-d}
646
option, which specifies an amount by which such comments are moved to
647
the @emph{left}, or unindented. For example, @option{-d2} places comments
648
two spaces to the left of code. By default, comments are aligned with
649
code, unless they begin in the first column, in which case they are left
650
there by default --- to get them aligned with the code, specify @option{-fc1}.
653
@kindex --comment-indentation@var{n}
655
@kindex --declaration-comment-column@var{n}
657
@kindex --else-endif-column@var{n}
658
Comments to the right of code will appear by default in column 33.
659
This may be changed with one of three options. @option{-c} will specify
660
the column for comments following code, @option{-cd} specifies the
661
column for comments following declarations, and @option{-cp} specifies
662
the column for comments following preprocessor directives @code{#else}
665
If the code to the left of the comment exceeds the beginning column,
666
the comment column will be extended to the next tabstop column past
667
the end of the code, or in the case of preprocessor directives, to one
668
space past the end of the directive. This extension lasts only for
669
the output of that particular comment.
672
@kindex --comment-delimiters-on-blank-lines
674
@kindex --no-comment-delimiters-on-blank-lines
675
The @option{-cdb} option places the comment delimiters on blank lines.
676
Thus, a single line comment like @code{/* Loving hug */} can be
688
@kindex --star-left-side-of-comments
690
@kindex --dont-star-comments
691
Stars can be placed at the beginning of multi-line comments with the
692
@option{-sc} option. Thus, the single-line comment above can be
693
transformed (with @option{-cdb -sc}) into:
703
@node Statements, Declarations, Comments, Indent Program
704
@comment node-name, next, previous, up
708
@kindex --braces-on-if-line
710
@kindex --braces-after-if-line
711
The @option{-br} or @option{-bl} option specifies how to format braces.
713
@c another paragraph that needs to be attached to its example.
715
The @option{-br} option formats statement braces like this:
726
The @option{-bl} option formats them like this:
738
@kindex --brace-indent@var{n}
739
If you use the @option{-bl} option, you may also want to specify the
740
@option{-bli} option. This option specifies the number of spaces by
741
which braces are indented. @option{-bli2}, the default, gives the
742
result shown above. @option{-bli0} results in the following:
754
@kindex --cuddle-else
756
@kindex --dont-cuddle-else
757
If you are using the @option{-br} option, you probably want to also use
758
the @option{-ce} option. This causes the @code{else} in an if-then-else
759
construct to cuddle up to the immediately preceding @samp{@}}. For
760
example, with @option{-br -ce} you get the following:
767
fprintf (stderr, "...something wrong?\n");
773
With @option{-br -nce} that code would appear as
781
fprintf (stderr, "...something wrong?\n");
787
@kindex --cuddle-do-while
789
@kindex --dont-cuddle-do-while
790
This causes the @code{while} in a do-while
791
loop to cuddle up to the immediately preceding @samp{@}}. For
792
example, with @option{-cdw} you get the following:
803
With @option{-ncdw} that code would appear as
815
@kindex --case-indentation@var{n}
816
The @option{-cli} option specifies the number of spaces that case labels
817
should be indented to the right of the containing @code{switch}
821
The default gives code like:
840
Using the @option{-cli2} that would become:
859
@kindex --case-brace-indentation@var{n}
860
The indentation of the braces below a case statement can be
861
controlled with the @option{-cbi@var{n}} option. For example,
862
using @option{-cli2 -cbi0} results in:
881
@kindex --space-special-semicolon
883
@kindex --dont-space-special-semicolon
884
If a semicolon is on the same line as a @code{for} or @code{while}
885
statement, the @option{-ss} option will cause a space to be placed before
886
the semicolon. This emphasizes the semicolon, making it clear that the
887
body of the @code{for} or @code{while} statement is an empty statement.
888
@option{-nss} disables this feature.
891
@kindex --space-after-procedure-calls
893
@kindex --no-space-after-function-call-names
894
The @option{-pcs} option causes a space to be placed between the name of
895
the procedure being called and the @samp{(} (for example, @w{@code{puts
896
("Hi");}}. The @option{-npcs} option would give @code{puts("Hi");}).
900
@kindex --space-after-cast
902
@kindex --no-space-after-casts
903
If the @option{-cs} option is specified, @command{indent} puts a space after
907
@kindex --blank-after-sizeof
908
The @option{-bs} option ensures that there is a space between the
909
keyword @code{sizeof} and its argument. In some versions, this is
910
known as the @samp{Bill_Shannon} option.
913
@kindex --space-after-for
915
@kindex --no-space-after-for
916
The @option{-saf} option forces a space between an @code{for}
917
and the following parenthesis. This is the default.
920
@kindex --space-after-if
922
@kindex --no-space-after-if
923
The @option{-sai} option forces a space between an @code{if}
924
and the following parenthesis. This is the default.
927
@kindex --space-after-while
929
@kindex --no-space-after-while
930
The @option{-saw} option forces a space between an @code{while}
931
and the following parenthesis. This is the default.
934
@kindex --space-after-parentheses
935
The @option{-prs} option causes all parentheses to be seperated with
936
a space from the what is between them. For example, using @option{-prs}
937
results in code like:
941
while ( ( e_code - s_code ) < ( dec_ind - 1 ) )
943
set_buf_break ( bb_dec_ind );
949
@node Declarations, Indentation, Statements, Indent Program
950
@comment node-name, next, previous, up
951
@section Declarations
954
@kindex --declaration-indentation@var{n}
955
By default @command{indent} will line up identifiers, in the column
956
specified by the @option{-di} option. For example, @option{-di16} makes
966
Using a small value (such as one or two) for the @option{-di} option can
967
be used to cause the identifiers to be placed in the first available
968
position; for example:
977
The value given to the @option{-di} option will still affect variables
978
which are put on separate lines from their types, for example
979
@option{-di2} will lead to:
989
@kindex --blank-lines-after-commas
991
@kindex --no-blank-lines-after-commas
992
If the @option{-bc} option is specified, a newline is forced after each
993
comma in a declaration. For example,
1004
With the @option{-nbc} option this would look like
1011
@kindex --break-function-decl-args
1013
@kindex --dont-break-function-decl-args
1014
The @option{-bfda} option causes a newline to be forced after the comma
1015
separating the arguments of a function declaration. The arguments will
1016
appear at the current indention level matching the opening paren. This
1017
is particularly helpful for functions with long argument lists. For
1022
void foo (int arg1, char arg2, int *arg3, long arg4, char arg5);
1026
With the @option{-bfda} option this would look like
1037
@kindex --procnames-start-lines
1039
@kindex --dont-break-procedure-type
1040
@cindex @command{etags} requires @option{-psl}
1041
The @option{-psl} option causes the type of a procedure being defined to
1042
be placed on the line before the name of the procedure. This style is
1043
required for the @command{etags} program to work correctly, as well as some
1044
of the @code{c-mode} functions of Emacs.
1049
You must use the @option{-T}
1050
option to tell @command{indent} the name of all the typenames in your
1051
program that are defined by @code{typedef}. @option{-T} can be specified
1052
more than once, and all names specified are used. For example, if your
1057
typedef unsigned long CODE_ADDR;
1058
typedef enum @{red, blue, green@} COLOR;
1063
you would use the options @option{-T CODE_ADDR -T COLOR}.
1065
The @option{-brs} or @option{-bls} option specifies how to format braces
1066
in struct declarations. The @option{-brs} option formats braces like
1078
The @option{-bls} option formats them like this:
1089
@node Indentation, Breaking long lines, Declarations, Indent Program
1090
@comment node-name, next, previous, up
1091
@section Indentation
1094
@kindex --indent-level@var{n}
1096
@kindex --continuation-indentation@var{n}
1098
@kindex --continue-at-parentheses
1100
@kindex --dont-line-up-parentheses
1101
One issue in the formatting of code is how far each line should be
1102
indented from the left margin. When the beginning of a statement such
1103
as @code{if} or @code{for} is encountered, the indentation level is
1104
increased by the value specified by the @option{-i} option. For example,
1105
use @option{-i8} to specify an eight character indentation for each
1106
level. When a statement is broken across two lines, the second line is
1107
indented by a number of additional spaces specified by the @option{-ci}
1108
option. @option{-ci} defaults to 0. However, if the @option{-lp} option is
1109
specified, and a line has a left parenthesis which is not closed on that
1110
line, then continuation lines will be lined up to start at the character
1111
position just after the left parenthesis. This processing also applies
1112
to @samp{[} and applies to @samp{@{} when it occurs in initialization
1113
lists. For example, a piece of continued code might look like this with
1114
@option{-nlp -ci3} in effect:
1118
p1 = first_procedure (second_procedure (p2, p3),
1119
third_procedure (p4, p5));
1124
With @option{-lp} in effect the code looks somewhat clearer:
1128
p1 = first_procedure (second_procedure (p2, p3),
1129
third_procedure (p4, p5));
1134
@kindex --tab-size@var{n}
1135
When a statement is broken in between two or more paren pairs (...),
1136
each extra pair causes the indentation level extra indentation:
1141
k > 0) || p == 0) &&
1148
The option @option{-ip@var{N}} can be used to set the extra offset per paren.
1149
For instance, @option{-ip0} would format the above as:
1154
k > 0) || p == 0) &&
1161
@command{indent} assumes that tabs are placed at regular intervals of both
1162
input and output character streams. These intervals are by default 8
1163
columns wide, but (as of version 1.2) may be changed by the @option{-ts}
1164
option. Tabs are treated as the equivalent number of spaces.
1167
@kindex --parameter-indentation@var{n}
1169
@kindex --no-parameter-indentation
1170
The indentation of type declarations in old-style function definitions
1171
is controlled by the @option{-ip} parameter. This is a numeric parameter
1172
specifying how many spaces to indent type declarations. For example,
1173
the default @w{@option{-ip5}} makes definitions look like this:
1178
create_world (x, y, scale)
1188
For compatibility with other versions of indent, the option @option{-nip}
1189
is provided, which is equivalent to @option{-ip0}.
1192
@kindex --leave-preprocessor-space
1194
@kindex --remove-preprocessor-space
1195
ANSI C allows white space to be placed on preprocessor command lines
1196
between the character @samp{#} and the command name. By default,
1197
@command{indent} removes this space, but specifying the @option{-lps} option
1198
directs @command{indent} to leave this space unmodified.
1200
@node Breaking long lines, Disabling Formatting, Indentation, Indent Program
1201
@comment node-name, next, previous, up
1202
@section Breaking long lines
1205
@kindex --line-length@var{n}
1206
With the option @option{-l@var{n}}, or @option{--line-length@var{n}}, it is
1207
possible to specify the maximum length of a line of C code, not including
1208
possible comments that follow it.
1210
When lines become longer then the specified line length, GNU @command{indent}
1211
tries to break the line at a logical place. This is new as of version 2.1
1212
however and not very intelligent or flexible yet.
1215
@kindex --break-before-boolean-operator
1217
@kindex --break-after-boolean-operator
1219
@kindex --honour-newlines
1221
@kindex --ignore-newlines
1222
Currently there are two options that allows one to interfere with the
1223
algorithm that determines where to break a line.
1225
The @option{-bbo} option causes GNU @command{indent} to prefer to break
1226
long lines before the boolean operators @code{&&} and @code{||}. The
1227
@option{-nbbo} option causes GNU @command{indent} not have that
1228
preference. For example, the default option @option{-bbo} (together
1229
with @option{--line-length60} and @option{--ignore-newlines}) makes code
1235
&& ((mask[0] == '\0')
1237
&& ((mask[0] == '0') || (mask[0] == '*')))))
1241
Using the option @option{-nbbo} will make it look like this:
1246
((mask[0] == '\0') ||
1248
((mask[0] == '0') || (mask[0] == '*')))))
1252
The default @option{-hnl}, however, honours newlines in the input file by
1253
giving them the highest possible priority to break lines at. For example,
1254
when the input file looks like this:
1259
&& ((mask[0] == '\0')
1260
|| (mask[1] == '\0' && ((mask[0] == '0') || (mask[0] == '*')))))
1265
then using the option @option{-hnl}, or @option{--honour-newlines},
1266
together with the previously mentioned @option{-nbbo} and
1267
@option{--line-length60}, will cause the output not to be what is given
1268
in the last example but instead will prefer to break at the positions
1269
where the code was broken in the input file:
1274
&& ((mask[0] == '\0')
1275
|| (mask[1] == '\0' &&
1276
((mask[0] == '0') || (mask[0] == '*')))))
1280
The idea behind this option is that lines which are too long, but are already
1281
broken up, will not be touched by GNU @command{indent}. Really messy code
1282
should be run through @command{indent} at least once using the
1283
@option{--ignore-newlines} option though.
1285
@node Disabling Formatting, Miscellaneous options, Breaking long lines, Indent Program
1286
@comment node-name, next, previous, up
1287
@section Disabling Formatting
1289
Formatting of C code may be disabled for portions of a program by
1290
embedding special @dfn{control comments} in the program. To turn off
1291
formatting for a section of a program, place the disabling control
1292
comment @code{/* *INDENT-OFF* */} on a line by itself just before that
1293
section. Program text scanned after this control comment is output
1294
precisely as input with no modifications until the corresponding
1295
enabling comment is scanned on a line by itself. The disabling control
1296
comment is @code{/* *INDENT-ON* */}, and any text following the comment
1297
on the line is also output unformatted. Formatting begins again with
1298
the input line following the enabling control comment.
1300
More precisely, @command{indent} does not attempt to verify the closing
1301
delimiter (@code{*/}) for these C comments, and any whitespace on the
1302
line is totally transparent.
1304
These control comments also function in their C++ formats, namely
1305
@code{// *INDENT-OFF*} and @code{// *INDENT-ON*}.
1307
It should be noted that the internal state of @command{indent} remains
1308
unchanged over the course of the unformatted section. Thus, for
1309
example, turning off formatting in the middle of a function and
1310
continuing it after the end of the function may lead to bizarre
1311
results. It is therefore wise to be somewhat modular in selecting code
1312
to be left unformatted.
1314
As a historical note, some earlier versions of @command{indent} produced
1315
error messages beginning with @code{*INDENT**}. These versions of
1316
@command{indent} were written to ignore any input text lines which began
1317
with such error messages. I have removed this incestuous feature from
1318
GNU @command{indent}.
1320
@node Miscellaneous options, Bugs, Disabling Formatting, Indent Program
1321
@comment node-name, next, previous, up
1322
@section Miscellaneous options
1325
To find out what version of @command{indent} you have, use the command
1326
@code{indent -version}. This will report the version number of
1327
@command{indent}, without doing any of the normal processing.
1332
@kindex --no-verbosity
1333
@comment Would --terse be better? I think not, but perhaps accepting
1334
@comment --no-verbose would avoid error messages.
1335
The @option{-v} option can be used to turn on verbose mode. When in
1336
verbose mode, @command{indent} reports when it splits one line of input
1337
into two more more lines of output, and gives some size statistics at
1341
@kindex --preserve-mtime
1343
The @option{-pmt} option causes @command{indent} to preserve the access
1344
and modification times on the output files. Using this option
1345
has the advantage that running indent on all source and header
1346
files in a project won't cause @code{make} to rebuild all targets.
1347
This option is only available on Operating Systems that have the
1348
POSIX @code{utime(2)} function.
1350
@node Bugs, Copyright, Miscellaneous options, Indent Program
1351
@comment node-name, next, previous, up
1354
Please report any bugs to @email{bug-indent@@gnu.org}.
1356
When @command{indent} is run twice on a file, with the same profile,
1357
it should @emph{never} change that file the second time. With the
1358
current design of @command{indent}, this can not be guaranteed, however,
1359
and it has not been extensively tested.
1361
@command{indent} does not understand C. In some cases this leads to
1362
the inability to join lines. The result is that running a file
1363
through @command{indent} is @emph{irreversible}, even if the used input
1364
file was the result of running @command{indent} with a given profile
1365
(@file{.indent.pro}).
1367
While an attempt was made to get @command{indent} working for C++, is
1368
will not do a good job on any C++ source except the very simple.
1370
@command{indent} does not look at the given @option{--line-length} option
1371
when writing comments to the output file. This results often in comments
1372
being put far to the right. In order to prohibit @command{indent} from
1373
joining a broken line that has a comment at the end, make sure that the
1374
comments start on the first line of the break.
1376
@command{indent} does not count lines and comments (see the @option{-v}
1377
option) when @command{indent} is turned off with
1378
@code{/* *INDENT-OFF* */}.
1380
Comments of the form @code{/*UPPERCASE*/} are not treated as comment but as an
1381
identifier, causing them to be joined with the next line. This renders
1382
comments of this type useless, unless they are embedded in the code to
1385
@node Copyright, , Bugs, Indent Program
1386
@comment node-name, next, previous, up
1389
The following copyright notice applies to the @command{indent} program.
1390
The copyright and copying permissions for this manual appear near the
1391
beginning of @file{indent.texinfo} and @file{indent.info}, and near the
1392
end of @file{indent.1}.
1395
Copyright @copyright{} 2001 David Ingamells.
1396
Copyright @copyright{} 1999 Carlo Wood.
1397
Copyright @copyright{} 1995, 1996 Joseph Arceneaux.
1398
Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation
1399
Copyright @copyright{} 1985 Sun Microsystems, Inc.
1400
Copyright @copyright{} 1980 The Regents of the University of California.
1401
Copyright @copyright{} 1976 Board of Trustees of the University of Illinois.
1402
All rights reserved.
1404
Redistribution and use in source and binary forms are permitted
1405
provided that the above copyright notice and this paragraph are
1406
duplicated in all such forms and that any documentation,
1407
advertising materials, and other materials related to such
1408
distribution and use acknowledge that the software was developed
1409
by the University of California, Berkeley, the University of Illinois,
1410
Urbana, and Sun Microsystems, Inc. The name of either University
1411
or Sun Microsystems may not be used to endorse or promote products
1412
derived from this software without specific prior written permission.
1413
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1414
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1415
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
1420
@node Option Summary, Index, Indent Program, Top
1421
@appendix Option Summary
1423
Here is a list of all the options for @command{indent}, alphabetized by
1424
short option. It is followed by a cross key alphabetized by long option.
1427
@c The cross references are all on lines by themselves because this
1428
@c looks better in both printed output and Info. 4 Feb 1992 --rjc
1431
@itemx --blank-lines-after-declarations
1432
Force blank lines after the declarations.@*
1436
@itemx --blank-lines-after-procedures
1437
Force blank lines after procedure bodies.@*
1441
@itemx --blank-lines-before-block-comments
1442
Force blank lines before block comments.@*
1446
@itemx --break-before-boolean-operator
1447
Prefer to break long lines before boolean operators.@*
1448
@xref{Breaking long lines}.
1451
@itemx --blank-lines-after-commas
1452
Force newline after comma in declaration.@*
1453
@xref{Declarations}.
1456
@itemx --braces-after-if-line
1457
Put braces on line after @code{if}, etc.@*
1461
@itemx --brace-indent@var{n}
1462
Indent braces @var{n} spaces.@*
1466
@itemx --braces-after-struct-decl-line
1467
Put braces on the line after @code{struct} declaration lines.@*
1468
@xref{Declarations}.
1471
@itemx --braces-on-if-line
1472
Put braces on line with @code{if}, etc.@*
1476
@itemx --braces-on-struct-decl-line
1477
Put braces on @code{struct} declaration line.@*
1478
@xref{Declarations}.
1481
@itemx --Bill-Shannon
1482
@itemx --blank-before-sizeof
1483
Put a space between @code{sizeof} and its argument.@*
1487
@itemx --comment-indentation@var{n}
1488
Put comments to the right of code in column @var{n}.@*
1492
@itemx --case-brace-indentation@var{n}
1493
Indent braces after a case label N spaces.@*
1497
@itemx --declaration-comment-column@var{n}
1498
Put comments to the right of the declarations in column @var{n}.@*
1502
@itemx --comment-delimiters-on-blank-lines
1503
Put comment delimiters on blank lines.@*
1507
@itemx --cuddle-do-while
1508
Cuddle while of @code{do @{@} while;} and preceeding @samp{@}}.@*
1512
@itemx --cuddle-else
1513
Cuddle else and preceeding @samp{@}}.@*
1517
@itemx --continuation-indentation@var{n}
1518
Continuation indent of @var{n} spaces.@*
1522
@itemx --case-indentation@var{n}
1523
Case label indent of @var{n} spaces.@*
1527
@itemx --else-endif-column@var{n}
1528
Put comments to the right of @code{#else} and
1529
@code{#endif} statements in column @var{n}.@*
1533
@itemx --space-after-cast
1534
Put a space after a cast operator.@*
1538
@itemx --line-comments-indentation@var{n}
1539
Set indentation of comments not to the right
1540
of code to @var{n} spaces.@*
1544
@itemx --break-function-decl-args
1545
Align all arguments in a declaration with opening paren.@*
1546
@xref{Declarations}.
1549
@itemx --declaration-indentation@var{n}
1550
Put variables in column @var{n}.@*
1551
@xref{Declarations}.
1554
@itemx --format-first-column-comments
1555
Format comments in the first column.@*
1559
@itemx --format-all-comments
1560
Do not disable all formatting of comments.@*
1565
Use GNU coding style. This is the default.@*
1566
@xref{Common styles}.
1569
@itemx --honour-newlines
1570
Prefer to break long lines at the position of newlines in the input.@*
1571
@xref{Breaking long lines}.
1574
@itemx --indent-level@var{n}
1575
Set indentation level to @var{n} spaces.@*
1579
@itemx --parameter-indentation@var{n}
1580
Indent parameter types in old-style function
1581
definitions by @var{n} spaces.@*
1585
@itemx --k-and-r-style
1586
Use Kernighan & Ritchie coding style.@*
1587
@xref{Common styles}.
1590
@itemx --line-length@var{n}
1591
Set maximum line length for non-comment lines to @var{n}.@*
1592
@xref{Breaking long lines}.
1595
@itemx --comment-line-length@var{n}
1596
Set maximum line length for comment formatting to @var{n}.@*
1600
@itemx --continue-at-parentheses
1601
Line up continued lines at parentheses.@*
1605
@itemx --leave-preprocessor-space
1606
Leave space between @samp{#} and preprocessor directive.@*
1610
@itemx --no-blank-lines-after-declarations
1611
Do not force blank lines after declarations.@*
1615
@itemx --no-blank-lines-after-procedures
1616
Do not force blank lines after procedure bodies.@*
1620
@comment Didn't do anything, so I removed it
1622
@itemx --no-blank-lines-before-block-comments
1623
Do not force blank-lines before block comments.@*
1628
@itemx --break-after-boolean-operator
1629
Do not prefer to break long lines before boolean operators.@*
1630
@xref{Breaking long lines}.
1633
@itemx --no-blank-lines-after-commas
1634
Do not force newlines after commas in declarations.@*
1635
@xref{Declarations}.
1638
@itemx --dont-break-function-decl-args
1639
Don't put each argument in a function declaration on a seperate line.@*
1640
@xref{Declarations}.
1643
@itemx --no-comment-delimiters-on-blank-lines
1644
Do not put comment delimiters on blank lines.@*
1648
@itemx --dont-cuddle-do-while
1649
Do not cuddle @code{@}} and the @code{while} of a @code{do @{@} while;}.@*
1653
@itemx --dont-cuddle-else
1654
Do not cuddle @code{@}} and @code{else}.@*
1658
@itemx --no-space-after-casts
1659
Do not put a space after cast operators.@*
1663
@itemx --dont-format-first-column-comments
1664
Do not format comments in the first column as normal.@*
1668
@itemx --dont-format-comments
1669
Do not format any comments.@*
1673
@itemx --ignore-newlines
1674
Do not prefer to break long lines at the position of newlines in the input.@*
1675
@xref{Breaking long lines}.
1678
@itemx --no-parameter-indentation
1679
Zero width indentation for parameters.@*
1683
@itemx --dont-line-up-parentheses
1684
Do not line up parentheses.@*
1688
@itemx --no-space-after-function-call-names
1689
Do not put space after the function in function calls.@*
1693
@itemx --no-space-after-parentheses
1694
Do not put a space after every '(' and before every ')'.@*
1698
@itemx --dont-break-procedure-type
1699
Put the type of a procedure on the same line as its name.@*
1700
@xref{Declarations}.
1703
@itemx --no-space-after-for
1704
Do not put a space after every @code{for}.@*
1708
@itemx --no-space-after-if
1709
Do not put a space after every @code{if}.@*
1713
@itemx --no-space-after-while
1714
Do not put a space after every @code{while}.@*
1718
@itemx --dont-star-comments
1719
Do not put the @samp{*} character at the left of comments.@*
1723
@itemx --leave-optional-blank-lines
1724
Do not swallow optional blank lines.@*
1728
@itemx --dont-space-special-semicolon
1729
Do not force a space before the semicolon after certain statements.
1730
Disables @option{-ss}.@*
1735
Use spaces instead of tabs.@*
1739
@itemx --no-verbosity
1740
Disable verbose mode.@*
1741
@xref{Miscellaneous options}.
1745
Use the original Berkeley coding style.@*
1746
@xref{Common styles}.
1749
@itemx --ignore-profile
1750
Do not read @file{.indent.pro} files.@*
1751
@xref{Invoking indent}.
1754
@itemx --space-after-procedure-calls
1755
Insert a space between the name of the
1756
procedure being called and the @samp{(}.@*
1760
@itemx --paren-indentation@var{n}
1761
Specify the extra indentation per open parentheses '(' when a
1762
statement is broken.
1766
@itemx --preserve-mtime
1767
Preserve access and modification times on output files.
1768
@xref{Miscellaneous options}.
1771
@itemx --space-after-parentheses
1772
Put a space after every '(' and before every ')'.@*
1776
@itemx --procnames-start-lines
1777
Put the type of a procedure on the line before its name.@*
1778
@xref{Declarations}.
1781
@itemx --space-after-for
1782
Put a space after each @code{for}.@*
1786
@itemx --space-after-if
1787
Put a space after each @code{if}.@*
1791
@itemx --space-after-while
1792
Put a space after each @code{while}.@*
1796
@itemx --struct-brace-indentation@var{n}
1797
Indent braces of a struct, union or enum N spaces.@*
1801
@itemx --start-left-side-of-comments
1802
Put the @samp{*} character at the left of comments.@*
1806
@itemx --swallow-optional-blank-lines
1807
Swallow optional blank lines.@*
1811
@itemx --space-special-semicolon
1812
On one-line @code{for} and @code{while} statments,
1813
force a blank before the semicolon.@*
1817
@itemx --standard-output
1818
Write to standard output.@*
1819
@xref{Invoking indent}.
1822
Tell @command{indent} the name of typenames.@*
1823
@xref{Declarations}.
1826
@itemx --tab-size@var{n}
1827
Set tab size to @var{n} spaces.@*
1832
Use tabs. This is the default.@*
1837
Enable verbose mode.@*
1838
@xref{Miscellaneous options}.
1841
Output the version number of @command{indent}.@*
1842
@xref{Miscellaneous options}.
1847
@subheading Options' Cross Key
1849
Here is a list of options alphabetized by long option, to help you find
1850
the corresponding short option.
1856
\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill}
1859
\line{ --blank-lines-after-commas \leaderfill -bc\ \ }
1860
\line{ --blank-lines-after-declarations \leaderfill -bad\ }
1861
\line{ --blank-lines-after-procedures \leaderfill -bap\ }
1862
\line{ --blank-lines-before-block-comments \leaderfill -bbb\ }
1863
\line{ --braces-after-if-line \leaderfill -bl\ \ }
1864
\line{ --brace-indent \leaderfill -bli@var{n}}
1865
\line{ --braces-after-struct-decl-line \leaderfill -bls\ \ }
1866
\line{ --break-after-boolean-operator \leaderfill -nbbo\ \ }
1867
\line{ --break-before-boolean-operator \leaderfill -bbo\ \ }
1868
\line{ --break-function-decl-args \leaderfill -bfda}
1869
\line{ --braces-on-if-line \leaderfill -br\ \ }
1870
\line{ --braces-on-struct-decl-line \leaderfill -brs\ \ }
1871
\line{ --case-indentation \leaderfill -cli@var{n}}
1872
\line{ --case-brace-indentation \leaderfill -cbi@var{n}}
1873
\line{ --comment-delimiters-on-blank-lines \leaderfill -cdb\ }
1874
\line{ --comment-indentation \leaderfill -c@var{n}\ \ }
1875
\line{ --continuation-indentation \leaderfill -ci@var{n}\ }
1876
\line{ --continue-at-parentheses \leaderfill -lp\ \ }
1877
\line{ --cuddle-do-while \leaderfill -cdw\ \ }
1878
\line{ --cuddle-else \leaderfill -ce\ \ }
1879
\line{ --declaration-comment-column \leaderfill -cd@var{n}\ }
1880
\line{ --declaration-indentation \leaderfill -di@var{n}\ }
1881
\line{ --dont-break-function-decl-args \leaderfill -nbfda}
1882
\line{ --dont-break-procedure-type \leaderfill -npsl}
1883
\line{ --dont-cuddle-do-while \leaderfill -ncdw\ \ }
1884
\line{ --dont-cuddle-else \leaderfill -nce\ }
1885
\line{ --dont-format-comments \leaderfill -nfca}
1886
\line{ --dont-format-first-column-comments \leaderfill -nfc1}
1887
\line{ --dont-line-up-parentheses \leaderfill -nlp\ }
1888
\line{ --dont-space-special-semicolon \leaderfill -nss\ }
1889
\line{ --dont-star-comments \leaderfill -nsc\ }
1890
\line{ --else-endif-column \leaderfill -cp@var{n}\ }
1891
\line{ --format-all-comments \leaderfill -fca\ }
1892
\line{ --format-first-column-comments \leaderfill -fc1\ }
1893
\line{ --gnu-style \leaderfill -gnu\ }
1894
\line{ --honour-newlines \leaderfill -hnl\ \ }
1895
\line{ --ignore-newlines \leaderfill -nhnl\ \ }
1896
\line{ --ignore-profile \leaderfill -npro}
1897
\line{ --indent-level \leaderfill -i@var{n}\ \ }
1898
\line{ --k-and-r-style \leaderfill -kr\ \ }
1899
\line{ --leave-optional-blank-lines \leaderfill -nsob}
1900
\line{ --line-comments-indentation \leaderfill -d@var{n}\ \ }
1901
\line{ --leave-preprocessor-space \leaderfill -lps\ }
1902
\line{ --line-length \leaderfill -l@var{n}\ \ }
1903
\line{ --no-blank-lines-after-commas \leaderfill -nbc\ }
1904
\line{ --no-blank-lines-after-declarations \leaderfill -nbad}
1905
\line{ --no-blank-lines-after-procedures \leaderfill -nbap}
1906
\line{ --no-blank-lines-before-block-comments \leaderfill -nbbb}
1907
\line{ --no-comment-delimiters-on-blank-lines \leaderfill -ncdb}
1908
\line{ --no-space-after-casts \leaderfill -ncs\ }
1909
\line{ --no-parameter-indentation \leaderfill -nip\ }
1910
\line{ --no-space-after-for \leaderfill -nsaf}
1911
\line{ --no-space-after-function-call-names \leaderfill -npcs}
1912
\line{ --no-space-after-if \leaderfill -nsai}
1913
\line{ --no-space-after-parentheses \leaderfill -nprs}
1914
\line{ --no-space-after-while \leaderfill -nsaw}
1915
\line{ --no-tabs \leaderfill -nut\ \ }
1916
\line{ --no-verbosity \leaderfill -nv\ \ }
1917
\line{ --original \leaderfill -orig}
1918
\line{ --parameter-indentation \leaderfill -ip@var{n}\ }
1919
\line{ --paren-indentation \leaderfill -pi@var{n}\ }
1920
\line{ --preserve-mtime \leaderfill -pmt\ }
1921
\line{ --procnames-start-lines \leaderfill -psl\ }
1922
\line{ --space-after-cast \leaderfill -cs\ \ }
1923
\line{ --space-after-for \leaderfill -saf\ }
1924
\line{ --space-after-if \leaderfill -sai\ }
1925
\line{ --space-after-parentheses \leaderfill -prs\ }
1926
\line{ --space-after-procedure-calls \leaderfill -pcs\ }
1927
\line{ --space-after-while \leaderfill -saw\ }
1928
\line{ --space-special-semicolon \leaderfill -ss\ \ }
1929
\line{ --standard-output \leaderfill -st\ \ }
1930
\line{ --start-left-side-of-comments \leaderfill -sc\ \ }
1931
\line{ --struct-brace-indentation \leaderfill -sbi@var{n}}
1932
\line{ --swallow-optional-blank-lines \leaderfill -sob\ }
1933
\line{ --tab-size \leaderfill -ts@var{n}\ }
1934
\line{ --use-tabs \leaderfill -ut\ \ }
1935
\line{ --verbose \leaderfill -v\ \ \ }
1941
--blank-lines-after-commas -bc
1942
--blank-lines-after-declarations -bad
1943
--blank-lines-after-procedures -bap
1944
--blank-lines-before-block-comments -bbb
1945
--braces-after-if-line -bl
1947
--braces-after-struct-decl-line -bls
1948
--braces-on-if-line -br
1949
--braces-on-struct-decl-line -brs
1950
--break-after-boolean-operator -nbbo
1951
--break-before-boolean-operator -bbo
1952
--break-function-decl-args -bfda
1953
--case-indentation -cli@var{n}
1954
--case-brace-indentation -cbi@var{n}
1955
--comment-delimiters-on-blank-lines -cdb
1956
--comment-indentation -c@var{n}
1957
--continuation-indentation -ci@var{n}
1958
--continue-at-parentheses -lp
1959
--cuddle-do-while -cdw
1961
--declaration-comment-column -cd@var{n}
1962
--declaration-indentation -di@var{n}
1963
--dont-break-function-decl-args -nbfda
1964
--dont-break-procedure-type -npsl
1965
--dont-cuddle-do-while -ncdw
1966
--dont-cuddle-else -nce
1967
--dont-format-comments -nfca
1968
--dont-format-first-column-comments -nfc1
1969
--dont-line-up-parentheses -nlp
1970
--dont-space-special-semicolon -nss
1971
--dont-star-comments -nsc
1972
--else-endif-column -cp@var{n}
1973
--format-all-comments -fca
1974
--format-first-column-comments -fc1
1976
--honour-newlines -hnl
1977
--ignore-newlines -nhnl
1978
--ignore-profile -npro
1979
--indent-level -i@var{n}
1981
--leave-optional-blank-lines -nsob
1982
--leave-preprocessor-space -lps
1983
--line-comments-indentation -d@var{n}
1984
--line-length -l@var{n}
1985
--no-blank-lines-after-commas -nbc
1986
--no-blank-lines-after-declarations -nbad
1987
--no-blank-lines-after-procedures -nbap
1988
--no-blank-lines-before-block-comments -nbbb
1989
--no-comment-delimiters-on-blank-lines -ncdb
1990
--no-space-after-casts -ncs
1991
--no-parameter-indentation -nip
1992
--no-space-after-for -nsaf
1993
--no-space-after-function-call-names -npcs
1994
--no-space-after-if -nsai
1995
--no-space-after-parentheses -nprs
1996
--no-space-after-while -nsaw
2000
--parameter-indentation -ip@var{n}
2001
--paren-indentation -pi@var{n}
2002
--preserve-mtime -pmt
2003
--procnames-start-lines -psl
2004
--space-after-cast -cs
2005
--space-after-for -saf
2006
--space-after-if -sai
2007
--space-after-parentheses -prs
2008
--space-after-procedure-calls -pcs
2009
--space-after-while -saw
2010
--space-special-semicolon -ss
2011
--standard-output -st
2012
--start-left-side-of-comments -sc
2013
--struct-brace-indentation -sbi@var{n}
2014
--swallow-optional-blank-lines -sob
2015
--tab-size -ts@var{n}
2022
@node Index, , Option Summary, Top