Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:37

0001 #!/bin/bash
0002 DIR=`dirname $0`;
0003 
0004 format_file()
0005 {
0006     echo "====  Reformatting file: $*";
0007     emacs --quick --script ${DIR}/format_code.el $*;
0008 }
0009 
0010 arg=$1;
0011 
0012 if test -f "${arg}";
0013 then
0014     format_file "${arg}";
0015 elif test -d "${arg}";
0016 then
0017     for i in `find ${arg} \( -name '*.cpp' -o -name '*.h' -o -name '*.inl' \) -type f -print`;
0018     do
0019         format_file $i;
0020     done;
0021 else
0022     echo "$0: File/Directory $* does not exist or is not a regular file nor a directory!"
0023 fi;