indent is a Unix utility that reformats C and C++ code in a user-defined coding style. Support for C++ code is considered experimental.
indent somefile.c -st -bad --blank-lines-after-procedures -bli0 -i4 -l79
-ncs -npcs -nut -npsl -fca -lc79 -fc1
indents somefile.c in a style resembling BSD/Allman style and writes the result to the standard output.
The program's manpage