From: Youness Alaoui Date: Sun, 9 Jan 2011 13:04:04 +0000 (-0500) Subject: Adding kakaroto-indent script that will indent all the files to my coding style.... X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=d6471bf1725b166ea78db3564351b516ed4fccf6;p=console%2FRCOMage.git Adding kakaroto-indent script that will indent all the files to my coding style. Required gnu indent to be installed --- diff --git a/kakaroto-indent b/kakaroto-indent new file mode 100755 index 0000000..247cbdc --- /dev/null +++ b/kakaroto-indent @@ -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] +