#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;
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)
{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)
{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)
return SUCCESS;
}
-PHP_MINIT_FUNCTION(tidy)
+static PHP_MINIT_FUNCTION(tidy)
{
REGISTER_INI_ENTRIES();
REGISTER_TIDY_CLASS(tidy, doc, NULL, 0);
return SUCCESS;
}
-PHP_RINIT_FUNCTION(tidy)
+static PHP_RINIT_FUNCTION(tidy)
{
if (INI_BOOL("tidy.clean_output") == TRUE) {
zval *name;
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");
DISPLAY_INI_ENTRIES();
}
-PHP_FUNCTION(ob_tidyhandler)
+static PHP_FUNCTION(ob_tidyhandler)
{
char *input;
int input_len;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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);
/* {{{ 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);
/* {{{ proto boolean tidy_diagnose()
Run configured diagnostics on parsed and repaired markup. */
-PHP_FUNCTION(tidy_diagnose)
+static PHP_FUNCTION(tidy_diagnose)
{
TIDY_FETCH_OBJECT;
/* {{{ 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;
#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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
}
/* }}} */
-TIDY_DOC_METHOD(__construct)
+static TIDY_DOC_METHOD(__construct)
{
char *inputfile = NULL, *enc = NULL;
int input_len = 0, enc_len = 0, contents_len = 0;
}
}
-TIDY_DOC_METHOD(parseFile)
+static TIDY_DOC_METHOD(parseFile)
{
char *inputfile, *enc = NULL;
int input_len, enc_len = 0, contents_len = 0;
efree(contents);
}
-TIDY_DOC_METHOD(parseString)
+static TIDY_DOC_METHOD(parseString)
{
char *input, *enc = NULL;
int input_len, enc_len = 0;
/* {{{ 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);
/* {{{ 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);
/* {{{ 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);
/* {{{ 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);
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;