#!/bin/sh
#run this in the php tarball topdir

cat /dev/null > $HOME/.bluefish/php4_functions

egrep -r '/\* {{{ proto' * | while read LINE ; do
#	DIR=`echo $LINE | cut -f1 -d:`
	GROUP=`echo $LINE | cut -f1 -d: | cut -f -1 -d. | cut -f3 -d/`
	if [ -z "$GROUP" ] ; then
		GROUP=`echo $LINE | cut -f1 -d: | cut -f -1 -d. | cut -f2 -d/`
	fi
	FFCHAR=`echo $GROUP|cut -c0-4`
#	echo $FFCHAR
	if [ "$FFCHAR" = "php_" ] ; then
		GROUP=`echo $GROUP|cut -c5-`
	fi
	PROTO=`echo $LINE | cut -f2 -d: | cut -c14-`
#	echo "$GROUP:$PROTO" >> $HOME/.bluefish/php4_functions
	echo "$GROUP:$PROTO"
done
