Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools/do-indent
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
commit1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch)
tree698eefa87ac437deaf36a4141b326f8ce7986692 /tools/do-indent
Import XaoS r489 (trunk after version 3.5)
Diffstat (limited to 'tools/do-indent')
-rwxr-xr-xtools/do-indent14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/do-indent b/tools/do-indent
new file mode 100755
index 0000000..354fa16
--- /dev/null
+++ b/tools/do-indent
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Autoindenter.
+# This ugly trio of programs `do-indent', `indent1' and `wintounix' will
+# indent all .c and .h files to a standard format.
+# Author: Zoltan Kovacs <kovzol@math.u-szeged.hu>
+
+which indent || exit 1
+echo "You are to indent all .c and .h in this directory, recursively."
+echo -n "Do you really want to do this? [n] "
+read A
+if [ "$A" = "y" ]; then
+ gcc -o wintounix wintounix.c
+ find .. -name '*.[ch]' -exec ./indent1 '{}' ';'
+ fi