summaryrefslogtreecommitdiff
path: root/buildscripts/PhpDocumentor/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/PhpDocumentor/scripts')
-rw-r--r--buildscripts/PhpDocumentor/scripts/add_cvs.php304
-rw-r--r--buildscripts/PhpDocumentor/scripts/create_examples.php136
-rw-r--r--buildscripts/PhpDocumentor/scripts/create_package.xml.php372
-rw-r--r--buildscripts/PhpDocumentor/scripts/makedoc.sh188
-rw-r--r--buildscripts/PhpDocumentor/scripts/tokenizer_test.php118
5 files changed, 543 insertions, 575 deletions
diff --git a/buildscripts/PhpDocumentor/scripts/add_cvs.php b/buildscripts/PhpDocumentor/scripts/add_cvs.php
index 2dfcd656..8b1145d0 100644
--- a/buildscripts/PhpDocumentor/scripts/add_cvs.php
+++ b/buildscripts/PhpDocumentor/scripts/add_cvs.php
@@ -1,153 +1,153 @@
-<?php
-//
-// +------------------------------------------------------------------------+
-// | phpDocumentor |
-// +------------------------------------------------------------------------+
-// | Copyright (c) 2000-2003 Joshua Eichorn, Gregory Beaver |
-// | Email jeichorn@phpdoc.org, cellog@phpdoc.org |
-// | Web http://www.phpdoc.org |
-// | Mirror http://phpdocu.sourceforge.net/ |
-// | PEAR http://pear.php.net/package-info.php?pacid=137 |
-// +------------------------------------------------------------------------+
-// | This source file is subject to version 3.00 of the PHP License, |
-// | that is available at http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +------------------------------------------------------------------------+
-//
-/**
- * CVS file adding iterator
- *
- * This file iterates over a directory, and adds everything to CVS that is
- * found, ignoring any error messages, until all files in each directory
- * and subdirectory have been added to cvs. It then commits the files to cvs
- * @package phpDocumentor
- * @author Greg Beaver <cellog@users.sourceforge.net>
- * @copyright Copyright 2003, Greg Beaver
- * @version 1.0
- */
-/**#@+
- * phpDocumentor include files. If you don't have phpDocumentor, go get it!
- * Your php life will be changed forever
- */
-$dir = realpath(dirname(__FILE__).'/..');
-require_once("$dir/phpDocumentor/common.inc.php");
-require_once("$dir/phpDocumentor/Io.inc");
-/**#@-*/
-
-/**
-* Physical location on this computer of the package to parse
-* @global string $cvsadd_directory
-*/
-$cvsadd_directory = realpath('.');
-/**
-* Comma-separated list of files and directories to ignore
-*
-* This uses wildcards * and ? to remove extra files/directories that are
-* not part of the package or release
-* @global string $ignore
-*/
-$ignore = array('CVS/');
-
-/******************************************************************************
-* Don't change anything below here unless you're adventuresome *
-*******************************************************************************/
-
-/**
- * @global Io $files
- */
-$files = new Io;
-
-$allfiles = $files->dirList($cvsadd_directory);
-/**#@+
- * Sorting functions for the file list
- * @param string
- * @param string
- */
-function sortfiles($a, $b)
-{
- return strnatcasecmp($a['file'],$b['file']);
-}
-
-function mystrucsort($a, $b)
-{
- if (is_numeric($a) && is_string($b)) return 1;
- if (is_numeric($b) && is_string($a)) return -1;
- if (is_numeric($a) && is_numeric($b))
- {
- if ($a > $b) return 1;
- if ($a < $b) return -1;
- if ($a == $b) return 0;
- }
- return strnatcasecmp($a,$b);
-}
-/**#@-*/
-
-$struc = array();
-foreach($allfiles as $file)
-{
- if ($files->checkIgnore(basename($file),dirname($file),$ignore, false))
- {
-// print 'Ignoring '.$file."<br>\n";
- continue;
- }
- $path = substr(dirname($file),strlen(str_replace('\\','/',realpath($cvsadd_directory)))+1);
- if (!$path) $path = '/';
- $file = basename($file);
- $ext = array_pop(explode('.',$file));
- if (strlen($ext) == strlen($file)) $ext = '';
- $struc[$path][] = array('file' => $file,'ext' => $ext);
-}
-uksort($struc,'strnatcasecmp');
-foreach($struc as $key => $ind)
-{
- usort($ind,'sortfiles');
- $struc[$key] = $ind;
-}
-$tempstruc = $struc;
-$struc = array('/' => $tempstruc['/']);
-$bv = 0;
-foreach($tempstruc as $key => $ind)
-{
- $save = $key;
- if ($key != '/')
- {
- $struc['/'] = setup_dirs($struc['/'], explode('/',$key), $tempstruc[$key]);
- }
-}
-uksort($struc['/'],'mystrucsort');
-/**
- * Recursively add files to cvs
- * @param array the sorted directory structure
- */
-function addToCVS($struc)
-{
- foreach($struc as $dir => $files)
- {
- if ($dir === '/')
- {
- print 'processing '.$dir . "\n";
- addToCVS($struc[$dir]);
- return;
- } else
- {
- if (!isset($files['file']))
- {
- print 'adding '.$dir . "\n";
- system('cvs add '.$dir);
- chdir($dir);
- addToCVS($files);
- chdir('..');
- } else
- {
- print 'adding '.$files['file'] . "\n";
- system('cvs add '.$files['file']);
- system('cvs commit -m "" '.$files['file']);
- }
- }
- }
-}
-addToCVS($struc);
-print "\n".'done';
+<?php
+//
+// +------------------------------------------------------------------------+
+// | phpDocumentor |
+// +------------------------------------------------------------------------+
+// | Copyright (c) 2000-2003 Joshua Eichorn, Gregory Beaver |
+// | Email jeichorn@phpdoc.org, cellog@phpdoc.org |
+// | Web http://www.phpdoc.org |
+// | Mirror http://phpdocu.sourceforge.net/ |
+// | PEAR http://pear.php.net/package/PhpDocumentor |
+// +------------------------------------------------------------------------+
+// | This source file is subject to version 3.00 of the PHP License, |
+// | that is available at http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +------------------------------------------------------------------------+
+//
+/**
+ * CVS file adding iterator
+ *
+ * This file iterates over a directory, and adds everything to CVS that is
+ * found, ignoring any error messages, until all files in each directory
+ * and subdirectory have been added to cvs. It then commits the files to cvs
+ * @package phpDocumentor
+ * @author Greg Beaver <cellog@php.net>
+ * @copyright Copyright 2003, Greg Beaver
+ * @version 1.0
+ */
+/**#@+
+ * phpDocumentor include files. If you don't have phpDocumentor, go get it!
+ * Your php life will be changed forever
+ */
+$dir = realpath(dirname(__FILE__).'/..');
+require_once("$dir/phpDocumentor/common.inc.php");
+require_once("$dir/phpDocumentor/Io.inc");
+/**#@-*/
+
+/**
+* Physical location on this computer of the package to parse
+* @global string $cvsadd_directory
+*/
+$cvsadd_directory = realpath('.');
+/**
+* Comma-separated list of files and directories to ignore
+*
+* This uses wildcards * and ? to remove extra files/directories that are
+* not part of the package or release
+* @global string $ignore
+*/
+$ignore = array('CVS/');
+
+/******************************************************************************
+* Don't change anything below here unless you're adventuresome *
+*******************************************************************************/
+
+/**
+ * @global Io $files
+ */
+$files = new Io;
+
+$allfiles = $files->dirList($cvsadd_directory);
+/**#@+
+ * Sorting functions for the file list
+ * @param string
+ * @param string
+ */
+function sortfiles($a, $b)
+{
+ return strnatcasecmp($a['file'],$b['file']);
+}
+
+function mystrucsort($a, $b)
+{
+ if (is_numeric($a) && is_string($b)) return 1;
+ if (is_numeric($b) && is_string($a)) return -1;
+ if (is_numeric($a) && is_numeric($b))
+ {
+ if ($a > $b) return 1;
+ if ($a < $b) return -1;
+ if ($a == $b) return 0;
+ }
+ return strnatcasecmp($a,$b);
+}
+/**#@-*/
+
+$struc = array();
+foreach($allfiles as $file)
+{
+ if ($files->checkIgnore(basename($file),dirname($file),$ignore, false))
+ {
+// print 'Ignoring '.$file."<br>\n";
+ continue;
+ }
+ $path = substr(dirname($file),strlen(str_replace('\\','/',realpath($cvsadd_directory)))+1);
+ if (!$path) $path = '/';
+ $file = basename($file);
+ $ext = array_pop(explode('.',$file));
+ if (strlen($ext) == strlen($file)) $ext = '';
+ $struc[$path][] = array('file' => $file,'ext' => $ext);
+}
+uksort($struc,'strnatcasecmp');
+foreach($struc as $key => $ind)
+{
+ usort($ind,'sortfiles');
+ $struc[$key] = $ind;
+}
+$tempstruc = $struc;
+$struc = array('/' => $tempstruc['/']);
+$bv = 0;
+foreach($tempstruc as $key => $ind)
+{
+ $save = $key;
+ if ($key != '/')
+ {
+ $struc['/'] = setup_dirs($struc['/'], explode('/',$key), $tempstruc[$key]);
+ }
+}
+uksort($struc['/'],'mystrucsort');
+/**
+ * Recursively add files to cvs
+ * @param array the sorted directory structure
+ */
+function addToCVS($struc)
+{
+ foreach($struc as $dir => $files)
+ {
+ if ($dir === '/')
+ {
+ print 'processing '.$dir . "\n";
+ addToCVS($struc[$dir]);
+ return;
+ } else
+ {
+ if (!isset($files['file']))
+ {
+ print 'adding '.$dir . "\n";
+ system('cvs add '.$dir);
+ chdir($dir);
+ addToCVS($files);
+ chdir('..');
+ } else
+ {
+ print 'adding '.$files['file'] . "\n";
+ system('cvs add '.$files['file']);
+ system('cvs commit -m "" '.$files['file']);
+ }
+ }
+ }
+}
+addToCVS($struc);
+print "\n".'done';
?> \ No newline at end of file
diff --git a/buildscripts/PhpDocumentor/scripts/create_examples.php b/buildscripts/PhpDocumentor/scripts/create_examples.php
index b3a8acde..ff1863b7 100644
--- a/buildscripts/PhpDocumentor/scripts/create_examples.php
+++ b/buildscripts/PhpDocumentor/scripts/create_examples.php
@@ -1,66 +1,70 @@
-<?php
-//
-// +------------------------------------------------------------------------+
-// | phpDocumentor |
-// +------------------------------------------------------------------------+
-// | Copyright (c) 2000-2003 Joshua Eichorn, Gregory Beaver |
-// | Email jeichorn@phpdoc.org, cellog@phpdoc.org |
-// | Web http://www.phpdoc.org |
-// | Mirror http://phpdocu.sourceforge.net/ |
-// | PEAR http://pear.php.net/package-info.php?pacid=137 |
-// +------------------------------------------------------------------------+
-// | This source file is subject to version 3.00 of the PHP License, |
-// | that is available at http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +------------------------------------------------------------------------+
-//
-// ./phpdoc -d /home/jeichorn/phpdoc -dn phpDocumentor -ti "phpDocumentor generated docs" -td templates/DOM/l0l33t -t /tmp/phpdoc_DOM_l0l33t
-/**
-* This file creates example documentation output of all templates.
-* @package phpDocumentor
-*/
-
-/**
-* Directory the output should go to.
-* Change this variable to an output directory on your computer
-* @global string $output_directory
-*/
-$output_directory = "/tmp";
-/**
-* default package name, used to change all non-included files to this package
-* @global string $base_package
-*/
-$base_package = "phpDocumentor";
-/**
-* Title of the generated documentation
-* @global string $title
-*/
-$title = "phpDocumentor Generated Documentation";
-/**
-* location of the files to parse. Change to a location on your computer
-* @global string $parse_directory
-*/
-$parse_directory = "/home/jeichorn/phpdoc";
-
-/**
-* directories to output examples into.
-* @global array $output
-*/
-$output = array(
- $output_directory.'/docs/phpdoc_default' => 'HTML:default:default',
- $output_directory.'/docs/phpdoc_l0l33t' => 'HTML:default:l0l33t',
- $output_directory.'/docs/phpdoc_phpdoc_de' => 'HTML:default:phpdoc.de',
- $output_directory.'/docs/phpdoc_DOM_default' => 'HTML:default:DOM/default',
- $output_directory.'/docs/phpdoc_DOM_l0l33t' => 'HTML:default:DOM/l0l33t',
- $output_directory.'/docs/phpdoc_DOM_phpdoc_de' => 'HTML:default:DOM/phpdoc.de',
- $output_directory.'/docs/phpdoc_smarty_default' => 'HTML:Smarty:default',
- $output_directory.'/docs/phpdoc_pdf_default' => 'PDF:default:default',
- $output_directory.'/docs/phpdoc_chm_default' => 'CHM:default:default'
- );
-
-foreach($output as $output => $template)
-{
- passthru("./phpdoc -d /home/jeichorn/phpdoc -dn $base_package -ti \"$title\" -td $template -t $output");
-}
+<?php
+//
+// +------------------------------------------------------------------------+
+// | phpDocumentor |
+// +------------------------------------------------------------------------+
+// | Copyright (c) 2000-2003 Joshua Eichorn, Gregory Beaver |
+// | Email jeichorn@phpdoc.org, cellog@phpdoc.org |
+// | Web http://www.phpdoc.org |
+// | Mirror http://phpdocu.sourceforge.net/ |
+// | PEAR http://pear.php.net/package/PhpDocumentor |
+// +------------------------------------------------------------------------+
+// | This source file is subject to version 3.00 of the PHP License, |
+// | that is available at http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +------------------------------------------------------------------------+
+//
+// ./phpdoc -d /home/jeichorn/phpdoc -dn phpDocumentor -ti "phpDocumentor generated docs" -td templates/DOM/l0l33t -t /tmp/phpdoc_DOM_l0l33t
+/**
+* This file creates example documentation output of all templates.
+* @package phpDocumentor
+*/
+
+/**
+* Directory the output should go to.
+* Change this variable to an output directory on your computer
+* @global string $output_directory
+*/
+$output_directory = "/tmp";
+/**
+* default package name, used to change all non-included files to this package
+* @global string $base_package
+*/
+$base_package = "phpDocumentor";
+/**
+* Title of the generated documentation
+* @global string $title
+*/
+$title = "phpDocumentor Generated Documentation";
+/**
+* location of the files to parse. Change to a location on your computer.
+* Example:
+* <code>
+* $parse_directory = "/home/jeichorn/phpdoc";
+* </code>
+* @global string $parse_directory
+*/
+$parse_directory = "/you-MUST/change-me/to-fit/your-environment";
+
+/**
+* directories to output examples into.
+* @global array $output
+*/
+$output = array(
+ $output_directory.'/docs/phpdoc_default' => 'HTML:default:default',
+ $output_directory.'/docs/phpdoc_l0l33t' => 'HTML:default:l0l33t',
+ $output_directory.'/docs/phpdoc_phpdoc_de' => 'HTML:default:phpdoc.de',
+ $output_directory.'/docs/phpdoc_DOM_default' => 'HTML:default:DOM/default',
+ $output_directory.'/docs/phpdoc_DOM_l0l33t' => 'HTML:default:DOM/l0l33t',
+ $output_directory.'/docs/phpdoc_DOM_phpdoc_de' => 'HTML:default:DOM/phpdoc.de',
+ $output_directory.'/docs/phpdoc_smarty_default' => 'HTML:Smarty:default',
+ $output_directory.'/docs/phpdoc_pdf_default' => 'PDF:default:default',
+ $output_directory.'/docs/phpdoc_chm_default' => 'CHM:default:default',
+ );
+
+foreach($output as $output => $template)
+{
+ passthru("./phpdoc -d /home/jeichorn/phpdoc -dn $base_package -ti \"$title\" -td $template -t $output");
+}
diff --git a/buildscripts/PhpDocumentor/scripts/create_package.xml.php b/buildscripts/PhpDocumentor/scripts/create_package.xml.php
index 2ef0fd2c..afc6ddbd 100644
--- a/buildscripts/PhpDocumentor/scripts/create_package.xml.php
+++ b/buildscripts/PhpDocumentor/scripts/create_package.xml.php
@@ -1,204 +1,168 @@
-<?php
-set_time_limit(0);
-require_once('PEAR/PackageFileManager.php');
-PEAR::setErrorHandling(PEAR_ERROR_DIE);
-$test = new PEAR_PackageFileManager;
-
-$packagedir = dirname(dirname(__FILE__));
-
-$e = $test->setOptions(
-array('baseinstalldir' => 'PhpDocumentor',
-'version' => '1.3.0RC4',
-'packagedirectory' => $packagedir,
-'state' => 'beta',
-'filelistgenerator' => 'cvs',
-'notes' => 'PHP 5 support and more, fix bugs
-
-This will be the last release in the 1.x series. 2.0 is next
-
-Features added to this release include:
-
- * Full PHP 5 support, phpDocumentor both runs in and parses Zend Engine 2
- language constructs. Note that you must be running phpDocumentor in
- PHP 5 in order to parse PHP 5 code
- * XML:DocBook/peardoc2:default converter now beautifies the source using
- PEAR\'s XML_Beautifier if available
- * inline {@example} tag - this works just like {@source} except that
- it displays the contents of another file. In tutorials, it works
- like <programlisting>
- * customizable README/INSTALL/CHANGELOG files
- * phpDocumentor tries to run .ini files out of the current directory
- first, to allow you to put them anywhere you want to
- * multi-national characters are now allowed in package/subpackage names
- * images in tutorials with the <graphic> tag
- * un-modified output with <programlisting role="html">
- * html/xml source highlighting with <programlisting role="tutorial">
-
-From both Windows and Unix, both the command-line version
-of phpDocumentor and the web interface will work
-out of the box by using command phpdoc - guaranteed :)
-
-WARNING: in order to use the web interface through PEAR, you must set your
-data_dir to a subdirectory of your document root.
-
-$ pear config-set data_dir /path/to/public_html/pear
-
-on Windows with default apache setup, it might be
-
-C:\> pear config-set data_dir "C:\Program Files\Apache\htdocs\pear"
-
-After this, install/upgrade phpDocumentor
-
-$ pear upgrade phpDocumentor
-
-and you can browse to:
-
-http://localhost/pear/PhpDocumentor/
-
-for the web interface
-
-------
-WARNING: The PDF Converter will not work in PHP5. The PDF library that it relies upon
-segfaults with the simplest of files. Generation still works great in PHP4
-------
-
-- WARNING: phpDocumentor installs phpdoc in the
- scripts directory, and this will conflict with PHPDoc,
- you can\'t have both installed at the same time
-- Switched to Smarty 2.6.0, now it will work in PHP 5. Other
- changes made to the code to make it work in PHP 5, including parsing
- of private/public/static/etc. access modifiers
-- fixed these bugs:
- [ not entered ] XMLDocBookpeardoc2 beautifier removes comments
- [ 896444 ] Bad line numbers
- [ 937235 ] duplicated /** after abstract method declaration
- [ 962319 ] Define : don\'t show the assigned value
- [ 977674 ] Parser error
- [ 989258 ] wrong interfaces parsing
- [ 1150809 ] Infinite loop when class extends itself
- [ 1151196 ] PHP Fatal error: Cannot re-assign $this
- [ 1151650 ] UTF8 decoding for DocBook packages
- [ 1152781 ] PHP_NOTICE: Uninitialized string offset in ParserDescCleanup
- [ 1153593 ] string id="...." in tutorials
- [ 1164253 ] Inherited Class Constants are not displayed
- [ 1171583 ] CHM wrong filesource
- [ 1180200 ] HighlightParser does not handle Heredoc Blocks.
- [ 1202772 ] missing parentheses in Parser.inc line 946
- [ 1203445 ] Call to a member function on a non-object in Parser.inc
- [ 1203451 ] array to string conversion notice in InlineTags.inc
-- fixed these bugs reported in PEAR:
- Bug #2288: Webfrontend ignores more than one dir in "Files to ignore"
- Bug #5011: PDF generation warning on uksort
-',
-'package' => 'PhpDocumentor',
-'dir_roles' => array(
- 'Documentation' => 'doc',
- 'Documentation/tests' => 'test',
- 'docbuilder' => 'data',
- 'HTML_TreeMenu-1.1.2' => 'data',
- 'tutorials' => 'doc',
- 'phpDocumentor/Converters/CHM/default/templates/default/templates_c' => 'data',
- 'phpDocumentor/Converters/PDF/default/templates/default/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/default/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/l0l33t/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/phpdoc.de/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/phpedit/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/earthli/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/DOM/default/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/DOM/l0l33t/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/DOM/phpdoc.de/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/DOM/phphtmllib/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/frames/templates/DOM/earthli/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/Smarty/templates/default/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/Smarty/templates/PHP/templates_c' => 'data',
- 'phpDocumentor/Converters/HTML/Smarty/templates/HandS/templates_c' => 'data',
- 'phpDocumentor/Converters/XML/DocBook/peardoc2/templates/default/templates_c' => 'data',
- ),
-'simpleoutput' => true,
-'exceptions' =>
- array(
- 'index.html' => 'data',
- 'README' => 'doc',
- 'ChangeLog' => 'doc',
- 'PHPLICENSE.txt' => 'doc',
- 'poweredbyphpdoc.gif' => 'data',
- 'INSTALL' => 'doc',
- 'FAQ' => 'doc',
- 'Authors' => 'doc',
- 'Release-1.2.0beta1' => 'doc',
- 'Release-1.2.0beta2' => 'doc',
- 'Release-1.2.0beta3' => 'doc',
- 'Release-1.2.0rc1' => 'doc',
- 'Release-1.2.0rc2' => 'doc',
- 'Release-1.2.0' => 'doc',
- 'Release-1.2.1' => 'doc',
- 'Release-1.2.2' => 'doc',
- 'Release-1.2.3' => 'doc',
- 'Release-1.2.3.1' => 'doc',
- 'Release-1.3.0' => 'doc',
- 'pear-phpdoc' => 'script',
- 'pear-phpdoc.bat' => 'script',
- 'HTML_TreeMenu-1.1.2/TreeMenu.php' => 'php',
- 'phpDocumentor/Smarty-2.6.0/libs/debug.tpl' => 'php',
- 'new_phpdoc.php' => 'data',
- 'phpdoc.php' => 'data',
- ),
-'ignore' =>
- array('package.xml',
- "$packagedir/phpdoc",
- 'phpdoc.bat',
- 'LICENSE',
- '*templates/PEAR/*',
- 'phpDocumentor/Smarty-2.5.0/*',
- '*CSV*',
- 'makedocs.ini',
- 'publicweb-PEAR-1.2.1.patch.txt',
- ),
-'installas' =>
- array('pear-phpdoc' => 'phpdoc',
- 'pear-phpdoc.bat' => 'phpdoc.bat',
- 'user/pear-makedocs.ini' => 'user/makedocs.ini',
- ),
-'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/', 'scripts/makedoc.sh' => '/'),
-));
-if (PEAR::isError($e)) {
- echo $e->getMessage();
- exit;
-}
-$test->addPlatformException('pear-phpdoc.bat', 'windows');
-$test->addDependency('php', '4.1.0', 'ge', 'php');
-// optional dep for peardoc2 converter
-$test->addDependency('XML_Beautifier', '1.1', 'ge', 'pkg', true);
-// replace @PHP-BIN@ in this file with the path to php executable! pretty neat
-$test->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin');
-$test->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
-$test->addReplacement('pear-phpdoc.bat', 'pear-config', '@BIN-DIR@', 'bin_dir');
-$test->addReplacement('pear-phpdoc.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
-$test->addReplacement('pear-phpdoc.bat', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/includes/utilities.php', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/builder.php', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/file_dialog.php', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/file_dialog.php', 'pear-config', '@WEB-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/actions.php', 'pear-config', '@WEB-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/top.php', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/config.php', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('docbuilder/config.php', 'pear-config', '@WEB-DIR@', 'data_dir');
-$test->addReplacement('phpDocumentor/Setup.inc.php', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('phpDocumentor/Converter.inc', 'pear-config', '@DATA-DIR@', 'data_dir');
-$test->addReplacement('phpDocumentor/common.inc.php', 'package-info', '@VER@', 'version');
-$test->addReplacement('phpDocumentor/IntermediateParser.inc', 'package-info', '@VER@', 'version');
-$test->addReplacement('user/pear-makedocs.ini', 'pear-config', '@PEAR-DIR@', 'php_dir');
-$test->addReplacement('user/pear-makedocs.ini', 'pear-config', '@DOC-DIR@', 'doc_dir');
-$test->addReplacement('user/pear-makedocs.ini', 'package-info', '@VER@', 'version');
-$test->addRole('inc', 'php');
-$test->addRole('sh', 'script');
-if (isset($_GET['make'])) {
- $test->writePackageFile();
-} else {
- $test->debugPackageFile();
-}
-if (!isset($_GET['make'])) {
- echo '<a href="' . $_SERVER['PHP_SELF'] . '?make=1">Make this file</a>';
-}
-?> \ No newline at end of file
+<?php
+set_time_limit(0);
+require_once('PEAR/PackageFileManager.php');
+require_once('PEAR/PackageFileManager2.php');
+PEAR::setErrorHandling(PEAR_ERROR_DIE);
+
+$packagedir = dirname(dirname(__FILE__));
+$notes = '
+Includes these PEAR items:
+ * Bug #11654: @static in DocBlock Template can cause PHP Notice [ashnazg|mvriel]
+ * Bug #11813: @link URL short description does&apos;nt work [ashnazg]
+ * Bug #13800: Invalid tutorials tree generation [ashnazg|wrzasq]
+ * Bug #14191: earthli template contains bad HTML [ashnazg|jorrit]
+ * Bug #14472: Incorrect line numbers with heredoc [ashnazg|indigo]
+ * Bug #15517: Wrong table of contents in tutorials [ashnazg]
+ * Bug #16431: Warning: get_class() expects parameter 1 to be object, string given [ashnazg|aharvey]
+ * Bug #16441: Parse error when parsing &lt;&lt;foo&gt;&gt; [ashnazg|marcusson]
+ * Bug #16446: Use of split() causes E_DEPRECATED warnings [ashnazg|aharvey]
+ * Feature #13599: Third Gotcha on Bare Minimum Tutorial example [ashnazg]
+ * Feature #14312: @param tag with additional arguments doesn&apos;t work as expected [ashnazg]
+ * Feature #14461: Data Type Confusion for Some Tags [ashnazg]
+
+
+Includes these Sourceforge items:
+* [2692032] use of templatebase - missing information [ashnazg]
+* [2669256] get_class() expects parameter 1 to be object, string given [ashnazg]
+* [2669110] ereg / split is deprecated [ashnazg]
+* [1940914] Tutorials tree is added to tutorials which have no children [ashnazg|wrzasq]
+* [1929926] Default version number not updated [ashnazg]
+* [1918851] @toc render is wrong in earthli tutorial_toc.tpl [ashnazg]
+* [1903136] Constant Link not worked [ashnazg|scholesmafia]
+* [1771553] @link URL short description does\'nt work [ashnazg]
+
+';
+$version = '1.4.3';
+$release_stability = 'stable';
+$api = '1.4.0';
+$api_stability = 'stable';
+$options = array(
+'baseinstalldir' => 'PhpDocumentor',
+'version' => $version,
+'packagedirectory' => $packagedir,
+'filelistgenerator' => 'cvs',
+'notes' => $notes,
+'package' => 'PhpDocumentor',
+'dir_roles' => array(
+ 'Documentation' => 'doc',
+ 'docbuilder' => 'data',
+ 'HTML_TreeMenu-1.1.2' => 'data',
+ 'tutorials' => 'doc',
+ 'tests' => 'test',
+ ),
+'simpleoutput' => true,
+'exceptions' =>
+ array(
+ 'index.html' => 'data',
+ 'README' => 'doc',
+ 'ChangeLog' => 'doc',
+ 'LICENSE' => 'doc',
+ 'poweredbyphpdoc.gif' => 'data',
+ 'INSTALL' => 'doc',
+ 'FAQ' => 'doc',
+ 'Authors' => 'doc',
+ 'Release-1.4.3' => 'doc',
+ 'pear-phpdoc' => 'script',
+ 'pear-phpdoc.bat' => 'script',
+ 'HTML_TreeMenu-1.1.2/TreeMenu.php' => 'php',
+ 'phpDocumentor/Smarty-2.6.0/libs/debug.tpl' => 'php',
+ 'new_phpdoc.php' => 'data',
+ 'phpdoc.php' => 'data',
+ 'scripts/makedoc.sh' => 'php',
+ ),
+'ignore' =>
+ array('package.xml',
+ '*templates/PEAR/*',
+ ),
+'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/'),
+);
+$pfm2 = PEAR_PackageFileManager2::importOptions(dirname(dirname(__FILE__))
+ . DIRECTORY_SEPARATOR . 'package.xml', array_merge($options, array('packagefile' => 'package.xml')));
+$pfm2->setReleaseVersion($version);
+$pfm2->setReleaseStability($release_stability);
+$pfm2->setAPIVersion($api);
+$pfm2->setAPIStability($api_stability);
+$pfm2->setLicense('LGPL', 'http://www.opensource.org/licenses/lgpl-license.php');
+$pfm2->setNotes($notes);
+$pfm2->clearDeps();
+$pfm2->setPhpDep('4.2.0');
+$pfm2->setPearinstallerDep('1.4.6');
+$pfm2->addPackageDepWithChannel('optional', 'XML_Beautifier', 'pear.php.net', '1.1');
+$pfm2->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin');
+$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
+$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@BIN-DIR@', 'bin_dir');
+$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
+$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('README', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('README', 'package-info', '@STABILITY@', 'state');
+$pfm2->addReplacement('docbuilder/includes/utilities.php', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/builder.php', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/file_dialog.php', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/file_dialog.php', 'pear-config', '@WEB-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/actions.php', 'pear-config', '@WEB-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/top.php', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/config.php', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('docbuilder/config.php', 'pear-config', '@WEB-DIR@', 'data_dir');
+$pfm2->addReplacement('phpDocumentor/Setup.inc.php', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('phpDocumentor/Converter.inc', 'pear-config', '@DATA-DIR@', 'data_dir');
+$pfm2->addReplacement('phpDocumentor/Classes.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/DescHTML.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/DocBlockTags.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/Errors.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/EventStack.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/common.inc.php', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/common.inc.php', 'pear-config', '@PEAR-DIR@', 'php_dir');
+$pfm2->addReplacement('phpDocumentor/HighlightParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/InlineTags.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/IntermediateParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/IntermediateParser.inc', 'pear-config', '@PEAR-DIR@', 'php_dir');
+$pfm2->addReplacement('phpDocumentor/LinkClasses.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/PackagePageElements.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/ParserData.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/phpDocumentorTParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/phpDocumentorTWordParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/ProceduralPages.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/Publisher.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/TutorialHighlightParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/WordParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('phpDocumentor/XMLpackagePageParser.inc', 'package-info', '@VER@', 'version');
+$pfm2->addReplacement('user/pear-makedocs.ini', 'pear-config', '@PEAR-DIR@', 'php_dir');
+$pfm2->addReplacement('user/pear-makedocs.ini', 'pear-config', '@DOC-DIR@', 'doc_dir');
+$pfm2->addReplacement('user/pear-makedocs.ini', 'package-info', '@VER@', 'version');
+$pfm2->addRole('inc', 'php');
+$pfm2->addRole('sh', 'script');
+$pfm2->addUnixEol('pear-phpdoc');
+$pfm2->addUnixEol('phpdoc');
+$pfm2->addWindowsEol('pear-phpdoc.bat');
+$pfm2->addWindowsEol('phpdoc.bat');
+$pfm2->generateContents();
+$pfm2->setPackageType('php');
+$pfm2->addRelease();
+$pfm2->setOsInstallCondition('windows');
+// these next few files are only used if the archive is extracted as-is
+// without installing via "pear install blah"
+$pfm2->addIgnoreToRelease("phpdoc");
+$pfm2->addIgnoreToRelease('phpdoc.bat');
+$pfm2->addIgnoreToRelease('user/makedocs.ini');
+$pfm2->addIgnoreToRelease('scripts/makedoc.sh');
+$pfm2->addInstallAs('pear-phpdoc', 'phpdoc');
+$pfm2->addInstallAs('pear-phpdoc.bat', 'phpdoc.bat');
+$pfm2->addInstallAs('user/pear-makedocs.ini', 'user/makedocs.ini');
+$pfm2->addRelease();
+// these next two files are only used if the archive is extracted as-is
+// without installing via "pear install blah"
+$pfm2->addIgnoreToRelease("phpdoc");
+$pfm2->addIgnoreToRelease('phpdoc.bat');
+$pfm2->addIgnoreToRelease('user/makedocs.ini');
+$pfm2->addIgnoreToRelease('pear-phpdoc.bat');
+$pfm2->addInstallAs('pear-phpdoc', 'phpdoc');
+$pfm2->addInstallAs('user/pear-makedocs.ini', 'user/makedocs.ini');
+if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
+ $pfm2->writePackageFile();
+} else {
+ $pfm2->debugPackageFile();
+}
+if (!isset($_GET['make']) && !(isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) {
+ echo '<a href="' . $_SERVER['PHP_SELF'] . '?make=1">Make this file</a>';
+}
+?>
diff --git a/buildscripts/PhpDocumentor/scripts/makedoc.sh b/buildscripts/PhpDocumentor/scripts/makedoc.sh
index 83c3bcc0..4a0e51de 100644
--- a/buildscripts/PhpDocumentor/scripts/makedoc.sh
+++ b/buildscripts/PhpDocumentor/scripts/makedoc.sh
@@ -1,94 +1,94 @@
-#!/bin/bash
-# $Id: makedoc.sh,v 1.1 2005/10/17 18:37:43 jeichorn Exp $
-
-#/**
-# * makedoc - PHPDocumentor script to save your settings
-# *
-# * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
-# * re/make your project documentation.
-# *
-# * The version of this file is the version of PHPDocumentor it is compatible.
-# *
-# * It simples run phpdoc with the parameters you set in this file.
-# * NOTE: Do not add spaces after bash variables.
-# *
-# * @copyright makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
-# * @author Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
-# * @version Release-1.1.0
-# */
-
-
-##############################
-# should be edited
-##############################
-
-#/**
-# * title of generated documentation, default is 'Generated Documentation'
-# *
-# * @var string TITLE
-# */
-TITLE="Your Project Documentation"
-
-#/**
-# * name to use for the default package. If not specified, uses 'default'
-# *
-# * @var string PACKAGES
-# */
-PACKAGES="yourProject"
-
-#/**
-# * name of a directory(s) to parse directory1,directory2
-# * $PWD is the directory where makedoc.sh
-# *
-# * @var string PATH_PROJECT
-# */
-PATH_PROJECT=$PWD
-
-#/**
-# * path of PHPDoc executable
-# *
-# * @var string PATH_PHPDOC
-# */
-PATH_PHPDOC=~/phpdoc/phpdoc
-
-#/**
-# * where documentation will be put
-# *
-# * @var string PATH_DOCS
-# */
-PATH_DOCS=$PWD/docs
-
-#/**
-# * what outputformat to use (html/pdf)
-# *
-# * @var string OUTPUTFORMAT
-# */
-OUTPUTFORMAT=HTML
-
-#/**
-# * converter to be used
-# *
-# * @var string CONVERTER
-# */
-CONVERTER=Smarty
-
-#/**
-# * template to use
-# *
-# * @var string TEMPLATE
-# */
-TEMPLATE=default
-
-#/**
-# * parse elements marked as private
-# *
-# * @var bool (on/off) PRIVATE
-# */
-PRIVATE=off
-
-# make documentation
-$PATH_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \
--o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
-
-
-# vim: set expandtab :
+#!/bin/bash
+# $Id: makedoc.sh,v 1.2 2007-12-10 01:11:19 ashnazg Exp $
+
+#/**
+# * makedoc - PHPDocumentor script to save your settings
+# *
+# * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
+# * re/make your project documentation.
+# *
+# * The version of this file is the version of PHPDocumentor it is compatible.
+# *
+# * It simples run phpdoc with the parameters you set in this file.
+# * NOTE: Do not add spaces after bash variables.
+# *
+# * @copyright makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
+# * @author Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
+# * @version Release-1.1.0
+# */
+
+
+##############################
+# should be edited
+##############################
+
+#/**
+# * title of generated documentation, default is 'Generated Documentation'
+# *
+# * @var string TITLE
+# */
+TITLE="Your Project Documentation"
+
+#/**
+# * name to use for the default package. If not specified, uses 'default'
+# *
+# * @var string PACKAGES
+# */
+PACKAGES="yourProject"
+
+#/**
+# * name of a directory(s) to parse directory1,directory2
+# * $PWD is the directory where makedoc.sh
+# *
+# * @var string PATH_PROJECT
+# */
+PATH_PROJECT=$PWD
+
+#/**
+# * path of PHPDoc executable
+# *
+# * @var string PATH_PHPDOC
+# */
+PATH_PHPDOC=~/phpdoc/phpdoc
+
+#/**
+# * where documentation will be put
+# *
+# * @var string PATH_DOCS
+# */
+PATH_DOCS=$PWD/docs
+
+#/**
+# * what outputformat to use (html/pdf)
+# *
+# * @var string OUTPUTFORMAT
+# */
+OUTPUTFORMAT=HTML
+
+#/**
+# * converter to be used
+# *
+# * @var string CONVERTER
+# */
+CONVERTER=Smarty
+
+#/**
+# * template to use
+# *
+# * @var string TEMPLATE
+# */
+TEMPLATE=default
+
+#/**
+# * parse elements marked as private
+# *
+# * @var bool (on/off) PRIVATE
+# */
+PRIVATE=off
+
+# make documentation
+"$PATH_PHPDOC" -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
+-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
+
+
+# vim: set expandtab :
diff --git a/buildscripts/PhpDocumentor/scripts/tokenizer_test.php b/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
index 2b5ca25e..e7c5748a 100644
--- a/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
+++ b/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
@@ -1,59 +1,59 @@
-<?php
-/**
- * @package tests
- */
-/**
-$fp = fopen("../phpDocumentor/Converter.inc","r");
-$file = fread($fp,filesize("../phpDocumentor/Converter.inc"));
-fclose($fp);
-*/
-$file = "
-<?php
- function &newSmarty()
- {
- if (!isset(\$this->package_index))
- foreach(\$this->all_packages as \$key => \$val)
- {
- if (isset(\$this->pkg_elements[\$key]))
- {
- if (!isset(\$start)) \$start = \$key;
- \$this->package_index[] = array('link' => \"li_\$key.html\", 'title' => \$key);
- }
- }
- \$templ = new Smarty;
- \$templ->template_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates';
- \$templ->compile_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates_c';
- \$templ->config_dir = \$this->smarty_dir . PATH_DELIMITER . 'configs';
- \$templ->assign(\"packageindex\",\$this->package_index);
- \$templ->assign(\"phpdocversion\",PHPDOCUMENTOR_VER);
- \$templ->assign(\"phpdocwebsite\",PHPDOCUMENTOR_WEBSITE);
- \$templ->assign(\"package\",\$this->package);
- \$templ->assign(\"subdir\",'');
- return \$templ;
- }
-?>
-";
-$tokens = token_get_all($file);
-
-$nl_check = array(T_WHITESPACE,T_ENCAPSED_AND_WHITESPACE,T_COMMENT,T_DOC_COMMENT,T_OPEN_TAG,T_CLOSE_TAG,T_INLINE_HTML);
-print '<pre>';
-$line = 0;
-foreach($tokens as $key => $val)
-{
- if (is_array($val))
- {
- // seeing if we can get line numbers out of the beast
- if (in_array($val[0],$nl_check))
- {
- $line+=substr_count($val[1],"\n");
- }
- echo token_name($val[0])." => ".htmlentities($val[1])."\n";
- }
- else
- {
- echo "*** $val\n";
- }
-}
-echo "$line\n";
-print '</pre>';
-?>
+<?php
+/**
+ * @package tests
+ */
+/**
+$fp = fopen("../phpDocumentor/Converter.inc","r");
+$file = fread($fp,filesize("../phpDocumentor/Converter.inc"));
+fclose($fp);
+*/
+$file = "
+<?php
+ function &newSmarty()
+ {
+ if (!isset(\$this->package_index))
+ foreach(\$this->all_packages as \$key => \$val)
+ {
+ if (isset(\$this->pkg_elements[\$key]))
+ {
+ if (!isset(\$start)) \$start = \$key;
+ \$this->package_index[] = array('link' => \"li_\$key.html\", 'title' => \$key);
+ }
+ }
+ \$templ = new Smarty;
+ \$templ->template_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates';
+ \$templ->compile_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates_c';
+ \$templ->config_dir = \$this->smarty_dir . PATH_DELIMITER . 'configs';
+ \$templ->assign(\"packageindex\",\$this->package_index);
+ \$templ->assign(\"phpdocversion\",PHPDOCUMENTOR_VER);
+ \$templ->assign(\"phpdocwebsite\",PHPDOCUMENTOR_WEBSITE);
+ \$templ->assign(\"package\",\$this->package);
+ \$templ->assign(\"subdir\",'');
+ return \$templ;
+ }
+?>
+";
+$tokens = token_get_all($file);
+
+$nl_check = array(T_WHITESPACE,T_ENCAPSED_AND_WHITESPACE,T_COMMENT,T_DOC_COMMENT,T_OPEN_TAG,T_CLOSE_TAG,T_INLINE_HTML);
+print '<pre>';
+$line = 0;
+foreach($tokens as $key => $val)
+{
+ if (is_array($val))
+ {
+ // seeing if we can get line numbers out of the beast
+ if (in_array($val[0],$nl_check))
+ {
+ $line+=substr_count($val[1],"\n");
+ }
+ echo token_name($val[0])." => ".htmlentities($val[1])."\n";
+ }
+ else
+ {
+ echo "*** $val\n";
+ }
+}
+echo "$line\n";
+print '</pre>';
+?>