Fixed pointer alignment in formatting script.
authorArmin Novak <armin.novak@gmail.com>
Mon, 18 Aug 2014 17:34:33 +0000 (19:34 +0200)
committerArmin Novak <armin.novak@thincast.com>
Tue, 9 Sep 2014 14:32:04 +0000 (16:32 +0200)
scripts/format_code.sh [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index d4c30e0..727b194
@@ -2,22 +2,23 @@
 
 ASTYLE=`which astyle`
 
-if [ ! -x $ASTYLE ];
+          if [ ! -x $ASTYLE ];
+
 then
-  echo "No astyle found in path, please install."
-  exit 1
+echo "No astyle found in path, please install."
+exit 1
 fi
 
 if [ $# -le 0 ]; then
-  echo "Usage:"
-  echo "\t$0 <file1> [<file2> ...]"
+echo "Usage:"
+echo "\t$0 <file1> [<file2> ...]"
 #  echo "\t$0 -r <directory>"
-  exit 2
+exit 2
 fi
 
 $ASTYLE --lineend=linux --mode=c --indent=force-tab=4 --brackets=linux --pad-header \
-                               --indent-switches --indent-cases --indent-preprocessor \
-                               --indent-col1-comments --delete-empty-lines --break-closing-brackets \
-                               --align-pointer=name --indent-labels --brackets=break \
-                               --unpad-paren --break-blocks $@
-exit $?
+                                                          --indent-switches --indent-cases --indent-preprocessor \
+                                                          --indent-col1-comments --delete-empty-lines --break-closing-brackets \
+                                                          --align-pointer=type --indent-labels --brackets=break \
+                                                                          --unpad-paren --break-blocks $@
+                                                                          exit $?