1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
<?php
/*
* Copyright 2006 Sony Computer Entertainment Inc.
*
* Licensed under the MIT Open Source License, for details please see license.txt or the website
* http://www.opensource.org/licenses/mit-license.php
*
*/
global $indent;
// Add doxygen formatted comments
print $indent ."/**\n";
//$_local_doc = $bag['documentation'][ $_globals['language'] ];
$_local_doc = str_replace( "\n", " ", $bag );
$_local_doc = str_replace( "\t", "", $_local_doc );
while( strlen( $_local_doc ) > 0 )
{
if ( preg_match( "/(.{0,70}[^\s]*)(\s*)/", $_local_doc, $matches ) )
{
// Print blocks of 70 chars thru the next word
print $indent ." * " . $matches[1] . "\n";
// Account for any newlines
/*$n_newlines = preg_match_all( "/\n/", $matches[2], $buf );
if ( $n_newlines > 0 )
{
for( $i=0; $i<$n_newlines; $i++ ) { print " * \n"; }
}*/
// Find more lines...
$_local_doc = substr( $_local_doc, strlen( $matches[0] ) );
}
}
print $indent ." */\n";
?>
|