nlopess Mon Aug 14 15:09:08 2006 UTC
Removed files: (Branch: PHP_5_2)
/php-src/ext/tidy libtidy.txt
Modified files:
/php-src/ext/tidy README php_tidy.h tidy.c
Log:
more static keywording
also remove the libtidy patch, as it is too old. users should use a newer
libtify anyway
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/README?r1=1.4&r2=1.4.6.1&diff_format=u
Index: php-src/ext/tidy/README
diff -u php-src/ext/tidy/README:1.4 php-src/ext/tidy/README:1.4.6.1
--- php-src/ext/tidy/README:1.4 Mon Jan 12 10:02:04 2004
+++ php-src/ext/tidy/README Mon Aug 14 15:09:08 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.26.2.1.2.1&r2=1.26.2.1.2.2&diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.26.2.1.2.1
php-src/ext/tidy/php_tidy.h:1.26.2.1.2.2
--- php-src/ext/tidy/php_tidy.h:1.26.2.1.2.1 Wed May 24 21:22:13 2006
+++ php-src/ext/tidy/php_tidy.h Mon Aug 14 15:09:08 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_tidy.h,v 1.26.2.1.2.1 2006/05/24 21:22:13 tony2001 Exp $ */
+/* $Id: php_tidy.h,v 1.26.2.1.2.2 2006/08/14 15:09:08 nlopess Exp $ */
#ifndef PHP_TIDY_H
#define PHP_TIDY_H
@@ -39,57 +39,57 @@
#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);
+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);
ZEND_BEGIN_MODULE_GLOBALS(tidy)
char *default_config;
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.4&r2=1.66.2.8.2.5&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.4
php-src/ext/tidy/tidy.c:1.66.2.8.2.5
--- php-src/ext/tidy/tidy.c:1.66.2.8.2.4 Sat Jul 8 00:13:17 2006
+++ php-src/ext/tidy/tidy.c Mon Aug 14 15:09:08 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.66.2.8.2.4 2006/07/08 00:13:17 nlopess Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.5 2006/08/14 15:09:08 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)
@@ -950,7 +950,7 @@
return SUCCESS;
}
-PHP_MINIT_FUNCTION(tidy)
+static PHP_MINIT_FUNCTION(tidy)
{
REGISTER_INI_ENTRIES();
REGISTER_TIDY_CLASS(tidy, doc, NULL, 0);
@@ -970,7 +970,7 @@
return SUCCESS;
}
-PHP_RINIT_FUNCTION(tidy)
+static PHP_RINIT_FUNCTION(tidy)
{
if (INI_BOOL("tidy.clean_output") == TRUE) {
if (php_start_ob_buffer_named("ob_tidyhandler", 0, 1 TSRMLS_CC)
== FAILURE) {
@@ -981,24 +981,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.66.2.8.2.4 2006/07/08 00:13:17
nlopess Exp $)");
+ php_info_print_table_row(2, "Extension Version",
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.5 2006/08/14 15:09:08
nlopess Exp $)");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
-PHP_FUNCTION(ob_tidyhandler)
+static PHP_FUNCTION(ob_tidyhandler)
{
char *input;
int input_len;
@@ -1055,7 +1055,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;
@@ -1085,7 +1085,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;
@@ -1099,7 +1099,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;
@@ -1114,7 +1114,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;
@@ -1152,7 +1152,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;
@@ -1167,7 +1167,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);
@@ -1176,7 +1176,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);
@@ -1185,7 +1185,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;
@@ -1200,7 +1200,7 @@
/* {{{ proto string tidy_get_release()
Get release date (version) for Tidy library */
-PHP_FUNCTION(tidy_get_release)
+static PHP_FUNCTION(tidy_get_release)
{
TIDY_SET_CONTEXT;
@@ -1216,7 +1216,7 @@
#if HAVE_TIDYOPTGETDOC
/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname)
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;
@@ -1256,7 +1256,7 @@
/* {{{ proto array tidy_get_config()
Get current Tidy configuarion */
-PHP_FUNCTION(tidy_get_config)
+static PHP_FUNCTION(tidy_get_config)
{
TidyIterator itOpt;
char *opt_name;
@@ -1295,7 +1295,7 @@
/* {{{ proto int tidy_get_status()
Get status of specfied document. */
-PHP_FUNCTION(tidy_get_status)
+static PHP_FUNCTION(tidy_get_status)
{
TIDY_FETCH_OBJECT;
@@ -1305,7 +1305,7 @@
/* {{{ proto int tidy_get_html_ver()
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;
@@ -1315,7 +1315,7 @@
/* {{{ proto boolean tidy_is_xhtml()
Indicates if the document is a XHTML document. */
-PHP_FUNCTION(tidy_is_xhtml)
+static PHP_FUNCTION(tidy_is_xhtml)
{
TIDY_FETCH_OBJECT;
@@ -1325,7 +1325,7 @@
/* {{{ proto boolean tidy_is_xhtml()
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;
@@ -1335,7 +1335,7 @@
/* {{{ proto int tidy_error_count()
Returns the Number of Tidy errors encountered for specified document. */
-PHP_FUNCTION(tidy_error_count)
+static PHP_FUNCTION(tidy_error_count)
{
TIDY_FETCH_OBJECT;
@@ -1345,7 +1345,7 @@
/* {{{ proto int tidy_warning_count()
Returns the Number of Tidy warnings encountered for specified document. */
-PHP_FUNCTION(tidy_warning_count)
+static PHP_FUNCTION(tidy_warning_count)
{
TIDY_FETCH_OBJECT;
@@ -1355,7 +1355,7 @@
/* {{{ proto int tidy_access_count()
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;
@@ -1365,7 +1365,7 @@
/* {{{ proto int tidy_config_count()
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;
@@ -1375,7 +1375,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;
@@ -1432,7 +1432,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;
@@ -1464,7 +1464,7 @@
}
}
-TIDY_DOC_METHOD(parseFile)
+static TIDY_DOC_METHOD(parseFile)
{
char *inputfile, *enc = NULL;
int input_len, enc_len = 0, contents_len = 0;
@@ -1498,7 +1498,7 @@
efree(contents);
}
-TIDY_DOC_METHOD(parseString)
+static TIDY_DOC_METHOD(parseString)
{
char *input, *enc = NULL;
int input_len, enc_len = 0;
@@ -1525,7 +1525,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);
@@ -1534,7 +1534,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);
@@ -1543,7 +1543,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);
@@ -1552,7 +1552,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);
@@ -1561,14 +1561,14 @@
/* {{{ proto tidyNode::tidyNode()
Constructor. */
-TIDY_NODE_METHOD(__construct)
+static TIDY_NODE_METHOD(__construct)
{
}
/* }}} */
/* {{{ proto boolean tidyNode::hasChildren()
Returns true if this node has children */
-TIDY_NODE_METHOD(hasChildren)
+static TIDY_NODE_METHOD(hasChildren)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1582,7 +1582,7 @@
/* {{{ proto boolean tidyNode::hasSiblings()
Returns true if this node has siblings */
-TIDY_NODE_METHOD(hasSiblings)
+static TIDY_NODE_METHOD(hasSiblings)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1596,7 +1596,7 @@
/* {{{ proto boolean tidyNode::isComment()
Returns true if this node represents a comment */
-TIDY_NODE_METHOD(isComment)
+static TIDY_NODE_METHOD(isComment)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1610,7 +1610,7 @@
/* {{{ proto boolean tidyNode::isHtml()
Returns true if this node is part of a HTML document */
-TIDY_NODE_METHOD(isHtml)
+static TIDY_NODE_METHOD(isHtml)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1624,7 +1624,7 @@
/* {{{ proto boolean tidyNode::isXhtml()
Returns true if this node is part of a XHTML document */
-TIDY_NODE_METHOD(isXhtml)
+static TIDY_NODE_METHOD(isXhtml)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1638,7 +1638,7 @@
/* {{{ proto boolean tidyNode::isXml()
Returns true if this node is part of a XML document */
-TIDY_NODE_METHOD(isXml)
+static TIDY_NODE_METHOD(isXml)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1652,7 +1652,7 @@
/* {{{ proto boolean tidyNode::isText()
Returns true if this node represents text (no markup) */
-TIDY_NODE_METHOD(isText)
+static TIDY_NODE_METHOD(isText)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1666,7 +1666,7 @@
/* {{{ proto boolean tidyNode::isJste()
Returns true if this node is JSTE */
-TIDY_NODE_METHOD(isJste)
+static TIDY_NODE_METHOD(isJste)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1680,7 +1680,7 @@
/* {{{ proto boolean tidyNode::isAsp()
Returns true if this node is ASP */
-TIDY_NODE_METHOD(isAsp)
+static TIDY_NODE_METHOD(isAsp)
{
TIDY_FETCH_ONLY_OBJECT;
@@ -1694,7 +1694,7 @@
/* {{{ proto boolean tidyNode::isPhp()
Returns true if this node is PHP */
-TIDY_NODE_METHOD(isPhp)
+static TIDY_NODE_METHOD(isPhp)
{
TIDY_FETCH_ONLY_OBJECT;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php