空白の挿入や削除を行い、C 言語プログラムの見栄えを変える。
-bad, --blank-lines-after-declarations
-bap, --blank-lines-after-procedures
-bbb, --blank-lines-before-block-comments
-bbo, --break-before-boolean-operator
-bc, --blank-lines-after-commas
-bl, --braces-after-if-line
-blin, --brace-indentn
-bls, --braces-after-struct-decl-line
-br, --braces-on-if-line
-brs, --braces-on-struct-decl-line
-bs, --Bill-Shannon, --blank-before-sizeof
-cn, --comment-indentationn
-cbin, --case-brace-indentationn
-cdn, --declaration-comment-columnn
-cdb, --comment-delimiters-on-blank-lines
-cdw, --cuddle-do-while
-ce, --cuddle-else
-cin, --continuation-indentationn
-clin, --case-indentationn
-cpn, --else-endif-columnn
-cs, --space-after-cast
-dn, --line-comments-indentationn
-bfda, --break-function-decl-args
-bfde, --break-function-decl-args
-din, --declaration-indentationn
-fc1, --format-first-column-comments
-fca, --format-all-comments
-gnu, --gnu-style
-hnl, --honour-newlines
-in, --indent-leveln
-ipn, --parameter-indentationn
-kr, --k-and-r-style
-ln, --line-lengthn
-lcn, --comment-line-lengthn
-lp, --continue-at-parentheses
-lps, --leave-preprocessor-space
-nbad, --no-blank-lines-after-declarations
-nbap, --no-blank-lines-after-procedures
-nbbo, --break-after-boolean-operator
-nbc, --no-blank-lines-after-commas
-nbfda, --dont-break-function-decl-args
-ncdb, --no-comment-delimiters-on-blank-lines
-ncdw, --dont-cuddle-do-while
-nce, --dont-cuddle-else
-ncs, --no-space-after-casts
-nfc1, --dont-format-first-column-comments
-nfca, --dont-format-comments
-nhnl, --ignore-newlines
-nip, --no-parameter-indentation
-nlp, --dont-line-up-parentheses
-npcs, --no-space-after-function-call-names
-nprs, --no-space-after-parentheses
-npsl, --dont-break-procedure-type
-nsaf, --no-space-after-for
-nsai, --no-space-after-if
-nsaw, --no-space-after-while
-nsc, --dont-star-comments
-nsob, --leave-optional-blank-lines
-nss, --dont-space-special-semicolon
-nut, --no-tabs
-nv, --no-verbosity
-orig, --original
-npro, --ignore-profile
-pcs, --space-after-procedure-calls
-pin, --paren-indentationn
-pmt, --preserve-mtime
-prs, --space-after-parentheses
-psl, --procnames-start-lines
-saf, --space-after-for
-sai, --space-after-if
-saw, --space-after-while
-sbin, --struct-brace-indentationn
-sc, --start-left-side-of-comments
-sob, --swallow-optional-blank-lines
-ss, --space-special-semicolon
-st, --standard-output
-T
-tsn, --tab-sizen
-ut, --use-tabs
-v, --verbose
-version
indent [options] [input-files]
indent [options] [single-input-file] [-o output-file]
-5
indent slithy_toves.c -o slithy_toves.out
indent -st slithy_toves.c > slithy_toves.out
cat slithy_toves.c | indent -o slithy_toves.out
-5
indent -br test/metabolism.c -l85 -5
indent --braces-on-if-line --line-length185 test/metabolism.c
indent +braces-on-if-line +line-length185 test/metabolism.c
-5
-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai -saw -nsc -nsob -5
-nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss -5
-nbad -nbap -bbo -bc -br -brs -c33 -cd33 -cdb -ce -ci4 -cli0 -cp33 -di16 -fc1 -fca -hnl -i4 -ip4 -l75 -lp -npcs -nprs -psl -saf -sai -saw -sc -nsob -nss -ts8 -5
char *foo; char *bar; /* このコメントは宣言のブロックを分けている */ int baz; -5
char *foo; char *bar;
/* このコメントは宣言のブロックを分けている */ int baz; -5
char *foo; char *bar; /* このコメントは宣言のブロックを分けている */ int baz; -5
int foo () { puts(Hi); } /* この手続き bar には意味はない */ char * bar () { puts(Hello); } -5
int foo () { puts (Hi); }
/* この手続き bar には意味はない */ char * bar () { puts (Hello); } -5
int foo () { puts (Hi); } /* この手続き bar には意味はない */ char * bar () { puts (Hello); } -5
/********************** * 箱の中のコメント!! * **********************/
/* * 別な種類のコメントには、 * 別な形式を使う。 */ -5
/* Loving hug */ -5
/* * Loving hug */ -5
if (x > 0) { x--; } -5
if (x > 0) { x--; } -5
if (x > 0) { x--; } -5
if (x > 0) { x--; } else { fprintf (stderr, ...something wrong?\\n); } -5
if (x > 0) { x--; } else { fprintf (stderr, ...something wrong?\\n); } -5
do { x--; } while (x); -5
do { x--; } while (x); -5
switch (i) { case 0: break; case 1: { ++i; } default: break; } -5
switch (i) { case 0: break; case 1: { ++i; } default: break; } -5
switch (i) { case 0: break; case 1: { ++i; } default: break; } -5
while ( ( e_code - s_code ) < ( dec_ind - 1 ) ) { set_buf_break ( bb_dec_ind ); *e_code++ = \' \'; } -5
int foo; char *bar; -5
int foo; char *bar; -5
int foo; -5
int a, b, c; -5
int a, b, c; -5
void foo (int arg1, char arg2, int *arg3, long arg4, char arg5); -5
void foo ( int arg1, char arg2, int *arg3, long arg4, char arg5); -5
void foo ( int arg1, char arg2, int *arg3, long arg4, char arg5 ); -5
typedef unsigned long CODE_ADDR; typedef enum {red, blue, green} COLOR; -5
struct foo { int x; }; -5
struct foo { int x; }; -5
p1 = first_procedure (second_procedure (p2, p3), third_procedure (p4, p5)); -5
p1 = first_procedure (second_procedure (p2, p3), third_procedure (p4, p5)); -5
if ((((i < 2 && k > 0) || p == 0) && q == 1) || n = 0) -5
if ((((i < 2 && k > 0) || p == 0) && q == 1) || n = 0) -5
char * create_world (x, y, scale) int x; int y; float scale; { } -5
#if X #if Y #define Z 1 #else #define Z 0 #endif #endif -5を次のように整形する。 +5
#if X # if Y # define Z 1 # else # define Z 0 # endif #endif -5
if (mask && ((mask[0] == \'\\0\') || (mask[1] == \'\\0\' && ((mask[0] == \'0\') || (mask[0] == \'*\'))))) -5
if (mask && ((mask[0] == \'\\0\') || (mask[1] == \'\\0\' && ((mask[0] == \'0\') || (mask[0] == \'*\'))))) -5
if (mask && ((mask[0] == \'\\0\') || (mask[1] == \'\\0\' && ((mask[0] == \'0\') || (mask[0] == \'*\'))))) -5
if (mask && ((mask[0] == \'\\0\') || (mask[1] == \'\\0\' && ((mask[0] == \'0\') || (mask[0] == \'*\'))))) -5
Copyright (c) 2001 David Ingamells. Copyright (c) 1999 Carlo Wood. Copyright (c) 1995, 1996 Joseph Arceneaux. Copyright (c) 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation Copyright (c) 1985 Sun Microsystems, Inc. Copyright (c) 1980 The Regents of the University of California. Copyright (c) 1976 Board of Trustees of the University of Illinois. All rights reserved.
Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the University of California, Berkeley, the University of Illinois, Urbana, and Sun Microsystems, Inc. The name of either University or Sun Microsystems may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED \`\`AS IS\'\' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
--blank-lines-after-commas -bc --blank-lines-after-declarations -bad --blank-lines-after-procedures -bap --blank-lines-before-block-comments -bbb --braces-after-if-line -bl --brace-indent -bli --braces-after-struct-decl-line -bls --braces-on-if-line -br --braces-on-struct-decl-line -brs --break-after-boolean-operator -nbbo --break-before-boolean-operator -bbo --break-function-decl-args -bfda --break-function-decl-args-end -bfde --case-indentation -clin --case-brace-indentation -cbin --comment-delimiters-on-blank-lines -cdb --comment-indentation -cn --continuation-indentation -cin --continue-at-parentheses -lp --cuddle-do-while -cdw --cuddle-else -ce --declaration-comment-column -cdn --declaration-indentation -din --dont-break-function-decl-args -nbfda --dont-break-function-decl-args-end -nbfde --dont-break-procedure-type -npsl --dont-cuddle-do-while -ncdw --dont-cuddle-else -nce --dont-format-comments -nfca --dont-format-first-column-comments -nfc1 --dont-line-up-parentheses -nlp --dont-space-special-semicolon -nss --dont-star-comments -nsc --else-endif-column -cpn --format-all-comments -fca --format-first-column-comments -fc1 --gnu-style -gnu --honour-newlines -hnl --ignore-newlines -nhnl --ignore-profile -npro --indent-level -in --k-and-r-style -kr --leave-optional-blank-lines -nsob --leave-preprocessor-space -lps --line-comments-indentation -dn --line-length -ln --no-blank-lines-after-commas -nbc --no-blank-lines-after-declarations -nbad --no-blank-lines-after-procedures -nbap --no-blank-lines-before-block-comments -nbbb --no-comment-delimiters-on-blank-lines -ncdb --no-space-after-casts -ncs --no-parameter-indentation -nip --no-space-after-for -nsaf --no-space-after-function-call-names -npcs --no-space-after-if -nsai --no-space-after-parentheses -nprs --no-space-after-while -nsaw --no-tabs -nut --no-verbosity -nv --original -orig --parameter-indentation -ipn --paren-indentation -pin --preserve-mtime -pmt --procnames-start-lines -psl --space-after-cast -cs --space-after-for -saf --space-after-if -sai --space-after-parentheses -prs --space-after-procedure-calls -pcs --space-after-while -saw --space-special-semicolon -ss --standard-output -st --start-left-side-of-comments -sc --struct-brace-indentation -sbin --swallow-optional-blank-lines -sob --tab-size -tsn --use-tabs -ut --verbose -v -5
\w'$HOME/.indent.pro 'u $HOME/.indent.pro indent のデフォルトのオプションを設定する