1#! /bin/sh 2# 3# do some automatic conversion of prototypes 4# 5 6if test "$1" = "" ; then 7 echo "usage: $0 list-of-files" 8 exit 1 9fi 10 11tmpfile=`mktemp -q /tmp/asd.XXXXXX` 12 13if test "$?" != "0" ; then 14 echo "$0: cannot create temporary file" 15 exit 1 16fi 17 18for file in ${1+"$@"} ; do 19 echo "working on $file" 20 cat $file | \ 21 sed -e \ 22 's/void php3_\(.*\)(INTERNAL_FUNCTION_PARAMETERS)/PHP_FUNCTION(\1)/' \ 23 -e 's/^extern void /void /' \ 24 -e 's/^extern PHP_FUNCTION/PHP_FUNCTION/' > $tmpfile 25 cp $tmpfile $file 26done 27 28rm -f $tmpfile 29 30exit 0 31