In mqc.h, changed MQC_NUMCTXS from 32 to 19 as JPEG 2000 only allows 19 possible...
[openjpeg.git] / CVSROOT / checkTabs
1 #!/bin/tcsh
2 #
3 # checkTabs checks source code for explicit TABS
4 #   checks only files with the following extensions: .c, .cxx, .txx,
5 #   exits with 0, if all commited files pass the test.
6 #   exits with 1, if any one of the tests fails
7 #
8 # checkTabs can be run as a cvs commitinfo command.
9 # The following commitinfo line (without the #) will run the script
10 # ALL   $CVSROOT/CVSROOT/checkTabs
11
12 set failed=0
13 #
14 # skip the first arg, the directory
15 foreach file ( $argv[2-] )
16 #
17 # select files with extentions .txx, .cxx, .h, .html, .htm
18 set match=`echo $file | egrep \[\.\]txx\$\|\[\.\]cxx\$\|\[\.\]h\$\|\[\.\]cpp\$\|\[\.\]htm\$\|\[\.\]html\$\|\[\.\]c\$\|\[\.\]mm\$\|\[\.\]h.in\$\|\[\.\]hxx.in\$\|CMakeLists.txt\$\|\[\.\]cmake\$\|\[\.\]cmake.in\$`
19 if ( $match == "" ) continue;
20 set count=`grep -n "    " /dev/null $file|wc -c`
21 set results=`expr $count \| 0`
22 if ( "$results" != "0" ) then
23         echo "=========================================================="
24         grep -n "       " /dev/null $file
25         echo ""
26         echo "$file has explicit TABSs."
27         echo "They must be converted to SPACES(2 per TAB) before you can commit."
28         echo "=========================================================="
29         set failed=1
30 endif
31 end
32 exit $failed