indent is a
Unix utility that reformats
C and
C++ code in a user-defined
indentation style and
coding style
Programming style, also known as code style, is a set of rules or guidelines used when writing the source code for a computer program. It is often claimed that following a particular programming style will help programmers read and understand sour ...
. Support for C++ code is minimal.
The original version of indent was written by David Willcox at the
University of Illinois in November 1976. It was incorporated into
4.1BSD in October 1982. GNU indent was first written by Jim Kingdon in 1989. The command is available as a separate package for
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
as part of the
UnxUtils collection of
native Win32 ports of common GNU Unix-like utilities.
Examples of usage
The following
command
$ indent -st -bap -bli0 -i4 -l79 -ncs -npcs -npsl -fca -lc79 -fc1 -ts4 some_file.c
indents
some_file.c
in a style resembling
BSD/Allman style and writes the result to the
standard output.
GNU indent
GNU indent is the
GNU Project's version of indent. A different indentation style, the
GNU style, is used by default.
GNU Indent Manual
/ref>
GUI
* UniversalIndentGUI
References
External links
GNU indent Homepage
*
(an alternative to indent)
GNU Project software
Unix programming tools
{{Unix-stub
de:Astyle