Using indent Utility213
Using the –
nbbo
option results in the following output.
if (((counter == 100) &&
(color == RED)) ||
(string[0] == 'S'))
The
indent
utility may also be used to handle new line characters in a special way using
the –
hnl
option. You are encouraged to experiment with this option.
7.1.7Summary of Options
Options with the
indent
program can be used in two ways: the long way that starts with
two hyphen characters and the short way that starts with a single hyphen character. Options used
with the
indent
command are listed below. These are taken from the manual page of the
indent
command. The long method also describes the meaning of an option.
-bc --blank-lines-after-commas
-bad --blank-lines-after-declarations
-bap --blank-lines-after-procedures
-bbb --blank-lines-before-block-comments
-bl --braces-after-if-line
-bli --brace-indent
-bls --braces-after-struct-decl-line
-br --braces-on-if-line
-brs --braces-on-struct-decl-line
-nbbo --break-after-boolean-operator
-bbo --break-before-boolean-operator
-bfda --break-function-decl-args
-clin --case-indentation
-cbin --case-brace-indentation
-cdb --comment-delimiters-on-blank-lines
-cn --comment-indentation
-cin --continuation-indentation
-lp --continue-at-parentheses
-cdw --cuddle-do-while
-ce --cuddle-else
-cdn --declaration-comment-column
-din --declaration-indentation
-nbfda --dont-break-function-decl-args
-npsl --dont-break-procedure-type
-ncdw --dont-cuddle-do-while
-nce --dont-cuddle-else
-nfca --dont-format-comments
-nfc1 --dont-format-first-column-comments
-nlp --dont-line-up-parentheses
-nss --dont-space-special-semicolon
-nsc --dont-star-comments
-cpn --else-endif-column
Next Page >>
<< Previous Page
Back to the Table of Contents