Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
spellchecking instead of sleeping
[simgrid.git] / tools / internal / indent
1 #!/bin/bash
2
3 # Copyright (c) 2011, 2014. The SimGrid Team.
4 # All rights reserved.
5
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the license (GNU LGPL) which comes with this package.
8
9 declare -a OPTIONS
10 OPTIONS=(
11     -kr         # Use Kernighan & Ritchie coding style. 
12     -l120       # Set maximum line length for non-comment lines to 120.
13     -nut        # Use spaces instead of tabs.
14     -i2         # Set indentation level to 2 spaces.
15     -lps        # Leave space between ‘#’ and preprocessor directive.
16     -npcs       # Do not put space after the function in function calls.
17     -br         # Put braces on line with if, etc.
18     -brs        # Put braces on struct declaration line.
19     -ce         # Cuddle else and preceding ‘}’.
20     -cdw        # Cuddle while of do {} while; and preceding ‘}’.
21     -bbo        # Prefer to break long lines before boolean operators.
22     -npsl       # Put the type of a procedure on the same line as its name.
23 )
24
25 exec indent "${OPTIONS[@]}" "$@"