cvs: functable / genfunclist table.php update.all

From: Date: Wed, 11 Oct 2000 12:42:06 +0000
Subject: cvs: functable / genfunclist table.php update.all
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1984@lists.php.net to get a copy of this message
hholzgra Wed Oct 11 05:42:06 2000 EDT Modified files: /functable genfunclist table.php update.all Log: some cleanups and a parse error removed Index: functable/genfunclist diff -u functable/genfunclist:1.1.1.1 functable/genfunclist:1.2 --- functable/genfunclist:1.1.1.1 Tue Oct 10 10:34:32 2000 +++ functable/genfunclist Wed Oct 11 05:42:06 2000 @@ -23,22 +23,24 @@ mysql -uphpdoc -pphpdoc -e "delete from funclist where version='$version'" phpdoc mysql -uphpdoc -pphpdoc -e "delete from funcimp where version='$version'" phpdoc + cd sources rm -f tmp.txt ; touch tmp.txt - for file in find sources/$version -name "*.[c]" -print -o -name "*.ec" -print | xargs egrep -li function_entry| sed -e"s/\.\///g" + for file in find $version -name "*.[c]" -print -o -name "*.ec" -print | xargs egrep -li function_entry| sed -e"s/\.\///g" do - file2=echo $file | sed -e"s|^sources/php_3[^/]*|php3|g" | sed -e"s|^sources/php_4[^/]*|php4|g" - awk -f funcparse.awk < $file | sed -e"s/^ *//g" | sed -e"s|$|,'$file2');|g" >> tmp.txt + file2=echo $file | sed -e"s|^php_3[^/]*|php3|g" | sed -e"s|^php_4[^/]*|php4|g" + awk -f ../funcparse.awk < $file | sed -e"s/^ *//g" | sed -e"s|$|,'$file2');|g" >> tmp.txt done - sort < tmp.txt | sed -e's/ *//g' | grep -v 'NULL}' | uniq > sources/$version.txt + sort < tmp.txt | sed -e's/ *//g' | grep -v 'NULL}' | uniq > $version.txt - sed -e"s/^/INSERT INTO funclist (version,function,ftype,alias_for,lineno,filename) VALUES('$version',/g" < sources/$version.txt | mysql -uphpdoc -pphpdoc phpdoc + sed -e"s/^/INSERT INTO funclist (version,function,ftype,alias_for,lineno,filename) VALUES('$version',/g" < $version.txt | mysql -uphpdoc -pphpdoc phpdoc - for file in find sources/$version -name "*.[c]" -print -o -name "*.ec" -print | sed -e"s/\.\///g" | grep -v php_3 + for file in find $version -name "*.[c]" -print -o -name "*.ec" -print | sed -e"s/\.\///g" | grep -v php_3 do - awk -f funcimp.awk < $file | sed -e "s|-v-|$version|g" | sed -e "s|-f-|$file|g" | mysql -uphpdoc -pphpdoc phpdoc + awk -f ../funcimp.awk < $file | sed -e "s|-v-|$version|g" | sed -e "s|-f-|$file|g" | mysql -uphpdoc -pphpdoc phpdoc done - + cd .. + echo "done" done Index: functable/table.php diff -u functable/table.php:1.1.1.1 functable/table.php:1.2 --- functable/table.php:1.1.1.1 Tue Oct 10 10:34:33 2000 +++ functable/table.php Wed Oct 11 05:42:06 2000 @@ -746,7 +746,7 @@ } if(isset($quickref['en'][$function])) { - print("$quickref[en][$function]\n"); + print("{$quickref[en][$function]}\n"); } print( "<table width=\"100%\">"); // linke spalte @@ -975,13 +975,14 @@ head(false,false,"Statistics","Functions implemented but not made available"); print( "<table><tr bgcolor=\"$bgcolor\"><th>function</th><th>file</th></tr>\n"); -$result=mysql_query("select i.function as function" +$result=mysql_query("select i.function as function, i.file as file " ." from funcimp i left outer join funclist f on f.function=i.function and f.versionid = i.versionid " - ." where i.versionid = 499 and f.versionid is null;"); + ." where i.versionid = 499 and f.versionid is null" + ." order by file,function"); $count['notpub']=mysql_num_rows($result); while($row=mysql_fetch_array($result)) { bg_toggle(); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["function"])."</td><td>".sourceref($imp4[$row["function"]])."</td></tr>\n"); + print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["function"])."</td><td>".sourceref($row["file"])."</td></tr>\n"); } mysql_free_result($result); print( "</table>\n"); Index: functable/update.all diff -u functable/update.all:1.1.1.1 functable/update.all:1.2 --- functable/update.all:1.1.1.1 Tue Oct 10 10:34:33 2000 +++ functable/update.all Wed Oct 11 05:42:06 2000 @@ -1,25 +1,26 @@ #!/bin/bash - + # test for net connection if ping -c 1 -nq cvs.php.net >/dev/null 2>/dev/null then - HAVE_CVS=1 + HAVE_CVS=1 else - HAVE_CVS=0 + HAVE_CVS=0 fi -if [ $HAVE_CVS = 1 ] +if [ ! -d sources ] then - if [ ! -d sources ] - then - mkdir sources - fi - - cd sources + mkdir sources +fi + +cd sources +if [ $HAVE_CVS = 1 ] +then + echo getting previous releases - + # getting php3 releases for release in xargs echo < ../version3.tags do @@ -31,7 +32,7 @@ echo $release already there fi done - + # getting php3 latest developement snapshot echo updating php3 cvs if [ -d php_3_cvs ] @@ -40,7 +41,7 @@ else cvs -d ":pserver:cvsread@cvs.php.net:/repository" get -d php_3_cvs php3 fi - + # getting php4 releases for release in xargs echo < ../version4.tags do @@ -53,7 +54,7 @@ echo $release already there fi done - + # getting php4 latest developement snapshot echo updating php4 cvs if [ -d php_4_cvs ] @@ -64,30 +65,30 @@ cvs -d ":pserver:cvsread@cvs.php.net:/repository" get -d php_4_cvs php4 ( cd php_4_cvs ; cvs -d ":pserver:cvsread@cvs.zend.com:/repository" get Zend ) fi - + # getting current manual snapshot echo updating phpdoc cvs - if [ -d phpdoc ] + if [ -d phpdoc ] then - (cd phpdoc; rm -f version.dsl ; cvs update) + (cd phpdoc; rm -f version.dsl ; cvs update ) else cvs -d ":pserver:cvsread@cvs.php.net:/repository" get phpdoc ( cd phpdoc; autoconf; ./configure --with-lang=en --with-source=../php_4_cvs ) fi - - cd .. - + else echo "no network connection available or cvs.php.net currently down" echo "will be working with data from previous runs if available" fi +cd .. + # parsing step #1 : functions from c source echo genfunclist -./genfunclist +./genfunclist @@ -131,23 +132,6 @@ # generate version info file ./dslgen > sources/phpdoc/version.dsl - -# check in new version info file -# if cvs connection is available and file content has changed -if [ $HAVE_CVS = 1 ] -then - cd sources/phpdoc - lines=cvs diff version.dsl 2>/dev/null | wc --lines - if [ \( $lines -gt 0 \) -a \( $lines -lt 100 \) ] - then - cvs ci -m 'automatic update' version.dsl - else - if [ hostname = "hartmut" ] - then - echo "version dsl diff has $lines lines " | mail hartmut -s "function table problem" - fi - cd ../.. -fi # prepare distribution package

« previous php.cvs (#1984) next »