#! /bin/sh
CFILES="`echo src/*/*.[chy] src/*/*/*.[ch] examples/*.c examples/*.gp |sed -e 's,src/language/parse\.[ch],,g'`"
OFILES="AUTHORS COMPAT NEW TODO CHANGES MACHINES doc/*.tex src/test/in/* src/functions/*/*"
SCRIPTS="config/* src/test/dotest"
err=0;
if grep ' $' $CFILES $OFILES $SCRIPTS; then
  echo "BUG: trailing spaces found."
  err=1;
fi
if grep '	' $CFILES $OFILES; then
  echo "BUG: TAB found."
  err=1;
fi
if grep '	$' $SCRIPTS; then
  echo "BUG: TAB found in scripts."
  err=1;
fi
exit $err
