You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
532 B

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