]> Chaos Git - console/RCOMage.git/commitdiff
Adding kakaroto-indent script that will indent all the files to my coding style....
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Sun, 9 Jan 2011 13:04:04 +0000 (08:04 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Sun, 9 Jan 2011 13:04:04 +0000 (08:04 -0500)
kakaroto-indent [new file with mode: 0755]

diff --git a/kakaroto-indent b/kakaroto-indent
new file mode 100755 (executable)
index 0000000..247cbdc
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/bash
+# KaKaRoTo style
+
+BLANKS="\
+       --blank-lines-after-declarations \
+       --blank-lines-after-procedures \
+       --blank-lines-before-block-comments \
+       --swallow-optional-blank-lines"
+
+COMMENTS=" \
+       --format-all-comments \
+       --format-first-column-comments \
+       --no-comment-delimiters-on-blank-lines \
+       --start-left-side-of-comments \
+       --line-comments-indentation0 \
+       --comment-indentation33 \
+       --declaration-comment-column33 \
+       --else-endif-column33"
+       
+STATEMENTS=" \
+       --braces-on-if-lines \
+       --cuddle-else \
+       --cuddle-do-while \
+       --case-indentation2 \
+       --case-brace-indentation2 \
+       --space-special-semicolon \
+       --space-after-procedure-calls \
+       --space-after-cast \
+       --space-after-for \
+       --space-after-if \
+       --space-after-while \
+       --no-space-after-parentheses"
+
+DECLARATIONS=" \
+       --declaration-indentation1 \
+       --no-blank-lines-after-commas \
+       --dont-break-function-decl-args \
+       --dont-break-function-decl-args-end \
+       --procnames-start-lines \
+       --braces-on-struct-decl-line \
+       --braces-after-func-def-line"
+
+INDENTATION=" \
+       --indent-level2 \
+       --continuation-indentation4 \
+       --dont-line-up-parentheses \
+       --parameter-indentation2 \
+       --remove-preprocessor-space \
+       --indent-label2"
+       
+BREAK_LONG_LINES=" \
+       --line-length80 \
+       --ignore-newlines \
+       --break-after-boolean-operator"
+
+
+
+indent $BLANKS $COMMENTS $STATEMENTS $DECLARATIONS $INDENTATION $BREAK_LONG_LINES *.[ch]
+