#! /bin/bash

# $Id: indent.sh 729 2007-01-14 13:44:38Z michael $
# $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/indent.sh $


# -kr    Use Kernighan & Ritchie coding style.
# -l120  Set maximum line length for non-comment lines to 150.

rm *.c~ *.h~
indent -kr -l120 *.c *.h

for i in *.c *.h; do
  if !(diff -q $i $i~); then
    rm $i~
  else
    mv $i~ $i
  fi
done
