diff options
Diffstat (limited to 'demos')
-rwxr-xr-x | demos/GL4JavaCheckGluNew.sh | 21 | ||||
-rwxr-xr-x | demos/GL4JavaCheckMakeCurrentFree.sh | 30 |
2 files changed, 51 insertions, 0 deletions
diff --git a/demos/GL4JavaCheckGluNew.sh b/demos/GL4JavaCheckGluNew.sh new file mode 100755 index 0000000..df926ad --- /dev/null +++ b/demos/GL4JavaCheckGluNew.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +verbose=1 + +if [ "$1" = "-quiet" ] ; then + verbose=0 +fi + +# +# gluNew check ! +# +for i in *.java ; do + a=$(grep -h -c gluNew $i) + if [ ! \( $a -eq 0 \) ] ; then + if [ $verbose -eq 1 ] ; then + echo $i gluNew used WARNING + else + echo $i + fi + fi +done diff --git a/demos/GL4JavaCheckMakeCurrentFree.sh b/demos/GL4JavaCheckMakeCurrentFree.sh new file mode 100755 index 0000000..16a9726 --- /dev/null +++ b/demos/GL4JavaCheckMakeCurrentFree.sh @@ -0,0 +1,30 @@ +#! /bin/sh + +verbose=1 + +if [ "$1" = "-quiet" ] ; then + verbose=0 +fi + +# +# MakeCurrent/Free check +# +for i in *.java ; do + a=$(grep -h -c gljMakeCurrent $i) + b=$(grep -h -c gljFree $i) + if [ ! \( $a -eq $b \) ] ; then + if [ $verbose -eq 1 ] ; then + echo $i MakeCurrent/Free ERROR + else + echo $i + fi + fi + if [ \( $a -eq 0 \) ] ; then + if [ $verbose -eq 1 ] ; then + echo $i MakeCurrent never called ERROR + else + echo $i + fi + fi +done + |