nlopess Thu Jan 22 12:16:41 2004 EDT
Modified files:
/livedocs mktoc.php
Log:
php5 compliance
http://cvs.php.net/diff.php/livedocs/mktoc.php?r1=1.5&r2=1.6&ty=u
Index: livedocs/mktoc.php
diff -u livedocs/mktoc.php:1.5 livedocs/mktoc.php:1.6
--- livedocs/mktoc.php:1.5 Mon Jan 12 18:04:30 2004
+++ livedocs/mktoc.php Thu Jan 22 12:16:40 2004
@@ -20,31 +20,9 @@
// | tree into the toc table. |
// +----------------------------------------------------------------------+
//
-// $Id: mktoc.php,v 1.5 2004/01/12 23:04:30 didou Exp $
+// $Id: mktoc.php,v 1.6 2004/01/22 17:16:40 nlopess Exp $
-$TOC = $argv[1];
-
-if (!strlen($TOC)) {
- echo "Usage: mktoc.php tocfile.xml\n";
- exit(1);
-}
-elseif (!is_file($TOC)) {
- echo "Error: $TOC cannot be found or is not a file\n";
- exit(1);
-}
-
-parse_file($TOC);
-exit;
-
-function parse_file($filename) {
- global $idx, $fileid;
-
- $parser = xml_parser_create();
- $p = new DocBookTOCParser($filename, $rel='', $parser);
- xml_parser_free($parser);
-}
-
class DocBookTOCParser {
var $cdata = null;
var $id_stack = array();
@@ -100,4 +78,27 @@
}
}
-?>
\ No newline at end of file
+
+$TOC = $argv[1];
+
+if (!strlen($TOC)) {
+ echo "Usage: mktoc.php tocfile.xml\n";
+ exit(1);
+}
+elseif (!is_file($TOC)) {
+ echo "Error: $TOC cannot be found or is not a file\n";
+ exit(1);
+}
+
+parse_file($TOC);
+exit;
+
+function parse_file($filename) {
+ global $idx, $fileid;
+
+ $parser = xml_parser_create();
+ $p = new DocBookTOCParser($filename, $rel='', $parser);
+ xml_parser_free($parser);
+}
+
+?>