| 1 | = Coding Style = |
| 2 | |
| 3 | This page documents possible coding conventions for MapServer. |
| 4 | |
| 5 | == Artistic Style (astyle) == |
| 6 | |
| 7 | [http://astyle.sourceforge.net/ Artistic Style (astyle)] is source code formatting tool, and allows for flexible definitions (spaces, padding, indents, one liners, etc.) to automatically format source code for a given coding convention. |
| 8 | |
| 9 | Here is a sample invocation: |
| 10 | |
| 11 | {{{ |
| 12 | $ astyle --style=kr --unpad=paren --indent=spaces=2 mslibxml2.c |
| 13 | }}} |
| 14 | |
| 15 | == Coding Conventions == |
| 16 | |
| 17 | * style (k&r, gnu, linux) |
| 18 | * tabs an brackets (tabs, spaces) |
| 19 | * indentation |
| 20 | * formatting (parens) |
| 21 | |