cvs: pear /CodeGen_PECL/PECL Extension.php /CodeGen_PECL/PECL/Dependency With.php /CodeGen_PECL/PECL/Element Function.php Method.php Property.php
| From: | Hartmut Holzgraefe | Date: | Tue, 10 Oct 2006 07:18:46 +0000 |
| Subject: | cvs: pear /CodeGen_PECL/PECL Extension.php /CodeGen_PECL/PECL/Dependency With.php /CodeGen_PECL/PECL/Element Function.php Method.php Property.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42476@lists.php.net to get a copy of this message | ||
hholzgra Tue Oct 10 07:18:46 2006 UTC
Modified files:
/pear/CodeGen_PECL/PECL Extension.php
/pear/CodeGen_PECL/PECL/Dependency With.php
/pear/CodeGen_PECL/PECL/Element Function.php Method.php
Property.php
Log:
CS/WS fixes
http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Extension.php?r1=1.59&r2=1.60&diff_format=u Index: pear/CodeGen_PECL/PECL/Extension.php diff -u pear/CodeGen_PECL/PECL/Extension.php:1.59 pear/CodeGen_PECL/PECL/Extension.php:1.60 --- pear/CodeGen_PECL/PECL/Extension.php:1.59 Mon Oct 9 21:27:04 2006 +++ pear/CodeGen_PECL/PECL/Extension.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Extension.php,v 1.59 2006/10/09 21:27:04 hholzgra Exp $ + * @version CVS: $Id: Extension.php,v 1.60 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen_PECL */ @@ -757,12 +757,12 @@ $const_groups = array(); foreach ($this->constants as $constant) { - $const_groups[$constant->getGroup()][] = $constant; + $const_groups[$constant->getGroup()][] = $constant; } foreach ($const_groups as $group => $constants) { if ($group == "default") { - $group = $idName; + $group = $idName; } $fp->puts(CodeGen_PECL_Element_Constant::docHeader($group)); @@ -832,7 +832,7 @@ $fp->puts(" <para>\n".rtrim($with->summary)."\n </para>\n"); } } else { - $fp->puts(" <para>Requires <literal>".$with->getName()."</literal></para>\n"); + $fp->puts(" <para>Requires <literal>".$with->getName()."</literal></para>\n"); } } } @@ -878,7 +878,7 @@ $functionsXml = new CodeGen_Tools_FileReplacer($docdir."/functions.xml"); sort($function_entities); foreach ($function_entities as $entity) { - $functionsXml->puts(" &$entity;\n"); + $functionsXml->puts(" &$entity;\n"); } $functionsXml->close(); } @@ -895,21 +895,22 @@ * @access private * @return string zend_module_entry code fragment */ - function generateExtensionEntry() { + function generateExtensionEntry() + { $name = $this->name; $upname = strtoupper($this->name); $code = ""; if (empty($this->otherExtensions)) { - $moduleHeader = " STANDARD_MODULE_HEADER,"; + $moduleHeader = " STANDARD_MODULE_HEADER,"; } else { - $code.= CodeGen_PECL_Dependency_Extension::cCodeHeader($this); - foreach ($this->otherExtensions as $ext) { - $code.= $ext->cCode($this); - } - $code.= CodeGen_PECL_Dependency_Extension::cCodeFooter($this); + $code.= CodeGen_PECL_Dependency_Extension::cCodeHeader($this); + foreach ($this->otherExtensions as $ext) { + $code.= $ext->cCode($this); + } + $code.= CodeGen_PECL_Dependency_Extension::cCodeFooter($this); - $moduleHeader = + $moduleHeader = "#if ZEND_EXTENSION_API_NO >= 220050617 STANDARD_MODULE_HEADER_EX, NULL, {$this->name}_deps, @@ -1332,12 +1333,12 @@ } if (count($this->phpini)) { - $code .= " REGISTER_INI_ENTRIES();\n"; + $code .= " REGISTER_INI_ENTRIES();\n"; $need_block = true; } foreach ($this->logos as $logo) { - $code .= $this->codegen->block($logo->minitCode()); + $code .= $this->codegen->block($logo->minitCode()); $need_block = true; } @@ -1356,24 +1357,24 @@ } if (count($this->classes)) { - foreach ($this->classes as $class) { - $code .= $this->codegen->block($class->minitCode($this)); - } - $need_block = true; + foreach ($this->classes as $class) { + $code .= $this->codegen->block($class->minitCode($this)); + } + $need_block = true; } if (count($this->interfaces)) { - foreach ($this->interfaces as $interface) { - $code .= $this->codegen->block($interface->minitCode($this)); - } - $need_block = true; + foreach ($this->interfaces as $interface) { + $code .= $this->codegen->block($interface->minitCode($this)); + } + $need_block = true; } if (count($this->streams)) { - foreach ($this->streams as $stream) { - $code .= $this->codegen->block($stream->minitCode($this)); - } - $need_block = true; + foreach ($this->streams as $stream) { + $code .= $this->codegen->block($stream->minitCode($this)); + } + $need_block = true; } if (isset($this->internalFunctions['MINIT'])) { @@ -1395,7 +1396,7 @@ "; if (count($this->phpini)) { - $code .= " UNREGISTER_INI_ENTRIES();\n"; + $code .= " UNREGISTER_INI_ENTRIES();\n"; $need_block = true; } @@ -1428,7 +1429,7 @@ if (isset($this->internalFunctions['RINIT'])) { $code .= $this->codegen->block($this->internalFunctions['RINIT']->getCode()); } else { - $code .= " /* add your stuff here */\n"; + $code .= " /* add your stuff here */\n"; } $code .= " @@ -1530,7 +1531,7 @@ // }}} - // {{{ code file + // {{{ code file /** * Write the complete C code file @@ -1650,12 +1651,12 @@ foreach ($this->with as $with) { - echo $with->configm4($this); + echo $with->configm4($this); } $pathes = array(); foreach ($this->headers as $header) { - $pathes[$header->getPath()] = true; // TODO WTF??? + $pathes[$header->getPath()] = true; // TODO WTF??? } foreach (array_keys($pathes) as $path) { http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Dependency/With.php?r1=1.14&r2=1.15&diff_format=u Index: pear/CodeGen_PECL/PECL/Dependency/With.php diff -u pear/CodeGen_PECL/PECL/Dependency/With.php:1.14 pear/CodeGen_PECL/PECL/Dependency/With.php:1.15 --- pear/CodeGen_PECL/PECL/Dependency/With.php:1.14 Mon Oct 9 21:27:04 2006 +++ pear/CodeGen_PECL/PECL/Dependency/With.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: With.php,v 1.14 2006/10/09 21:27:04 hholzgra Exp $ + * @version CVS: $Id: With.php,v 1.15 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -217,15 +217,15 @@ */ function setMode($mode) { - switch ($mode) { - case "default": - case "pkg-config": - $this->mode = $mode; - return true; + switch ($mode) { + case "default": + case "pkg-config": + $this->mode = $mode; + return true; - default: - return PEAR::raiseError("'$mode' is not a valid <with> mode"); - } + default: + return PEAR::raiseError("'$mode' is not a valid <with> mode"); + } } /** @@ -302,13 +302,13 @@ */ function m4Line() { - $optname = str_replace("_", "-", $this->name); + $optname = str_replace("_", "-", $this->name); - return sprintf("PHP_ARG_WITH(%s, %s,[ %-20s With %s support])\n", - $optname, - $this->getSummary(), - sprintf("--with-%s[=DIR]", $optname), - $this->name); + return sprintf("PHP_ARG_WITH(%s, %s,[ %-20s With %s support])\n", + $optname, + $this->getSummary(), + sprintf("--with-%s[=DIR]", $optname), + $this->name); } @@ -332,7 +332,7 @@ switch ($this->mode) { case "pkg-config": - $code.= " + $code.= " if test -z \"\$PKG_CONFIG\" then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) @@ -348,25 +348,25 @@ fi "; - if ($this->version) { - $code .= " + if ($this->version) { + $code .= " if ! \$PKG_CONFIG --atleast-version {$this->version} $withName then PKG_VERSION=`\$PKG_CONFIG --modversion $withName` AC_MSG_ERROR(['$withName'\ is version \$PKG_VERSION, {$this->version} required]) fi "; - } + } - $code .= " + $code .= " PHP_EVAL_INCLINE(`\$PKG_CONFIG --cflags-only-I $withName`) PHP_EVAL_LIBLINE(`\$PKG_CONFIG --libs $withName`, {$extUpname}_SHARED_LIBADD) "; - break; + break; default: if ($this->testfile) { - $code.= " + $code.= " if test -r \"\$PHP_$withUpname/".$this->testfile."\"; then PHP_{$withUpname}_DIR=\"\$PHP_$withUpname\" else @@ -388,10 +388,10 @@ $pathes = array(); foreach ($this->getHeaders() as $header) { - $pathes[$header->getPath()] = true; + $pathes[$header->getPath()] = true; } foreach (array_keys($pathes) as $path) { - $code .=" PHP_ADD_INCLUDE(\$PHP_{$withUpname}_DIR/$path)\n"; + $code .=" PHP_ADD_INCLUDE(\$PHP_{$withUpname}_DIR/$path)\n"; } break; } @@ -415,4 +415,11 @@ } +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode:nil + * End: + */ ?> http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Element/Function.php?r1=1.36&r2=1.37&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Function.php diff -u pear/CodeGen_PECL/PECL/Element/Function.php:1.36 pear/CodeGen_PECL/PECL/Element/Function.php:1.37 --- pear/CodeGen_PECL/PECL/Element/Function.php:1.36 Mon Oct 9 10:23:18 2006 +++ pear/CodeGen_PECL/PECL/Element/Function.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Function.php,v 1.36 2006/10/09 10:23:18 hholzgra Exp $ + * @version CVS: $Id: Function.php,v 1.37 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -552,7 +552,7 @@ $name .= $char; } else if ($char == '.' && $proto{$n+1} == '.' && $proto{$n+2} == '.') { $name = "..."; - $n += 2; + $n += 2; } else { if ($name) $tokens[] = $name; $name = ""; @@ -577,7 +577,7 @@ if ($returnType === "resource" && $tokens[$n] !== "(") { $returnSubtype = $functionName; - $functionName = $tokens[$n++]; + $functionName = $tokens[$n++]; } // function name is not really used, taken from <function> tag instead @@ -1012,15 +1012,15 @@ } if (isset($param['optional']) && !$optional) { - $optional = true; + $optional = true; $argString .= "|"; } switch ($param['type']) { case "bool": $argString .= "b"; - $default = $this->defaultval($param, "0"); - $code .= " zend_bool $name = $default;\n"; + $default = $this->defaultval($param, "0"); + $code .= " zend_bool $name = $default;\n"; break; case "int": @@ -1116,23 +1116,23 @@ break; case "stream": - $zvalType = true; - $argString .= "r"; - $code .= " zval * {$name}_zval = NULL;\n"; - $code .= " php_stream * $name = NULL:\n"; - $postProcess.= " php_stream_from_zval($name, &_z$name);\n"; + $zvalType = true; + $argString .= "r"; + $code .= " zval * {$name}_zval = NULL;\n"; + $code .= " php_stream * $name = NULL:\n"; + $postProcess .= " php_stream_from_zval($name, &_z$name);\n"; break; case "callback": - $postProcess.= " if (!zend_is_callable({$name}, 0, NULL)) {\n"; - $postProcess.= " php_error(E_WARNING, \"Invalid comparison function.\");\n"; - $postProcess.= " return;"; - $postProcess.= " }\n"; + $postProcess .= " if (!zend_is_callable({$name}, 0, NULL)) {\n"; + $postProcess .= " php_error(E_WARNING, \"Invalid comparison function.\");\n"; + $postProcess .= " return;"; + $postProcess .= " }\n"; /* fallthru */ case "mixed": $zvalType = true; $argString .= "z"; - $code .= " zval * {$name} = NULL;\n"; + $code .= " zval * {$name} = NULL;\n"; break; } @@ -1436,7 +1436,7 @@ $code = ""; // generate refargs mask if needed - if ($this->hasRefArgs) { + if ($this->hasRefArgs) { $code.= "ZEND_BEGIN_ARG_INFO({$this->name}_arg_info, 0)\n"; foreach ($this->params as $param) { $code.= " ZEND_ARG_PASS_INFO(". (isset($param["byRef"]) ? 1 : 0) .")\n"; http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Element/Method.php?r1=1.21&r2=1.22&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Method.php diff -u pear/CodeGen_PECL/PECL/Element/Method.php:1.21 pear/CodeGen_PECL/PECL/Element/Method.php:1.22 --- pear/CodeGen_PECL/PECL/Element/Method.php:1.21 Mon Oct 9 21:27:05 2006 +++ pear/CodeGen_PECL/PECL/Element/Method.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Method.php,v 1.21 2006/10/09 21:27:05 hholzgra Exp $ + * @version CVS: $Id: Method.php,v 1.22 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -188,7 +188,7 @@ $code.= "\n _this_zval = getThis();\n"; } else { $code = " - if (zend_parse_method_parameters($argc TSRMLS_CC, getThis(), \"$argString\", ".join(", ",$argPointers).") == FAILURE) { + if (zend_parse_method_parameters($argc TSRMLS_CC, getThis(), \"$argString\", ".join(", ", $argPointers).") == FAILURE) { return; } @@ -242,7 +242,7 @@ } if ($this->name != "__construct") { - $param = array(); + $param = array(); $param['name'] = "_this_zval"; $param['type'] = "object"; $param['subtype'] = $this->classname; http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Element/Property.php?r1=1.7&r2=1.8&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Property.php diff -u pear/CodeGen_PECL/PECL/Element/Property.php:1.7 pear/CodeGen_PECL/PECL/Element/Property.php:1.8 --- pear/CodeGen_PECL/PECL/Element/Property.php:1.7 Mon Oct 9 21:27:05 2006 +++ pear/CodeGen_PECL/PECL/Element/Property.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Property.php,v 1.7 2006/10/09 21:27:05 hholzgra Exp $ + * @version CVS: $Id: Property.php,v 1.8 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -187,7 +187,8 @@ * @access public * @return string */ - function minitCode($classptr) { + function minitCode($classptr) + { $code = $this->ifConditionStart(); $code.= " zend_declare_property_{$this->type}({$classptr}, \n";
http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Extension.php?r1=1.59&r2=1.60&diff_format=u Index: pear/CodeGen_PECL/PECL/Extension.php diff -u pear/CodeGen_PECL/PECL/Extension.php:1.59 pear/CodeGen_PECL/PECL/Extension.php:1.60 --- pear/CodeGen_PECL/PECL/Extension.php:1.59 Mon Oct 9 21:27:04 2006 +++ pear/CodeGen_PECL/PECL/Extension.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Extension.php,v 1.59 2006/10/09 21:27:04 hholzgra Exp $ + * @version CVS: $Id: Extension.php,v 1.60 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen_PECL */ @@ -757,12 +757,12 @@ $const_groups = array(); foreach ($this->constants as $constant) { - $const_groups[$constant->getGroup()][] = $constant; + $const_groups[$constant->getGroup()][] = $constant; } foreach ($const_groups as $group => $constants) { if ($group == "default") { - $group = $idName; + $group = $idName; } $fp->puts(CodeGen_PECL_Element_Constant::docHeader($group)); @@ -832,7 +832,7 @@ $fp->puts(" <para>\n".rtrim($with->summary)."\n </para>\n"); } } else { - $fp->puts(" <para>Requires <literal>".$with->getName()."</literal></para>\n"); + $fp->puts(" <para>Requires <literal>".$with->getName()."</literal></para>\n"); } } } @@ -878,7 +878,7 @@ $functionsXml = new CodeGen_Tools_FileReplacer($docdir."/functions.xml"); sort($function_entities); foreach ($function_entities as $entity) { - $functionsXml->puts(" &$entity;\n"); + $functionsXml->puts(" &$entity;\n"); } $functionsXml->close(); } @@ -895,21 +895,22 @@ * @access private * @return string zend_module_entry code fragment */ - function generateExtensionEntry() { + function generateExtensionEntry() + { $name = $this->name; $upname = strtoupper($this->name); $code = ""; if (empty($this->otherExtensions)) { - $moduleHeader = " STANDARD_MODULE_HEADER,"; + $moduleHeader = " STANDARD_MODULE_HEADER,"; } else { - $code.= CodeGen_PECL_Dependency_Extension::cCodeHeader($this); - foreach ($this->otherExtensions as $ext) { - $code.= $ext->cCode($this); - } - $code.= CodeGen_PECL_Dependency_Extension::cCodeFooter($this); + $code.= CodeGen_PECL_Dependency_Extension::cCodeHeader($this); + foreach ($this->otherExtensions as $ext) { + $code.= $ext->cCode($this); + } + $code.= CodeGen_PECL_Dependency_Extension::cCodeFooter($this); - $moduleHeader = + $moduleHeader = "#if ZEND_EXTENSION_API_NO >= 220050617 STANDARD_MODULE_HEADER_EX, NULL, {$this->name}_deps, @@ -1332,12 +1333,12 @@ } if (count($this->phpini)) { - $code .= " REGISTER_INI_ENTRIES();\n"; + $code .= " REGISTER_INI_ENTRIES();\n"; $need_block = true; } foreach ($this->logos as $logo) { - $code .= $this->codegen->block($logo->minitCode()); + $code .= $this->codegen->block($logo->minitCode()); $need_block = true; } @@ -1356,24 +1357,24 @@ } if (count($this->classes)) { - foreach ($this->classes as $class) { - $code .= $this->codegen->block($class->minitCode($this)); - } - $need_block = true; + foreach ($this->classes as $class) { + $code .= $this->codegen->block($class->minitCode($this)); + } + $need_block = true; } if (count($this->interfaces)) { - foreach ($this->interfaces as $interface) { - $code .= $this->codegen->block($interface->minitCode($this)); - } - $need_block = true; + foreach ($this->interfaces as $interface) { + $code .= $this->codegen->block($interface->minitCode($this)); + } + $need_block = true; } if (count($this->streams)) { - foreach ($this->streams as $stream) { - $code .= $this->codegen->block($stream->minitCode($this)); - } - $need_block = true; + foreach ($this->streams as $stream) { + $code .= $this->codegen->block($stream->minitCode($this)); + } + $need_block = true; } if (isset($this->internalFunctions['MINIT'])) { @@ -1395,7 +1396,7 @@ "; if (count($this->phpini)) { - $code .= " UNREGISTER_INI_ENTRIES();\n"; + $code .= " UNREGISTER_INI_ENTRIES();\n"; $need_block = true; } @@ -1428,7 +1429,7 @@ if (isset($this->internalFunctions['RINIT'])) { $code .= $this->codegen->block($this->internalFunctions['RINIT']->getCode()); } else { - $code .= " /* add your stuff here */\n"; + $code .= " /* add your stuff here */\n"; } $code .= " @@ -1530,7 +1531,7 @@ // }}} - // {{{ code file + // {{{ code file /** * Write the complete C code file @@ -1650,12 +1651,12 @@ foreach ($this->with as $with) { - echo $with->configm4($this); + echo $with->configm4($this); } $pathes = array(); foreach ($this->headers as $header) { - $pathes[$header->getPath()] = true; // TODO WTF??? + $pathes[$header->getPath()] = true; // TODO WTF??? } foreach (array_keys($pathes) as $path) { http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Dependency/With.php?r1=1.14&r2=1.15&diff_format=u Index: pear/CodeGen_PECL/PECL/Dependency/With.php diff -u pear/CodeGen_PECL/PECL/Dependency/With.php:1.14 pear/CodeGen_PECL/PECL/Dependency/With.php:1.15 --- pear/CodeGen_PECL/PECL/Dependency/With.php:1.14 Mon Oct 9 21:27:04 2006 +++ pear/CodeGen_PECL/PECL/Dependency/With.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: With.php,v 1.14 2006/10/09 21:27:04 hholzgra Exp $ + * @version CVS: $Id: With.php,v 1.15 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -217,15 +217,15 @@ */ function setMode($mode) { - switch ($mode) { - case "default": - case "pkg-config": - $this->mode = $mode; - return true; + switch ($mode) { + case "default": + case "pkg-config": + $this->mode = $mode; + return true; - default: - return PEAR::raiseError("'$mode' is not a valid <with> mode"); - } + default: + return PEAR::raiseError("'$mode' is not a valid <with> mode"); + } } /** @@ -302,13 +302,13 @@ */ function m4Line() { - $optname = str_replace("_", "-", $this->name); + $optname = str_replace("_", "-", $this->name); - return sprintf("PHP_ARG_WITH(%s, %s,[ %-20s With %s support])\n", - $optname, - $this->getSummary(), - sprintf("--with-%s[=DIR]", $optname), - $this->name); + return sprintf("PHP_ARG_WITH(%s, %s,[ %-20s With %s support])\n", + $optname, + $this->getSummary(), + sprintf("--with-%s[=DIR]", $optname), + $this->name); } @@ -332,7 +332,7 @@ switch ($this->mode) { case "pkg-config": - $code.= " + $code.= " if test -z \"\$PKG_CONFIG\" then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) @@ -348,25 +348,25 @@ fi "; - if ($this->version) { - $code .= " + if ($this->version) { + $code .= " if ! \$PKG_CONFIG --atleast-version {$this->version} $withName then PKG_VERSION=`\$PKG_CONFIG --modversion $withName` AC_MSG_ERROR(['$withName'\ is version \$PKG_VERSION, {$this->version} required]) fi "; - } + } - $code .= " + $code .= " PHP_EVAL_INCLINE(`\$PKG_CONFIG --cflags-only-I $withName`) PHP_EVAL_LIBLINE(`\$PKG_CONFIG --libs $withName`, {$extUpname}_SHARED_LIBADD) "; - break; + break; default: if ($this->testfile) { - $code.= " + $code.= " if test -r \"\$PHP_$withUpname/".$this->testfile."\"; then PHP_{$withUpname}_DIR=\"\$PHP_$withUpname\" else @@ -388,10 +388,10 @@ $pathes = array(); foreach ($this->getHeaders() as $header) { - $pathes[$header->getPath()] = true; + $pathes[$header->getPath()] = true; } foreach (array_keys($pathes) as $path) { - $code .=" PHP_ADD_INCLUDE(\$PHP_{$withUpname}_DIR/$path)\n"; + $code .=" PHP_ADD_INCLUDE(\$PHP_{$withUpname}_DIR/$path)\n"; } break; } @@ -415,4 +415,11 @@ } +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode:nil + * End: + */ ?> http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Element/Function.php?r1=1.36&r2=1.37&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Function.php diff -u pear/CodeGen_PECL/PECL/Element/Function.php:1.36 pear/CodeGen_PECL/PECL/Element/Function.php:1.37 --- pear/CodeGen_PECL/PECL/Element/Function.php:1.36 Mon Oct 9 10:23:18 2006 +++ pear/CodeGen_PECL/PECL/Element/Function.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Function.php,v 1.36 2006/10/09 10:23:18 hholzgra Exp $ + * @version CVS: $Id: Function.php,v 1.37 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -552,7 +552,7 @@ $name .= $char; } else if ($char == '.' && $proto{$n+1} == '.' && $proto{$n+2} == '.') { $name = "..."; - $n += 2; + $n += 2; } else { if ($name) $tokens[] = $name; $name = ""; @@ -577,7 +577,7 @@ if ($returnType === "resource" && $tokens[$n] !== "(") { $returnSubtype = $functionName; - $functionName = $tokens[$n++]; + $functionName = $tokens[$n++]; } // function name is not really used, taken from <function> tag instead @@ -1012,15 +1012,15 @@ } if (isset($param['optional']) && !$optional) { - $optional = true; + $optional = true; $argString .= "|"; } switch ($param['type']) { case "bool": $argString .= "b"; - $default = $this->defaultval($param, "0"); - $code .= " zend_bool $name = $default;\n"; + $default = $this->defaultval($param, "0"); + $code .= " zend_bool $name = $default;\n"; break; case "int": @@ -1116,23 +1116,23 @@ break; case "stream": - $zvalType = true; - $argString .= "r"; - $code .= " zval * {$name}_zval = NULL;\n"; - $code .= " php_stream * $name = NULL:\n"; - $postProcess.= " php_stream_from_zval($name, &_z$name);\n"; + $zvalType = true; + $argString .= "r"; + $code .= " zval * {$name}_zval = NULL;\n"; + $code .= " php_stream * $name = NULL:\n"; + $postProcess .= " php_stream_from_zval($name, &_z$name);\n"; break; case "callback": - $postProcess.= " if (!zend_is_callable({$name}, 0, NULL)) {\n"; - $postProcess.= " php_error(E_WARNING, \"Invalid comparison function.\");\n"; - $postProcess.= " return;"; - $postProcess.= " }\n"; + $postProcess .= " if (!zend_is_callable({$name}, 0, NULL)) {\n"; + $postProcess .= " php_error(E_WARNING, \"Invalid comparison function.\");\n"; + $postProcess .= " return;"; + $postProcess .= " }\n"; /* fallthru */ case "mixed": $zvalType = true; $argString .= "z"; - $code .= " zval * {$name} = NULL;\n"; + $code .= " zval * {$name} = NULL;\n"; break; } @@ -1436,7 +1436,7 @@ $code = ""; // generate refargs mask if needed - if ($this->hasRefArgs) { + if ($this->hasRefArgs) { $code.= "ZEND_BEGIN_ARG_INFO({$this->name}_arg_info, 0)\n"; foreach ($this->params as $param) { $code.= " ZEND_ARG_PASS_INFO(". (isset($param["byRef"]) ? 1 : 0) .")\n"; http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Element/Method.php?r1=1.21&r2=1.22&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Method.php diff -u pear/CodeGen_PECL/PECL/Element/Method.php:1.21 pear/CodeGen_PECL/PECL/Element/Method.php:1.22 --- pear/CodeGen_PECL/PECL/Element/Method.php:1.21 Mon Oct 9 21:27:05 2006 +++ pear/CodeGen_PECL/PECL/Element/Method.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Method.php,v 1.21 2006/10/09 21:27:05 hholzgra Exp $ + * @version CVS: $Id: Method.php,v 1.22 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -188,7 +188,7 @@ $code.= "\n _this_zval = getThis();\n"; } else { $code = " - if (zend_parse_method_parameters($argc TSRMLS_CC, getThis(), \"$argString\", ".join(", ",$argPointers).") == FAILURE) { + if (zend_parse_method_parameters($argc TSRMLS_CC, getThis(), \"$argString\", ".join(", ", $argPointers).") == FAILURE) { return; } @@ -242,7 +242,7 @@ } if ($this->name != "__construct") { - $param = array(); + $param = array(); $param['name'] = "_this_zval"; $param['type'] = "object"; $param['subtype'] = $this->classname; http://cvs.php.net/viewvc.cgi/pear/CodeGen_PECL/PECL/Element/Property.php?r1=1.7&r2=1.8&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Property.php diff -u pear/CodeGen_PECL/PECL/Element/Property.php:1.7 pear/CodeGen_PECL/PECL/Element/Property.php:1.8 --- pear/CodeGen_PECL/PECL/Element/Property.php:1.7 Mon Oct 9 21:27:05 2006 +++ pear/CodeGen_PECL/PECL/Element/Property.php Tue Oct 10 07:18:46 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005, 2006 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Property.php,v 1.7 2006/10/09 21:27:05 hholzgra Exp $ + * @version CVS: $Id: Property.php,v 1.8 2006/10/10 07:18:46 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -187,7 +187,8 @@ * @access public * @return string */ - function minitCode($classptr) { + function minitCode($classptr) + { $code = $this->ifConditionStart(); $code.= " zend_declare_property_{$this->type}({$classptr}, \n";