[PHP4BETA] CVS update: php4

From: Date: Sat, 08 May 1999 21:44:13 +0000
Subject: [PHP4BETA] CVS update: php4
Groups: php.version4 
Request: Send a blank email to php-version4+get-696@lists.php.net to get a copy of this message
Date: Saturday May 8, 1999 @ 17:44 Author: sas Update of /repository/php4 In directory php:/tmp/cvs-serv1365 Modified Files: genif.sh Log Message: this is faster than parsing the file line by line Index: php4/genif.sh diff -u php4/genif.sh:1.2 php4/genif.sh:1.3 --- php4/genif.sh:1.2 Sat May 8 14:16:29 1999 +++ php4/genif.sh Sat May 8 17:44:12 1999 @@ -1,6 +1,6 @@ #! /bin/sh -# $Id: genif.sh,v 1.2 1999/05/08 18:16:29 andrey Exp $ +# $Id: genif.sh,v 1.3 1999/05/08 21:44:12 sas Exp $ # replacement for genif.pl infile="$1" @@ -13,24 +13,24 @@ exit 1 fi -cmd1='echo $data | grep @EXT_INCLUDE_CODE@ > /dev/null 2>&1' -cmd2='echo $data | grep @EXT_MODULE_PTRS@ > /dev/null 2>&1' +module_ptrs="" +includes="" -while read data; do - if eval $cmd1 ; then - for ext in $* ; do - for pre in php3 php php4 zend; do - hdrfile="ext/$ext/${pre}_${ext}.h" - if test -f $hdrfile ; then - echo "#include \"$hdrfile\"" - fi - done - done - elif eval $cmd2 ; then - for ext in $* ; do - echo " phpext_${ext}_ptr," - done - else - echo "$data" - fi -done < $infile +# the 'ä' is used as a newline replacement +# its later tr'd to '\n' + +for ext in $* ; do + module_ptrs=" phpext_${ext}_ptr,ä$module_ptrs" + for pre in php3 php php4 zend; do + hdrfile="ext/$ext/${pre}_${ext}.h" + if test -f $hdrfile ; then + includes="#include \"$hdrfile\"ä$includes" + fi + done +done + +cat $infile | \ + sed "s'@EXT_INCLUDE_CODE@'$includes'" | \ + sed "s'@EXT_MODULE_PTRS@'$module_ptrs'" | \ + tr ä '\n' + -- PHP 4 Beta

« previous php.version4 (#696) next »