Format C source


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

Runs on:

QNX Neutrino


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.
Specify the column in which comments on code start.
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 (}).
Set the line overflow indentation to be n.
Indent case labels n tab stops past the switch.
Indent code comments by themselves one tab stop.
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.
Specify the number of spaces for one indentation level. The default is 4.
-nip, -ip
Disable the indentation of parameter declarations.
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.
Ignore the profile files ./ and ~/
-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.
Take input from stdin, and send output to stdout.
Add typename to the list of type keywords.
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.


The indent utility formats C source code.

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


./, ~/
Profile files.

See also: