otherdir=$1
for i in *.[hc]
do
   if [ -s $otherdir/$i ] ; then
       cmp  $otherdir/$i $i
       if [ $? -gt 0 ] ; then
          echo "File: $i"
          diff $otherdir/$i $i > $i.patch
#       else
#          echo "File: $i is not different"
       fi
#   else
#       echo "File: $i does not exist in $otherdir"
   fi
done
