


      IIIINNNNDDDDEEEENNNNTTTT((((1111))))                   ((((bbbbssssdddd 4444....2222))))                   IIIINNNNDDDDEEEENNNNTTTT((((1111))))



      NNNNAAAAMMMMEEEE
           indent - indent and format C program source

      SSSSYYYYNNNNTTTTAAAAXXXX
           iiiinnnnddddeeeennnntttt _i_n_p_u_t [ _o_u_t_p_u_t ] [ _f_l_a_g_s ]

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _I_n_d_e_n_t is intended primarily as a C program formatter.
           Specifically, _i_n_d_e_n_t will:

           +o    indent code lines

           +o    align comments

           +o    insert spaces around operators where necessary

           +o    break up declaration lists as in ``int a,b,c;''.

           _I_n_d_e_n_t will not break up long statements to make them fit
           within the maximum line length, but it will flag lines that
           are too long.  Lines will be broken so that each statement
           starts a new line, and braces will appear alone on a line.
           (See the -br option to inhibit this.) Also, an attempt is
           made to line up identifiers in declarations.

           If the _f_l_a_g_s are specified, they may appear before or after
           the file names.  If the _o_u_t_p_u_t file is omitted, the
           formatted file will be written back into _i_n_p_u_t and a
           ``backup'' copy of _i_n_p_u_t will be written in the current
           directory.  If _i_n_p_u_t is named ``/blah/blah/file'', the
           backup file will be named ``.Bfile''.  If _o_u_t_p_u_t is
           specified, _i_n_d_e_n_t checks to make sure it is different from
           _i_n_p_u_t.

           The following flags may be used to control the formatting
           style imposed by _i_n_d_e_n_t.

           ----llll_n_n_n     Maximum length of an output line.  The default is
                     75.

           ----cccc_n_n_n     The column in which comments will start.  The
                     default is 33.

           ----ccccdddd_n_n_n    The column in which comments on declarations will
                     start.  The default is for these comments to start
                     in the same column as other comments.

           ----iiii_n_n_n     The number of spaces for one indentation level.
                     The default is 4.

           ----ddddjjjj,----nnnnddddjjjj  ----ddddjjjj will cause declarations to be left justified.
                     ----nnnnddddjjjj will cause them to be indented the same as



      Page 1                                                   (9010-E)






      IIIINNNNDDDDEEEENNNNTTTT((((1111))))                   ((((bbbbssssdddd 4444....2222))))                   IIIINNNNDDDDEEEENNNNTTTT((((1111))))



                     code.  The default is ----nnnnddddjjjj.

           ----vvvv,----nnnnvvvv    ----vvvv turns on ``verbose'' mode, ----nnnnvvvv turns it off.
                     When in verbose mode, _i_n_d_e_n_t will report when it
                     splits one line of input into two or more lines of
                     output, and it will give some size statistics at
                     completion. The default is ----nnnnvvvv.

           ----bbbbcccc,----nnnnbbbbcccc  If ----bbbbcccc is specified, then a newline will be forced
                     after each comma in a declaration. ----nnnnbbbbcccc will turn
                     off this option.  The default is ----bbbbcccc.

           ----dddd_n_n_n     This option controls the placement of comments,
                     which are not to the right of code.  Specifying
                     ----dddd2222 means that such comments will be placed two
                     indentation levels to the left of code.  The
                     default ----dddd0000 lines up these comments with the code.
                     See the section on comment indentation below.

           ----bbbbrrrr,----bbbbllll   Specifying ----bbbbllll will cause complex statements to be
                     lined up like this:
                         if (...)
                         {
                             code
                         }
                     Specifying ----bbbbrrrr (the default) will make them look
                     like this:
                         if (...) {
                             code
                         }

           You may set up your own ``profile'' of defaults to _i_n_d_e_n_t by
           creating the file ``.indent.pro'' in your login directory
           and including whatever switches you like.  If _i_n_d_e_n_t is run
           and a profile file exists, then it is read to set up the
           program's defaults.  Switches on the command line, though,
           will always override profile switches.  The profile file
           must be a single line of not more than 127 characters.  The
           switches should be separated on the line by spaces or tabs.

           MMMMuuuullllttttiiii----lllliiiinnnneeee eeeexxxxpppprrrreeeessssssssiiiioooonnnnssss

           _I_n_d_e_n_t will not break up complicated expressions that extend
           over multiple lines, but it will usually correctly indent
           such expressions which have already been broken up.  Such an










      Page 2                                                   (9010-E)






      IIIINNNNDDDDEEEENNNNTTTT((((1111))))                   ((((bbbbssssdddd 4444....2222))))                   IIIINNNNDDDDEEEENNNNTTTT((((1111))))



           expression might end up looking like this:
               x =
                       (
                           (Arbitrary parenthesized expression)
                           +
                           (
                               (Parenthesized expression)
                               *
                               (Parenthesized expression)
                           )
                       );


           CCCCoooommmmmmmmeeeennnnttttssss

           _I_n_d_e_n_t recognizes four kinds of comments. They are: straight
           text, ``box'' comments, UNIX-style comments, and comments
           that should be passed through unchanged. The action taken
           with these various types are as follows:

           ``_B_o_x'' _c_o_m_m_e_n_t_s.   _I_n_d_e_n_t assumes that any comment with a
           dash immediately after the start of a comment (i.e. ``/*-'')
           is a comment surrounded by a box of stars.  Each line of
           such a comment will be left unchanged, except that the first
           non-blank character of each successive line will be lined up
           with the beginning slash of the first line.  Box comments
           will be indented (see below).

           ``_U_n_i_x-_s_t_y_l_e'' _c_o_m_m_e_n_t_s.   This is the type of section
           header which is used extensively in the UNIX system source.
           If the start of a comment (``/*'') appears on a line by
           itself, indent assumes that it is a UNIX-style comment.
           These will be treated similarly to box comments, except the
           first non-blank character on each line will be lined up with
           the `*' of the ``/*''.

           _U_n_c_h_a_n_g_e_d _c_o_m_m_e_n_t_s.   Any comment which starts in column 1
           will be left completely unchanged.  This is intended
           primarily for documentation header pages.  The check for
           unchanged comments is made before the check for UNIX-style
           comments.

           _S_t_r_a_i_g_h_t _t_e_x_t.   All other comments are treated as straight
           text. _I_n_d_e_n_t will fit as many words (separated by blanks,
           tabs, or newlines) on a line as possible.  Straight text
           comments will be indented.

           CCCCoooommmmmmmmeeeennnntttt iiiinnnnddddeeeennnnttttaaaattttiiiioooonnnn

           Box comments, UNIX-style commnets, and straight text
           comments may be indented.  If a comment is on a line with
           code, it will be started in the ``comment column'', which is



      Page 3                                                   (9010-E)






      IIIINNNNDDDDEEEENNNNTTTT((((1111))))                   ((((bbbbssssdddd 4444....2222))))                   IIIINNNNDDDDEEEENNNNTTTT((((1111))))



           set by the ----ccccnnnnnnnnnnnn command line parameter.  Otherwise, if _n_n_n
           is specified by the ----ddddnnnnnnnnnnnn command line parameter, the
           comment will be started at _n_n_n indentation levels less than
           where code is currently being placed.  (Indented comments
           will never be placed in column 1.) If the code on a line
           extends past the comment column, the comment will be moved
           to the next line.

      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
           Diagnostic error messages are used to tell that a text line
           has been broken or is too long for the output line.

      FFFFIIIILLLLEEEESSSS
           .indent.pro    profile file

      BBBBUUUUGGGGSSSS
           Does not know how to format ``long'' declarations.






































      Page 4                                                   (9010-E)



