#!/bin/sh

# what api's are directly implemented?
#
# make list of all functions in lib*.so
# list all api's from xxx.d files
# grep for each api from the lib*.so files

suffix=$$

echo "making list of api's"
nm win/lib*.so |while read a p n
do 
	if [ "$p" = "T" ]
	then
		echo $n
	fi
done |fgrep -v "^TWIN_
^lsd
IT32_
mfs_
IT_" >api.$suffix

echo "matching api's"

grep "^stub" bin32/*.d |while read f api line
do 
	grep -w $api api.$suffix
done

