Indent (Unix): Difference between revisions
imported>MichielN Release info from Wikidata |
imported>Bender the Bot m →top: HTTP to HTTPS for SourceForge |
||
| Line 28: | Line 28: | ||
|date=2017 | |date=2017 | ||
|website=Invisible Island | |website=Invisible Island | ||
|access-date=2019-04-22}}</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 (computing)|native]] [[Windows API|Win32]] [[porting|ports]] of common GNU Unix-like utilities.<ref>{{Cite web|url= | |access-date=2019-04-22}}</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 (computing)|native]] [[Windows API|Win32]] [[porting|ports]] of common GNU Unix-like utilities.<ref>{{Cite web|url=https://unxutils.sourceforge.net/|title=Native Win32 ports of some GNU utilities|website=unxutils.sourceforge.net}}</ref> | ||
==Examples of usage== | ==Examples of usage== | ||
Latest revision as of 20:50, 9 August 2025
Template:Lowercase Template:Refimprove Script error: No such module "Infobox".Template:Template other Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters".
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.[1]
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.[2] 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.[3]
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.[4]
References
<templatestyles src="Reflist/styles.css" />
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ GNU Indent Manual
Script error: No such module "Check for unknown parameters".
External links
- GNU indent Homepage
- – OpenBSD General Commands Manual
- UniversalIndentGUI
- clang-format (an alternative to indent)
Script error: No such module "Navbox".