#! /bin/sh
#
# findbfunc - A script to look in sources that use bcopy/bzero/bcmp and
# ensure that they include <X11/Xfuncs.h>
#
for file in *.c
do
	if grep bzero $file > /dev/null 2>&1
	then
		if grep Xfunc $file
		then
			@:
		else
			echo "$file uses bzero but doesn't include Xfuncs.h"
		fi
	fi
	if grep bcmp $file > /dev/null 2>&1
	then
		if grep Xfunc $file
		then
			@:
		else
			echo "$file uses bcmp but doesn't include Xfuncs.h"
		fi
	fi
	if grep bcopy $file > /dev/null 2>&1
	then
		if grep Xfunc $file
		then
			@:
		else
			echo "$file uses bcopy but doesn't include Xfuncs.h"
		fi
	fi
done
