Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix mem leack and factorize code.
[simgrid.git] / tools / indent
1 #!/bin/bash
2
3 declare -a OPTIONS
4 OPTIONS=(
5     -kr         # Use Kernighan & Ritchie coding style. 
6     -l80        # Set maximum line length for non-comment lines to 80.
7     -nut        # Use spaces instead of tabs.
8     -i2         # Set indentation level to 2 spaces.
9     -lps        # Leave space between ‘#’ and preprocessor directive.
10     -npcs       # Do not put space after the function in function calls.
11     -br         # Put braces on line with if, etc.
12     -brs        # Put braces on struct declaration line.
13     -ce         # Cuddle else and preceding ‘}’.
14     -cdw        # Cuddle while of do {} while; and preceding ‘}’.
15     -bbo        # Prefer to break long lines before boolean operators.
16     -npsl       # Put the type of a procedure on the same line as its name.
17 )
18
19 exec indent "${OPTIONS[@]}" "$@"