cvs: php-src(PHP_5_2) /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c php_json.h /ext/pspell php_pspell.h pspell.c
/ext/tidy php_tidy.h tidy.c /ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c

From: Date: Mon, 14 Aug 2006 20:08:18 +0000
Subject: cvs: php-src(PHP_5_2) /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c php_json.h /ext/pspell php_pspell.h pspell.c
/ext/tidy php_tidy.h tidy.c /ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-39978@lists.php.net to get a copy of this message
nlopess Mon Aug 14 20:08:18 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/bz2 bz2.c php_bz2.h /php-src/ext/ctype ctype.c php_ctype.h /php-src/ext/json json.c php_json.h /php-src/ext/pspell php_pspell.h pspell.c /php-src/ext/tidy php_tidy.h tidy.c /php-src/ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c Log: move static declaration to *.c files mroe static/const keywording

http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.6&r2=1.14.2.3.2.7&diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.6 php-src/ext/bz2/bz2.c:1.14.2.3.2.7 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.6 Mon Aug 14 14:53:23 2006 +++ php-src/ext/bz2/bz2.c Mon Aug 14 20:08:17 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c,v 1.14.2.3.2.6 2006/08/14 14:53:23 nlopess Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.7 2006/08/14 20:08:17 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -40,6 +40,17 @@ #define PHP_BZ_ERRSTR 1 #define PHP_BZ_ERRBOTH 2 +static PHP_MINIT_FUNCTION(bz2); +static PHP_MSHUTDOWN_FUNCTION(bz2); +static PHP_MINFO_FUNCTION(bz2); +static PHP_FUNCTION(bzopen); +static PHP_FUNCTION(bzread); +static PHP_FUNCTION(bzerrno); +static PHP_FUNCTION(bzerrstr); +static PHP_FUNCTION(bzerror); +static PHP_FUNCTION(bzcompress); +static PHP_FUNCTION(bzdecompress); + /* {{{ arginfo */ static ZEND_BEGIN_ARG_INFO_EX(arginfo_bzread, 0, 0, 1) http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/php_bz2.h?r1=1.7.2.1.2.1&r2=1.7.2.1.2.2&diff_format=u Index: php-src/ext/bz2/php_bz2.h diff -u php-src/ext/bz2/php_bz2.h:1.7.2.1.2.1 php-src/ext/bz2/php_bz2.h:1.7.2.1.2.2 --- php-src/ext/bz2/php_bz2.h:1.7.2.1.2.1 Mon Aug 14 14:53:23 2006 +++ php-src/ext/bz2/php_bz2.h Mon Aug 14 20:08:17 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_bz2.h,v 1.7.2.1.2.1 2006/08/14 14:53:23 nlopess Exp $ */ +/* $Id: php_bz2.h,v 1.7.2.1.2.2 2006/08/14 20:08:17 nlopess Exp $ */ #ifndef PHP_BZ2_H #define PHP_BZ2_H @@ -29,17 +29,6 @@ /* Bzip2 includes */ #include <bzlib.h> -static PHP_MINIT_FUNCTION(bz2); -static PHP_MSHUTDOWN_FUNCTION(bz2); -static PHP_MINFO_FUNCTION(bz2); -static PHP_FUNCTION(bzopen); -static PHP_FUNCTION(bzread); -static PHP_FUNCTION(bzerrno); -static PHP_FUNCTION(bzerrstr); -static PHP_FUNCTION(bzerror); -static PHP_FUNCTION(bzcompress); -static PHP_FUNCTION(bzdecompress); - #else #define phpext_bz2_ptr NULL #endif http://cvs.php.net/viewvc.cgi/php-src/ext/ctype/ctype.c?r1=1.34.2.3.2.2&r2=1.34.2.3.2.3&diff_format=u Index: php-src/ext/ctype/ctype.c diff -u php-src/ext/ctype/ctype.c:1.34.2.3.2.2 php-src/ext/ctype/ctype.c:1.34.2.3.2.3 --- php-src/ext/ctype/ctype.c:1.34.2.3.2.2 Mon Aug 14 14:53:23 2006 +++ php-src/ext/ctype/ctype.c Mon Aug 14 20:08:17 2006 @@ -40,6 +40,24 @@ /* True global resources - no need for thread safety here */ /* static int le_ctype; */ +static PHP_MINIT_FUNCTION(ctype); +static PHP_MSHUTDOWN_FUNCTION(ctype); +static PHP_RINIT_FUNCTION(ctype); +static PHP_RSHUTDOWN_FUNCTION(ctype); +static PHP_MINFO_FUNCTION(ctype); + +static PHP_FUNCTION(ctype_alnum); +static PHP_FUNCTION(ctype_alpha); +static PHP_FUNCTION(ctype_cntrl); +static PHP_FUNCTION(ctype_digit); +static PHP_FUNCTION(ctype_lower); +static PHP_FUNCTION(ctype_graph); +static PHP_FUNCTION(ctype_print); +static PHP_FUNCTION(ctype_punct); +static PHP_FUNCTION(ctype_space); +static PHP_FUNCTION(ctype_upper); +static PHP_FUNCTION(ctype_xdigit); + /* {{{ arginfo */ static ZEND_BEGIN_ARG_INFO(arginfo_ctype_alnum, 0) http://cvs.php.net/viewvc.cgi/php-src/ext/ctype/php_ctype.h?r1=1.12.2.1.2.1&r2=1.12.2.1.2.2&diff_format=u Index: php-src/ext/ctype/php_ctype.h diff -u php-src/ext/ctype/php_ctype.h:1.12.2.1.2.1 php-src/ext/ctype/php_ctype.h:1.12.2.1.2.2 --- php-src/ext/ctype/php_ctype.h:1.12.2.1.2.1 Mon Aug 14 14:53:23 2006 +++ php-src/ext/ctype/php_ctype.h Mon Aug 14 20:08:17 2006 @@ -33,24 +33,6 @@ #define PHP_CTYPE_API #endif -static PHP_MINIT_FUNCTION(ctype); -static PHP_MSHUTDOWN_FUNCTION(ctype); -static PHP_RINIT_FUNCTION(ctype); -static PHP_RSHUTDOWN_FUNCTION(ctype); -static PHP_MINFO_FUNCTION(ctype); - -static PHP_FUNCTION(ctype_alnum); -static PHP_FUNCTION(ctype_alpha); -static PHP_FUNCTION(ctype_cntrl); -static PHP_FUNCTION(ctype_digit); -static PHP_FUNCTION(ctype_lower); -static PHP_FUNCTION(ctype_graph); -static PHP_FUNCTION(ctype_print); -static PHP_FUNCTION(ctype_punct); -static PHP_FUNCTION(ctype_space); -static PHP_FUNCTION(ctype_upper); -static PHP_FUNCTION(ctype_xdigit); - /* Declare any global variables you may need between the BEGIN and END macros here: http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.5&r2=1.9.2.6&diff_format=u Index: php-src/ext/json/json.c diff -u php-src/ext/json/json.c:1.9.2.5 php-src/ext/json/json.c:1.9.2.6 --- php-src/ext/json/json.c:1.9.2.5 Sat Jul 22 15:22:56 2006 +++ php-src/ext/json/json.c Mon Aug 14 20:08:17 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: json.c,v 1.9.2.5 2006/07/22 15:22:56 nlopess Exp $ */ +/* $Id: json.c,v 1.9.2.6 2006/08/14 20:08:17 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -30,6 +30,11 @@ #include "JSON_parser.h" #include "php_json.h" +static PHP_MINFO_FUNCTION(json); + +static PHP_FUNCTION(json_encode); +static PHP_FUNCTION(json_decode); + /* If you declare any globals in php_json.h uncomment this: ZEND_DECLARE_MODULE_GLOBALS(json) */ @@ -39,7 +44,7 @@ * * Every user visible function must have an entry in json_functions[]. */ -function_entry json_functions[] = { +static function_entry json_functions[] = { PHP_FE(json_encode, NULL) PHP_FE(json_decode, NULL) {NULL, NULL, NULL} /* Must be the last line in json_functions[] */ @@ -72,7 +77,7 @@ /* {{{ PHP_MINFO_FUNCTION */ -PHP_MINFO_FUNCTION(json) +static PHP_MINFO_FUNCTION(json) { php_info_print_table_start(); php_info_print_table_row(2, "json support", "enabled"); @@ -390,7 +395,7 @@ return; } -PHP_FUNCTION(json_encode) +static PHP_FUNCTION(json_encode) { zval *parameter; smart_str buf = {0}; @@ -406,7 +411,7 @@ smart_str_free(&buf); } -PHP_FUNCTION(json_decode) +static PHP_FUNCTION(json_decode) { char *parameter; int parameter_len, utf16_len; http://cvs.php.net/viewvc.cgi/php-src/ext/json/php_json.h?r1=1.8&r2=1.8.2.1&diff_format=u Index: php-src/ext/json/php_json.h diff -u php-src/ext/json/php_json.h:1.8 php-src/ext/json/php_json.h:1.8.2.1 --- php-src/ext/json/php_json.h:1.8 Sat Mar 18 04:15:16 2006 +++ php-src/ext/json/php_json.h Mon Aug 14 20:08:17 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_json.h,v 1.8 2006/03/18 04:15:16 omar Exp $ */ +/* $Id: php_json.h,v 1.8.2.1 2006/08/14 20:08:17 nlopess Exp $ */ #ifndef PHP_JSON_H #define PHP_JSON_H @@ -36,11 +36,6 @@ #include "TSRM.h" #endif -PHP_MINFO_FUNCTION(json); - -PHP_FUNCTION(json_encode); -PHP_FUNCTION(json_decode); - #ifdef ZTS #define JSON_G(v) TSRMG(json_globals_id, zend_json_globals *, v) #else http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/php_pspell.h?r1=1.15.2.1.2.1&r2=1.15.2.1.2.2&diff_format=u Index: php-src/ext/pspell/php_pspell.h diff -u php-src/ext/pspell/php_pspell.h:1.15.2.1.2.1 php-src/ext/pspell/php_pspell.h:1.15.2.1.2.2 --- php-src/ext/pspell/php_pspell.h:1.15.2.1.2.1 Mon Aug 14 14:53:23 2006 +++ php-src/ext/pspell/php_pspell.h Mon Aug 14 20:08:17 2006 @@ -16,35 +16,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pspell.h,v 1.15.2.1.2.1 2006/08/14 14:53:23 nlopess Exp $ */ +/* $Id: php_pspell.h,v 1.15.2.1.2.2 2006/08/14 20:08:17 nlopess Exp $ */ #ifndef _PSPELL_H #define _PSPELL_H #if HAVE_PSPELL extern zend_module_entry pspell_module_entry; #define pspell_module_ptr &pspell_module_entry - -static PHP_MINIT_FUNCTION(pspell); -static PHP_MINFO_FUNCTION(pspell); -static PHP_FUNCTION(pspell_new); -static PHP_FUNCTION(pspell_new_personal); -static PHP_FUNCTION(pspell_new_config); -static PHP_FUNCTION(pspell_check); -static PHP_FUNCTION(pspell_suggest); -static PHP_FUNCTION(pspell_store_replacement); -static PHP_FUNCTION(pspell_add_to_personal); -static PHP_FUNCTION(pspell_add_to_session); -static PHP_FUNCTION(pspell_clear_session); -static PHP_FUNCTION(pspell_save_wordlist); -static PHP_FUNCTION(pspell_config_create); -static PHP_FUNCTION(pspell_config_runtogether); -static PHP_FUNCTION(pspell_config_mode); -static PHP_FUNCTION(pspell_config_ignore); -static PHP_FUNCTION(pspell_config_personal); -static PHP_FUNCTION(pspell_config_dict_dir); -static PHP_FUNCTION(pspell_config_data_dir); -static PHP_FUNCTION(pspell_config_repl); -static PHP_FUNCTION(pspell_config_save_repl); #else #define pspell_module_ptr NULL #endif http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.1&r2=1.45.2.4.2.2&diff_format=u Index: php-src/ext/pspell/pspell.c diff -u php-src/ext/pspell/pspell.c:1.45.2.4.2.1 php-src/ext/pspell/pspell.c:1.45.2.4.2.2 --- php-src/ext/pspell/pspell.c:1.45.2.4.2.1 Mon Aug 14 14:53:23 2006 +++ php-src/ext/pspell/pspell.c Mon Aug 14 20:08:18 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pspell.c,v 1.45.2.4.2.1 2006/08/14 14:53:23 nlopess Exp $ */ +/* $Id: pspell.c,v 1.45.2.4.2.2 2006/08/14 20:08:18 nlopess Exp $ */ #define IS_EXT_MODULE @@ -50,9 +50,31 @@ */ #define PSPELL_LARGEST_WORD 3 +static PHP_MINIT_FUNCTION(pspell); +static PHP_MINFO_FUNCTION(pspell); +static PHP_FUNCTION(pspell_new); +static PHP_FUNCTION(pspell_new_personal); +static PHP_FUNCTION(pspell_new_config); +static PHP_FUNCTION(pspell_check); +static PHP_FUNCTION(pspell_suggest); +static PHP_FUNCTION(pspell_store_replacement); +static PHP_FUNCTION(pspell_add_to_personal); +static PHP_FUNCTION(pspell_add_to_session); +static PHP_FUNCTION(pspell_clear_session); +static PHP_FUNCTION(pspell_save_wordlist); +static PHP_FUNCTION(pspell_config_create); +static PHP_FUNCTION(pspell_config_runtogether); +static PHP_FUNCTION(pspell_config_mode); +static PHP_FUNCTION(pspell_config_ignore); +static PHP_FUNCTION(pspell_config_personal); +static PHP_FUNCTION(pspell_config_dict_dir); +static PHP_FUNCTION(pspell_config_data_dir); +static PHP_FUNCTION(pspell_config_repl); +static PHP_FUNCTION(pspell_config_save_repl); + /* {{{ pspell_functions[] */ -zend_function_entry pspell_functions[] = { +static zend_function_entry pspell_functions[] = { PHP_FE(pspell_new, NULL) PHP_FE(pspell_new_personal, NULL) PHP_FE(pspell_new_config, NULL) http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.26.2.1.2.2&r2=1.26.2.1.2.3&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.2 php-src/ext/tidy/php_tidy.h:1.26.2.1.2.3 --- php-src/ext/tidy/php_tidy.h:1.26.2.1.2.2 Mon Aug 14 15:09:08 2006 +++ php-src/ext/tidy/php_tidy.h Mon Aug 14 20:08:18 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tidy.h,v 1.26.2.1.2.2 2006/08/14 15:09:08 nlopess Exp $ */ +/* $Id: php_tidy.h,v 1.26.2.1.2.3 2006/08/14 20:08:18 nlopess Exp $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H @@ -39,58 +39,6 @@ #define TIDY_ATTR_METHOD(name) PHP_FUNCTION(tam_ ##name) #define TIDY_ATTR_ME(name, param) TIDY_METHOD_MAP(name, tam_ ##name, param) -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 -static PHP_FUNCTION(tidy_get_opt_doc); -#endif -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; zval *inst; http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.5&r2=1.66.2.8.2.6&diff_format=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.5 php-src/ext/tidy/tidy.c:1.66.2.8.2.6 --- php-src/ext/tidy/tidy.c:1.66.2.8.2.5 Mon Aug 14 15:09:08 2006 +++ php-src/ext/tidy/tidy.c Mon Aug 14 20:08:18 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c,v 1.66.2.8.2.5 2006/08/14 15:09:08 nlopess Exp $ */ +/* $Id: tidy.c,v 1.66.2.8.2.6 2006/08/14 20:08:18 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -237,6 +237,58 @@ static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options TSRMLS_DC); static void _php_tidy_register_nodetypes(INIT_FUNC_ARGS); static void _php_tidy_register_tags(INIT_FUNC_ARGS); + +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 +static PHP_FUNCTION(tidy_get_opt_doc); +#endif +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_DECLARE_MODULE_GLOBALS(tidy) @@ -992,7 +1044,7 @@ 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.5 2006/08/14 15:09:08 nlopess Exp $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.6 2006/08/14 20:08:18 nlopess Exp $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/php_zlib.h?r1=1.42.2.1&r2=1.42.2.1.2.1&diff_format=u Index: php-src/ext/zlib/php_zlib.h diff -u php-src/ext/zlib/php_zlib.h:1.42.2.1 php-src/ext/zlib/php_zlib.h:1.42.2.1.2.1 --- php-src/ext/zlib/php_zlib.h:1.42.2.1 Sun Jan 1 12:50:17 2006 +++ php-src/ext/zlib/php_zlib.h Mon Aug 14 20:08:18 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zlib.h,v 1.42.2.1 2006/01/01 12:50:17 sniper Exp $ */ +/* $Id: php_zlib.h,v 1.42.2.1.2.1 2006/08/14 20:08:18 nlopess Exp $ */ #ifndef PHP_ZLIB_H #define PHP_ZLIB_H @@ -39,26 +39,9 @@ extern zend_module_entry php_zlib_module_entry; #define zlib_module_ptr &php_zlib_module_entry -PHP_MINIT_FUNCTION(zlib); -PHP_MSHUTDOWN_FUNCTION(zlib); -PHP_RINIT_FUNCTION(zlib); -PHP_MINFO_FUNCTION(zlib); -PHP_FUNCTION(gzopen); -PHP_FUNCTION(readgzfile); -PHP_FUNCTION(gzfile); -PHP_FUNCTION(gzcompress); -PHP_FUNCTION(gzuncompress); -PHP_FUNCTION(gzdeflate); -PHP_FUNCTION(gzinflate); -PHP_FUNCTION(gzencode); -PHP_FUNCTION(ob_gzhandler); -PHP_FUNCTION(zlib_get_coding_type); - -int php_enable_output_compression(int buffer_size TSRMLS_DC); int php_ob_gzhandler_check(TSRMLS_D); php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); -extern php_stream_ops php_stream_gzio_ops; extern php_stream_wrapper php_stream_gzip_wrapper; #ifdef ZTS http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib.c?r1=1.183.2.6.2.3&r2=1.183.2.6.2.4&diff_format=u Index: php-src/ext/zlib/zlib.c diff -u php-src/ext/zlib/zlib.c:1.183.2.6.2.3 php-src/ext/zlib/zlib.c:1.183.2.6.2.4 --- php-src/ext/zlib/zlib.c:1.183.2.6.2.3 Mon Jun 26 23:22:58 2006 +++ php-src/ext/zlib/zlib.c Mon Aug 14 20:08:18 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.183.2.6.2.3 2006/06/26 23:22:58 tony2001 Exp $ */ +/* $Id: zlib.c,v 1.183.2.6.2.4 2006/08/14 20:08:18 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -82,11 +82,28 @@ #define GZIP_FOOTER_LENGTH 8 /* True globals, no need for thread safety */ -static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ +static const int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +static int php_enable_output_compression(int buffer_size TSRMLS_DC); + +static PHP_MINIT_FUNCTION(zlib); +static PHP_MSHUTDOWN_FUNCTION(zlib); +static PHP_RINIT_FUNCTION(zlib); +static PHP_MINFO_FUNCTION(zlib); +static PHP_FUNCTION(gzopen); +static PHP_FUNCTION(readgzfile); +static PHP_FUNCTION(gzfile); +static PHP_FUNCTION(gzcompress); +static PHP_FUNCTION(gzuncompress); +static PHP_FUNCTION(gzdeflate); +static PHP_FUNCTION(gzinflate); +static PHP_FUNCTION(gzencode); +static PHP_FUNCTION(ob_gzhandler); +static PHP_FUNCTION(zlib_get_coding_type); /* {{{ php_zlib_functions[] */ -zend_function_entry php_zlib_functions[] = { +static zend_function_entry php_zlib_functions[] = { PHP_FE(readgzfile, NULL) PHP_FALIAS(gzrewind, rewind, NULL) PHP_FALIAS(gzclose, fclose, NULL) @@ -205,7 +222,7 @@ /* {{{ PHP_MINIT_FUNCTION */ -PHP_MINIT_FUNCTION(zlib) +static PHP_MINIT_FUNCTION(zlib) { php_register_url_stream_wrapper("compress.zlib", &php_stream_gzip_wrapper TSRMLS_CC); php_stream_filter_register_factory("zlib.*", &php_zlib_filter_factory TSRMLS_CC); @@ -221,7 +238,7 @@ /* {{{ PHP_RINIT_FUNCTION */ -PHP_RINIT_FUNCTION(zlib) +static PHP_RINIT_FUNCTION(zlib) { uint chunk_size = ZLIBG(output_compression); @@ -240,7 +257,7 @@ /* {{{ PHP_MSHUTDOWN_FUNCTION */ -PHP_MSHUTDOWN_FUNCTION(zlib) +static PHP_MSHUTDOWN_FUNCTION(zlib) { php_unregister_url_stream_wrapper("zlib" TSRMLS_CC); php_stream_filter_unregister_factory("zlib.*" TSRMLS_CC); @@ -253,7 +270,7 @@ /* {{{ PHP_MINFO_FUNCTION */ -PHP_MINFO_FUNCTION(zlib) +static PHP_MINFO_FUNCTION(zlib) { php_info_print_table_start(); php_info_print_table_row(2, "ZLib Support", "enabled"); @@ -269,7 +286,7 @@ /* {{{ proto array gzfile(string filename [, int use_include_path]) Read und uncompress entire .gz-file into an array */ -PHP_FUNCTION(gzfile) +static PHP_FUNCTION(gzfile) { char *filename; int filename_len; @@ -314,7 +331,7 @@ /* {{{ proto resource gzopen(string filename, string mode [, int use_include_path]) Open a .gz-file and return a .gz-file pointer */ -PHP_FUNCTION(gzopen) +static PHP_FUNCTION(gzopen) { char *filename, *mode; int filename_len, mode_len; @@ -342,7 +359,7 @@ */ /* {{{ proto int readgzfile(string filename [, int use_include_path]) Output a .gz-file */ -PHP_FUNCTION(readgzfile) +static PHP_FUNCTION(readgzfile) { char *filename; int filename_len; @@ -369,7 +386,7 @@ /* {{{ proto string gzcompress(string data [, int level]) Gzip-compress a string */ -PHP_FUNCTION(gzcompress) +static PHP_FUNCTION(gzcompress) { int data_len, status; long level = Z_DEFAULT_COMPRESSION; @@ -411,7 +428,7 @@ /* {{{ proto string gzuncompress(string data [, int length]) Unzip a gzip-compressed string */ -PHP_FUNCTION(gzuncompress) +static PHP_FUNCTION(gzuncompress) { int data_len, status; unsigned int factor=1, maxfactor=16; @@ -457,7 +474,7 @@ /* {{{ proto string gzdeflate(string data [, int level]) Gzip-compress a string */ -PHP_FUNCTION(gzdeflate) +static PHP_FUNCTION(gzdeflate) { int data_len,status; long level = Z_DEFAULT_COMPRESSION; @@ -518,7 +535,7 @@ /* {{{ proto string gzinflate(string data [, int length]) Unzip a gzip-compressed string */ -PHP_FUNCTION(gzinflate) +static PHP_FUNCTION(gzinflate) { int data_len, status; unsigned int factor=1, maxfactor=16; @@ -598,7 +615,7 @@ /* {{{ proto string zlib_get_coding_type(void) Returns the coding type used for output compression */ -PHP_FUNCTION(zlib_get_coding_type) +static PHP_FUNCTION(zlib_get_coding_type) { switch (ZLIBG(compression_coding)) { case CODING_GZIP: @@ -732,7 +749,7 @@ /* {{{ proto string gzencode(string data [, int level [, int encoding_mode]]) GZ encode a string */ -PHP_FUNCTION(gzencode) +static PHP_FUNCTION(gzencode) { char *data, *s2; int data_len; @@ -862,7 +879,7 @@ /* {{{ proto string ob_gzhandler(string str, int mode) Encode str based on accept-encoding setting - designed to be called from ob_start() */ -PHP_FUNCTION(ob_gzhandler) +static PHP_FUNCTION(ob_gzhandler) { char *string; int string_len; @@ -963,7 +980,7 @@ /* {{{ php_enable_output_compression */ -int php_enable_output_compression(int buffer_size TSRMLS_DC) +static int php_enable_output_compression(int buffer_size TSRMLS_DC) { zval **a_encoding; http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib_fopen_wrapper.c?r1=1.46.2.1&r2=1.46.2.1.2.1&diff_format=u Index: php-src/ext/zlib/zlib_fopen_wrapper.c diff -u php-src/ext/zlib/zlib_fopen_wrapper.c:1.46.2.1 php-src/ext/zlib/zlib_fopen_wrapper.c:1.46.2.1.2.1 --- php-src/ext/zlib/zlib_fopen_wrapper.c:1.46.2.1 Sun Jan 1 12:50:17 2006 +++ php-src/ext/zlib/zlib_fopen_wrapper.c Mon Aug 14 20:08:18 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib_fopen_wrapper.c,v 1.46.2.1 2006/01/01 12:50:17 sniper Exp $ */ +/* $Id: zlib_fopen_wrapper.c,v 1.46.2.1.2.1 2006/08/14 20:08:18 nlopess Exp $ */ #define _GNU_SOURCE @@ -92,7 +92,7 @@ return gzflush(self->gz_file, Z_SYNC_FLUSH); } -php_stream_ops php_stream_gzio_ops = { +static php_stream_ops php_stream_gzio_ops = { php_gziop_write, php_gziop_read, php_gziop_close, php_gziop_flush, "ZLIB",
« previous php.cvs (#39978) next »