:
if [ "$1" != "" ] ; then
	c=$1
else
	c="/lib /usr/lib /local/lib /usr/local/lib"
fi
n=0
a=""
for i in $c
do
	for j in $i $i/libcurses.*
	do
		if [ -f $j ] ; then
			n=`expr $n + 1`
			a="$a $j"
		fi
	done
done
if [ $n != 1 ] ; then
	echo "CURSESLIB found $n libs ($a)"
	echo "only one will do..."
	exit 1
fi
nm $a | grep '[ 	][tT][	 ]' |
sed '
/[	]__/d
s/^.*[tT][ 	][ 	]*/#define XYX/
'
