nlopess Mon Aug 14 15:17:03 2006 UTC Removed files: /php-src/ext/tidy libtidy.txt
Modified files: /php-src/ext/tidy README php_tidy.h tidy.c Log: MFB: static keywording
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/README?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/tidy/README diff -u php-src/ext/tidy/README:1.4 php-src/ext/tidy/README:1.5 --- php-src/ext/tidy/README:1.4 Mon Jan 12 10:02:04 2004 +++ php-src/ext/tidy/README Mon Aug 14 15:17:03 2006 @@ -5,12 +5,3 @@ Tidy is an extension based on Libtidy (http://tidy.sf.net/) and allows a PHP developer to clean, repair, and traverse HTML, XHTML, and XML documents -- including ones with embedded scripting languages such as PHP or ASP within them using OO constructs. - ---------------------------------------------------------------------------------------- -!! Important Note !! ---------------------------------------------------------------------------------------- -Older versions of libtidy have a small memory leak inside the ParseConfigFileEnc() function -used to load configuration from a file. If you intend to use this functionality apply -the "libtidy.txt" patch (cd tidy/src/; patch -p0 < libtidy.txt) to libtidy sources and -then recompile libtidy. ---------------------------------------------------------------------------------------- http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.29&r2=1.30&diff_format=u Index: php-src/ext/tidy/php_tidy.h diff -u php-src/ext/tidy/php_tidy.h:1.29 php-src/ext/tidy/php_tidy.h:1.30 --- php-src/ext/tidy/php_tidy.h:1.29 Wed May 24 21:22:27 2006 +++ php-src/ext/tidy/php_tidy.h Mon Aug 14 15:17:03 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tidy.h,v 1.29 2006/05/24 21:22:27 tony2001 Exp $ */ +/* $Id: php_tidy.h,v 1.30 2006/08/14 15:17:03 nlopess Exp $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H @@ -39,58 +39,58 @@ #define TIDY_ATTR_METHOD(name) PHP_FUNCTION(tam_ ##name) #define TIDY_ATTR_ME(name, param) TIDY_METHOD_MAP(name, tam_ ##name, param) -PHP_MINIT_FUNCTION(tidy); -PHP_MSHUTDOWN_FUNCTION(tidy); -PHP_RINIT_FUNCTION(tidy); -PHP_MINFO_FUNCTION(tidy); - -PHP_FUNCTION(tidy_getopt); -PHP_FUNCTION(tidy_parse_string); -PHP_FUNCTION(tidy_parse_file); -PHP_FUNCTION(tidy_clean_repair); -PHP_FUNCTION(tidy_repair_string); -PHP_FUNCTION(tidy_repair_file); -PHP_FUNCTION(tidy_diagnose); -PHP_FUNCTION(tidy_get_output); -PHP_FUNCTION(tidy_get_error_buffer); -PHP_FUNCTION(tidy_get_release); -PHP_FUNCTION(tidy_reset_config); -PHP_FUNCTION(tidy_get_config); -PHP_FUNCTION(tidy_get_status); -PHP_FUNCTION(tidy_get_html_ver); +static PHP_MINIT_FUNCTION(tidy); +static PHP_MSHUTDOWN_FUNCTION(tidy); +static PHP_RINIT_FUNCTION(tidy); +static PHP_MINFO_FUNCTION(tidy); + +static PHP_FUNCTION(tidy_getopt); +static PHP_FUNCTION(tidy_parse_string); +static PHP_FUNCTION(tidy_parse_file); +static PHP_FUNCTION(tidy_clean_repair); +static PHP_FUNCTION(tidy_repair_string); +static PHP_FUNCTION(tidy_repair_file); +static PHP_FUNCTION(tidy_diagnose); +static PHP_FUNCTION(tidy_get_output); +static PHP_FUNCTION(tidy_get_error_buffer); +static PHP_FUNCTION(tidy_get_release); +static PHP_FUNCTION(tidy_reset_config); +static PHP_FUNCTION(tidy_get_config); +static PHP_FUNCTION(tidy_get_status); +static PHP_FUNCTION(tidy_get_html_ver); #if HAVE_TIDYOPTGETDOC -PHP_FUNCTION(tidy_get_opt_doc); +static PHP_FUNCTION(tidy_get_opt_doc); #endif -PHP_FUNCTION(tidy_is_xhtml); -PHP_FUNCTION(tidy_is_xml); -PHP_FUNCTION(tidy_error_count); -PHP_FUNCTION(tidy_warning_count); -PHP_FUNCTION(tidy_access_count); -PHP_FUNCTION(tidy_config_count); - -PHP_FUNCTION(ob_tidyhandler); - -PHP_FUNCTION(tidy_get_root); -PHP_FUNCTION(tidy_get_html); -PHP_FUNCTION(tidy_get_head); -PHP_FUNCTION(tidy_get_body); - -TIDY_DOC_METHOD(__construct); -TIDY_DOC_METHOD(parseFile); -TIDY_DOC_METHOD(parseString); - -TIDY_NODE_METHOD(__construct); -TIDY_NODE_METHOD(hasChildren); -TIDY_NODE_METHOD(hasSiblings); -TIDY_NODE_METHOD(isComment); -TIDY_NODE_METHOD(isHtml); -TIDY_NODE_METHOD(isXhtml); -TIDY_NODE_METHOD(isXml); -TIDY_NODE_METHOD(isText); -TIDY_NODE_METHOD(isJste); -TIDY_NODE_METHOD(isAsp); -TIDY_NODE_METHOD(isPhp); -TIDY_NODE_METHOD(getParent); +static PHP_FUNCTION(tidy_is_xhtml); +static PHP_FUNCTION(tidy_is_xml); +static PHP_FUNCTION(tidy_error_count); +static PHP_FUNCTION(tidy_warning_count); +static PHP_FUNCTION(tidy_access_count); +static PHP_FUNCTION(tidy_config_count); + +static PHP_FUNCTION(ob_tidyhandler); + +static PHP_FUNCTION(tidy_get_root); +static PHP_FUNCTION(tidy_get_html); +static PHP_FUNCTION(tidy_get_head); +static PHP_FUNCTION(tidy_get_body); + +static TIDY_DOC_METHOD(__construct); +static TIDY_DOC_METHOD(parseFile); +static TIDY_DOC_METHOD(parseString); + +static TIDY_NODE_METHOD(__construct); +static TIDY_NODE_METHOD(hasChildren); +static TIDY_NODE_METHOD(hasSiblings); +static TIDY_NODE_METHOD(isComment); +static TIDY_NODE_METHOD(isHtml); +static TIDY_NODE_METHOD(isXhtml); +static TIDY_NODE_METHOD(isXml); +static TIDY_NODE_METHOD(isText); +static TIDY_NODE_METHOD(isJste); +static TIDY_NODE_METHOD(isAsp); +static TIDY_NODE_METHOD(isPhp); +static TIDY_NODE_METHOD(getParent); ZEND_BEGIN_MODULE_GLOBALS(tidy) char *default_config; http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.92&r2=1.93&diff_format=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.92 php-src/ext/tidy/tidy.c:1.93 --- php-src/ext/tidy/tidy.c:1.92 Tue Jul 25 23:03:56 2006 +++ php-src/ext/tidy/tidy.c Mon Aug 14 15:17:03 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c,v 1.92 2006/07/25 23:03:56 mike Exp $ */ +/* $Id: tidy.c,v 1.93 2006/08/14 15:17:03 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -246,7 +246,7 @@ PHP_INI_ENTRY("tidy.clean_output", "0", PHP_INI_PERDIR, NULL) PHP_INI_END() -zend_function_entry tidy_functions[] = { +static zend_function_entry tidy_functions[] = { PHP_FE(tidy_getopt, NULL) PHP_FE(tidy_parse_string, NULL) PHP_FE(tidy_parse_file, NULL) @@ -277,7 +277,7 @@ {NULL, NULL, NULL} }; -zend_function_entry tidy_funcs_doc[] = { +static zend_function_entry tidy_funcs_doc[] = { TIDY_METHOD_MAP(getOpt, tidy_getopt, NULL) TIDY_METHOD_MAP(cleanRepair, tidy_clean_repair, NULL) TIDY_DOC_ME(parseFile, NULL) @@ -302,7 +302,7 @@ {NULL, NULL, NULL} }; -zend_function_entry tidy_funcs_node[] = { +static zend_function_entry tidy_funcs_node[] = { TIDY_NODE_ME(__construct, NULL) TIDY_NODE_ME(hasChildren, NULL) TIDY_NODE_ME(hasSiblings, NULL) @@ -941,7 +941,7 @@ return SUCCESS; } -PHP_MINIT_FUNCTION(tidy) +static PHP_MINIT_FUNCTION(tidy) { REGISTER_INI_ENTRIES(); REGISTER_TIDY_CLASS(tidy, doc, NULL, 0); @@ -961,7 +961,7 @@ return SUCCESS; } -PHP_RINIT_FUNCTION(tidy) +static PHP_RINIT_FUNCTION(tidy) { if (INI_BOOL("tidy.clean_output") == TRUE) { zval *name; @@ -976,24 +976,24 @@ return SUCCESS; } -PHP_MSHUTDOWN_FUNCTION(tidy) +static PHP_MSHUTDOWN_FUNCTION(tidy) { UNREGISTER_INI_ENTRIES(); return SUCCESS; } -PHP_MINFO_FUNCTION(tidy) +static PHP_MINFO_FUNCTION(tidy) { php_info_print_table_start(); php_info_print_table_header(2, "Tidy support", "enabled"); php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate()); - php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.92 2006/07/25 23:03:56 mike Exp $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.93 2006/08/14 15:17:03 nlopess Exp $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); } -PHP_FUNCTION(ob_tidyhandler) +static PHP_FUNCTION(ob_tidyhandler) { char *input; int input_len; @@ -1047,7 +1047,7 @@ /* {{{ proto bool tidy_parse_string(string input [, mixed config_options [, string encoding]]) Parse a document stored in a string */ -PHP_FUNCTION(tidy_parse_string) +static PHP_FUNCTION(tidy_parse_string) { char *input, *enc = NULL; int input_len, enc_len = 0; @@ -1077,7 +1077,7 @@ /* {{{ proto string tidy_get_error_buffer([boolean detailed]) Return warnings and errors which occured parsing the specified document*/ -PHP_FUNCTION(tidy_get_error_buffer) +static PHP_FUNCTION(tidy_get_error_buffer) { TIDY_FETCH_OBJECT; @@ -1091,7 +1091,7 @@ /* {{{ proto string tidy_get_output() Return a string representing the parsed tidy markup */ -PHP_FUNCTION(tidy_get_output) +static PHP_FUNCTION(tidy_get_output) { TidyBuffer output = {0}; TIDY_FETCH_OBJECT; @@ -1104,7 +1104,7 @@ /* {{{ proto boolean tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]]) Parse markup in file or URI */ -PHP_FUNCTION(tidy_parse_file) +static PHP_FUNCTION(tidy_parse_file) { char *inputfile, *enc = NULL; int input_len, contents_len, enc_len = 0; @@ -1142,7 +1142,7 @@ /* {{{ proto boolean tidy_clean_repair() Execute configured cleanup and repair operations on parsed markup */ -PHP_FUNCTION(tidy_clean_repair) +static PHP_FUNCTION(tidy_clean_repair) { TIDY_FETCH_OBJECT; @@ -1157,7 +1157,7 @@ /* {{{ proto boolean tidy_repair_string(string data [, mixed config_file [, string encoding]]) Repair a string using an optionally provided configuration file */ -PHP_FUNCTION(tidy_repair_string) +static PHP_FUNCTION(tidy_repair_string) { TIDY_SET_CONTEXT; php_tidy_quick_repair(INTERNAL_FUNCTION_PARAM_PASSTHRU, FALSE); @@ -1166,7 +1166,7 @@ /* {{{ proto boolean tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]]) Repair a file using an optionally provided configuration file */ -PHP_FUNCTION(tidy_repair_file) +static PHP_FUNCTION(tidy_repair_file) { TIDY_SET_CONTEXT; php_tidy_quick_repair(INTERNAL_FUNCTION_PARAM_PASSTHRU, TRUE); @@ -1175,7 +1175,7 @@ /* {{{ proto boolean tidy_diagnose() Run configured diagnostics on parsed and repaired markup. */ -PHP_FUNCTION(tidy_diagnose) +static PHP_FUNCTION(tidy_diagnose) { TIDY_FETCH_OBJECT; @@ -1190,7 +1190,7 @@ /* {{{ proto string tidy_get_release() U Get release date (version) for Tidy library */ -PHP_FUNCTION(tidy_get_release) +static PHP_FUNCTION(tidy_get_release) { TIDY_SET_CONTEXT; @@ -1206,7 +1206,7 @@ #if HAVE_TIDYOPTGETDOC /* {{{ proto string tidy_get_opt_doc(tidy resource, string optname) U Returns the documentation for the given option name */ -PHP_FUNCTION(tidy_get_opt_doc) +static PHP_FUNCTION(tidy_get_opt_doc) { PHPTidyObj *obj; char *optname, *optval; @@ -1246,7 +1246,7 @@ /* {{{ proto array tidy_get_config() U Get current Tidy configuration */ -PHP_FUNCTION(tidy_get_config) +static PHP_FUNCTION(tidy_get_config) { TidyIterator itOpt; char *opt_name; @@ -1285,7 +1285,7 @@ /* {{{ proto int tidy_get_status() U Get status of specfied document. */ -PHP_FUNCTION(tidy_get_status) +static PHP_FUNCTION(tidy_get_status) { TIDY_FETCH_OBJECT; @@ -1295,7 +1295,7 @@ /* {{{ proto int tidy_get_html_ver() U Get the Detected HTML version for the specified document. */ -PHP_FUNCTION(tidy_get_html_ver) +static PHP_FUNCTION(tidy_get_html_ver) { TIDY_FETCH_OBJECT; @@ -1305,7 +1305,7 @@ /* {{{ proto bool tidy_is_xhtml() U Indicates if the document is a XHTML document. */ -PHP_FUNCTION(tidy_is_xhtml) +static PHP_FUNCTION(tidy_is_xhtml) { TIDY_FETCH_OBJECT; @@ -1315,7 +1315,7 @@ /* {{{ proto bool tidy_is_xhtml() U Indicates if the document is a generic (non HTML/XHTML) XML document. */ -PHP_FUNCTION(tidy_is_xml) +static PHP_FUNCTION(tidy_is_xml) { TIDY_FETCH_OBJECT; @@ -1325,7 +1325,7 @@ /* {{{ proto int tidy_error_count() U Returns the Number of Tidy errors encountered for specified document. */ -PHP_FUNCTION(tidy_error_count) +static PHP_FUNCTION(tidy_error_count) { TIDY_FETCH_OBJECT; @@ -1335,7 +1335,7 @@ /* {{{ proto int tidy_warning_count() U Returns the Number of Tidy warnings encountered for specified document. */ -PHP_FUNCTION(tidy_warning_count) +static PHP_FUNCTION(tidy_warning_count) { TIDY_FETCH_OBJECT; @@ -1345,7 +1345,7 @@ /* {{{ proto int tidy_access_count() U Returns the Number of Tidy accessibility warnings encountered for specified document. */ -PHP_FUNCTION(tidy_access_count) +static PHP_FUNCTION(tidy_access_count) { TIDY_FETCH_OBJECT; @@ -1355,7 +1355,7 @@ /* {{{ proto int tidy_config_count() U Returns the Number of Tidy configuration errors encountered for specified document. */ -PHP_FUNCTION(tidy_config_count) +static PHP_FUNCTION(tidy_config_count) { TIDY_FETCH_OBJECT; @@ -1365,7 +1365,7 @@ /* {{{ proto mixed tidy_getopt(string option) Returns the value of the specified configuration option for the tidy document. */ -PHP_FUNCTION(tidy_getopt) +static PHP_FUNCTION(tidy_getopt) { PHPTidyObj *obj; char *optname; @@ -1422,7 +1422,7 @@ } /* }}} */ -TIDY_DOC_METHOD(__construct) +static TIDY_DOC_METHOD(__construct) { char *inputfile = NULL, *enc = NULL; int input_len = 0, enc_len = 0, contents_len = 0; @@ -1454,7 +1454,7 @@ } } -TIDY_DOC_METHOD(parseFile) +static TIDY_DOC_METHOD(parseFile) { char *inputfile, *enc = NULL; int input_len, enc_len = 0, contents_len = 0; @@ -1488,7 +1488,7 @@ efree(contents); } -TIDY_DOC_METHOD(parseString) +static TIDY_DOC_METHOD(parseString) { char *input, *enc = NULL; int input_len, enc_len = 0; @@ -1515,7 +1515,7 @@ /* {{{ proto TidyNode tidy_get_root() Returns a TidyNode Object representing the root of the tidy parse tree */ -PHP_FUNCTION(tidy_get_root) +static PHP_FUNCTION(tidy_get_root) { TIDY_SET_CONTEXT; php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_root_node); @@ -1524,7 +1524,7 @@ /* {{{ proto TidyNode tidy_get_html() Returns a TidyNode Object starting from the <HTML> tag of the tidy parse tree */ -PHP_FUNCTION(tidy_get_html) +static PHP_FUNCTION(tidy_get_html) { TIDY_SET_CONTEXT; php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_html_node); @@ -1533,7 +1533,7 @@ /* {{{ proto TidyNode tidy_get_head() Returns a TidyNode Object starting from the <HEAD> tag of the tidy parse tree */ -PHP_FUNCTION(tidy_get_head) +static PHP_FUNCTION(tidy_get_head) { TIDY_SET_CONTEXT; php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_head_node); @@ -1542,7 +1542,7 @@ /* {{{ proto TidyNode tidy_get_body(resource tidy) Returns a TidyNode Object starting from the <BODY> tag of the tidy parse tree */ -PHP_FUNCTION(tidy_get_body) +static PHP_FUNCTION(tidy_get_body) { TIDY_SET_CONTEXT; php_tidy_create_node(INTERNAL_FUNCTION_PARAM_PASSTHRU, is_body_node); @@ -1551,14 +1551,14 @@ /* {{{ proto tidyNode::tidyNode() Constructor. */ -TIDY_NODE_METHOD(__construct) +static TIDY_NODE_METHOD(__construct) { } /* }}} */ /* {{{ proto bool tidyNode::hasChildren() U Returns true if this node has children */ -TIDY_NODE_METHOD(hasChildren) +static TIDY_NODE_METHOD(hasChildren) { TIDY_FETCH_ONLY_OBJECT; @@ -1572,7 +1572,7 @@ /* {{{ proto bool tidyNode::hasSiblings() U Returns true if this node has siblings */ -TIDY_NODE_METHOD(hasSiblings) +static TIDY_NODE_METHOD(hasSiblings) { TIDY_FETCH_ONLY_OBJECT; @@ -1586,7 +1586,7 @@ /* {{{ proto bool tidyNode::isComment() U Returns true if this node represents a comment */ -TIDY_NODE_METHOD(isComment) +static TIDY_NODE_METHOD(isComment) { TIDY_FETCH_ONLY_OBJECT; @@ -1600,7 +1600,7 @@ /* {{{ proto bool tidyNode::isHtml() U Returns true if this node is part of a HTML document */ -TIDY_NODE_METHOD(isHtml) +static TIDY_NODE_METHOD(isHtml) { TIDY_FETCH_ONLY_OBJECT; @@ -1614,7 +1614,7 @@ /* {{{ proto bool tidyNode::isXhtml() U Returns true if this node is part of a XHTML document */ -TIDY_NODE_METHOD(isXhtml) +static TIDY_NODE_METHOD(isXhtml) { TIDY_FETCH_ONLY_OBJECT; @@ -1628,7 +1628,7 @@ /* {{{ proto bool tidyNode::isXml() U Returns true if this node is part of a XML document */ -TIDY_NODE_METHOD(isXml) +static TIDY_NODE_METHOD(isXml) { TIDY_FETCH_ONLY_OBJECT; @@ -1642,7 +1642,7 @@ /* {{{ proto bool tidyNode::isText() U Returns true if this node represents text (no markup) */ -TIDY_NODE_METHOD(isText) +static TIDY_NODE_METHOD(isText) { TIDY_FETCH_ONLY_OBJECT; @@ -1656,7 +1656,7 @@ /* {{{ proto bool tidyNode::isJste() U Returns true if this node is JSTE */ -TIDY_NODE_METHOD(isJste) +static TIDY_NODE_METHOD(isJste) { TIDY_FETCH_ONLY_OBJECT; @@ -1670,7 +1670,7 @@ /* {{{ proto bool tidyNode::isAsp() U Returns true if this node is ASP */ -TIDY_NODE_METHOD(isAsp) +static TIDY_NODE_METHOD(isAsp) { TIDY_FETCH_ONLY_OBJECT; @@ -1684,7 +1684,7 @@ /* {{{ proto bool tidyNode::isPhp() U Returns true if this node is PHP */ -TIDY_NODE_METHOD(isPhp) +static TIDY_NODE_METHOD(isPhp) { TIDY_FETCH_ONLY_OBJECT; @@ -1698,7 +1698,7 @@ /* {{{ proto tidyNode tidyNode::getParent() U Returns the parent node if available or NULL */ -TIDY_NODE_METHOD(getParent) +static TIDY_NODE_METHOD(getParent) { TidyNode parent_node; PHPTidyObj *newobj;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php