indent

Format C source

Syntax:

indent [input-file [output-file]] [options...]

Runs on:

QNX Neutrino

Options:

The first option of a pair is described; the second option disables the first. The second option (disabled) is default.

-bad, -nbad
Force a blank line after each block of declarations.
-bap, -nbap
Force a blank line after procedure bodies.
-bbb, -nbbb
Force a blank line before every block comment.
-nbc, -bc
Don't force a newline after each comma in a declaration.
-bl, -br
Move the first brace ({) of a compound statement to the next line.
-cn
Specify the column in which comments on code start.
-cdn
Specify the column in which comments on declarations start.
-ncdb, -cdb
Don't place comment delimiters alone on blank lines.
-nce, -ce
Don't place else statements adjacent to the preceding closing brace (}).
-cin
Set the line overflow indentation to be n.
-clin
Indent case labels n tab stops past the switch.
-d1
Indent code comments by themselves one tab stop.
-din
Specify the column indentation of variable declarations.
-ndj, -dj
Left-justify declarations.
-ei, -nei
Indent an if following an else the same as the preceding if.
-nfc1, -fc1
Don't format comments that start in column 1.
-in
Specify the number of spaces for one indentation level. The default is 4.
-nip, -ip
Disable the indentation of parameter declarations.
-ln
Specify the maximum length of an output line. The default is 75.
-nlp, -lp
Don't line up parameters that overflowed onto the next line.
-npro
Ignore the profile files ./.indent.pro and ~/.indent.pro.
-pcs, -npcs
Place a space between procedure names and the following parenthesis (().
-npsl, -psl
Don't place column 1 procedure types on the previous line.
-nsc, -sc
Disable the placement of asterisks (*) at the left edge of comments.
-sob, -nsob
Remove optional blank lines.
-st
Take input from stdin, and send output to stdout.
-Ttypename
Add typename to the list of type keywords.
-troff
Format for processing by troff. If you use this option, the output is sent to stdout by default.
-v, -nv
Be verbose; provide statistics and line-splitting information.

Description:

The indent utility formats C source code.

Note: If you specify only input-file, it's modified.

Files:

./.indent.pro, ~/.indent.pro
Profile files.