Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools/do-indent
blob: 354fa167fbd1160719feac0f2a0b4db7c7ed0c71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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