Go to the first, previous, next, last section, table of contents.


Declarations

By default indent will line up identifiers, in the column specified by the `-di' option. For example, `-di16' makes things look like:

int             foo;
char           *bar;

Using a small value (such as one or two) for the `-di' option can be used to cause the indentifiers to be placed in the first available position, for example

int foo;
char *bar;

The value given to the `-di' option will still affect variables which are put on separate lines from their types, for example `-di2' will lead to

int
  foo;

If the `-bc' option is specified, a newline is forced after each comma in a declaration. For example,

int a,
  b,
  c;

With the `-nbc' option this would look like

int a, b, c;

The `-psl' option causes the type of a procedure being defined to be placed on the line before the name of the procedure. This style is required for the etags program to work correctly, as well as some of the c-mode functions of Emacs.

If you are not using the `-di1' option to place variables being declared immediately after their type, you need to use the `-T' option to tell indent the name of all the typenames in your program that are defined by typedef. `-T' can be specified more than once, and all names specified are used. For example, if your program contains

typedef unsigned long CODE_ADDR;
typedef enum {red, blue, green} COLOR;

you would use the options `-T CODE_ADDR -T COLOR'.


Go to the first, previous, next, last section, table of contents.