indent (Unix)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
indent
Original authorDavid Willcox
DevelopersDavid Ingamells, Carlo Wood, Joseph Arceneaux, Jim Kingdon, John Bridges
Initial releaseNovember 1976; 49 years ago (1976-11)
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inC
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemCross-platform
    Typesource-code-reformat tool
    LicenseGNU: GPL-3.0-or-later[1]
    WebsiteGNU: gnu.org/software/indent/

    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.[2]

    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.[3] 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.[4]

    Examples of usage

    [edit | edit source]

    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

    [edit | edit source]

    GNU indent is the GNU Project's version of indent. A different indentation style, the GNU style, is used by default.[5]

    References

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ GNU Indent Manual
    [edit | edit source]


    de:Astyle