"; echo " "; if (with_tables) { echo " "; } $started = FALSE; $fcontents = file ('ChangeLog'); $date = ""; while (list ($n, $line) = each ($fcontents)) { $line = str_replace ("\t", " ", $line); $c = substr ($line, 0, 1); $line = trim ($line); if ($line == "") continue; $words = explode (" ", $line); $NF = count ($words) - 1; //echo "|$line|". $words[0] . "|". $words[1] . "|". $words[2] . "|
"; $marker = strpos ("." . $line, "):"); if ($marker >= 1) { } else { $marker = 0; } //echo "
date: $date
ladate: $ladate
"; if ($c != " ") { // $has_number = (strcspn ($words[$NF], "0123456789") == 0); if ($has_number) { $last = $NF - 1; $number = $words[$NF]; } else { $last = $NF; $number = ""; } $who = ""; for ($i = 1; $i <= $last; $i++) { $who .= " "; $who .= $words[$i]; } $date = $words[0]; if ($date != $ladate) { $ladate = $date; } else { $date = " "; } //echo "date:[" . $date . "] ladate:[" . $ladate . "] who:" . $who . " #:" . $number . " [$line]
" ; } else if (($words[0] == "*") || ($marker >= 1)) { if ($started) { if ($with_tables) echo ""; $started = FALSE; } if ($marker == 0) { $marker = strpos ("." . $line, ":"); } else { $marker++; } //echo " ...Starting an entry... marker=$marker date=$date
"; if ($marker > 0) { $head = substr ($line, 0, $marker); $line = substr ($line, $marker); } else { $head = $line; $line = ""; } $head = trim ($head); $line = trim ($line); //echo "[$head] [$line]
"; $par = strpos ("." . $head, "("); if ($par > 0) { if ($par > 1) $file = substr ($head, 0, $par-1); $info = substr ($head, $par); $info = str_replace ("(", "", $info); $info = str_replace (")", "", $info); $info = str_replace (":", "", $info); } else { $file = $head; $info = ""; } $file = str_replace ("*", "", $file); $file = str_replace ("(", "", $file); $file = str_replace (")", "", $file); $file = str_replace (":", "", $file); $file = str_replace ("\\", "/", $file); if ($with_tables) echo "
date
file
comment
"; echo "$date"; if ($with_tables) echo ""; echo "$file"; if (!empty ($info)) echo " ($info)"; //echo ""; if ($with_tables) echo ""; $date = " "; $line = trim ($line); if (empty ($line)) $line=" "; echo "$line"; if (!$with_tables) echo "
"; $started = TRUE; $was_empty = FALSE; $was_not_empty = FALSE; } else if ($started) { $line = trim ($line); if (empty ($line)) { if ($was_not_empty) { $was_not_empty = FALSE; $was_empty = TRUE; } $line = " "; } else { if ($was_empty) { $was_empty = TRUE; echo "
"; } $was_not_empty = TRUE; } echo "$line"; if (!$with_tables) echo "
"; } } if ($with_tables) echo "
"; echo " "; ?>