Indent (Unix)

Revision as of 15:43, 11 February 2024 by imported>MichielN (Release info from Wikidata)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Lowercase Template:Refimprove {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other

indent is a Unix utility that reformats C and C++ code in a user-defined indentation style and coding style. Support for C++ code is minimal.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> GNU indent was first written by Jim Kingdon in 1989. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Examples of usageEdit

The following command

<syntaxhighlight lang="sh"> $ indent -st -bap -bli0 -i4 -l79 -ncs -npcs -npsl -fca -lc79 -fc1 -ts4 some_file.c </syntaxhighlight> indents some_file.c in a style resembling BSD/Allman style and writes the result to the standard output.

GNU indentEdit

GNU indent is the GNU Project's version of indent. A different indentation style, the GNU style, is used by default.<ref>GNU Indent Manual</ref>

ReferencesEdit

Template:Reflist

External linksEdit

Template:GNU


Template:Unix-stub

de:Astyle