Return to conv_proto CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / scripts / dev |
1.1 ! misho 1: #! /bin/sh ! 2: # ! 3: # do some automatic conversion of prototypes ! 4: # ! 5: ! 6: if test "$1" = "" ; then ! 7: echo "usage: $0 list-of-files" ! 8: exit 1 ! 9: fi ! 10: ! 11: tmpfile=`mktemp -q /tmp/asd.XXXXXX` ! 12: ! 13: if test "$?" != "0" ; then ! 14: echo "$0: cannot create temporary file" ! 15: exit 1 ! 16: fi ! 17: ! 18: for 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 ! 26: done ! 27: ! 28: rm -f $tmpfile ! 29: ! 30: exit 0