Automatically Indenting C++ progams

There are three popular ways of indenting C programs.
is a program which does simple indenting, but is not very tailorable. It also indents with tabs, so you must post process with a program like expand to replace tabs with the appropriate number of spaces.
is a very flexible indenting tool, with lots of options about how indenting is performed.
     indent -bad -bap -nbc -br -nce -i4
     indent -bad -bap -nbc -bl -nce -i4
are commands which approxomate our reccomended FPCL coding standards.
is an editor with on-the-fly formatting. can add a phrase like:
    (defun my-c-hook nil "Simple function to setup cc-mode"
     (c-toggle-auto-hungry-state 1)
      (set-variable 'c-file-style "Stroustrup")
    (add-hook 'c-mode-common-hook 'my-c-hook)
to their .emacs file, or add a block like
    // Local Variables:
    // mode: c++
    // c-file-style: "Stroustrup"
    // End:
to their C++ source files to set a particular indentation style.
More information on these tools can be found in the docuementaion for cb, indent, and emacs on the web.



Groups doing C++ development work should choose formatting conventions that can be enforced by automated tools like indent and emacs, and should provide files for indent and parameter comment blocks for emacs to enforce their coding style.

Groups using cvs may want to automatically apply a formatter program on source being checked into a code repository.

We may want to reccomend that Computing Division provide binary versions of indent for our supported platforms.