3 test -f ${0%/*}/src/cfgparser/oparse.c && {
5 This script reformats all source files. Be careful
6 with doing so. You need a clean source tree, e.g.
7 reformatting of bison/flex output may not work well.
9 For these reasons: run "make uberclean" first.
13 test -x $PWD/${0##*/} || {
15 ************************************************************
16 Warning: about to change all files below current working dir
18 ************************************************************
22 test "y" = "$l" || exit 1
25 sed -i 's/Andreas T.\{1,6\}nnesen/Andreas Tonnesen/g;s/Andreas Tønnesen/Andreas Tonnesen/g;s/Andreas Tønmnesen/Andreas Tonnesen/' $(find -type f -not -path "*/.hg*" -not -name ${0##*/})
26 sed -i 's/
\r//g;s/[ ]\+$//' $(find -name "*.[ch]" -not -path "*/.hg*")
29 test "--cmp" = "$1" && {
30 # Note: may help to compare two messy formatted source trees.
31 addon="--swallow-optional-blank-lines --ignore-newlines"
34 indent $(cat ${0%/*}/src/.indent.pro) $addon $* $(find -name "*.[ch]" -not -path "*/.hg*")
36 rm $(find -name "*~" -not -path "*/.hg*")