:
# findcstr - find a string in a C source file
# 
# written 6/9/95 by Ronald Joe Record (rr@sco.com)
#

CASE=
FILE=

useage() {
	echo "useage: findcstr [-y] [-l] string"
	exit 1
}

while case "$1" in
	-u*) useage
        ;;
	-y) CASE=-y
        ;;
	-l) FILE=-l
        ;;
	"") break
	;;
	*)  STR=$1
	;;
        esac
do
    shift
done

[ "$STR" ] || useage


find . -name \*\.\[ch\] -print | xargs grep $CASE $FILE $STR
