diff options
author | SVN Migration <svn@php.net> | 2003-08-03 13:58:21 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2003-08-03 13:58:21 +0000 |
commit | 1002acbac0e99cad57b4ed3b58f1bae0b51980f5 (patch) | |
tree | 1cae9d4f16bd5e88c6f5fb708c4b8872d49e9ca6 /ext/tidy/php_tidy.h | |
parent | f05452fbcdceac2d1d8176d2c1b69c741af54ae9 (diff) | |
download | php-git-BEFORE_ARG_INFO.tar.gz |
This commit was manufactured by cvs2svn to create tag 'BEFORE_ARG_INFO'.BEFORE_ARG_INFO
Diffstat (limited to 'ext/tidy/php_tidy.h')
-rw-r--r-- | ext/tidy/php_tidy.h | 193 |
1 files changed, 0 insertions, 193 deletions
diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h deleted file mode 100644 index 42324e4a37..0000000000 --- a/ext/tidy/php_tidy.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 4 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2003 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: John Coggeshall <john@php.net> | - +----------------------------------------------------------------------+ -*/ - -/* $Id$ */ - -#ifndef PHP_TIDY_H -#define PHP_TIDY_H - -extern zend_module_entry tidy_module_entry; -#define phpext_tidy_ptr &tidy_module_entry - -#ifdef PHP_WIN32 -#define PHP_TIDY_API __declspec(dllexport) -#else -#define PHP_TIDY_API -#endif - -#ifdef ZTS -#include "TSRM.h" -#endif - -#include "tidyenum.h" -#include "tidy.h" -#include "buffio.h" - -#ifdef ZTS -#define TIDY_G(v) TSRMG(tidy_globals_id, zend_tidy_globals *, v) -#else -#define TIDY_G(v) (tidy_globals.v) -#endif - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#define TIDY_RV_FALSE(__t) __t->type = IS_BOOL; __t->value.lval = FALSE -#define TIDY_RV_TRUE(__t) __t->type = IS_BOOL; __t->value.lval = TRUE - -#define TIDY_IS_TN_PROP(_p) zend_hash_exists(TIDY_G(tn_prop), #_p, strlen(#_p)) -#define TIDY_IS_TA_PROP(_p) zend_hash_exists(TIDY_G(ta_prop), #_p, strlen(#_p)) - -#define REMOVE_NEWLINE(_z) _z->value.str.val[_z->value.str.len-1] = '\0'; - -#define TIDY_TAG_CONST(tag) REGISTER_LONG_CONSTANT("TIDY_TAG_" #tag, TidyTag_##tag, CONST_CS | CONST_PERSISTENT) -#define TIDY_ATTR_CONST(attr) REGISTER_LONG_CONSTANT("TIDY_ATTR_" #attr, TidyAttr_##attr, CONST_CS | CONST_PERSISTENT) -#define TIDY_NODE_CONST(name, type) REGISTER_LONG_CONSTANT("TIDY_NODETYPE_" #name, TidyNode_##type, CONST_CS | CONST_PERSISTENT) - -#define PHP_IS_TIDYUNDEF 0 -#define PHP_IS_TIDYNODE 1 -#define PHP_IS_TIDYATTR 2 - - -struct _PHPTidyDoc { - - TidyDoc doc; - TidyBuffer *errbuf; - zend_bool parsed; -}; - -typedef struct _PHPTidyDoc PHPTidyDoc; -typedef struct _PHPTidyObj PHPTidyObj; - -struct _PHPTidyObj { - zend_object obj; - TidyNode node; - TidyAttr attr; - PHPTidyDoc *tdoc; - unsigned int type; - zval *obj_parent; - unsigned int refcount; -}; - - -PHP_MINIT_FUNCTION(tidy); -PHP_MSHUTDOWN_FUNCTION(tidy); -PHP_RINIT_FUNCTION(tidy); -PHP_RSHUTDOWN_FUNCTION(tidy); -PHP_MINFO_FUNCTION(tidy); - -PHP_FUNCTION(tidy_create); -PHP_FUNCTION(tidy_setopt); -PHP_FUNCTION(tidy_getopt); -PHP_FUNCTION(tidy_parse_string); -PHP_FUNCTION(tidy_parse_file); -PHP_FUNCTION(tidy_clean_repair); -PHP_FUNCTION(tidy_diagnose); -PHP_FUNCTION(tidy_get_output); -PHP_FUNCTION(tidy_get_error_buffer); -PHP_FUNCTION(tidy_get_release); -PHP_FUNCTION(tidy_get_status); -PHP_FUNCTION(tidy_get_html_ver); -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(tidy_load_config); -PHP_FUNCTION(tidy_load_config_enc); -PHP_FUNCTION(tidy_set_encoding); -PHP_FUNCTION(tidy_save_config); - -PHP_FUNCTION(tidy_get_root); -PHP_FUNCTION(tidy_get_html); -PHP_FUNCTION(tidy_get_head); -PHP_FUNCTION(tidy_get_body); - -static void php_tidy_obj_clone(void *, void ** TSRMLS_DC); -static void php_tidy_obj_dtor(void *, zend_object_handle TSRMLS_DC); - -zend_object_value php_tidy_create_obj(zend_class_entry * TSRMLS_DC); -static zend_object_value php_tidy_register_object(PHPTidyObj *intern TSRMLS_DC); - -static zval *_php_tidy_create_obj_zval(unsigned int objtype, - PHPTidyObj *parent, - void *data - TSRMLS_DC); -static void _php_tidy_create_obj(zval *return_value, - unsigned int objtype, - PHPTidyObj *parent, - void *data - TSRMLS_DC); -/* object handlers */ -static zval * tidy_property_read(zval *object, zval *member, zend_bool silent TSRMLS_DC); -static void tidy_property_write(zval *obj, zval *member, zval *value TSRMLS_DC); -static zval ** tidy_property_get_ptr(zval *obj, zval *member TSRMLS_DC); -static int tidy_property_exists(zval *object, zval *member, int check_empty TSRMLS_DC); -static void tidy_property_delete(zval *obj, zval *member TSRMLS_DC); -static HashTable * tidy_get_properties(zval *object TSRMLS_DC); -static union _zend_function * tidy_get_method(zval *obj, char *method, int method_len TSRMLS_DC); -static int tidy_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS); -static union _zend_function * tidy_get_constructor(zval *obj TSRMLS_DC); -static zend_class_entry * tidy_get_class_entry(zval *obj TSRMLS_DC); -static int tidy_get_class_name(zval *obj, char **class_name, zend_uint *name_len, int parent TSRMLS_DC); -static int tidy_objects_compare(zval *obj_one, zval *obj_two TSRMLS_DC); -static void tidy_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC); -static void tidy_write_dim(zval *object, zval *offset, zval *value TSRMLS_DC); -static void tidy_del_dim(zval *object, zval *offset TSRMLS_DC); -static zval *tidy_read_dim(zval *object, zval *offset TSRMLS_DC); - -zend_bool _php_tidy_attr_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS); -zend_bool _php_tidy_node_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS); -void _php_tidy_init_prop_hashtables(); - -/* resource dtor */ -void dtor_TidyDoc(zend_rsrc_list_entry * TSRMLS_DC); - -/* constant register helpers */ -void _php_tidy_register_nodetypes(INIT_FUNC_ARGS); -void _php_tidy_register_tags(INIT_FUNC_ARGS); -void _php_tidy_register_attributes(INIT_FUNC_ARGS); - -/* Callbacks for hooking Tidy Memory alloc into e*alloc */ -void * _php_tidy_mem_alloc(size_t size); -void * _php_tidy_mem_realloc(void *mem, size_t newsize); -void _php_tidy_mem_free(void *mem); -void _php_tidy_mem_panic(ctmbstr errmsg); - -ZEND_BEGIN_MODULE_GLOBALS(tidy) -ZEND_END_MODULE_GLOBALS(tidy) - - - - - - -#endif - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ |