hholzgra Fri Sep 20 07:36:20 2002 EDT Modified files: /functable dslgen table.php xslgen Log: whitespace fixes
Index: functable/dslgen diff -u functable/dslgen:1.10 functable/dslgen:1.11 --- functable/dslgen:1.10 Fri Sep 20 07:31:27 2002 +++ functable/dslgen Fri Sep 20 07:36:20 2002 @@ -1,55 +1,55 @@ #!/usr/local/bin/php <? -include "config.php"; + include "config.php"; -$min3 = array(); -$max3 = array(); -$min4 = array(); -$max4 = array(); -$func = array(); -$ver = array(); - -require_once "lib/dbconnect.php"; - -$result = mysql_query("select distinct version,versionid from funclist"); -if(!$result) { echo mysql_error(); exit; } -while ($row=mysql_fetch_array($result)) { - $ver[$row["versionid"]]=str_replace("_",".",str_replace("php_","",$row["version"])); -} -mysql_free_result($result); - - -$result = mysql_query("select function,min(versionid) as min3,max(versionid) as max3 from funclist where versionid <400 group by function"); -if(!$result) { echo mysql_error(); exit; } -while ($row=mysql_fetch_array($result)) { - $func[$row["function"]] = true; - $min3[$row["function"]] = $row["min3"]; - $max3[$row["function"]] = $row["max3"]; -} -mysql_free_result($result); - -$result = mysql_query("select function,min(versionid) as min4,max(versionid) as max4 from funclist where versionid >=400 group by function"); -if(!$result) { echo mysql_error(); exit; } -while ($row=mysql_fetch_array($result)) { - $func[$row["function"]] = true; - $min4[$row["function"]] = $row["min4"]; - $max4[$row["function"]] = $row["max4"]; -} -mysql_free_result($result); - - -echo ";; DO NOT EDIT THIS FILE !!!\n"; -echo ";; as it is auto-generated from the same database\n"; -echo ";; as the functiontable at \n"; -echo ";; http://www.zugeschaut-und-mitgebaut.de/php\n"; -echo ";; you can generate it yourself by unsing the code\n"; -echo ";; to be found under the functable repository in CVS\n"; -echo ";;\n"; -echo ";; if you think this is out of date :\n"; -echo ";; mailto:[EMAIL PROTECTED]\n"; -echo ";;\n\n"; -echo "(define (index-char-val ch) + $min3 = array(); + $max3 = array(); + $min4 = array(); + $max4 = array(); + $func = array(); + $ver = array(); + + require_once "lib/dbconnect.php"; + + $result = mysql_query("select distinct version,versionid from funclist"); + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + +$ver[$row["versionid"]]=str_replace("_",".",str_replace("php_","",$row["version"])); + } + mysql_free_result($result); + + + $result = mysql_query("select function,min(versionid) as min3,max(versionid) +as max3 from funclist where versionid <400 group by function"); + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + $func[$row["function"]] = true; + $min3[$row["function"]] = $row["min3"]; + $max3[$row["function"]] = $row["max3"]; + } + mysql_free_result($result); + + $result = mysql_query("select function,min(versionid) as min4,max(versionid) +as max4 from funclist where versionid >=400 group by function"); + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + $func[$row["function"]] = true; + $min4[$row["function"]] = $row["min4"]; + $max4[$row["function"]] = $row["max4"]; + } + mysql_free_result($result); + + + echo ";; DO NOT EDIT THIS FILE !!!\n"; + echo ";; as it is auto-generated from the same database\n"; + echo ";; as the functiontable at \n"; + echo ";; http://www.zugeschaut-und-mitgebaut.de/php\n"; + echo ";; you can generate it yourself by unsing the code\n"; + echo ";; to be found under the functable repository in CVS\n"; + echo ";;\n"; + echo ";; if you think this is out of date :\n"; + echo ";; mailto:[EMAIL PROTECTED]\n"; + echo ";;\n\n"; + echo "(define (index-char-val ch) (case ch ((#\\A #\\a) 65) ((#\\B #\\b) 66) @@ -109,22 +109,22 @@ #f))) "; -echo "(define (version-info nl)\n"; -echo " (cond\n"; + echo "(define (version-info nl)\n"; + echo " (cond\n"; -echo ' ((equal-ci? (data nl) "array") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "echo") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "empty") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "eval") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "exit") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "isset") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "list") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "print") (literal "PHP 3, PHP 4 "))'; -echo ' ((equal-ci? (data nl) "unset") (literal "PHP 3, PHP 4 "))'; - -foreach($func as $key => $dummy) { - if(isset($min3[$key])) { - $min = $min3[$key]-300; + echo ' ((equal-ci? (data nl) "array") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "echo") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "empty") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "eval") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "exit") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "isset") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "list") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "print") (literal "PHP 3, PHP 4 "))'; + echo ' ((equal-ci? (data nl) "unset") (literal "PHP 3, PHP 4 "))'; + + foreach($func as $key => $dummy) { + if(isset($min3[$key])) { + $min = $min3[$key]-300; $max = $max3[$key]-300; $ver3="PHP 3"; if($min==0) { Index: functable/table.php diff -u functable/table.php:1.10 functable/table.php:1.11 --- functable/table.php:1.10 Fri Sep 20 07:31:27 2002 +++ functable/table.php Fri Sep 20 07:36:20 2002 @@ -2,87 +2,87 @@ <? # {{{ init -include "config.php"; -require_once "lib/dbconnect.php"; + include "config.php"; + require_once "lib/dbconnect.php"; -// initial values ... -$db_server="localhost"; -$db_user ="phpdoc"; -$db_passwd="phpdoc"; -$db_name ="phpdoc"; + // initial values ... + $db_server="localhost"; + $db_user ="phpdoc"; + $db_passwd="phpdoc"; + $db_name ="phpdoc"; -$outdir ="output"; + $outdir ="output"; -$color1 = "white"; -$color2 = "#EFEFEF"; + $color1 = "white"; + $color2 = "#EFEFEF"; -$imgdir = "images"; + $imgdir = "images"; -$ext = "html"; + $ext = "html"; -$ok_mark="<img border=0 SRC=\"$imgdir/vi1.gif\" height=14 width=12>"; + $ok_mark="<img border=0 SRC=\"$imgdir/vi1.gif\" height=14 width=12>"; #$ok_mark="<font color=green><b>x</b></font>"; -$fail_mark=" "; + $fail_mark=" "; -$bgcolor="$color1"; + $bgcolor="$color1"; -// ... may be overwritten by stylefile + // ... may be overwritten by stylefile -if(isset($argv[1])) { - if(file_exists("styles/$argv[1].php")) { - include "styles/$argv[1].php"; - } else { - echo "unknown style $argv[1]\n"; - exit; - } -} + if(isset($argv[1])) { + if(file_exists("styles/$argv[1].php")) { + include "styles/$argv[1].php"; + } else { + echo "unknown style $argv[1]\n"; + exit; + } + } -set_time_limit(0); -error_reporting(E_ALL - E_NOTICE); -ob_implicit_flush(); - -$urlok_cache = array(); - -function urlok($url) { - global $urlok_cache; - - return true; // for now as this doesn't work as expected (yet) - - $stat=false; - - if(isset($urlok_cache["$url"])) - return $urlok_cache["$url"]; - - $parts = parse_url($url); - if(!isset($parts["port"])) - $parts["port"]=80; - - $fp = fsockopen ($parts["host"], $parts["port"], $errno, $errstr, 30); - if($fp) { - fputs ($fp, "HEAD $parts[path] HTTP/1.0\r\n\r\n"); - $line = fgets ($fp,128); - fclose ($fp); - if(ereg("HTTP/.\.. ([1234567890]+)",$line,$match)) { - switch($match[1]) { - case "200": - case "301": - case "302": - case "304": - $stat=true; - break; - default: - break; + set_time_limit(0); + error_reporting(E_ALL - E_NOTICE); + ob_implicit_flush(); + + $urlok_cache = array(); + + function urlok($url) { + global $urlok_cache; + + return true; // for now as this doesn't work as expected (yet) + + $stat=false; + + if(isset($urlok_cache["$url"])) + return $urlok_cache["$url"]; + + $parts = parse_url($url); + if(!isset($parts["port"])) + $parts["port"]=80; + + $fp = fsockopen ($parts["host"], $parts["port"], $errno, $errstr, 30); + if($fp) { + fputs ($fp, "HEAD $parts[path] HTTP/1.0\r\n\r\n"); + $line = fgets ($fp,128); + fclose ($fp); + if(ereg("HTTP/.\.. ([1234567890]+)",$line,$match)) { + switch($match[1]) { + case "200": + case "301": + case "302": + case "304": + $stat=true; + break; + default: + break; + } } } - } - $urlok_cache["$url"] = $stat; - return $stat; -} + $urlok_cache["$url"] = $stat; + return $stat; + } @@ -90,139 +90,139 @@ # get languages, initialize translation counters -$translation = array(); -$result=mysql_query("select distinct language from quickref"); -if(!$result) { echo mysql_error(); exit;} -while($row=mysql_fetch_array($result)) { - $translation[$row["language"]]=0; -} -mysql_free_result($result); + $translation = array(); + $result=mysql_query("select distinct language from quickref"); + if(!$result) { echo mysql_error(); exit;} + while($row=mysql_fetch_array($result)) { + $translation[$row["language"]]=0; + } + mysql_free_result($result); # }}} -function ob_file($filename) { - $fp =fopen($filename,"w"); - if($fp) { - fputs($fp,ob_get_contents()); - fclose($fp); - ob_end_clean(); - ob_implicit_flush(); - } else { - ob_end_clean(); - echo "cannot open $filename\n"; - exit; + function ob_file($filename) { + $fp =fopen($filename,"w"); + if($fp) { + fputs($fp,ob_get_contents()); + fclose($fp); + ob_end_clean(); + ob_implicit_flush(); + } else { + ob_end_clean(); + echo "cannot open $filename\n"; + exit; + } } -} -function bg_toggle() { - global $color1,$color2,$bgcolor; - $bgcolor=($bgcolor=="$color1")?"$color2":"$color1"; -} + function bg_toggle() { + global $color1,$color2,$bgcolor; + $bgcolor=($bgcolor=="$color1")?"$color2":"$color1"; + } # {{{ functions creating external links -function sourceref($filename,$short=false) { - if(empty($filename)) return " "; + function sourceref($filename,$short=false) { + if(empty($filename)) return " "; - $filename=str_replace("php4/Zend","Zend",$filename); + $filename=str_replace("php4/Zend","Zend",$filename); - $filename=trim($filename); - $fbase=substr($filename,0,4); - if($short!=false) { - $showname=substr($filename,5); - } else { - $showname=$filename; - } - $showname=ereg_replace("#.*","",$showname); - list($filename,$lineno)=explode("#",$filename); - switch($fbase) { - case "php3": - return "<a href=\"http://bonsai.php.net/cvsblame.cgi?file=$filename&rev=&root=/local/repository#$lineno\">$showname</a>"; - case "php4": - case "Zend": - return "<a href=\"http://lxr.php.net/source/$filename#$lineno\">$showname</a>"; - default: - return $filename; + $filename=trim($filename); + $fbase=substr($filename,0,4); + if($short!=false) { + $showname=substr($filename,5); + } else { + $showname=$filename; + } + $showname=ereg_replace("#.*","",$showname); + list($filename,$lineno)=explode("#",$filename); + switch($fbase) { + case "php3": + return "<a +href=\"http://bonsai.php.net/cvsblame.cgi?file=$filename&rev=&root=/local/repository#$lineno\">$showname</a>"; + case "php4": + case "Zend": + return "<a +href=\"http://lxr.php.net/source/$filename#$lineno\">$showname</a>"; + default: + return $filename; + } } -} -function fpage($function) { - global $entry,$ext,$ol,$proto3,$proto4; - $function = strtolower(trim($function)); - if(isset($entry[$function])) { - if(isset($proto4[$function])) - $tmp = explode("<br>",$proto4[$function]); - else if(isset($proto3[$function])) - $tmp = explode("<br>",$proto3[$function]); + function fpage($function) { + global $entry,$ext,$ol,$proto3,$proto4; + $function = strtolower(trim($function)); + if(isset($entry[$function])) { + if(isset($proto4[$function])) + $tmp = explode("<br>",$proto4[$function]); + else if(isset($proto3[$function])) + $tmp = explode("<br>",$proto3[$function]); - return "<a href=\"function.$function.$ext\">$function</a>"; - } else { - return $function; + return "<a href=\"function.$function.$ext\">$function</a>"; + } else { + return $function; + } } -} -function docref($function,$language=false) { - global $docfile,$imgdir,$ol,$quickref; // $ext + function docref($function,$language=false) { + global $docfile,$imgdir,$ol,$quickref; // $ext - $ext="php"; + $ext="php"; - $function = strtolower(trim($function)); - $docname=str_replace("_","-",$function); + $function = strtolower(trim($function)); + $docname=str_replace("_","-",$function); - if(!isset($docfile[$function])) return false; + if(!isset($docfile[$function])) return false; - if(function_exists("custom_manual")) { - $url=custom_manual($docname,$language); - } + if(function_exists("custom_manual")) { + $url=custom_manual($docname,$language); + } - if(!isset($url)||empty($url)) { - switch($language) { - case "de": - case "german": - $url = "http://www.dynamic-webpages.de/php/function.$docname.php"; - break; - case "en": - case "yes": - case false: - //$url="../phpdoc/html/function.$docname.html"; - $url="http://php.net/manual/function.$docname.php"; - break; - default: - $url = "http://php.net/manual/$language/html/function.$docname.html"; - break; - } - } + if(!isset($url)||empty($url)) { + switch($language) { + case "de": + case "german": + $url = +"http://www.dynamic-webpages.de/php/function.$docname.php"; + break; + case "en": + case "yes": + case false: + //$url="../phpdoc/html/function.$docname.html"; + $url="http://php.net/manual/function.$docname.php"; + break; + default: + $url = +"http://php.net/manual/$language/html/function.$docname.html"; + break; + } + } - $alt = (($language=="yes")||empty($language))?"en":$language; + $alt = (($language=="yes")||empty($language))?"en":$language; - switch($language) - { - case false: $docstr="documented"; break; - case "yes": case "en": $docstr="<img src=\"$imgdir/flag_us_UK.gif\" alt=\"$alt\" border=0>"; break; - default: $docstr="<img src=\"$imgdir/flag_$language.gif\" alt=\"$alt\" border=0>"; break; - } + switch($language) + { + case false: $docstr="documented"; break; + case "yes": case "en": $docstr="<img +src=\"$imgdir/flag_us_UK.gif\" alt=\"$alt\" border=0>"; break; + default: $docstr="<img src=\"$imgdir/flag_$language.gif\" +alt=\"$alt\" border=0>"; break; + } - if(urlok($url)) - return " <a href=\"$url\" " - ." >$docstr</a>\n"; - else if($ext!="html") - return " <a href=\"nodoc-online.$ext?function=$function&url=".urlencode($url)."\">$docstr</a>\n"; - else - return " $docstr\n"; -} + if(urlok($url)) + return " <a href=\"$url\" " + ." >$docstr</a>\n"; + else if($ext!="html") + return " <a +href=\"nodoc-online.$ext?function=$function&url=".urlencode($url)."\">$docstr</a>\n"; + else + return " $docstr\n"; + } -function author_ref($author) { - return $author; -} + function author_ref($author) { + return $author; + } # }}} # {{{ functions for page setup -function head($version=false,$letter=' ',$tpath="",$ttitle="",$versionid=false) + function head($version=false,$letter=' ',$tpath="",$ttitle="",$versionid=false) { global $extensions,$color1,$color2,$imgdir,$ext,$translation,$bgcolor,$ol; @@ -240,26 +240,26 @@ if(function_exists("custom_head")) { custom_head($ttitle,$tpath); } else { -?> - <html> - <head> - <title><? echo strip_tags($ttitle) ?></title> - </head> - <body bgcolor="<?= $color1?>"> + ?> + <html> + <head> + <title><? echo strip_tags($ttitle) ?></title> + </head> + <body bgcolor="<?= $color1?>"> <h1>PHP Function Table / Implementation & Documentation</h1> - <p> - <a href="about.<?= $ext ?>">about</a> - - - <a href="extensions.<?= $ext ?>">PHP 4 extensions</a> - - - <a href="_.<?= $ext ?>">alphabetical PHP 4</a> - - - <a href="_.3.<?= $ext ?>">alphabetical PHP 3</a> - - - <a href="statistics.<?= $ext ?>">statistics</a> - </p> -<?php - if(!empty($ttitle)) echo "<h2>$ttitle</h2><p> </p>\n"; + + + <p> + + + <a href="about.<?= $ext ?>">about</a> + + + - + + + <a href="extensions.<?= $ext ?>">PHP 4 +extensions</a> + + + - + + + <a href="_.<?= $ext ?>">alphabetical PHP 4</a> + + + - + + + <a href="_.3.<?= $ext ?>">alphabetical PHP 3</a> + + + - + + + <a href="statistics.<?= $ext ?>">statistics</a> + + + </p> + + + + + <?php + + + if(!empty($ttitle)) echo +"<h2>$ttitle</h2><p> </p>\n"; } @@ -339,22 +339,22 @@ } -function foot($filename) { - if(function_exists("custom_foot")) { - custom_foot(); - } else { -?> - <br clear=all> + function foot($filename) { + if(function_exists("custom_foot")) { + custom_foot(); + } else { + ?> + <br clear=all> <hr> © 2000 <a href="mailto:[EMAIL PROTECTED]">Hartmut Holzgraefe</a> - - - last update: <?php echo date("l dS of F Y"); ?> - </body> - </html> -<?php + + - + last update: <?php echo date("l dS of +F Y"); ?> + </body> + </html> + <?php + } + ob_file($filename); } - ob_file($filename); -} # }}} @@ -362,107 +362,107 @@ # {{{ collecting data from DB -echo "getting version ids\n"; -$query="SELECT DISTINCT + echo "getting version ids\n"; + $query="SELECT DISTINCT versionid , version FROM funclist ORDER BY versionid "; -$result = mysql_query($query); -if(!$result) { echo mysql_error(); } -while($row=mysql_fetch_array($result)) { - $version[$row["versionid"]] = $row["version"]; - if($row["versionid"]<400) - $version3[$row["versionid"]] = $row["version"]; - else - $version4[$row["versionid"]] = $row["version"]; -} -mysql_free_result($result); + $result = mysql_query($query); + if(!$result) { echo mysql_error(); } + while($row=mysql_fetch_array($result)) { + $version[$row["versionid"]] = $row["version"]; + if($row["versionid"]<400) + $version3[$row["versionid"]] = $row["version"]; + else + $version4[$row["versionid"]] = $row["version"]; + } + mysql_free_result($result); -echo "getting function versions\n"; -$result = mysql_query("select function,version,versionid from funclist order by function,versionid"); -if(!$result) { echo mysql_error(); } -while($row=mysql_fetch_array($result)) { - $entry[strtolower(trim($row["function"]))][$row["version"]]=true; -} -mysql_free_result($result); + echo "getting function versions\n"; + $result = mysql_query("select function,version,versionid from funclist order +by function,versionid"); + if(!$result) { echo mysql_error(); } + while($row=mysql_fetch_array($result)) { + $entry[strtolower(trim($row["function"]))][$row["version"]]=true; + } + mysql_free_result($result); -echo "getting implementation files for PHP 3\n"; -$result = mysql_query("select function,filename,lineno from funclist where versionid=399"); -if(!$result) { echo mysql_error(); } -while($row=mysql_fetch_array($result)) { - $file3[strtolower(trim($row["function"]))]=str_replace("php_3_cvs","php3","$row[filename]#$row[lineno]"); -} -mysql_free_result($result); + echo "getting implementation files for PHP 3\n"; + $result = mysql_query("select function,filename,lineno from funclist where +versionid=399"); + if(!$result) { echo mysql_error(); } + while($row=mysql_fetch_array($result)) { + +$file3[strtolower(trim($row["function"]))]=str_replace("php_3_cvs","php3","$row[filename]#$row[lineno]"); + } + mysql_free_result($result); -echo "getting implementation files for php 4\n"; -$result = mysql_query("select function,filename,lineno from funclist where versionid=499"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) { - $function = strtolower(trim($row["function"])); - $filename = str_replace("php_4_cvs","php4",$row["filename"]); - $file4[$function]="$filename#$row[lineno]"; -} -mysql_free_result($result); + echo "getting implementation files for php 4\n"; + $result = mysql_query("select function,filename,lineno from funclist where +versionid=499"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { + $function = strtolower(trim($row["function"])); + $filename = str_replace("php_4_cvs","php4",$row["filename"]); + $file4[$function]="$filename#$row[lineno]"; + } + mysql_free_result($result); -$result = mysql_query("select function,file,lineno from funcimp where versionid=499"); -while($row=mysql_fetch_array($result)) + $result = mysql_query("select function,file,lineno from funcimp where +versionid=499"); + while($row=mysql_fetch_array($result)) { $imp4[strtolower(trim($row["function"]))]=str_replace("php_4_cvs","php4","$row[file]#$row[lineno]"); } -mysql_free_result($result); + mysql_free_result($result); -echo "getting function docfiles\n"; -$result = mysql_query("select function,docfile,lineno from docfile where docfile is not null"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) + echo "getting function docfiles\n"; + $result = mysql_query("select function,docfile,lineno from docfile where +docfile is not null"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { if(""!=trim($row["docfile"])) { $docfile[strtolower(trim($row["function"]))]="$row[docfile]#$row[lineno]"; } } -mysql_free_result($result); + mysql_free_result($result); -$result = mysql_query("select distinct function,proto,proto_desc from proto3"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) { - $proto3[strtolower(trim($row["function"]))]= - "<b>".htmlentities(trim($row["proto"]))."</b><br>".htmlentities(trim($row["proto_desc"])); -} -mysql_free_result($result); + $result = mysql_query("select distinct function,proto,proto_desc from proto3"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { + $proto3[strtolower(trim($row["function"]))]= + +"<b>".htmlentities(trim($row["proto"]))."</b><br>".htmlentities(trim($row["proto_desc"])); + + } + mysql_free_result($result); -$result = mysql_query("select distinct function,proto,proto_desc from proto4"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) { - $proto4[strtolower(trim($row["function"]))]= - "<b>".htmlentities(trim($row["proto"]))."</b><br>".htmlentities(trim($row["proto_desc"])); -} -mysql_free_result($result); + $result = mysql_query("select distinct function,proto,proto_desc from proto4"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { + $proto4[strtolower(trim($row["function"]))]= + +"<b>".htmlentities(trim($row["proto"]))."</b><br>".htmlentities(trim($row["proto_desc"])); + + } + mysql_free_result($result); -echo "getting function quickrefs\n"; -$result = mysql_query("select function,language,descr from quickref"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) + echo "getting function quickrefs\n"; + $result = mysql_query("select function,language,descr from quickref"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { $quickref[$row["language"]][strtolower(trim($row["function"]))]=$row["descr"]; } -mysql_free_result($result); + mysql_free_result($result); -echo "getting function authors\n"; -$result = mysql_query("select function,author from author"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) + echo "getting function authors\n"; + $result = mysql_query("select function,author from author"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { $author[$row['function']] = $row['author']; } -mysql_free_result($result); + mysql_free_result($result); -echo "checking for translations\n"; -reset($translation); -while(list($language,)=each($translation)) { - echo "... $language\n"; - $result = mysql_query("SELECT q1.function AS function + echo "checking for translations\n"; + reset($translation); + while(list($language,)=each($translation)) { + echo "... $language\n"; + $result = mysql_query("SELECT q1.function AS function FROM quickref q1 , quickref q2 WHERE q1.function = q2.function @@ -471,86 +471,86 @@ AND q1.descr <> q2.descr ORDER BY q1.function "); - if(!$result) { echo mysql_error(); exit; } - while($row=mysql_fetch_array($result)) - { - $doc[$language][strtolower(trim($row["function"]))]=true; - $translation[$language]++; - } - mysql_free_result($result); -} -arsort($translation,SORT_NUMERIC); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) + { + +$doc[$language][strtolower(trim($row["function"]))]=true; + $translation[$language]++; + } + mysql_free_result($result); + } + arsort($translation,SORT_NUMERIC); -echo "getting alias entries\n"; -$result = mysql_query("select distinct function,alias_for from funclist where alias_for is not null"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) { - $alias[strtolower(trim($row["function"]))]=strtolower(trim($row["alias_for"])); -} -mysql_free_result($result); + echo "getting alias entries\n"; + $result = mysql_query("select distinct function,alias_for from funclist where +alias_for is not null"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { + +$alias[strtolower(trim($row["function"]))]=strtolower(trim($row["alias_for"])); + } + mysql_free_result($result); -echo "getting alias entries\n"; -$result = mysql_query("select distinct function,alias_for from funclist where alias_for is not null"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) { - $alias[strtolower(trim($row["function"]))]=strtolower(trim($row["alias_for"])); -} -mysql_free_result($result); + echo "getting alias entries\n"; + $result = mysql_query("select distinct function,alias_for from funclist where +alias_for is not null"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { + +$alias[strtolower(trim($row["function"]))]=strtolower(trim($row["alias_for"])); + } + mysql_free_result($result); -echo "getting extension extension names\n"; -$result = mysql_query("select distinct substring_index(substring_index(filename,'/',-2),'/',1) as extension,substring_index(filename,'/',3) as dirname from funclist where versionid=499 order by extension"); -if(!$result) { echo mysql_error(); exit; } -while($row=mysql_fetch_array($result)) { - if(trim($row["extension"])!="Zend") - $extensions[strtolower(trim($row["extension"]))]=strtolower(trim($row["dirname"])); -} -$extensions["Zend"]="php4/Zend"; -mysql_free_result($result); + echo "getting extension extension names\n"; + $result = mysql_query("select distinct +substring_index(substring_index(filename,'/',-2),'/',1) as +extension,substring_index(filename,'/',3) as dirname from funclist where +versionid=499 order by extension"); + if(!$result) { echo mysql_error(); exit; } + while($row=mysql_fetch_array($result)) { + if(trim($row["extension"])!="Zend") + +$extensions[strtolower(trim($row["extension"]))]=strtolower(trim($row["dirname"])); + } + $extensions["Zend"]="php4/Zend"; + mysql_free_result($result); # }}} -include "lib/alphabetic_3.php"; -include "lib/alphabetic_4.php"; + include "lib/alphabetic_3.php"; + include "lib/alphabetic_4.php"; -include "lib/extension_overview.php"; -include "lib/extensions_4.php"; + include "lib/extension_overview.php"; + include "lib/extensions_4.php"; -include "lib/function_details.php"; + include "lib/function_details.php"; -include "lib/statistics/undocumented_functions.php"; -include "lib/statistics/undocumented_aliases.php"; -include "lib/statistics/no_prototype.php"; + include "lib/statistics/undocumented_functions.php"; + include "lib/statistics/undocumented_aliases.php"; + include "lib/statistics/no_prototype.php"; #include "lib/statistics/not_published.php"; -include "lib/statistics/in_php_3_only.php"; -include "lib/statistics/in_php_4_only.php"; -include "lib/statistics/aliases.php"; -include "lib/statistics/busy_coders.php"; + include "lib/statistics/in_php_3_only.php"; + include "lib/statistics/in_php_4_only.php"; + include "lib/statistics/aliases.php"; + include "lib/statistics/busy_coders.php"; -include "lib/statistics/statistics.php"; + include "lib/statistics/statistics.php"; -echo "index\n"; -if(function_exists("custom_index")) { - ob_start(); - custom_index(); - ob_file("$outdir/index.$ext"); -} else { - copy("$outdir/about.$ext","$outdir/index.$ext"); -} + echo "index\n"; + if(function_exists("custom_index")) { + ob_start(); + custom_index(); + ob_file("$outdir/index.$ext"); + } else { + copy("$outdir/about.$ext","$outdir/index.$ext"); + } -echo "nodoc-info\n"; -ob_start(); + echo "nodoc-info\n"; + ob_start(); ?> <html> <head> @@ -569,21 +569,9 @@ </body> </html> <? -ob_file("$outdir/nodoc-online.php"); - - - - - - - - -include "lib/about.php"; - - - - -mysql_close($db); + ob_file("$outdir/nodoc-online.php"); + include "lib/about.php"; + mysql_close($db); ?> Index: functable/xslgen diff -u functable/xslgen:1.7 functable/xslgen:1.8 --- functable/xslgen:1.7 Fri Sep 20 07:31:27 2002 +++ functable/xslgen Fri Sep 20 07:36:20 2002 @@ -1,59 +1,59 @@ #!/usr/local/bin/php -q <? -include "config.php"; + include "config.php"; -$min3 = array(); -$max3 = array(); -$min4 = array(); -$max4 = array(); -$func = array(); -$ver = array(); - -require_once "lib/dbconnect.php"; - -$result = mysql_query("select distinct version,versionid from funclist"); -if(!$result) { echo mysql_error(); exit; } -while ($row=mysql_fetch_array($result)) { - $ver[$row["versionid"]]=str_replace("_",".",str_replace("php_","",$row["version"])); -} -mysql_free_result($result); + $min3 = array(); + $max3 = array(); + $min4 = array(); + $max4 = array(); + $func = array(); + $ver = array(); + + require_once "lib/dbconnect.php"; + + $result = mysql_query("select distinct version,versionid from funclist"); + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + +$ver[$row["versionid"]]=str_replace("_",".",str_replace("php_","",$row["version"])); + } + mysql_free_result($result); -$result = mysql_query("select function,min(versionid) as min3,max(versionid) + $result = mysql_query("select function,min(versionid) as min3,max(versionid) as max3 from funclist where versionid <400 group by function"); -if(!$result) { echo mysql_error(); exit; } -while ($row=mysql_fetch_array($result)) { - $func[$row["function"]] = true; - $min3[$row["function"]] = $row["min3"]; - $max3[$row["function"]] = $row["max3"]; -} -mysql_free_result($result); + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + $func[$row["function"]] = true; + $min3[$row["function"]] = $row["min3"]; + $max3[$row["function"]] = $row["max3"]; + } + mysql_free_result($result); -$result = mysql_query("select function,min(versionid) as min4,max(versionid) + $result = mysql_query("select function,min(versionid) as min4,max(versionid) as max4 from funclist where versionid >=400 group by function"); -if(!$result) { echo mysql_error(); exit; } -while ($row=mysql_fetch_array($result)) { - $func[$row["function"]] = true; - $min4[$row["function"]] = $row["min4"]; - $max4[$row["function"]] = $row["max4"]; -} -mysql_free_result($result); - -echo "<?xml version='1.0' encoding='iso-8859-1'?>"; -echo "<!-- DO NOT EDIT THIS FILE !!!\n"; -echo ";; as it is auto-generated from the same database\n"; -echo ";; as the functiontable at \n"; -echo ";; http://www.zugeschaut-und-mitgebaut.de/php\n"; -echo ";; you can generate it yourself by unsing the code\n"; -echo ";; to be found under the functable repository in CVS\n"; -echo ";;\n"; -echo ";; if you think this is out of date :\n"; -echo ";; mailto:[EMAIL PROTECTED]\n"; -echo ";; -->\n\n"; + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + $func[$row["function"]] = true; + $min4[$row["function"]] = $row["min4"]; + $max4[$row["function"]] = $row["max4"]; + } + mysql_free_result($result); + + echo "<?xml version='1.0' encoding='iso-8859-1'?>"; + echo "<!-- DO NOT EDIT THIS FILE !!!\n"; + echo ";; as it is auto-generated from the same database\n"; + echo ";; as the functiontable at \n"; + echo ";; http://www.zugeschaut-und-mitgebaut.de/php\n"; + echo ";; you can generate it yourself by unsing the code\n"; + echo ";; to be found under the functable repository in CVS\n"; + echo ";;\n"; + echo ";; if you think this is out of date :\n"; + echo ";; mailto:[EMAIL PROTECTED]\n"; + echo ";; -->\n\n"; -echo "<versions>\n"; + echo "<versions>\n"; -echo " + echo " <function name='array' from='PHP 3, PHP 4 '/> <function name='echo' from='PHP 3, PHP 4 '/> <function name='empty' from='PHP 3, PHP 4 '/> @@ -65,50 +65,50 @@ <function name='unset' from='PHP 3, PHP 4 '/> "; -foreach($func as $key => $dummy) { - if(isset($min3[$key])) { - $min = $min3[$key]-300; - $max = $max3[$key]-300; - $ver3="PHP 3"; - if($min==0) { - if($max==99) { ; } - else { $ver3.=" <= ".$ver[$max+300];} - } else if($min==99){ - $ver3.=" CVS only"; - } else { - if($max==99) { $ver3.=">= ".$ver[$min+300]; } - else if ($min==$max) {$ver3.=$ver[$min+300]." only";} - else { $ver3=$ver[$min+300]." - ".$ver[$max+300]." + foreach($func as $key => $dummy) { + if(isset($min3[$key])) { + $min = $min3[$key]-300; + $max = $max3[$key]-300; + $ver3="PHP 3"; + if($min==0) { + if($max==99) { ; } + else { $ver3.=" <= ".$ver[$max+300];} + } else if($min==99){ + $ver3.=" CVS only"; + } else { + if($max==99) { $ver3.=">= ".$ver[$min+300]; } + else if ($min==$max) {$ver3.=$ver[$min+300]." only";} + else { $ver3=$ver[$min+300]." - ".$ver[$max+300]." only";} - } - } else { - $ver3 = ""; - } - if(isset($min4[$key])) { - $min = $min4[$key]-400; - $max = $max4[$key]-400; - $ver4="PHP 4 "; - if($min==0) { - if($max==99) { ; } - else { $ver4.=" <= ".$ver[$max+400];} - } else if($min==99){ - $ver4.=" CVS only"; - } else { - if($max==99) { $ver4.=">= ".$ver[$min+400]; } - else if ($min==$max) {$ver4.=$ver[$min+400]." only";} - else { $ver4=$ver[$min+400]." - ".$ver[$max+400]." only";} - } - } else { - $ver4 = ""; - } - - if(empty($ver3)||empty($ver4)) { - $ver34 = "$ver3$ver4"; - } else { - $ver34 = "$ver3, $ver4"; - } - - echo " <function name=\"$key\" from=\"".HTMLSpecialChars($ver34)."\"/>\n"; -} -echo "</versions>\n"; + } + } else { + $ver3 = ""; + } + if(isset($min4[$key])) { + $min = $min4[$key]-400; + $max = $max4[$key]-400; + $ver4="PHP 4 "; + if($min==0) { + if($max==99) { ; } + else { $ver4.=" <= ".$ver[$max+400];} + } else if($min==99){ + $ver4.=" CVS only"; + } else { + if($max==99) { $ver4.=">= ".$ver[$min+400]; } + else if ($min==$max) {$ver4.=$ver[$min+400]." only";} + else { $ver4=$ver[$min+400]." - ".$ver[$max+400]." +only";} + } + } else { + $ver4 = ""; + } + + if(empty($ver3)||empty($ver4)) { + $ver34 = "$ver3$ver4"; + } else { + $ver34 = "$ver3, $ver4"; + } + + echo " <function name=\"$key\" +from=\"".HTMLSpecialChars($ver34)."\"/>\n"; + } + echo "</versions>\n"; ?>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php