home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / i / indnt16.zip / indent-1.6 / indent.info (.txt) < prev    next >
GNU Info File  |  1992-08-19  |  39KB  |  916 lines

  1. This is Info file indent.info, produced by Makeinfo-1.47 from the input
  2. file ./indent.texinfo.
  3.    Copyright (C) 1989, 1992 Free Software Foundation, Inc.
  4.    This is Edition 0.02, 5 May 1992, of `The `indent' Manual', for
  5. Indent Version 1.3
  6.    Permission is granted to make and distribute verbatim copies of this
  7. manual provided the copyright notice and this permission notice are
  8. preserved on all copies.
  9. File: indent.info,  Node: Top,  Next: Indent Program,  Prev: (dir),  Up: (dir)
  10. `indent':  Indent and Format C Program Source
  11. *********************************************
  12.    The `indent' program changes the appearance of a C program by
  13. inserting or deleting whitespace.
  14.    This is Edition 0.02, May 1992, of `The `indent' Manual', for Indent
  15. Version 1.3
  16. * Menu:
  17. * Indent Program::              The `indent' Program
  18. * Option Summary::              Option Summary
  19. * Index::                       Index
  20. File: indent.info,  Node: Indent Program,  Next: Option Summary,  Prev: Top,  Up: Top
  21. The `indent' Program
  22. ********************
  23.    The `indent' program can be used to make code easier to read.  It
  24. can also convert from one style of writing C to another.
  25.    `indent' understands a substantial amount about the syntax of C, but
  26. it also attempts to cope with incomplete and misformed syntax.
  27.    In version 1.2 and more recent versions, the GNU style of indenting
  28. is the default.
  29. * Menu:
  30. * Invoking indent::             Invoking `indent'
  31. * Backup files::                Backup Files
  32. * Common styles::               Common styles
  33. * Blank lines::                 Blank lines
  34. * Comments::                    Comments
  35. * Statements::                  Statements
  36. * Declarations::                Declarations
  37. * Indentation::                 Indentation
  38. * Miscellaneous options::       Miscellaneous options
  39. * Copyright::                   Copyright
  40. File: indent.info,  Node: Invoking indent,  Next: Backup files,  Up: Indent Program
  41. Invoking `indent'
  42. =================
  43.    As of version 1.3, the format of the `indent' command is:
  44.      indent [OPTIONS] [INPUT-FILES]
  45.      
  46.      indent [OPTIONS] [SINGLE-INPUT-FILE] [-o OUTPUT-FILE]
  47.    This format is different from earlier versions and other versions of
  48. `indent'.
  49.    In the first form, one or more input files are specified.  `indent'
  50. makes a backup copy of each file, and the original file is replaced with
  51. its indented version.  *Note Backup files::, for an explanation of how
  52. backups are made.
  53.    In the second form, only one input file is specified.  In this case,
  54. or when the standard input is used, you may specify an output file after
  55. the `-o' option.
  56.    To cause `indent' to write to standard output, use the `-st' option.
  57.  This is only allowed when there is only one input file, or when the
  58. standard input is used.
  59.    If no input files are named, the standard input is read for input.
  60. Also, if a filename named `-' is specified, then the standard input is
  61. read.
  62.    As an example, each of the following commands will input the program
  63. `slithy_toves.c' and write its indented text to `slithy_toves.out':
  64.      indent slithy_toves.c -o slithy_toves.out
  65.      
  66.      indent -st slithy_toves.c > slithy_toves.out
  67.      
  68.      cat slithy_toves.c | indent -o slithy_toves.out
  69.    Most other options to `indent' control how programs are formatted.
  70. As of version 1.2, `indent' also recognizes a long name for each option
  71. name.  Long options are prefixed by either `--' or `+'.(1) In most of
  72. this document, the traditional, short names are used for the sake of
  73. brevity. *Note Option Summary::, for a list of options, including both
  74. long and short names.
  75.    Here is another example:
  76.      indent -br test/metabolism.c -l85
  77.    This will indent the program `test/metabolism.c' using the `-br' and
  78. `-l85' options, write the output back to `test/metabolism.c', and write
  79. the original contents of `test/metabolism.c' to a backup file in the
  80. directory `test'.
  81.    Equivalent invocations using long option names for this example would
  82.      indent --braces-on-if-line --line-length185 test/metabolism.c
  83.      
  84.      indent +braces-on-if-line +line-length185 test/metabolism.c
  85.    If you find that you often use `indent' with the same options, you
  86. may put those options into a file called `.indent.pro'. `indent' will
  87. first look for `.indent.pro' in the current directory and use that if
  88. found.  Otherwise, `indent' will search your home directory for
  89. `.indent.pro' and use that file if it is found.  This behaviour is
  90. different from that of other versions of `indent', which load both
  91. files if they both exist.
  92.    Command line switches are handled *after* processing `.indent.pro'. 
  93. Options specified later override arguments specified earlier, with one
  94. exception: Explicitly specified options always override background
  95. options (*note Common styles::.).  You can prevent `indent' from
  96. reading an `.indent.pro' file by specifying the `-npro' option.
  97.    ---------- Footnotes ----------
  98.    (1)   `+' is being superseded by `--' to maintain consistency with
  99. the POSIX standard.
  100. File: indent.info,  Node: Backup files,  Next: Common styles,  Prev: Invoking indent,  Up: Indent Program
  101. Backup Files
  102. ============
  103.    As of version 1.3, GNU `indent' makes GNU--style backup files, the
  104. same way GNU Emacs does.  This means that either "simple" or "numbered"
  105. backup filenames may be made.
  106.    Simple backup file names are generated by appending a suffix to the
  107. original file name.  The default for the this suffix is the
  108. one-character string `~' (tilde).  Thus, the backup file for `python.c'
  109. would be `python.c~'.
  110.    Instead of the default, you may specify any string as a suffix by
  111. setting the environment variable `SIMPLE_BACKUP_SUFFIX' to your
  112. preferred suffix.
  113.    Numbered backup versions of a file `momewraths' look like
  114. `momewraths.c.~23~', where 23 is the version of this particular backup.
  115.  When making a numbered backup of the file `src/momewrath.c', the
  116. backup file will be named `src/momewrath.c.~V~', where V is one greater
  117. than the highest version currently existing in the directory `src'.
  118.    The type of backup file made is controlled by the value of the
  119. environment variable `VERSION_CONTROL'.  If it is the string `simple',
  120. then only simple backups will be made.  If its value is the string
  121. `numbered', then numbered backups will be made.  If its value is
  122. `numbered-existing', then numbered backups will be made if there
  123. *already exist* numbered backups for the file being indented;
  124. otherwise, a simple backup is made.  If `VERSION_CONTROL' is not set,
  125. then `indent' assumes the behaviour of `numbered-existing'.
  126.    Other versions of `indent' use the suffix `.BAK' in naming backup
  127. files.  This behaviour can be emulated by setting
  128. `SIMPLE_BACKUP_SUFFIX' to `.BAK'.
  129.    Note also that other versions of `indent' make backups in the
  130. current directory, rather than in the directory of the source file as
  131. GNU `indent' now does.
  132. File: indent.info,  Node: Common styles,  Next: Blank lines,  Prev: Backup files,  Up: Indent Program
  133. Common styles
  134. =============
  135.    There are several common styles of C code, including the GNU style,
  136. the Kernighan & Ritchie style, and the original Berkeley style.  A
  137. style may be selected with a single "background" option, which
  138. specifies a set of values for all other options.  However, explicitly
  139. specified options always override options implied by a background
  140. option.
  141.    As of version 1.2, the default style of GNU `indent' is the GNU
  142. style.  Thus, it is no longer neccessary to specify the option `-gnu'
  143. to obtain this format, although doing so will not cause an error. 
  144. Option settings which correspond to the GNU style are:
  145.      -nbad -bap -nbbb -nbc -bl -bli2 -c33 -cd33 -ncdb -nce
  146.      -cli0 -cp1 -di2 -nfc1 -nfca -i2 -ip5 -lp -pcs -psl -cs
  147.      -nsc -nsob -nss -ts8 -d0 -ci0 -l78
  148.    The GNU coding style is that preferred by the GNU project.  It is the
  149. style that the GNU Emacs C mode encourages and which is used in the C
  150. portions of GNU Emacs.  (People interested in writing programs for
  151. Project GNU should get a copy of `The GNU Coding Standards', which also
  152. covers semantic and portability issues such as memory usage, the size
  153. of integers, etc.)
  154.    The Kernighan & Ritchie style is used throughout their well-known
  155. book `The C Programming Language'.  It is enabled with the `-kr'
  156. option.  The Kernighan & Ritchie style corresponds to the following set
  157. of options:
  158.      -nbad -bap -nbbb -nbc -br -c33 -cd33 -ncdb -ce -ci4
  159.      -cli0 -cp33 -d0 -di1 -nfc1 -nfca -i4 -ip0 -l75 -lp
  160.      -npcs -npsl -nsc -nsob -nss -ts8 -cs
  161. Kernighan & Ritchie style does not put comments to the right of code in
  162. the same column at all times (nor does it use only one space to the
  163. right of the code), so for this style `indent' has arbitrarily chosen
  164. column 33.
  165.    The style of the original Berkeley `indent' may be obtained by
  166. specifying `-orig' (or by specifyfying `--original', using the long
  167. option name).  This style is equivalent to the following settings:
  168.      -nbap -nbad -nbbb -bc -br -c33 -cd33 -cdb -ce -ci4
  169.      -cli0 -cp33 -d4 -di16 -fc1 -fca -i4 -ip4 -l75 -lp
  170.      -npcs -psl -sc -nsob -nss -ts8 -ncs
  171. File: indent.info,  Node: Blank lines,  Next: Comments,  Prev: Common styles,  Up: Indent Program
  172. Blank lines
  173. ===========
  174.    Various programming styles use blank lines in different places.
  175. `indent' has a number of options to insert or delete blank lines in
  176. specific places.
  177.    The `-bad' option causes `indent' to force a blank line after every
  178. block of declarations.  The `-nbad' option causes `indent' not to force
  179. such blank lines.
  180.    The `-bap' option forces a blank line after every procedure body.
  181. The `-nbap' option forces no such blank line.
  182.    The `-bbb' option forces a blank line before every block comment. A
  183. block comment is one which starts in column one when formatting of such
  184. comments is disabled, or one with `-' or `*' immediately following the
  185. `/*'.  The `-nbbb' option does not force such blank lines.
  186.    The `-sob' option causes `indent' to swallow optional blank lines
  187. (that is, any optional blank lines present in the input will be removed
  188. from the output).  If the `-nsob' is specified, any blank lines present
  189. in the input file will be copied to the output file.
  190. * Menu:
  191. * -bad::                        More on the `-bad' option.
  192. * -bap::                        More on the `-bap' option.
  193. File: indent.info,  Node: -bad,  Next: -bap,  Up: Blank lines
  194. --blank-lines-after-declarations
  195. --------------------------------
  196.    The `-bad' option forces a blank line after every block of
  197. declarations.  The `-nbad' option does not add any such blank lines.
  198.    For example, given the input
  199.      char *foo;
  200.      char *bar;
  201.      /* This separates blocks of declarations.  */
  202.      int baz;
  203. `indent -bad' produces
  204.      char *foo;
  205.      char *bar;
  206.      
  207.      /* This separates blocks of declarations.  */
  208.      int baz;
  209. and `indent -nbad' produces
  210.      char *foo;
  211.      char *bar;
  212.      /* This separates blocks of declarations.  */
  213.      int baz;
  214. File: indent.info,  Node: -bap,  Prev: -bad,  Up: Blank lines
  215. --blank-lines-after-procedures
  216. ------------------------------
  217.    The `-bap' option forces a blank line after every procedure body.
  218.    For example, given the input
  219.      int
  220.      foo ()
  221.      {
  222.        puts("Hi");
  223.      }
  224.      /* The procedure bar is even less interesting.  */
  225.      char *
  226.      bar ()
  227.      {
  228.        puts("Hello");
  229.      }
  230. `indent -bap' produces
  231.      int
  232.      foo ()
  233.      {
  234.        puts ("Hi");
  235.      }
  236.      
  237.      /* The procedure bar is even less interesting.  */
  238.      char *
  239.      bar ()
  240.      {
  241.        puts ("Hello");
  242.      }
  243. and `indent -nbap' produces
  244.      int
  245.      foo ()
  246.      {
  247.        puts ("Hi");
  248.      }
  249.      /* The procedure bar is even less interesting.  */
  250.      char *
  251.      bar ()
  252.      {
  253.        puts ("Hello");
  254.      }
  255. No blank line will be added after the procedure `foo'.
  256. File: indent.info,  Node: Comments,  Next: Statements,  Prev: Blank lines,  Up: Indent Program
  257. Comments
  258. ========
  259.    Comments are no longer formatted by default as of version 1.2.  This
  260. can be enabled with the `-fca' option.  Doing so will cause newlines in
  261. the comment text to be ignored and the line will be filled up to the
  262. length of a line (which can be modified with `-l').  When formatting is
  263. enabled, blank lines indicate paragraph breaks.
  264.    The `-fc1' option enables the formatting of comments which begin in
  265. the first column.  The `-nfc1' option disables the formatting of first
  266. column comments.  When comment formatting is disabled, overall comment
  267. indentation may still be adjusted.
  268.    The indentation of comments which do not appear to the right of code
  269. is set by the `-d' option, which specifies the number of spaces to the
  270. left of the surrounding code that the comment appears.  For example,
  271. `-d2' places comments two spaces to the left of code; `-d0' lines up
  272. comments with the code.  The `-cdb' option controls whether the `/*'
  273. and `*/' are placed on blank lines.  With `-cdb', comments look like
  274. this:
  275.      /*
  276.       * this is a comment
  277.       */
  278. With `-ncdb', comments look like this:
  279.      /* this is a comment */
  280. `-cdb' only affects block comments, not comments to the right of code. 
  281. The default is `-ncdb'.
  282.    Comments which appear on the same line as code are placed to the
  283. right. The column in which comments on code start is controlled by the
  284. `-c' option.  The column in which comments to the right of declarations
  285. start is controlled by the `-cd' option.  By default, they start in the
  286. same column as comments to the right of code, which is column 33.  The
  287. column number for comments to the right of `#else' and `#endif'
  288. statements is controlled by the `-cp' option.  If the code on a line
  289. extends past the comment column, the comment starts further to the
  290. right, and the right margin may be automatically extended in extreme
  291. cases.
  292.    If the `-sc' option is specified, `*' is placed at the left edge of
  293. all comments.  For example:
  294.      /* This is a comment which extends from one line
  295.       * onto the next line, thus causing us to consider
  296.       * how it should continue.  */
  297. instead of
  298.      /* This is a comment which extends from one line
  299.         onto the next line, thus causing us to consider
  300.         how it should continue.  */
  301. File: indent.info,  Node: Statements,  Next: Declarations,  Prev: Comments,  Up: Indent Program
  302. Statements
  303. ==========
  304.    The `-br' or `-bl' option specifies how to format braces.
  305.    The `-br' option formats braces like this:
  306.      if (x > 0) {
  307.        x--;
  308.      }
  309. The `-bl' option formats them like this:
  310.      if (x > 0)
  311.        {
  312.          x--;
  313.        }
  314.    If you use the `-bl' option, you may also want to specify the `-bli'
  315. option.  This option specifies the number of spaces by which braces are
  316. indented.  `-bli2', the default, gives the result shown above.  `-bli0'
  317. results in the following:
  318.      if (x > 0)
  319.      {
  320.        x--;
  321.      }
  322.    If you are using the `-br' option, you probably want to also use the
  323. `-ce' option.  This causes the `else' in an if-then-else construct to
  324. cuddle up to the immediately preceding `}'.  For example, with `-br
  325. -ce' you get the following:
  326.      if (x > 0) {
  327.        x--;
  328.      } else {
  329.        fprintf (stderr, "...something wrong?\n");
  330.      }
  331. With `-br -nce' that code would appear as
  332.      if (x > 0) {
  333.        x--;
  334.      }
  335.      else {
  336.        fprintf (stderr, "...something wrong?\n");
  337.      }
  338.    The `-cli' option specifies the number of spaces that case labels
  339. should be indented to the right of the containing `switch' statement.
  340.    If a semicolon is on the same line as a `for' or `while' statement,
  341. the `-ss' option will cause a space to be placed before the semicolon. 
  342. This emphasizes the semicolon, making it clear that the body of the
  343. `for' or `while' statement is an empty statement. `-nss' disables this
  344. feature.
  345.    The `-pcs' option causes a space to be placed between the name of
  346. the procedure being called and the `(' (for example, `puts ("Hi");'. 
  347. The `-npcs' option would give `puts("Hi");').
  348.    If the `-cs' option is specified, `indent' puts a space after a cast
  349. operator.
  350.    The `-bs' option ensures that there is a space between the keyword
  351. `sizeof' and its argument.  In some versions, this is known as the
  352. `Bill_Shannon' option.
  353. File: indent.info,  Node: Declarations,  Next: Indentation,  Prev: Statements,  Up: Indent Program
  354. Declarations
  355. ============
  356.    By default `indent' will line up identifiers, in the column
  357. specified by the `-di' option.  For example, `-di16' makes things look
  358. like:
  359.      int             foo;
  360.      char           *bar;
  361.    Using a small value (such as one or two) for the `-di' option can be
  362. used to cause the indentifiers to be placed in the first available
  363. position, for example
  364.      int foo;
  365.      char *bar;
  366.    The value given to the `-di' option will still affect variables
  367. which are put on separate lines from their types, for example `-di2'
  368. will lead to
  369.      int
  370.        foo;
  371.    If the `-bc' option is specified, a newline is forced after each
  372. comma in a declaration.  For example,
  373.      int a,
  374.        b,
  375.        c;
  376. With the `-nbc' option this would look like
  377.      int a, b, c;
  378.    The `-psl' option causes the type of a procedure being defined to be
  379. placed on the line before the name of the procedure.  This style is
  380. required for the `etags' program to work correctly, as well as some of
  381. the `c-mode' functions of Emacs.
  382.    If you are not using the `-di1' option to place variables being
  383. declared immediately after their type, you need to use the `-T' option
  384. to tell `indent' the name of all the typenames in your program that are
  385. defined by `typedef'.  `-T' can be specified more than once, and all
  386. names specified are used.  For example, if your program contains
  387.      typedef unsigned long CODE_ADDR;
  388.      typedef enum {red, blue, green} COLOR;
  389. you would use the options `-T CODE_ADDR -T COLOR'.
  390. File: indent.info,  Node: Indentation,  Next: Miscellaneous options,  Prev: Declarations,  Up: Indent Program
  391. Indentation
  392. ===========
  393.    One issue in the formatting of code is how far each line should be
  394. indented from the left margin.  When the beginning of a statement such
  395. as `if' or `for' is encountered, the indentation level is increased by
  396. the value specified by the `-i' option.  For example, use `-i8' to
  397. specify an eight character indentation for each level. When a statement
  398. is continued from a previous line, it is indented by a number of
  399. additional spaces specified by the `-ci' option. `-ci' defaults to 0. 
  400. However, if the `-lp' option is specified, and a line has a left
  401. parenthesis which is not closed on that line, then continuation lines
  402. will be lined up to start at the character position just after the left
  403. parenthesis.  This processing also applies to `[' and applies to `{'
  404. when it occurs in initialization lists.  For example, a piece of
  405. continued code might look like this with `-nlp -ci3' in effect:
  406.        p1 = first_procedure (second_procedure (p2, p3),
  407.           third_procedure (p4, p5));
  408. With `-lp' in effect the code looks somewhat clearer:
  409.        p1 = first_procedure (second_procedure (p2, p3),
  410.                              third_procedure (p4, p5));
  411.    `indent' assumes that tabs are placed at regular intervals of both
  412. input and output character streams.  These intervals are by default 8
  413. columns wide, but (as of version 1.2) may be changed by the `-ts'
  414. option.  Tabs are treated as the equivalent number of spaces.
  415.    The indentation of type declarations in old-style function
  416. definitions is controlled by the `-ip' parameter.  This is a numeric
  417. parameter specifying how many spaces to indent type declarations.  For
  418. example, the default `-ip5' makes definitions look like this:
  419.      char *
  420.      create_world (x, y, scale)
  421.           int x;
  422.           int y;
  423.           float scale;
  424.      {
  425.        . . .
  426.      }
  427.    For compatibility with other versions of indent, the option `-nip'
  428. is provided, which is equivalent to `-ip0'.
  429.    ASCII C allows white space to be placed on preprocessor command lines
  430. between the character `#' and the command name.  By default, `indent'
  431. removes this space, but specifying the `-lps' option directs `indent'
  432. to leave this space unmodified.
  433. File: indent.info,  Node: Miscellaneous options,  Next: Copyright,  Prev: Indentation,  Up: Indent Program
  434. Miscellaneous options
  435. =====================
  436.    To find out what version of `indent' you have, use the command
  437. `indent -version'.  This will report the version number of `indent',
  438. without doing any of the normal processing.
  439.    The `-v' option can be used to turn on verbose mode.  When in
  440. verbose mode, `indent' reports when it splits one line of input into
  441. two more more lines of output, and gives some size statistics at
  442. completion.
  443. File: indent.info,  Node: Copyright,  Prev: Miscellaneous options,  Up: Indent Program
  444. Copyright
  445. =========
  446.    The following copyright notice applies to the `indent' program. The
  447. copyright and copying permissions for this manual appear near the
  448. beginning of this document.
  449.      Copyright (c) 1989, 1992 Free Software Foundation
  450.      Copyright (c) 1985 Sun Microsystems, Inc.
  451.      Copyright (c) 1980 The Regents of the University of California.
  452.      Copyright (c) 1976 Board of Trustees of the University of Illinois.
  453.      All rights reserved.
  454.      
  455.      Redistribution and use in source and binary forms are permitted
  456.      provided that the above copyright notice and this paragraph are
  457.      duplicated in all such forms and that any documentation,
  458.      advertising materials, and other materials related to such
  459.      distribution and use acknowledge that the software was developed
  460.      by the University of California, Berkeley, the University of Illinois,
  461.      Urbana, and Sun Microsystems, Inc.  The name of either University
  462.      or Sun Microsystems may not be used to endorse or promote products
  463.      derived from this software without specific prior written permission.
  464.      THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  465.      IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  466.      WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  467.      PURPOSE.
  468. File: indent.info,  Node: Option Summary,  Next: Index,  Prev: Indent Program,  Up: Top
  469. Option Summary
  470. **************
  471.    Here is a list of all the options for `indent', alphabetized by
  472. short option.  It is followed by a cross key alphabetized by long
  473. option.
  474. `-bad'
  475. `--blank-lines-after-declarations'
  476.      Force blank lines after the declarations.
  477.      *Note Blank lines::.
  478. `-bap'
  479. `--blank-lines-after-procedures'
  480.      Force blank lines after procedure bodies.
  481.      *Note Blank lines::.
  482. `-bbb'
  483. `--blank-lines-after-block-comments'
  484.      Force blank lines after block comments.
  485.      *Note Blank lines::.
  486. `-bc'
  487. `--blank-lines-after-commas'
  488.      Force newline after comma in declaration.
  489.      *Note Declarations::.
  490. `-bl'
  491. `--braces-after-if-line'
  492.      Put braces on line after `if', etc.
  493.      *Note Statements::.
  494. `-bliN'
  495. `--brace-indentN'
  496.      Indent braces N spaces.
  497.      *Note Statements::.
  498. `-br'
  499. `--braces-on-if-line'
  500.      Put braces on line with `if', etc.
  501.      *Note Statements::.
  502. `-cN'
  503. `--comment-indentationN'
  504.      Put comments to the right of code in column N.
  505.      *Note Comments::.
  506. `-cdN'
  507. `--declaration-comment-columnN'
  508.      Put comments to the right of the declarations in column N.
  509.      *Note Comments::.
  510. `-cdb'
  511. `--comment-delimiters-on-blank-lines'
  512.      Put comment delimiters on blank lines.
  513.      *Note Comments::.
  514. `-ce'
  515. `--cuddle-else'
  516.      Cuddle else and preceeding `}'.
  517.      *Note Comments::.
  518. `-ciN'
  519. `--continuation-indentationN'
  520.      Continuation indent of N spaces.
  521.      *Note Statements::.
  522. `-cliN'
  523. `--case-indentationN'
  524.      Case label indent of N spaces.
  525.      *Note Statements::.
  526. `-cpN'
  527. `--else-endif-columnN'
  528.      Put comments to the right of `#else' and `#endif' statements in
  529.      column N.
  530.      *Note Comments::.
  531. `-cs'
  532. `--space-after-cast'
  533.      Put a space after a cast operator.
  534.      *Note Statements::.
  535. `-bs'
  536. `--blank-before-sizeof'
  537.      Put a space between `sizeof' and its argument.
  538.      *Note Statements::
  539. `-dN'
  540. `--line-comments-indentationN'
  541.      Set indentation of comments not to the right of code to N spaces.
  542.      *Note Comments::.
  543. `-diN'
  544. `--declaration-indentationN'
  545.      Put variables in column N.
  546.      *Note Declarations::.
  547. `-fc1'
  548. `--format-first-column-comments'
  549.      Format comments in the first column.
  550.      *Note Comments::.
  551. `-fca'
  552. `--format-all-comments'
  553.      Do not disable all formatting of comments.
  554.      *Note Comments::
  555. `-gnu'
  556. `--gnu-style'
  557.      Use GNU coding style.  This is the default.
  558.      *Note Common styles::.
  559. `-iN'
  560. `--indent-levelN'
  561.      Set indentation level to N spaces.
  562.      *Note Indentation::.
  563. `-ipN'
  564. `--parameter-indentationN'
  565.      Indent parameter types in old-style function definitions by N
  566.      spaces.
  567.      *Note Indentation::.
  568. `-kr'
  569. `--k-and-r-style'
  570.      Use Kernighan & Ritchie coding style.
  571.      *Note Common styles::.
  572. `-lN'
  573. `--line-lengthN'
  574.      Set maximum line length to N.
  575.      *Note Comments::.
  576. `-lp'
  577. `--continue-at-parentheses'
  578.      Line up continued lines at parentheses.
  579.      *Note Indentation::.
  580. `-lps'
  581. `--leave-preprocessor-space'
  582.      Leave space between `#' and preprocessor directive. *Note
  583.      Indentation::.
  584. `-nbad'
  585. `--no-blank-lines-after-declarations'
  586.      Do not force blank lines after declarations.
  587.      *Note Blank lines::.
  588. `-nbap'
  589. `--no-blank-lines-after-procedures'
  590.      Do not force blank lines after procedure bodies.
  591.      *Note Blank lines::.
  592. `-nbbb'
  593. `--no-blank-lines-after-block-comments'
  594.      Do not force blank-lines after block comments.
  595.      *Note Blank lines::.
  596. `-nbc'
  597. `--no-blank-lines-after-commas'
  598.      Do not force newlines after commas in declarations.
  599.      *Note Declarations::.
  600. `-ncdb'
  601. `--no-comment-delimiters-on-blank-lines'
  602.      Do not put comment delimiters on blank lines.
  603.      *Note Comments::.
  604. `-nce'
  605. `--dont-cuddle-else'
  606.      Do not cuddle `}' and `else'.
  607.      *Note Statements::.
  608. `-ncs'
  609. `--no-space-after-casts'
  610.      Do not put a space after cast operators.
  611.      *Note Statements::.
  612. `-nfc1'
  613. `--dont-format-first-column-comments'
  614.      Do not format comments in the first column as normal.
  615.      *Note Comments::.
  616. `-nfca'
  617. `--dont-format-comments'
  618.      Do not format any comments.
  619.      *Note Comments::.
  620. `-nip'
  621. `--no-parameter-indentation'
  622.      Zero width indentation for parameters.
  623.      *Note Indentation::
  624. `-nlp'
  625. `--dont-line-up-parentheses'
  626.      Do not line up parentheses.
  627.      *Note Statements::.
  628. `-npcs'
  629. `--no-space-after-function-call-names'
  630.      Do not put space after the function in function calls.
  631.      *Note Statements::.
  632. `-npsl'
  633. `--dont-break-procedure-type'
  634.      Put the type of a procedure on the same line as its name.
  635.      *Note Declarations::.
  636. `-nsc'
  637. `--dont-star-comments'
  638.      Do not put the `*' character at the left of comments.
  639.      *Note Comments::.
  640. `-nsob'
  641. `--leave-optional-blank-lines'
  642.      Do not swallow optional blank lines.
  643.      *Note Blank lines::.
  644. `-nss'
  645. `--dont-space-special-semicolon'
  646.      Do not force a space before the semicolon after certain statements.
  647.      Disables `-ss'.
  648.      *Note Statements::.
  649. `-nv'
  650. `--no-verbosity'
  651.      Disable verbose mode. *Note Miscellaneous options::.
  652. `-orig'
  653. `--original'
  654.      Use the original Berkeley coding style.
  655.      *Note Common styles::.
  656. `-npro'
  657. `--ignore-profile'
  658.      Do not read `.indent.pro' files.
  659.      *Note Invoking indent::.
  660. `-pcs'
  661. `--space-after-procedure-calls'
  662.      Insert a space between the name of the procedure being called and
  663.      the `('.
  664.      *Note Statements::.
  665. `-psl'
  666. `--procnames-start-lines'
  667.      Put the type of a procedure on the line before its name.
  668.      *Note Declarations::.
  669. `-sc'
  670. `--start-left-side-of-comments'
  671.      Put the `*' character at the left of comments.
  672.      *Note Comments::.
  673. `-sob'
  674. `--swallow-optional-blank-lines'
  675.      Swallow optional blank lines.
  676.      *Note Blank lines::.
  677. `-ss'
  678. `--space-special-semicolon'
  679.      On one-line `for' and `while' statments, force a blank before the
  680.      semicolon.
  681.      *Note Statements::.
  682. `-st'
  683. `--standard-output'
  684.      Write to standard output.
  685.      *Note Invoking indent::.
  686.      Tell `indent' the name of typenames.
  687.      *Note Declarations::.
  688. `-tsN'
  689. `--tab-sizeN'
  690.      Set tab size to N spaces.
  691.      *Note Indentation::.
  692. `--verbose'
  693.      Enable verbose mode.
  694.      *Note Miscellaneous options::.
  695. `-version'
  696.      Output the version number of `indent'.
  697.      *Note Miscellaneous options::.
  698. Options' Cross Key
  699. ------------------
  700.    Here is a list of options alphabetized by long option, to help you
  701. find the corresponding short option.
  702.      --blank-lines-after-block-comments              -bbb
  703.      --blank-lines-after-commas                      -bc
  704.      --blank-lines-after-declarations                -bad
  705.      --blank-lines-after-procedures                  -bap
  706.      --braces-after-if-line                          -bl
  707.      --brace-indent                                  -bli
  708.      --braces-on-if-line                             -br
  709.      --case-indentation                              -cliN
  710.      --comment-delimiters-on-blank-lines             -cdb
  711.      --comment-indentation                           -cN
  712.      --continuation-indentation                      -ciN
  713.      --continue-at-parentheses                       -lp
  714.      --cuddle-else                                   -ce
  715.      --declaration-comment-column                    -cdN
  716.      --declaration-indentation                       -diN
  717.      --dont-break-procedure-type                     -npsl
  718.      --dont-cuddle-else                              -nce
  719.      --dont-format-comments                          -nfca
  720.      --dont-format-first-column-comments             -nfc1
  721.      --dont-line-up-parentheses                      -nlp
  722.      --dont-space-special-semicolon                  -nss
  723.      --dont-star-comments                            -nsc
  724.      --else-endif-column                             -cpN
  725.      --format-all-comments                           -fca
  726.      --format-first-column-comments                  -fc1
  727.      --gnu-style                                     -gnu
  728.      --ignore-profile                                -npro
  729.      --indent-level                                  -iN
  730.      --k-and-r-style                                 -kr
  731.      --leave-optional-blank-lines                    -nsob
  732.      --leave-preprocessor-space                      -lps
  733.      --line-comments-indentation                     -dN
  734.      --line-length                                   -lN
  735.      --no-blank-lines-after-block-comments           -nbbb
  736.      --no-blank-lines-after-commas                   -nbc
  737.      --no-blank-lines-after-declarations             -nbad
  738.      --no-blank-lines-after-procedures               -nbap
  739.      --no-comment-delimiters-on-blank-lines          -ncdb
  740.      --no-space-after-casts                          -ncs
  741.      --no-parameter-indentation                      -nip
  742.      --no-space-after-function-call-names            -npcs
  743.      --no-verbosity                                  -nv
  744.      --original                                      -orig
  745.      --parameter-indentation                         -ipN
  746.      --procnames-start-lines                         -psl
  747.      --space-after-cast                              -cs
  748.      --space-after-procedure-calls                   -pcs
  749.      --space-special-semicolon                       -ss
  750.      --standard-output                               -st
  751.      --start-left-side-of-comments                   -sc
  752.      --swallow-optional-blank-lines                  -sob
  753.      --tab-size                                      -tsN
  754.      --verbose                                       -v
  755. File: indent.info,  Node: Index,  Prev: Option Summary,  Up: Top
  756. Index
  757. *****
  758. * Menu:
  759. * --blank-after-sizeof:                 Statements.
  760. * --blank-lines-after-block-comments:   Blank lines.
  761. * --blank-lines-after-commas:           Declarations.
  762. * --blank-lines-after-declarations:     -bad.
  763. * --blank-lines-after-procedures:       -bap.
  764. * --brace-indentN:                      Statements.
  765. * --braces-after-if-line:               Statements.
  766. * --braces-on-if-line:                  Statements.
  767. * --case-indentationN:                  Statements.
  768. * --comment-delimiters-on-blank-lines:  Comments.
  769. * --comment-indentationN:               Comments.
  770. * --continuation-indentationN:          Indentation.
  771. * --continue-at-parentheses:            Indentation.
  772. * --cuddle-else:                        Statements.
  773. * --declaration-comment-columnN:        Comments.
  774. * --declaration-indentationN:           Declarations.
  775. * --dont-break-procedure-type:          Declarations.
  776. * --dont-cuddle-else:                   Statements.
  777. * --dont-format-comments:               Comments.
  778. * --dont-format-first-column-comments:  Comments.
  779. * --dont-line-up-parentheses:           Indentation.
  780. * --dont-space-special-semicolon:       Statements.
  781. * --dont-star-comments:                 Comments.
  782. * --else-endif-columnN:                 Comments.
  783. * --format-all-comments:                Comments.
  784. * --format-first-column-comments:       Comments.
  785. * --gnu-style:                          Common styles.
  786. * --ignore-profile:                     Invoking indent.
  787. * --indent-levelN:                      Indentation.
  788. * --k-and-r-style:                      Common styles.
  789. * --leave-optional-blank-lines:         Blank lines.
  790. * --leave-preprocessor-space:           Indentation.
  791. * --line-comments-indentationN:         Comments.
  792. * --line-lengthN:                       Comments.
  793. * --no-blank-lines-after-block-comments: Blank lines.
  794. * --no-blank-lines-after-commas:        Declarations.
  795. * --no-blank-lines-after-declarations:  -bad.
  796. * --no-blank-lines-after-procedures:    -bap.
  797. * --no-comment-delimiters-on-blank-lines: Comments.
  798. * --no-parameter-indentation:           Indentation.
  799. * --no-space-after-casts:               Statements.
  800. * --no-space-after-function-call-names: Statements.
  801. * --no-verbosity:                       Miscellaneous options.
  802. * --original:                           Common styles.
  803. * --output-file:                        Invoking indent.
  804. * --parameter-indentationN:             Indentation.
  805. * --procnames-start-lines:              Declarations.
  806. * --space-after-cast:                   Statements.
  807. * --space-after-procedure-calls:        Statements.
  808. * --space-special-semicolon:            Statements.
  809. * --standard-output:                    Invoking indent.
  810. * --start-left-side-of-comments:        Comments.
  811. * --swallow-optional-blank-lines:       Blank lines.
  812. * --tab-sizeN:                          Indentation.
  813. * --verbose:                            Miscellaneous options.
  814. * -T:                                   Declarations.
  815. * -bad:                                 -bad.
  816. * -bap:                                 -bap.
  817. * -bbb:                                 Blank lines.
  818. * -bc:                                  Declarations.
  819. * -bl:                                  Statements.
  820. * -bliN:                                Statements.
  821. * -br:                                  Statements.
  822. * -bs:                                  Statements.
  823. * -cN:                                  Comments.
  824. * -cdN:                                 Comments.
  825. * -cdb:                                 Comments.
  826. * -ce:                                  Statements.
  827. * -ciN:                                 Indentation.
  828. * -cliN:                                Statements.
  829. * -cpN:                                 Comments.
  830. * -cs:                                  Statements.
  831. * -dN:                                  Comments.
  832. * -dce:                                 Statements.
  833. * -diN:                                 Declarations.
  834. * -fc1:                                 Comments.
  835. * -fca:                                 Comments.
  836. * -gnu:                                 Common styles.
  837. * -iN:                                  Indentation.
  838. * -ipN:                                 Indentation.
  839. * -kr:                                  Common styles.
  840. * -lN:                                  Comments.
  841. * -lp:                                  Indentation.
  842. * -lps:                                 Indentation.
  843. * -nbad:                                -bad.
  844. * -nbap:                                -bap.
  845. * -nbbb:                                Blank lines.
  846. * -nbc:                                 Declarations.
  847. * -ncdb:                                Comments.
  848. * -ncs:                                 Statements.
  849. * -nfc1:                                Comments.
  850. * -nfca:                                Comments.
  851. * -nip:                                 Indentation.
  852. * -nlp:                                 Indentation.
  853. * -npcs:                                Statements.
  854. * -npro:                                Invoking indent.
  855. * -npsl:                                Declarations.
  856. * -nsc:                                 Comments.
  857. * -nsob:                                Blank lines.
  858. * -nss:                                 Statements.
  859. * -nv:                                  Miscellaneous options.
  860. * -o:                                   Invoking indent.
  861. * -orig:                                Common styles.
  862. * -pcs:                                 Statements.
  863. * -psl:                                 Declarations.
  864. * -sc:                                  Comments.
  865. * -sob:                                 Blank lines.
  866. * -ss:                                  Statements.
  867. * -st:                                  Invoking indent.
  868. * -tsN:                                 Indentation.
  869. * -v:                                   Miscellaneous options.
  870. * -version:                             Miscellaneous options.
  871. * etags requires -psl:                  Declarations.
  872. * .indent.pro file:                     Invoking indent.
  873. * Beginning indent:                     Invoking indent.
  874. * Berkeley style:                       Common styles.
  875. * Blank lines:                          Blank lines.
  876. * Comments:                             Comments.
  877. * GNU style:                            Common styles.
  878. * Initialization file:                  Invoking indent.
  879. * Invoking indent:                      Invoking indent.
  880. * Kernighan & Ritchie style:            Common styles.
  881. * Long options, use of:                 Invoking indent.
  882. * Original Berkeley style:              Common styles.
  883. * Output File Specification:            Invoking indent.
  884. * Standard Output:                      Invoking indent.
  885. * Starting indent:                      Invoking indent.
  886. * Typenames:                            Declarations.
  887. * Using Standard Input:                 Invoking indent.
  888. Tag Table:
  889. Node: Top
  890. Node: Indent Program
  891. Node: Invoking indent
  892. Node: Backup files
  893. Node: Common styles
  894. Node: Blank lines
  895. Node: -bad
  896. 10363
  897. Node: -bap
  898. 11012
  899. Node: Comments
  900. 11875
  901. Node: Statements
  902. 14249
  903. Node: Declarations
  904. 16248
  905. Node: Indentation
  906. 17865
  907. Node: Miscellaneous options
  908. 20182
  909. Node: Copyright
  910. 20729
  911. Node: Option Summary
  912. 22125
  913. Node: Index
  914. 31669
  915. End Tag Table
  916.