C Program Indentation

Original program (author's layout).

Indentation 2 spaces

./indent.exe -st -i2 old_dir/simple-gp.c > option_i2/simple-gp.c
Program after indent with -i2
Corresponding .indent.pro file

Indentation 4 spaces

./indent.exe -st -i4 old_dir/simple-gp.c > option_i4/simple-gp.c
Program after indent with -i4
Corresponding .indent.pro file

Differences between -i4 and -i2

Summary

Even without explicitly setting command line options indent makes a reasonable job of pretty printing C sources.
   The examples above show that with one option it is possible to see the effect of changes to indent's command line. However indent has 60 options for you to chose. It is impossible to try all combinations.
   Nevertheless Evo_indent allows you to rapidly and safely navigate the huge space of possible program layouts guided only by what appears on your screen and by your preferences. Evo_indent removes the need to learn about any of indent's options in detail.
back
W.Langdon 5 April 2009