diff options
Diffstat (limited to 'tools/do-indent')
-rwxr-xr-x | tools/do-indent | 14 |
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 |