From 8e1a65814b1d3aa493ec5ed3d9517959a6e04ad0 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sat, 6 Oct 2007 21:28:10 +0000 Subject: [PATCH] fix ws & folding, nuke unused vars --- ext/xsl/xsl_fe.h | 9 +++++++++ ext/xsl/xsltprocessor.c | 35 +++++++++++++++++------------------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h index 46705a265c..c005b036b1 100644 --- a/ext/xsl/xsl_fe.h +++ b/ext/xsl/xsl_fe.h @@ -35,3 +35,12 @@ PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support); PHP_FUNCTION(xsl_xsltprocessor_register_php_functions); PHP_FUNCTION(xsl_xsltprocessor_set_profiling); #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 8d7df26f8b..01c3a0201b 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -48,7 +48,6 @@ const zend_function_entry php_xsl_xsltprocessor_class_functions[] = { {NULL, NULL, NULL} }; -/* {{{ attribute protos, not implemented yet */ /* {{{ php_xsl_xslt_string_to_xpathexpr() Translates a string to a XPath Expression */ static char *php_xsl_xslt_string_to_xpathexpr(const char *str TSRMLS_DC) @@ -73,7 +72,7 @@ static char *php_xsl_xslt_string_to_xpathexpr(const char *str TSRMLS_DC) } return (char *) value; } - +/* }}} */ /* {{{ php_xsl_xslt_make_params() Translates a PHP array to a libxslt parameters array */ @@ -124,8 +123,7 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params TSRMLS } /* }}} */ - -static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int type) +static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int type) /* {{{ */ { xsltTransformContextPtr tctxt; zval **args; @@ -315,17 +313,19 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t efree(fci.params); } } +/* }}} */ -void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs) +void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs) /* {{{ */ { xsl_ext_function_php(ctxt, nargs, 1); } +/* }}} */ -void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs) +void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs) /* {{{ */ { xsl_ext_function_php(ctxt, nargs, 2); } - +/* }}} */ /* {{{ proto void xsl_xsltprocessor_import_stylesheet(domdocument doc) U URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# @@ -414,8 +414,7 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet) } /* }}} end xsl_xsltprocessor_import_stylesheet */ - -static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStylesheetPtr style, zval *docp TSRMLS_DC) +static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStylesheetPtr style, zval *docp TSRMLS_DC) /* {{{ */ { xmlDocPtr newdocp; xmlDocPtr doc = NULL; @@ -514,6 +513,7 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl return newdocp; } +/* }}} */ /* {{{ proto domdocument xsl_xsltprocessor_transform_to_doc(domnode doc) U URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# @@ -575,7 +575,6 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc) } /* }}} end xsl_xsltprocessor_transform_to_doc */ - /* {{{ proto int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri) U */ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) @@ -617,7 +616,6 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) } /* }}} end xsl_xsltprocessor_transform_to_uri */ - /* {{{ proto string xsl_xsltprocessor_transform_to_xml(domdocument doc) U */ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) @@ -656,7 +654,6 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) } /* }}} end xsl_xsltprocessor_transform_to_xml */ - /* {{{ proto bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value]) U */ PHP_FUNCTION(xsl_xsltprocessor_set_parameter) @@ -825,9 +822,7 @@ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) /* {{{ proto bool xsl_xsltprocessor_set_profiling(string filename) */ PHP_FUNCTION(xsl_xsltprocessor_set_profiling) { - zval *id; - zval *array_value, **entry, *new_string; xsl_object *intern; char *filename; int filename_len; @@ -835,15 +830,11 @@ PHP_FUNCTION(xsl_xsltprocessor_set_profiling) if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == SUCCESS) { intern = (xsl_object *)zend_object_store_get_object(id TSRMLS_CC); - intern->profiling = estrndup(filename,filename_len); - RETURN_TRUE; - } else { WRONG_PARAM_COUNT; } - } /* }}} end xsl_xsltprocessor_set_profiling */ @@ -859,3 +850,11 @@ PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support) } /* }}} end xsl_xsltprocessor_has_exslt_support(); */ +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ -- 2.50.1