#! /bin/sh
#
#	This script lists the functions found within the specified file.
#	The output of this script is then parsed to determine the type of
#	obscure variables.
#
#	usage:
#		binding_header filenam
#	input <...>:
#		UIB_EXTERN	OI_connection	*OI_uib_conn ;	/* connection to X server */
#		UIB_EXTERN	OI_app_window	*FOO UIB_INITIALIZE ;	/* ptr to prototyper generated object */
#		UIB_EXTERN	MyClass		*fluff UIB_INITIALIZE ;	/* ptr to prototyper generated object */
#	output <...>:
#		OI_app_window*	FOO
#		MyClass*	fluff
#
sed -n -e '/UIB_EXTERN/p' $1 | sed -n -e '/UIB_INITIALIZE/p' | sed -e '

#
# nuke irrelevant information
#
s/UIB_EXTERN//
s/UIB_INITIALIZE.*$//
s/\*//g
s/[ 	][ 	]*/ /g
s/^ //
s/ $//
'
