1.3 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 background option, which specifies a set
of values for all other options. However, explicitly specified options
always override options implied by a background option.

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

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 The GNU Coding Standards, which
also covers semantic and portability issues such as memory usage, the
size of integers, etc.)

The Kernighan & Ritchie style is used throughout their well-known book
The C Programming Language. It is enabled with the ‘-kr’
option. The Kernighan & Ritchie style corresponds to the following set
of options:

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 indent has arbitrarily
chosen column 33.

The style of the original Berkeley indent may be obtained by
specifying ‘-orig’ (or by specifying ‘--original’, using the
long option name). This style is equivalent to the following settings: