From c64365b84429b86b4af55b283de3758af38d9369 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 27 Jan 2006 10:16:29 +0000 Subject: [PATCH] - ws --- funcsummary.php | 85 ++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/funcsummary.php b/funcsummary.php index 6b1f042..a7e0f3c 100644 --- a/funcsummary.php +++ b/funcsummary.php @@ -74,25 +74,28 @@ $preface = <<<_PREFACE display: block; } .toc { - position: absolute; - top: 10px; - right: 10px; - width: 300px; - height: 95%%; - overflow: scroll; - font-size: .9em; - } - body>div.toc { - position: fixed; - } - .toc ul { - padding-left: 15px; - margin-left: 0; - } - .toc li { - padding: 0; - margin: 0; - } + position: absolute; + top: 10px; + right: 10px; + width: 300px; + height: 95%%; + overflow: scroll; + font-size: .9em; + } + body>div.toc { + position: fixed; + } + .toc ul { + padding-left: 15px; + margin-left: 0; + } + .toc li { + padding: 0; + margin: 0; + } + .tocfile { + font-weight: bold; + } @@ -117,26 +120,28 @@ $seen = array(); foreach (array_slice($_SERVER['argv'], 1) as $fp) { foreach (glob($fp) as $f) { if (isset($seen[$f])) { - continue; + continue; } else { $seen[$f] = true; } if (mf($f, $m)) { + $c = null; e("\nAnalyzing %s\n", basename($f)); printf("

%s

\n", basename($f), basename($f)); foreach ($m[1] as $i => $p) { e("Documenting $p\n"); if ($o = preg_match('/^(.*), (.*)$/', $m[4][$i], $n)) { - if ($n[2] == '__construct') { + if ($n[1] != $c) { + $c = $n[1]; printf("

%s

\n", $n[1], $n[1]); } - $TOC[basename($f)][$n[1]][$n[2]] = $n[1].'::'.$n[2].'()'; - printf("%s\n", 3, $n[1].'_'.$n[2], $p, 3); - } else { - $TOC[basename($f)][$m[4][$i]] = $m[4][$i].'()'; - printf("%s\n", 2, $m[4][$i], $p, 2); - } - print ff($m[3][$i]) ."\n"; + $TOC[basename($f)][$n[1]][$n[2]] = $n[1].'::'.$n[2].'()'; + printf("%s\n", 3, $n[1].'_'.$n[2], $p, 3); + } else { + $TOC[basename($f)][$m[4][$i]] = $m[4][$i].'()'; + printf("%s\n", 2, $m[4][$i], $p, 2); + } + print ff($m[3][$i]) ."\n"; } print "
\n"; } @@ -144,18 +149,18 @@ foreach (array_slice($_SERVER['argv'], 1) as $fp) { } printf("
Table of Contents\n\n
\n"); -- 2.30.2