\input texinfo   @c -*-texinfo-*-
@c %**start of header
@setfilename indent.info
@settitle @code{indent}:  Indent and Format C Program Source
@c %**end of header

@c ===> NOTE! <==
@c Determine the edition number in *three* places by hand:
@c      1. First ifinfo section  2. title page  3. top node
@c To find the locations, search for !!set

@c smallbook
@c Note: some of the long options are too long for the index in
@c       smallbook format.  This will need some thought.  --rjc

@finalout

@synindex cp ky
@setchapternewpage odd

@dircategory Indent Code Formatter
@direntry
* CIndent: (cindent).           C code formatter (fork).
@end direntry

@ifinfo
Copyright @copyright{} 1999-2024, 2025 Thomas E. Dickey@*
Copyright @copyright{} 1995, 1996 Joseph Arceneaux@*
Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.@*

@c !!set edition, date, version
This is Edition 2.0, May, 2024, of @cite{The @code{indent} Manual},
for Indent Version 2.0

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

@ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
section entitled ``GNU General Public License'' is included exactly as
in the original, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the section entitled ``GNU General Public License'' may be
included in a translation approved by the author instead of in the
original English.
@end ignore
@end ifinfo

@titlepage
@title Indent
@subtitle Format C Code
@sp 1
@c !!set edition, version, date
@subtitle Edition 2.0, for Indent Version 2.0
@subtitle May, 2025
@author Thomas E. Dickey
@author Joseph Arceneaux
@page
@vskip 0pt plus1filll
Copyright @copyright{} 1999-2024, 2025 Thomas E. Dickey

Copyright @copyright{} 1995, 1996 Joseph Arceneaux

Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software
Foundation, Inc.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by the Foundation.
@end titlepage
@page

@c put the following line in the the file dir in the info directory
@c under wherever you have installed emacs (assuming that
@c the info file made from this file is in the file "indent")
@c * indent:(indent).  How to change the appearance of a C program.

@ifinfo
@node Top, Indent Program, (dir), (dir)
@top @code{indent}:  Indent and Format C Program Source

The @code{indent} program changes the appearance of a C program by
inserting or deleting whitespace.

@comment !!set edition, version, date
@end ifinfo

@menu
* Indent Program::              The @code{indent} Program
* Option Summary::              Option Summary
* Index::                       Index
@end menu

@node Indent Program, Option Summary, Top, Top
@chapter The @code{indent} Program

@iftex
The @code{indent} program changes the appearance of a C program by
inserting or deleting whitespace.
@end iftex
@ifinfo
The @code{indent} program
@end ifinfo
@iftex
It
@end iftex
can be used to make code easier to read.  It can also convert from one
style of writing C to another.

@code{indent} understands a substantial amount about the syntax of C,
but it also attempts to cope with incomplete and malformed syntax.

In version 1.2 and more recent versions, the GNU style of indenting is
the default.

@menu
* Invoking indent::             Invoking @code{indent}
* Backup files::                Backup Files
* Common styles::               Common styles
* Blank lines::                 Blank lines
* Comments::                    Comments
* Statements::                  Statements
* Declarations::                Declarations
* Indentation::                 Indentation
* Disabling Formatting::        Disabling Formatting
* Other Languages::             Other Languages
* Miscellaneous options::       Miscellaneous options
* Bugs::                        Bugs
* Copyright::                   Copyright
@end menu

@node Invoking indent, Backup files,  , Indent Program
@section Invoking @code{indent}
@cindex Invoking @code{indent}
@cindex Starting @code{indent}
@cindex Beginning @code{indent}

As of version 1.3, the format of the @code{indent} command is:

@example
@group
indent [@var{options}] [@var{input-files}]

indent [@var{options}] [@var{single-input-file}] [-o @var{output-file}]
@end group
@end example

This format is different from earlier versions and other versions of
@code{indent}.

In the first form, one or more input files are specified.  @code{indent}
makes a backup copy of each file, and the original file is replaced with
its indented version.  @xref{Backup files}, for an explanation of how
backups are made.

@cindex Output File Specification
@kindex -o
@kindex --output
@kindex --output-file
In the second form, only one input file is specified.  In this case, or
when the standard input is used, you may specify an output file after
the @samp{-o} option.

@cindex Standard Output
@kindex -st
@kindex --standard-output
To cause @code{indent} to write to standard output, use the @samp{-st}
option.  This is only allowed when there is only one input file, or when
the standard input is used.

@cindex Using Standard Input
If no input files are named, the standard input is read for input.
Also, if a filename named @samp{-} is specified, then the standard input
is read.

As an example, each of the following commands will input the program
@file{slithy_toves.c} and write its indented text to
@file{slithy_toves.out}:

@example
@group
indent slithy_toves.c -o slithy_toves.out

indent -st slithy_toves.c > slithy_toves.out

cat slithy_toves.c | indent -o slithy_toves.out
@end group
@end example

@cindex Long options, use of
Most other options to @code{indent} control how programs are formatted.
As of version 1.2, @code{indent} also recognizes a long name for each
option name.  Long options are prefixed by either @samp{--} or
@samp{+}.@footnote{ @samp{+} is being superseded by @samp{--} to
maintain consistency with the POSIX standard.} In most of this document,
the traditional, short names are used for the sake of brevity.
@xref{Option Summary}, for a list of options, including both long and
short names.

Here is another example:

@example
indent -br test/metabolism.c -l85
@end example

This will indent the program @file{test/metabolism.c} using the
@samp{-br} and @samp{-l85} options, write the output back to
@file{test/metabolism.c}, and write the original contents of
@file{test/metabolism.c} to a backup file in the directory @file{test}.

Equivalent invocations using long option names for this example would
be:

@example
@group
indent --braces-on-if-line --line-length185 test/metabolism.c

indent +braces-on-if-line +line-length185 test/metabolism.c
@end group
@end example

@cindex @file{.indent.pro} file
@cindex Initialization file
@kindex -npro
@kindex --ignore-profile
@kindex +ignore-profile
If you find that you often use @code{indent} with the same options, you
may put those options into a file named @file{.indent.pro}.
@code{indent} will first look for @file{.indent.pro} in the current
directory and use that if found.  Otherwise, @code{indent} will search
your home directory for @file{.indent.pro} and use that file if it is
found.  This behavior is different from that of other versions of
@code{indent}, which load both files if they both exist.

The format of @code{.indent.pro} is simply a list of options, just as
they would appear on the command line, separated by white space (tabs,
spaces, and newlines).  Options in @code{.indent.pro} may be surrounded by C
or C++ comments, in which case they are ignored.

Most command line switches are handled @emph{after} processing
@file{.indent.pro}.  Options specified later override arguments
specified earlier, with one exception: Explicitly specified options
always override background options (@pxref{Common styles}).

You can
prevent @code{indent} from reading an @file{.indent.pro} file by
specifying the @samp{-npro} option.

Alternatively, you can tell @code{indent} to read a profile
from any file using the @samp{--profile} option.
The option accepts a parameter which can be either an absolute pathname
(beginning with a `/'), or relative.
If the pathname is relative, @code{indent} searches in the current
and home directories just like the @file{.indent.pro} file.
The @samp{-npro} option overrides this, as well.

@node Backup files, Common styles, Invoking indent, Indent Program
@comment  node-name,  next,  previous,  up
@section Backup Files

As of version 1.3, GNU @code{indent} makes GNU--style backup files, the
same way GNU Emacs does.  This means that either @dfn{simple} or
@dfn{numbered} backup filenames may be made.

Simple backup file names are generated by appending a suffix to the
original file name.  The default for the this suffix is the
one-character string @samp{~} (tilde).  Thus, the backup file for
@file{python.c} would be @file{python.c~}.

Instead of the default, you may specify any string as a suffix by
setting the environment variable @code{SIMPLE_BACKUP_SUFFIX} to
your preferred suffix.

Numbered backup versions of a file @file{momewraths} look like
@file{momewraths.c.~23~}, where 23 is the version of this particular
backup.  When making a numbered backup of the file @file{src/momewrath.c},
the backup file will be named @file{src/momewrath.c.~@var{V}~}, where
@var{V} is one greater than the highest version currently existing in
the directory @file{src}.

The type of backup file made is controlled by the value of the
environment variable @code{VERSION_CONTROL}.  If it is the string
@samp{simple}, then only simple backups will be made.  If its value is
the string @samp{numbered}, then numbered backups will be made.  If its
value is @samp{numbered-existing}, then numbered backups will be made if
there @strong{already exist} numbered backups for the file being indented;
otherwise, a simple backup is made.  If @code{VERSION_CONTROL} is not
set, then @code{indent} assumes the behavior of
@samp{numbered-existing}.

Other versions of @code{indent} use the suffix @samp{.BAK} in naming
backup files.  This behavior can be emulated by setting
@code{SIMPLE_BACKUP_SUFFIX} to @samp{.BAK}.

Note also that other versions of @code{indent} make backups in the
current directory, rather than in the directory of the source file as
GNU @code{indent} now does.

@node Common styles, Blank lines, Backup files, Indent Program
@comment  node-name,  next,  previous,  up
@section Common styles

There are several common styles of C code, including the GNU style, the
Kernighan & Ritchie style, and the original Berkeley style.  A style may
be selected with a single @dfn{background} option, which specifies a set
of values for all other options.  However, explicitly specified options
always override options implied by a background option.

@cindex GNU style
@kindex -gnu
@kindex --gnu-style
As of version 1.2, the default style of GNU @code{indent} is the GNU
style.  Thus, it is no longer necessary to specify the option
@samp{-gnu} to obtain this format, although doing so will not cause an
error.  Option settings which correspond to the GNU style are:

@example
@group
-nbad -bap -nbc -bl -ncdb -cs -nce -di2 -ndj
-ei -nfc1 -i2 -ip5 -lp -pcs -npsl -psl -nsc -nsob -bli2
-cp1 -nfca
@end group
@end example

The GNU coding style is that preferred by the GNU project.  It is the
style that the GNU Emacs C mode encourages and which is used in the C
portions of GNU Emacs.  (People interested in writing programs for
Project GNU should get a copy of @cite{The GNU Coding Standards}, which
also covers semantic and portability issues such as memory usage, the
size of integers, etc.)

@cindex Kernighan & Ritchie style
@kindex -kr
@kindex --k-and-r-style
@kindex --kernighan-and-ritchie
@kindex --kernighan-and-ritchie-style
@comment --kernighan-and-ritchie-style works, too, as does
@comment --kernighan-and-ritchie.  Which is most intuitive?
The Kernighan & Ritchie style is used throughout their well-known book
@cite{The C Programming Language}.  It is enabled with the @samp{-kr}
option.  The Kernighan & Ritchie style corresponds to the following set
of options:

@example
@group
-nbad -bap -nbc -br -c33 -cd33 -ncdb -ce -ci4
-cli0 -cp33 -d0 -di1 -nfc1 -nfca -i4 -ip0 -l75 -lp
-npcs -npsl -nsc -nsob -nss -cs
@end group
@end example

@noindent
Kernighan & Ritchie style does not put comments to the right of code in
the same column at all times (nor does it use only one space to the
right of the code), so for this style @code{indent} has arbitrarily
chosen column 33.

@cindex Berkeley style
@cindex Original Berkeley style
@kindex -orig
@kindex --original
@kindex --original-style
@kindex --berkeley
@kindex --berkeley-style
The style of the original Berkeley @code{indent} may be obtained by
specifying @samp{-orig} (or by specifying @samp{--original}, using the
long option name).  This style is equivalent to the following settings:

@example
@group
-nbap -nbad -bc -br -c33 -cd33 -cdb -ce -ci4
-cli0 -cp33 -di16 -fc1 -fca -i4 -ip4 -l75 -lp
-npcs -psl -sc -nsob -nss -ts8
@end group
@end example

@cindex Linux style
@kindex --linux
The Linux style is used in the Linux kernel and drivers.
It is enabled  with  the  @samp{-linux} option
(or by specifying @samp{--linux-style}.
This style is equivalent to the following settings:

@example
@group
-nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4
-cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -nprs -npsl -sai
-saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1
@end group
@end example

@node Blank lines, Comments, Common styles, Indent Program
@comment  node-name,  next,  previous,  up
@section Blank lines
@cindex Blank lines

Various programming styles use blank lines in different places.
@code{indent} has a number of options to insert or delete blank lines in
specific places.

The @samp{-bad} option causes @code{indent} to force a blank line after
every block of declarations.  The @samp{-nbad} option causes
@code{indent} not to force such blank lines.

@kindex -bacc
@kindex --blank-lines-after-ifdefs
@kindex -nbacc
@kindex --no-blank-lines-after-ifdefs
The @samp{-bacc} option forces a blank line after (before) every ifdef group.
The @samp{-nbacc} option forces no such blank line.

The @samp{-bap} option forces a blank line after every procedure body.
The @samp{-nbap} option forces no such blank line.

@kindex -bbb
@kindex --blank-lines-after-block-comments
@kindex -nbbb
@kindex --no-blank-lines-after-block-comments
The @samp{-bbb} option forces a blank line before every boxed comment.
(@pxref{Comments}) The @samp{-nbbb}
option does not force such blank lines.

@kindex -sob
@kindex --swallow-optional-blank-lines
@kindex -nsob
@kindex --leave-optional-blank-lines
The @samp{-sob} option causes @code{indent} to swallow optional blank
lines (that is, any optional blank lines present in the input will be
removed from the output).  If the @samp{-nsob} is specified, any blank
lines present in the input file will be copied to the output file.

@menu
* -bad::                        More on the @samp{-bad} option.
* -bap::                        More on the @samp{-bap} option.
@end menu

@ifinfo
@node -bad, -bap,  , Blank lines
@comment  node-name,  next,  previous,  up
@subsection @minus{}-blank-lines-after-declarations

The @samp{-bad} option forces a blank line after every block of
declarations.  The @samp{-nbad} option does not add any such blank
lines.
@end ifinfo

For example, given the input
@example
@group
char *foo;
char *bar;
/* This separates blocks of declarations.  */
int baz;
@end group
@end example

@kindex -bad
@kindex --blank-lines-after-declarations
@kindex -nbad
@kindex --no-blank-lines-after-declarations
@noindent
@code{indent -bad} produces

@example
@group
char *foo;
char *bar;

/* This separates blocks of declarations.  */
int baz;
@end group
@end example

@noindent
and @code{indent -nbad} produces

@example
@group
char *foo;
char *bar;
/* This separates blocks of declarations.  */
int baz;
@end group
@end example

@ifinfo
@node -bap,  , -bad, Blank lines
@comment  node-name,  next,  previous,  up
@subsection @minus{}-blank-lines-after-procedures
@end ifinfo

@kindex -bap
@kindex --blank-lines-after-procedures
@kindex -nbap
@kindex --no-blank-lines-after-procedures
The @samp{-bap} option forces a blank line after every procedure body.

For example, given the input

@example
@group
int
foo ()
@{
  puts("Hi");
@}
/* The procedure bar is even less interesting.  */
char *
bar ()
@{
  puts("Hello");
@}
@end group
@end example

@noindent
@code{indent -bap} produces

@example
@group
int
foo ()
@{
  puts ("Hi");
@}

/* The procedure bar is even less interesting.  */
char *
bar ()
@{
  puts ("Hello");
@}
@end group
@end example

@noindent
and @code{indent -nbap} produces

@example
@group
int
foo ()
@{
  puts ("Hi");
@}
/* The procedure bar is even less interesting.  */
char *
bar ()
@{
  puts ("Hello");
@}
@end group
@end example

@noindent
No blank line will be added after the procedure @code{foo}.

@node Comments, Statements, Blank lines, Indent Program
@comment  node-name,  next,  previous,  up
@section Comments
@cindex Comments

@code{indent} formats both C and C++ comments. C comments are begun with
@samp{/*}, terminated with @samp{*/} and may contain newline characters.
C++ comments begin with the delimiter @samp{//} and end at the newline.

@code{indent} handles comments differently depending upon their context.
@code{indent} attempts to distinguish amongst comments which follow
statements, comments which follow declarations, comments following
preprocessor directives, and comments which are not preceded by code of
any sort, i.e., they begin the text of the line (although not
necessarily in column 1).

@code{indent} further distinguishes between comments found outside of
procedures and aggregates, and those found within them.  In particular,
comments beginning a line found within a procedure will be indented to
the column at which code is currently indented.  The exception to this a
comment beginning in the leftmost column;  such a comment is output
at that column.

@code{indent} attempts to leave @dfn{boxed comments} unmodified.  The
general idea of such a comment is that it is enclosed in a rectangle or
''box'' of stars or dashes to visually set it apart.  More precisely,
boxed comments are defined as those in which the initial @samp{/*} is
followed immediately by the character @samp{*}, @samp{=}, @samp{_}, or
@samp{-}, or those in which the beginning comment delimiter (@samp{/*})
is on a line by itself, and the following line begins with a @samp{*} in
the same column as the star of the opening delimiter.

Examples of boxed comments are:

@example
@group
/**********************
 * Comment in a box!! *
 **********************/

       /*
        * A different kind of scent,
        * for a different kind of comment.
        */
@end group
@end example

@code{indent} attempts to leave boxed comments exactly as they are found
in the source file.  Thus the indentation of the comment is unchanged,
and its length is not checked in any way.  The only alteration made is
that an embedded tab character may be converted into the appropriate
number of spaces.

If the @samp{-bbb} option is specified, all such boxed comments will be
preceded by a blank line, unless such a comment is preceded by code.


@kindex -fca
@kindex --format-all-comments
@kindex -nfca
@kindex --dont-format-comments
@kindex -fc1
@kindex --format-first-column-comments
@kindex -nfc1
@kindex --dont-format-first-column-comments
Comments which are not boxed comments may be formatted, which means that
the line is broken to fit within a right margin and left-filled with
whitespace.  Single newlines are equivalent to a space, but blank lines
(two or more newlines in a row) are taken to mean a paragraph break.
Formatting of comments which begin after the first column is enabled
with the @samp{-fca} option.  To format those beginning in column one,
specify @samp{-fc1}.  Such formatting is disabled by default.

The right margin for formatting defaults to 78, but may be changed with
the @samp{-lc} option.  If the margin specified does not allow the
comment to be printed, the margin will be automatically extended for the
duration of that comment.  The margin is not respected if the comment is
not being formatted.

@kindex -d@var{n}
@kindex --line-comments-indentation@var{n}
If the comment begins a line (i.e., there is no program text to its
left), it will be indented to the column it was found in unless the
comment is within a block of code.  In that case, such a comment will be
aligned with the indented code of that block (unless the comment began
in the first column).  This alignment may be affected by the @samp{-d}
option, which specifies an amount by which such comments are moved to
the @strong{left}, or unindented.  For example, @samp{-d2} places comments
two spaces to the left of code.  By default, comments are aligned with
code, unless they begin in the first column, in which case they are left
there by default -- to get them aligned with the code, specify @samp{-fc1}.

@kindex -c@var{n}
@kindex --comment-indentation@var{n}
@kindex -cd@var{n}
@kindex --declaration-comment-column@var{n}
@kindex -cp@var{n}
@kindex --else-endif-column@var{n}
Comments to the right of code will appear by default in column 33.
This may be changed with one of three options.  @samp{-c} will specify
the column for comments following code, @samp{-cd} specifies the
column for comments following declarations, and @samp{-cp} specifies
the column for comments following preprocessor directives @code{#else}
and @code{#endif}.

If the code to the left of the comment exceeds the beginning column,
the comment column will be extended to the next tabstop column past
the end of the code, or in the case of preprocessor directives, to one
space past the end of the directive.  This extension lasts only for
the output of that particular comment.

@kindex -cdb
@kindex --comment-delimiters-on-blank-lines
@kindex -ncdb
@kindex --no-comment-delimiters-on-blank-lines
The @samp{-cdb} option places the comment delimiters on blank lines.
Thus, a single line comment like @code{/* Claustrophobia */} can be
transformed into:

@example
@group
/*
   Claustrophobia
 */
@end group
@end example

@kindex -sc
@kindex --start-left-side-of-comments
@kindex -nsc
@kindex --dont-star-comments
Stars can be placed at the beginning of multi-line comments with the
@samp{-sc} option.  Thus, the single-line comment above can be
transformed (with @samp{-cdb -sc}) into:

@example
@group
/*
 * Claustrophobia
 */
@end group
@end example

@node Statements, Declarations, Comments, Indent Program
@comment  node-name,  next,  previous,  up
@section Statements

@kindex -br
@kindex --braces-on-if-line
@kindex -bl
@kindex --braces-after-if-line
The @samp{-br} or @samp{-bl} option specifies how to format braces.

The @samp{-br} option formats statement braces like this:

@example
@group
if (x > 0) @{
  x--;
@}
@end group
@end example

@noindent
The @samp{-bl} option formats them like this:

@example
@group
if (x > 0)
  @{
    x--;
  @}
@end group
@end example

These options also affect structure and enumeration declarations.  The
@samp{-br} option produces structure declarations like the following:

@example
@group
struct Sname @{
    int i;
    char chp;
@} Vname;
@end group
@end example

The default behavior, also obtained by specifying @samp{-bl}, would
yield the following format for the same declaration:

@example
@group
struct Sname
  @{
     int i;
     char chp;
  @}
Vname;
@end group
@end example

@kindex -bli@var{n}
@kindex --brace-indent@var{n}
If you use the @samp{-bl} option, you may also want to specify the
@samp{-bli} option.  This option specifies the number of spaces by
which braces are indented.  @samp{-bli2}, the default, gives the
result shown above.  @samp{-bli0} results in the following:

@example
@group
if (x > 0)
@{
  x--;
@}
@end group
@end example

@kindex -ce
@kindex --cuddle-else
@kindex -nce
@kindex --dont-cuddle-else
If you are using the @samp{-br} option, you probably want to also use
the @samp{-ce} option.  This causes the @code{else} in an if-then-else
construct to cuddle up to the immediately preceding @samp{@}}.  For
example, with @samp{-br -ce} you get the following:

@example
@group
if (x > 0) @{
  x--;
@} else @{
  fprintf (stderr, "...something wrong?\n");
@}
@end group
@end example

@noindent
With @samp{-br -nce} that code would appear as

@smallexample
@group
if (x > 0) @{
  x--;
@}
else @{
  fprintf (stderr, "...something wrong?\n");
@}
@end group
@end smallexample

@kindex -cdw
@kindex --cuddle-do-while
@kindex -ncdw
@kindex --dont-cuddle-do-while
The @samp{-cdw} option causes the @code{while}
in a do-while loop to cuddle up
to the immediately preceding @samp{@}}.
For example, with @samp{-cdw} you get the following:

@smallexample
@group
do @{
  x--;
@} while (x);
@end group
@end smallexample

With @samp{-ncdw} that code would appear as

@smallexample
@group
do @{
  x--;
@}
while (x);
@end group
@end smallexample

@kindex -cbi@var{n}
@kindex --case-brace-indentation@var{n}
The @samp{-cli} option specifies the number of spaces that case labels
should be indented to the right of the containing @samp{switch}
statement.

The default setting gives code like:

@smallexample
@group
switch (i)
  @{
  case 0:
    break;
  case 1:
    @{
      ++i;
    @}
  default:
    break;
  @}
@end group
@end smallexample

Using the @samp{-cli2} option that would become:

@smallexample
@group
switch (i)
  @{
    case 0:
      break;
    case 1:
      @{
        ++i;
      @}
    default:
      break;
  @}
@end group
@end smallexample

The  indentation of the braces below a case statement can be controlled
with the @samp{-cbin} option.
For example, using @samp{-cli2 -cbi0} results in:

@smallexample
@group
switch (i)
  @{
    case 0:
      break;
    case 1:
    @{
      ++i;
    @}
    default:
      break;
  @}
@end group
@end smallexample

@kindex -ss
@kindex --space-special-semicolon
@kindex -nss
@kindex --dont-space-special-semicolon
If a semicolon is on the same line as a @code{for} or @code{while}
statement, the @samp{-ss} option will cause a space to be placed before
the semicolon.  This emphasizes the semicolon, making it clear that the
body of the @code{for} or @code{while} statement is an empty statement.
@code{-nss} disables this feature.

@kindex -pcs
@kindex --space-after-procedure-calls
@kindex -npcs
@kindex --no-space-after-function-call-names
The @samp{-pcs} option causes a space to be placed between the name of
the procedure being called and the @samp{(} (for example, @w{@code{puts
("Hi");}}.  The @samp{-npcs} option would give @code{puts("Hi");}).

@kindex -cs
@kindex --space-after-cast
@kindex -ncs
@kindex --no-space-after-casts
If the @samp{-cs} option is specified, @code{indent} puts a space after
a cast operator.

@kindex -bs
@kindex --blank-before-sizeof
@kindex --Bill-Shannon
The @samp{-bs} option ensures that there is a space between the
keyword @code{sizeof} and its argument.  In some versions, this is
known as the @samp{Bill_Shannon} option.

@node Declarations, Indentation, Statements, Indent Program
@comment  node-name,  next,  previous,  up
@section Declarations

@kindex -di@var{n}
@kindex --declaration-indentation@var{n}
By default @code{indent} will line up identifiers, in the column
specified by the @samp{-di} option.  For example, @samp{-di16} makes
things look like:

@example
@group
int             foo;
char           *bar;
@end group
@end example

Using a small value (such as one or two) for the @samp{-di} option can
be used to cause the identifiers to be placed in the first available
position, for example

@example
@group
int foo;
char *bar;
@end group
@end example

The value given to the @samp{-di} option will still affect variables
which are put on separate lines from their types, for example
@samp{-di2} will lead to

@example
@group
int
  foo;
@end group
@end example

@kindex -bc
@kindex --blank-lines-after-commas
@kindex -nbc
@kindex --no-blank-lines-after-commas
If the @samp{-bc} option is specified, a newline is forced after each
comma in a declaration.  For example,

@example
@group
int a,
  b,
  c;
@end group
@end example

@noindent
With the @samp{-nbc} option this would look like

@example
int a, b, c;
@end example

@kindex -psl
@kindex --procnames-start-lines
@kindex -npsl
@kindex --dont-break-procedure-type
@cindex @code{etags} requires @samp{-psl}
The @samp{-psl} option causes the type of a procedure being defined to
be placed on the line before the name of the procedure.  This style is
required for the @code{etags} program to work correctly, as well as some
of the @code{c-mode} functions of Emacs.

@kindex -T
@cindex Typenames
You should use the @samp{-T}
option to tell @code{indent} the name of all the type-names in your
program that are defined by @code{typedef}.  @samp{-T} can be specified
more than once, and all names specified are used.  For example, if your
program contains

@example
@group
typedef unsigned long CODE_ADDR;
typedef enum @{red, blue, green@} COLOR;
@end group
@end example

@noindent
you would use the options @samp{-T CODE_ADDR -T COLOR}.

@kindex -ta
@kindex -auto-typedefs
@cindex Typenames
You may also use the @samp{-ta}
option to tell @code{indent} to interpret identifiers ending with ``_t''
as if they were type-names declared by @samp{-T}.

@node Indentation, Disabling Formatting, Declarations, Indent Program
@comment  node-name,  next,  previous,  up
@section Indentation

@kindex -i@var{n}
@kindex --indent-level@var{n}
@kindex --indentation-level@var{n}
@kindex -ci@var{n}
@kindex --continuation-indentation@var{n}
@kindex -lp
@kindex --continue-at-parentheses
@kindex -nlp
@kindex --dont-line-up-parentheses
One issue in the formatting of code is how far each line should be
indented from the left margin.  When the beginning of a statement such
as @code{if} or @code{for} is encountered, the indentation level is
increased by the value specified by the @samp{-i} option.  For example,
use @samp{-i8} to specify an eight character indentation for each
level.  When a statement is broken across two lines, the second line is
indented by a number of additional spaces specified by the @samp{-ci}
option.  @samp{-ci} defaults to 0.  However, if the @samp{-lp} option is
specified, and a line has a left parenthesis which is not closed on that
line, then continuation lines will be lined up to start at the character
position just after the left parenthesis.  This processing also applies
to @samp{[} and applies to @samp{@{} when it occurs in initialization
lists.  For example, a piece of continued code might look like this with
@samp{-nlp -ci3} in effect:

@example
@group
  p1 = first_procedure (second_procedure (p2, p3),
     third_procedure (p4, p5));
@end group
@end example

@noindent
With @samp{-lp} in effect the code looks somewhat clearer:

@example
@group
  p1 = first_procedure (second_procedure (p2, p3),
                        third_procedure (p4, p5));
@end group
@end example

@kindex -ts@var{n}
@kindex --tab-size@var{n}
@code{indent} assumes that tabs are placed at regular intervals of both
input and output character streams.  These intervals are by default 8
columns wide, but (as of version 1.2) may be changed by the @samp{-ts}
option.  Tabs are treated as the equivalent number of spaces.

@kindex -ip@var{n}
@kindex --parameter-indentation@var{n}
@kindex -nip
@kindex --no-parameter-indentation
The indentation of type declarations in old-style function definitions
is controlled by the @samp{-ip} parameter.  This is a numeric parameter
specifying how many spaces to indent type declarations.  For example,
the default @w{@samp{-ip5}} makes definitions look like this:

@example
@group
char *
create_world (x, y, scale)
     int x;
     int y;
     float scale;
@{
  . . .
@}
@end group
@end example

For compatibility with other versions of indent, the option @samp{-nip}
is provided, which is equivalent to @samp{-ip0}.

@kindex -lps
@kindex --leave-preprocessor-space
@kindex -nlps
@kindex --remove-preprocessor-space
ANSI C allows white space to be placed on preprocessor command lines
between the character @samp{#} and the command name.  By default,
@code{indent} retains this space, but specifying the @samp{-nlps} option
directs @code{indent} to remove the whitespace.

@kindex -ppi@var{n}
@kindex --preprocessor-indentation@var{n}
Alternatively, you may use the @samp{-ppi} option to insert spaces,
indenting the preprocessor keywords
(after first removing any existing spacing between the character @samp{#}
and preprocessor keywords).
This option overrides @samp{-lps}.

@kindex -eei
@kindex --extra-expression-indentation
@kindex -neei
@kindex --no-extra-expression-indentation
Use the @samp{-eei} option to tell @code{indent} to improve readability
of continuation lines from the expression part of
@code{if(e)}, @code{while(e)}, @code{for(e;e;e)}
by indenting an extra tab stop
so that they do not conflict with the code that follows.

@node Disabling Formatting, Other Languages, Indentation, Indent Program
@comment  node-name,  next,  previous,  up
@section Disabling Formatting

Formatting of C code may be disabled for portions of a program by
embedding special @dfn{control comments} in the program.  To turn off
formatting for a section of a program, place the disabling control
comment

@example
/* *INDENT-OFF* */
@end example

on a line by itself just before that
section.  Program text scanned after this control comment is output
precisely as input with no modifications until the corresponding
enabling comment is scanned on a line by itself.  The disabling control
comment is

@example
/* *INDENT-ON* */
@end example

and any text following the comment
on the line is also output unformatted.  Formatting begins again with
the input line following the enabling control comment.

More precisely, @code{indent} does not attempt to verify the closing
delimiter (@code{*/}) for these C comments, and any whitespace on the
line is totally transparent.

These control comments also function in their C++ formats,
namely

@example
// *INDENT-OFF*
@end example

and

@example
// *INDENT-ON*
@end example

It should be noted that the internal state of @code{indent} remains
unchanged over the course of the unformatted section.  Thus, for
example, turning off formatting in the middle of a function and
continuing it after the end of the function may lead to bizarre
results.  It is therefore wise to be somewhat modular in selecting code
to be left unformatted.

As a historical note, some earlier versions of @code{indent} produced
error messages beginning with @code{*INDENT**}.  These versions of
@code{indent} were written to ignore any input text lines which began
with such error messages.

You may also override the formatting of assignment statements by using
a @code{/* *INDENT-EQLS* */} comment.
This tells @code{indent} to use the next statement as a hint of how
it and subsequent statements (up to the next blank line) should be
formatted.
It uses the first ``binary operator'' (such as @code{=})
on the line as a marker.
The resulting line will put that operator in the same column,
and align the first ``binary operator'' on subsequent lines in the same column.

Here is an example of how it might be used:

@example
@group
/* *INDENT-EQLS* */
dimensions = 2;
x          = 5;
y          += 6;
@end group
@end example

@node Other Languages, Miscellaneous options, Disabling Formatting, Indent Program
@comment  node-name,  next,  previous,  up
@section Other Languages

@kindex -c++
@kindex --c-plus-plus
In addition to recognizing C++ comments (which are now standard in C),
@code{indent} provides limited support for C++ constructs:

@itemize @bullet
@item
It deals with C++ Class::Method, by not splitting the double colons.
@item
It handles C++ const function declarations like
@display
const MediaDomainList PVR::get_itsMediaDomainList() const
@end display
by ignoring "const" just after a parameter list */
@end itemize

It also accepts (and currently ignores) a @samp{-c++} option.
This would be used with an alternate symbol table for C++.

@kindex -ly
@kindex --lex-or-yacc
If you add the @samp{-ly} option,
@code{indent} also handles for Lex/Yacc scripts,
by formatting the parts which are passed directly to the output.
Both lex and yacc use the same file structure:
@example
@group
``definitions''
%%
``rules''
%%
``literal''
@end group
@end example
Anything in the ``literal'' section is copied to the output,
and is assumed to be C source.
Also, within the ``definitions'' and ``rules'' sections,
lex/yacc pass any lines bracketed with %@{ and %@} to the output.

Other C statements within ``rules'' are not currently formatted.

@node Miscellaneous options, Bugs, Other Languages, Indent Program
@comment  node-name,  next,  previous,  up
@section Miscellaneous options

@kindex --version
To find out what version of @code{indent} you have, use the command
@code{indent --version}.  This will report the version number of
@code{indent}, without doing any of the normal processing.

@kindex -h
@kindex --help
@kindex --usage
Use the @code{--help} option to get a usage summary.

@ignore
This is intentionally undocumented because
1.  Although GNU now has groff, it would be better to use TeX.

2.  The output of indent -troff looks awful, so we have heard.  Perhaps
    it would be reasonable to use this as a starting point to printing a
    program.

If you are printing your program, you may wish to use the @samp{-troff}
option to produce output suitable for processing by the @code{troff}
program.  When the @samp{-troff} option is specified, if the output file
is not specified, the default is standard output, rather than formatting
in place.
@end ignore

@kindex -v
@kindex --verbose
@kindex -nv
@kindex --no-verbosity
The @samp{-v} option can be used to turn on verbose mode.  When in
verbose mode, @code{indent} reports when it splits one line of input
into two or more lines of output, and gives some size statistics at
completion.

@kindex -D
@kindex --debug
The @samp{-D} option can be used to turn on debugging traces.
Its parameter gives the debugging level (0 is off, 1 is on, 2 is more verbose).

@node Bugs, Copyright, Miscellaneous options, Indent Program
@comment  node-name,  next,  previous,  up
@section Bugs

The "-troff" option is strongly deprecated, and is not supported.  A
good thing for someone to do is to rewrite `indent' to generate TeX
source as a hardcopy output option, among other things.

@node Copyright,  , Bugs, Indent Program
@comment  node-name,  next,  previous,  up
@section Copyright

The following copyright notice applies to the @code{indent} program.
The copyright and copying permissions for this manual appear near the
beginning of this document.

@display
Copyright @copyright{} 1999-2024, 2025 Thomas E. Dickey
Copyright @copyright{} 1995, 1996 Joseph Arceneaux
Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation
Copyright @copyright{} 1985 Sun Microsystems, Inc.
Copyright @copyright{} 1980 The Regents of the University of California.
Copyright @copyright{} 1976 Board of Trustees of the University of Illinois.
All rights reserved.

Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley, the University of Illinois,
Urbana, and Sun Microsystems, Inc.  The name of either University
or Sun Microsystems may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
@end display

@node Option Summary, Index, Indent Program, Top
@appendix Option Summary

Here is a list of all the options for @code{indent}, alphabetized by
short option.  It is followed by a cross key alphabetized by long option.

@c The cross references are all on lines by themselves because this
@c looks better in both printed output and Info.  4 Feb 1992  --rjc
@table @samp
@item -bacc
@itemx --blank-lines-after-ifdefs
Force blank lines after (and before) ifdefs.@*
@xref{Blank lines}.

@item -bad
@itemx --blank-lines-after-declarations
Force blank lines after the declarations.@*
@xref{Blank lines}.

@item -bap
@itemx --blank-lines-after-procedures
Force blank lines after procedure bodies.@*
@xref{Blank lines}.

@item -bbb
@itemx --blank-lines-after-block-comments
Force blank lines after block comments.@*
@xref{Blank lines}.

@item -bc
@itemx --blank-lines-after-commas
Force newline after comma in declaration.@*
@xref{Declarations}.

@item -bl
@itemx --braces-after-if-line
Put braces on line after @code{if}, etc.@*
@xref{Statements}.

@item -bli@var{n}
@itemx --brace-indent@var{n}
Indent braces @var{n} spaces.@*
@xref{Statements}.

@item -br
@itemx --braces-on-if-line
Put braces on line with @code{if}, etc. and structure declarations@*
@xref{Statements}.

@item -bs
@itemx --Bill-Shannon
@itemx --blank-before-sizeof
Put a space between @code{sizeof} and its argument.@*
@xref{Statements}.

@item -c@var{n}
@itemx --comment-indentation@var{n}
Put comments to the right of code in column @var{n}.@*
@xref{Comments}.

@item -cbi@var{n}
@itemx --case-brace-indentation@var{n}
Indent braces after a case label @var{n} spaces.@*
@xref{Statements}.

@item -cd@var{n}
@itemx --declaration-comment-column@var{n}
Put comments to the right of the declarations in column @var{n}.@*
@xref{Comments}.

@item -cdb
@itemx --comment-delimiters-on-blank-lines
Put comment delimiters on blank lines.@*
@xref{Comments}.

@item -cdw
@itemx --cuddle-do-while
Cuddle while of @code{do @{@} while;} and preceding @samp{@}}.
@xref{Comments}.

@item -ce
@itemx --cuddle-else
Cuddle else and preceding @samp{@}}.@*
@xref{Comments}.

@item -ci@var{n}
@itemx --continuation-indentation@var{n}
Continuation indent of @var{n} spaces.@*
@xref{Statements}.

@item -cli@var{n}
@itemx --case-indentation@var{n}
Case label indent of @var{n} spaces.@*
@xref{Statements}.

@item -cp@var{n}
@itemx --else-endif-column@var{n}
Put comments to the right of @samp{#else} and
@samp{#endif} statements in column @var{n}.@*
@xref{Comments}.

@item -cs
@itemx --space-after-cast
Put a space after a cast operator.@*
@xref{Statements}.

@item -D@var{n}
@itemx --debug@var{n}
Enable debugging traces.@*
@xref{Miscellaneous options}.

@item -d@var{n}
@itemx --line-comments-indentation@var{n}
Set indentation of comments not to the right
of code to @var{n} spaces.@*
@xref{Comments}.

@item -di@var{n}
@itemx --declaration-indentation@var{n}
Put variables in column @var{n}.@*
@xref{Declarations}.

@item -eei
@itemx --extra-expression-indentation
Indent continuation lines
of @code{if}, @code{for} and @code{while} statements.@*
@xref{Indentation}.

@item -fc1
@itemx --format-first-column-comments
Format comments in the first column.@*
@xref{Comments}.

@item -fca
@itemx --format-all-comments
Do not disable all formatting of comments.@*
@xref{Comments}.

@item -gnu
@itemx --gnu-style
Use GNU coding style.  This is the default.@*
@xref{Common styles}.

@item -i@var{n}
@itemx --indent-level@var{n}
@itemx --indentation-level@var{n}
Set indentation level to @var{n} spaces.@*
@xref{Indentation}.

@item -ip@var{n}
@itemx --parameter-indentation@var{n}
Indent parameter types in old-style function
definitions by @var{n} spaces.@*
@xref{Indentation}.

@item -kr
@itemx --k-and-r-style
@itemx --kernighan-and-ritchie
@itemx --kernighan-and-ritchie-style
Use Kernighan & Ritchie coding style.@*
@xref{Common styles}.

@item -l@var{n}
@itemx --line-length@var{n}
Set maximum line length for non-comment lines to @var{n}.@*
@xref{Comments}.

@item -lc@var{n}
@itemx --comment-line-length@var{n}
Set maximum line length for comment formatting to @var{n}.@*
@xref{Comments}.

@item -lp
@itemx --continue-at-parentheses
Line up continued lines at parentheses.@*
@xref{Indentation}.

@item -lps
@itemx --leave-preprocessor-space
Leave space between @samp{#} and preprocessor directive.@*
@xref{Indentation}.

@item -nbacc
@itemx --no-blank-lines-after-ifdefs
Do not force blank lines after (and before) ifdefs.@*
@xref{Blank lines}.

@item -nbad
@itemx --no-blank-lines-after-declarations
Do not force blank lines after declarations.@*
@xref{Blank lines}.

@item -nbap
@itemx --no-blank-lines-after-procedures
Do not force blank lines after procedure bodies.@*
@xref{Blank lines}.

@item -nbbb
@itemx --no-blank-lines-after-block-comments
Do not force blank-lines after (before) block comments.@*
@xref{Blank lines}.

@item -nbc
@itemx --no-blank-lines-after-commas
Do not force newlines after commas in declarations.@*
@xref{Declarations}.

@item -ncdb
@itemx --no-comment-delimiters-on-blank-lines
Do not put comment delimiters on blank lines.@*
@xref{Comments}.

@item -ncdw
@itemx --dont-cuddle-do-while
Do not cuddle @code{@}} and the @code{while} of a @code{do @{@} while;}.@*
@xref{Statements}.

@item -nce
@itemx --dont-cuddle-else
Do not cuddle @code{@}} and @code{else}.@*
@xref{Statements}.

@item -ncs
@itemx --no-space-after-casts
Do not put a space after cast operators.@*
@xref{Statements}.

@item -neei
@itemx --no-extra-expression-indentation
Do not indent continuation lines
of @code{if}, @code{for} and @code{while} statements.@*
@xref{Indentation}.

@item -nfc1
@itemx --dont-format-first-column-comments
Do not format comments in the first column as normal.@*
@xref{Comments}.

@item -nfca
@itemx --dont-format-comments
Do not format any comments.@*
@xref{Comments}.

@item -nip
@itemx --no-parameter-indentation
Zero width indentation for parameters.@*
@xref{Indentation}.

@item -nlp
@itemx --dont-line-up-parentheses
Do not line up parentheses.@*
@xref{Statements}.

@item -nlps
@itemx --remove-preprocessor-space
Remove space between @samp{#} and preprocessor directive.@*
@xref{Indentation}.

@item -npcs
@itemx --no-space-after-function-call-names
Do not put space after the function in function calls.@*
@xref{Statements}.

@item -npsl
@itemx --dont-break-procedure-type
Put the type of a procedure on the same line as its name.@*
@xref{Declarations}.

@item -nsc
@itemx --dont-star-comments
Do not put the @samp{*} character at the left of comments.@*
@xref{Comments}.

@item -nsob
@itemx --leave-optional-blank-lines
Do not swallow optional blank lines.@*
@xref{Blank lines}.

@item -nss
@itemx --dont-space-special-semicolon
Do not force a space before the semicolon after certain statements.
Disables @samp{-ss}.@*
@xref{Statements}.

@item -nut
@itemx --no-tabs
Use spaces instead of tabs.@*
@xref{Indentation}.

@item -nv
@itemx --no-verbosity
Disable verbose mode. @xref{Miscellaneous options}.@*

@item -orig
@itemx --original
@itemx --original-style
@itemx --berkeley
@itemx --berkeley-style
Use the original Berkeley coding style.@*
@xref{Common styles}.

@item -npro
@itemx --ignore-profile
@itemx +ignore-profile
Do not read @file{.indent.pro} files.@*
@xref{Invoking indent}.

@item -o
@itemx --output
@itemx --output-file
Write an output file, for the case where only one input is given.@*
@xref{Invoking indent}.

@item -pcs
@itemx --space-after-procedure-calls
Insert a space between the name of the
procedure being called and the @samp{(}.@*
@xref{Statements}.

@item -ppi@var{n}
@itemx --preprocessor-indentation@var{n}
Insert spacing between @samp{#} and preprocessor keywords.
This overrides @samp{-lps}.@*
@xref{Indentation}.

@item -psl
@itemx --procnames-start-lines
Put the type of a procedure on the line before its name.@*
@xref{Declarations}.

@item -sc
@itemx --start-left-side-of-comments
Put the @samp{*} character at the left of comments.@*
@xref{Comments}.

@item -sob
@itemx --swallow-optional-blank-lines
Swallow optional blank lines.@*
@xref{Blank lines}.

@item -ss
@itemx --space-special-semicolon
On one-line @code{for} and @code{while} statements,
force a blank before the semicolon.@*
@xref{Statements}.

@item -st
@itemx --standard-output
Write to standard output.@*
@xref{Invoking indent}.

@item -T
Tell @code{indent} the name of type-names.@*
@xref{Declarations}.

@item -ta
@itemx -auto-typedefs
Tell @code{indent} to assume names ending with ``_t'' are type-names.@*
@xref{Declarations}.

@c Ignore the following since it is not supported.  When someone
@c rewrites this program, an effort could be made to generate TeX.
@c
@c item -troff
@c Format the program for printing with @code{troff}.  Use of this option
@c is not suggested.
@c  xref   Miscellaneous options
@c
@c
@item -ts@var{n}
@itemx --tab-size@var{n}
Set tab size to @var{n} spaces.@*
@xref{Indentation}.

@item -ut
@itemx --use-tabs
Use tabs. This is the default.
@xref{Indentation}.

@item -v
@itemx --verbose
Enable verbose mode.@*
@xref{Miscellaneous options}.

@item -version
Output the version number of @code{indent}.@*
@xref{Miscellaneous options}.
@end table

@subheading Options' Cross Key

Here is a list of options alphabetized by long option, to help you find
the corresponding short option.

@iftex
@sp 2
@end iftex
@tex
\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill}

{\tt
\line{ --auto-typedefs \leaderfill -ta\ }
\line{ --blank-lines-after-block-comments \leaderfill -bbb\ }
\line{ --blank-lines-after-commas \leaderfill         -bc\ \ }
\line{ --blank-lines-after-declarations \leaderfill   -bad\ }
\line{ --blank-lines-after-ifdefs \leaderfill         -bacc\ }
\line{ --blank-lines-after-procedures \leaderfill     -bap\ }
\line{ --braces-after-if-line \leaderfill            -bl\ \ }
\line{ --brace-indent \leaderfill                -bli@var{n}}
\line{ --braces-on-if-line \leaderfill               -br\ \ }
\line{ --case-brace-indentation \leaderfill            -cbi@var{n}}
\line{ --case-indentation \leaderfill            -cli@var{n}}
\line{ --comment-delimiters-on-blank-lines \leaderfill -cdb\ }
\line{ --comment-indentation \leaderfill       -c@var{n}\ \ }
\line{ --continuation-indentation       \leaderfill -ci@var{n}\ }
\line{ --continue-at-parentheses  \leaderfill   -lp\ \ }
\line{ --cuddle-do-while \leaderfill                         -cdw\ \ }
\line{ --cuddle-else \leaderfill                         -ce\ \ }
\line{ --debug \leaderfill  -D@var{n}\ }
\line{ --declaration-comment-column \leaderfill  -cd@var{n}\ }
\line{ --declaration-indentation \leaderfill     -di@var{n}\ }
\line{ --dont-break-procedure-type \leaderfill           -npsl}
\line{ --dont-cuddle-do-while \leaderfill                    -ncdw\ }
\line{ --dont-cuddle-else \leaderfill                    -nce\ }
\line{ --dont-format-comments \leaderfill                -nfca}
\line{ --dont-format-first-column-comments \leaderfill   -nfc1}
\line{ --dont-line-up-parentheses \leaderfill            -nlp\ }
\line{ --dont-space-special-semicolon \leaderfill        -nss\ }
\line{ --dont-star-comments \leaderfill                  -nsc\ }
\line{ --else-endif-column \leaderfill             -cp@var{n}\ }
\line{ --extra-expression-indentation \leaderfill        -eei\ }
\line{ --format-all-comments \leaderfill                 -fca\ }
\line{ --format-first-column-comments \leaderfill        -fc1\ }
\line{ --gnu-style \leaderfill                           -gnu\ }
\line{ --ignore-profile \leaderfill                      -npro}
\line{ --indent-level \leaderfill                  -i@var{n}\ \ }
\line{ --k-and-r-style \leaderfill                       -kr\ \ }
\line{ --leave-optional-blank-lines \leaderfill          -nsob}
\line{ --line-comments-indentation \leaderfill      -d@var{n}\ \ }
\line{ --linux-style \leaderfill                      --linux}
\line{ --leave-preprocessor-space \leaderfill       -lps\ }
\line{ --line-length \leaderfill                    -l@var{n}\ \ }
\line{ --no-blank-lines-after-block-comments \leaderfill -nbbb}
\line{ --no-blank-lines-after-commas \leaderfill         -nbc\ }
\line{ --no-blank-lines-after-declarations \leaderfill   -nbad}
\line{ --no-blank-lines-after-ifdefs \leaderfill         -nbacc}
\line{ --no-blank-lines-after-procedures \leaderfill     -nbap}
\line{ --no-extra-expression-indentation \leaderfill     -neei}
\line{ --no-comment-delimiters-on-blank-lines \leaderfill -ncdb}
\line{ --no-space-after-casts \leaderfill               -ncs\ }
\line{ --no-parameter-indentation \leaderfill               -nip\ }
\line{ --no-space-after-function-call-names \leaderfill -npcs}
\line{ --no-tabs \leaderfill       -nut\ \ \ }
\line{ --no-verbosity \leaderfill                       -nv\ \ }
\line{ --original \leaderfill                      -orig}
\line{ --parameter-indentation \leaderfill         -ip@var{n}\ }
\line{ --preprocessor-indentation \leaderfill      -ppi@var{n}\ }
\line{ --procnames-start-lines \leaderfill         -psl\ }
\line{ --remove-preprocessor-space \leaderfill       -nlps\ }
\line{ --space-after-cast \leaderfill              -cs\ \ }
\line{ --space-after-procedure-calls \leaderfill   -pcs\ }
\line{ --space-special-semicolon \leaderfill       -ss\ \ }
\line{ --standard-output \leaderfill      -st\ \ }
\line{ --start-left-side-of-comments \leaderfill   -sc\ \ }
\line{ --swallow-optional-blank-lines \leaderfill  -sob\ }
\line{ --tab-size \leaderfill          -ts@var{n}\ }
\line{ --use-tabs \leaderfill       -ut\ \ \ }
\line{ --verbose \leaderfill       -v\ \ \ }
}
@end tex

@ifinfo
@example
--auto-typedefs                                 -ta
--blank-lines-after-block-comments              -bbb
--blank-lines-after-commas                      -bc
--blank-lines-after-declarations                -bad
--blank-lines-after-procedures                  -bap
--braces-after-if-line                          -bl
--brace-indent                                  -bli
--braces-on-if-line                             -br
--case-brace-indentation                        -cbi@var{n}
--case-indentation                              -cli@var{n}
--comment-delimiters-on-blank-lines             -cdb
--comment-indentation                           -c@var{n}
--continuation-indentation                      -ci@var{n}
--continue-at-parentheses                       -lp
--cuddle-do-while                               -cdw
--cuddle-else                                   -ce
--debug                                         -D@var{n}
--declaration-comment-column                    -cd@var{n}
--declaration-indentation                       -di@var{n}
--dont-break-procedure-type                     -npsl
--dont-cuddle-do-while                          -ncdw
--dont-cuddle-else                              -nce
--dont-format-comments                          -nfca
--dont-format-first-column-comments             -nfc1
--dont-line-up-parentheses                      -nlp
--dont-space-special-semicolon                  -nss
--dont-star-comments                            -nsc
--else-endif-column                             -cp@var{n}
--format-all-comments                           -fca
--format-first-column-comments                  -fc1
--gnu-style                                     -gnu
--ignore-profile                                -npro
--indent-level                                  -i@var{n}
--k-and-r-style                                 -kr
--leave-optional-blank-lines                    -nsob
--leave-preprocessor-space                      -lps
--line-comments-indentation                     -d@var{n}
--line-length                                   -l@var{n}
--linux-style                                   -linux
--no-blank-lines-after-block-comments           -nbbb
--no-blank-lines-after-commas                   -nbc
--no-blank-lines-after-declarations             -nbad
--no-blank-lines-after-procedures               -nbap
--no-comment-delimiters-on-blank-lines          -ncdb
--no-space-after-casts                          -ncs
--no-parameter-indentation                      -nip
--no-space-after-function-call-names            -npcs
--no-tabs                                       -nut
--no-verbosity                                  -nv
--original                                      -orig
--parameter-indentation                         -ip@var{n}
--preprocessor-indentation                      -ppi@var{n}
--procnames-start-lines                         -psl
--space-after-cast                              -cs
--space-after-procedure-calls                   -pcs
--space-special-semicolon                       -ss
--standard-output                               -st
--start-left-side-of-comments                   -sc
--swallow-optional-blank-lines                  -sob
--tab-size                                      -ts@var{n}
--use-tabs                                      -ut
--verbose                                       -v
@end example
@end ifinfo

@node Index,  , Option Summary, Top
@unnumbered Index

@printindex ky

@page
@contents
@bye

