cvs: pear /CodeGen_PECL/PECL Extension.php

From: Date: Fri, 17 Feb 2006 10:28:08 +0000
Subject: cvs: pear /CodeGen_PECL/PECL Extension.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38306@lists.php.net to get a copy of this message
hholzgra Fri Feb 17 10:28:08 2006 UTC Modified files: /pear/CodeGen_PECL/PECL Extension.php Log: - use code header/footer methods for logos and resources - fixed indent for MINIT/MSHUTDOWN/MINFO code - do not indent logo data headers http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/PECL/Extension.php?r1=1.39&r2=1.40&diff_format=u Index: pear/CodeGen_PECL/PECL/Extension.php diff -u pear/CodeGen_PECL/PECL/Extension.php:1.39 pear/CodeGen_PECL/PECL/Extension.php:1.40 --- pear/CodeGen_PECL/PECL/Extension.php:1.39 Wed Feb 15 15:27:44 2006 +++ pear/CodeGen_PECL/PECL/Extension.php Fri Feb 17 10:28:07 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Extension.php,v 1.39 2006/02/15 15:27:44 hholzgra Exp $ + * @version CVS: $Id: Extension.php,v 1.40 2006/02/17 10:28:07 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen_PECL */ @@ -597,10 +597,10 @@ foreach($this->logos as $logo) { $fp = new CodeGen_Tools_FileReplacer("{$this->dirpath}/".$logo->getName()."_logos.h"); - $fp->puts(CodeGen_Tools_Indent::tabify($logo->hCode())); + $fp->puts($logo->hCode()); $fp->close(); } - + // generate project files for configure (unices and similar platforms like cygwin) if ($this->platform->test("unix")) { $this->writeConfigM4(); @@ -1260,7 +1260,7 @@ } if (isset($this->internalFunctions['MINIT'])) { - $indent = $need_block ? 6 : 4; + $indent = $need_block ? 8 : 4; if ($need_block) $code .= "\n do {\n"; $code .= CodeGen_Tools_Indent::indent($indent, $this->internalFunctions['MINIT']->getCode()); if ($need_block) $code .= "\n } while (0);\n"; @@ -1293,7 +1293,7 @@ } if (isset($this->internalFunctions['MSHUTDOWN'])) { - $indent = $need_block ? 6 : 4; + $indent = $need_block ? 8 : 4; if (count($this->phpini)) $code .= "\n do {\n"; $code .= CodeGen_Tools_Indent::indent(4, $this->internalFunctions['MSHUTDOWN']->getCode()); if (count($this->phpini)) $code .= "\n } while (0);\n"; @@ -1380,7 +1380,7 @@ // TODO move this decision up? if (isset($this->internalFunctions['MINFO'])) { $code .= "\n do {\n"; - $code .= CodeGen_Tools_Indent::indent(6, $this->internalFunctions['MINFO']->getCode()); + $code .= CodeGen_Tools_Indent::indent(8, $this->internalFunctions['MINFO']->getCode()); $code .= "\n } while (0);\n"; } else { $code .= " /* add your stuff here */\n"; @@ -1452,19 +1452,19 @@ if (!empty($this->logos)) { - echo "/* {{{ phpinfo logo definitions */\n"; + echo CodeGen_PECL_Element_Logo::cCodeHeader($this->name); foreach ($this->logos as $logo) { echo $logo->cCode($this->name); } - echo "\n/* }}} *\n\n"; + echo CodeGen_PECL_Element_Logo::cCodeFooter($this->name); } if (!empty($this->resources)) { - echo "/* {{{ Resource destructors */\n"; + echo CodeGen_PECL_Element_Resource::cCodeHeader($this->name); foreach ($this->resources as $resource) { echo $resource->cCode($this); } - echo "/* }}} *\n\n"; + echo CodeGen_PECL_Element_Resource::cCodeFooter($this->name); } echo $this->generateInterfaceRegistrations();

« previous php.pear.cvs (#38306) next »