#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)
/* 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
/* 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)
#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:
#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)
*/
*
* 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[] */
/* {{{ 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");
return;
}
-PHP_FUNCTION(json_encode)
+static PHP_FUNCTION(json_encode)
{
zval *parameter;
smart_str buf = {0};
smart_str_free(&buf);
}
-PHP_FUNCTION(json_decode)
+static PHP_FUNCTION(json_decode)
{
char *parameter;
int parameter_len, utf16_len;
#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
#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
*/
#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)
#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;
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)
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
#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)
/* {{{ 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);
/* {{{ PHP_RINIT_FUNCTION
*/
-PHP_RINIT_FUNCTION(zlib)
+static PHP_RINIT_FUNCTION(zlib)
{
uint chunk_size = ZLIBG(output_compression);
/* {{{ 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);
/* {{{ 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");
/* {{{ 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;
/* {{{ 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;
*/
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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:
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
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",