maxim Tue Feb 4 21:06:06 2003 EDT Modified files: /phpdoc/scripts bughunter.php Log: layout fixes Index: phpdoc/scripts/bughunter.php diff -u phpdoc/scripts/bughunter.php:1.3 phpdoc/scripts/bughunter.php:1.4 --- phpdoc/scripts/bughunter.php:1.3 Tue Feb 4 16:24:51 2003 +++ phpdoc/scripts/bughunter.php Tue Feb 4 21:06:06 2003 @@ -16,7 +16,7 @@ | Authors: Maxim Maletsky <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: bughunter.php,v 1.3 2003/02/04 21:24:51 maxim Exp $ + $Id: bughunter.php,v 1.4 2003/02/05 02:06:06 maxim Exp $ */ /* @@ -85,7 +85,7 @@ var $php_min_version = '4.3.1-dev'; var $parse_all = ''; var $parse_ext = ''; - var $module = 'php5'; + var $module = 'php4'; var $root = '../../'; var $funclist = 'phpdoc/funclist.txt'; var $index = Array(); @@ -122,7 +122,7 @@ } $skip = False; - echo "\n\n<b>Indexing functions from `{$this->funclist}'</b>\n"; + echo "\n\nIndexing functions from `{$this->funclist}'\n"; foreach(explode("\r\n", $this->read_file($this->root . $this->funclist)) as $line) { flush(); if(preg_match_all("/^# ([[:alnum:]_\/]+\/([[:alnum:]_]+)\/[[:alnum:]_]+\.c)$/", $line, $file, PREG_SET_ORDER)) { @@ -132,7 +132,7 @@ if(!file_exists($this->root . $file[0][1])) { $skip = True; $cache = $file; - echo "\n\tSkipping <b>{$file[0][2]}</b> - <i>{$file[0][1]} not in repository</i>..."; + echo "\n\tSkipping {$file[0][2]} - +<i>{$file[0][1]} not in repository</i>..."; Continue; } @@ -145,7 +145,7 @@ } } - echo "\n\n<b>Parsing Extensions</b>\n"; + echo "\n\nParsing Extensions\n"; if($this->parse_all) { foreach($this->index as $ext => $data) { $this->cur_ext = $ext; @@ -157,7 +157,7 @@ else if($this->parse_ext) { if(!isset($this->index[$this->parse_ext])) { echo "\n\n"; - echo isset($this->skipped[$this->parse_ext])? "Nothing to do for <b>{$this->parse_ext}</b>" : "Unknown Extension <b>{$this->parse_ext}</b>"; + echo isset($this->skipped[$this->parse_ext])? "Nothing +to do for {$this->parse_ext}" : "Unknown Extension {$this->parse_ext}"; echo "\n"; Return Exit; } @@ -224,11 +224,11 @@ // Break protos into tiny pieces preg_match_all($rex_proto_synopsis, $proto[1][$i], $detail, PREG_SET_ORDER); - #echo "<b>" . $detail[0][3] . "</b> : "; - #echo "<b><i>" . $detail[0][4] . "</i></b>\n\n"; + #echo "" . $detail[0][3] . " : "; + #echo "<i>" . $detail[0][4] . "</i>\n\n"; if(!isset($detail[0][3])) { - echo "\n<b>Failed parsing proto:</b> <i>{$proto[1][$i]}</i> in <b>{$this->index[$this->cur_ext]['location']}</b>\n"; + echo "\n\nFailed parsing proto: {$proto[1][$i]} in +{$this->index[$this->cur_ext]['location']}\n\n"; Return Array(); } @@ -346,36 +346,44 @@ $hunter = new BugHunter(); -echo "\n\n<hr>Process took : " . round(getmicrotime() - $t_start, 3) . " seconds\n<hr>\n\n"; -echo "\n\n<b>Results :</b>\n\n"; +echo "\n\nProcess took : " . round(getmicrotime() - $t_start, 3) . " seconds\n\n\n"; +echo "\n\nResults:\n\n"; -$tot = 0; +$tot = 0; +$size1 = 20; +$size2 = 30; foreach($hunter->result as $ext => $function) { flush(); - echo "\n\n<b>$ext</b>\n<hr>\n"; + echo "\n\t" . str_pad($ext, $size1); $err = 0; foreach($function as $name=>$data) { if(!empty($data['source']['proto']['errors'])) { - echo "\n\t" . str_pad($name, 50) . " : "; + if(!$err) + echo "\t[ FAILED ]"; + + echo "\n\t\t" . str_pad("$name()", $size2); + + $line = ''; foreach($data['source']['proto']['errors'] as $param=>$error) { - echo "\t\tp: $param : "; + + echo "$line\t\t$param. "; + + if(!$line) + $line = "\n\t\t" . str_repeat(' ', $size2); foreach($error as $err_type=>$err_val) { - echo "<b>" . str_pad($err_type, 10) . "</b>" . " : " - .str_pad($err_val , 10) - .',' - ; + echo str_pad($err_type, 10) . ($err_type == +'wrong_type'? (" : " . str_pad($err_val , 10)) : ''); $err++; } } } } - echo "\n\nTotal bugs: $err"; + echo ($err)? "\n\n\t\tTotal bugs: $err\n" : "\t[ OK ]"; $tot += $err; } -echo "\n\nTotal proto inconsistencies: <b>$tot</b>"; +echo "\n\nTotal proto inconsistencies: $tot"; #print_r((array) $hunter);
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php