diff options
author | Nuno Lopes <nlopess@php.net> | 2006-08-14 14:53:23 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-08-14 14:53:23 +0000 |
commit | 615a15d5fa22b467af045702e19cfa9870a2e160 (patch) | |
tree | 03346f1dfa1ae05aa3b2b1be6e818b95f327db48 | |
parent | c62d5fd1151a32fdb8cc6ae5fb66d83b10474977 (diff) | |
download | php-git-615a15d5fa22b467af045702e19cfa9870a2e160.tar.gz |
a few more static keywording
-rw-r--r-- | ext/bz2/bz2.c | 26 | ||||
-rw-r--r-- | ext/bz2/php_bz2.h | 20 | ||||
-rw-r--r-- | ext/ctype/ctype.c | 26 | ||||
-rw-r--r-- | ext/ctype/php_ctype.h | 32 | ||||
-rw-r--r-- | ext/pspell/php_pspell.h | 42 | ||||
-rw-r--r-- | ext/pspell/pspell.c | 42 |
6 files changed, 94 insertions, 94 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 6b2a5cee06..188024aa21 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -83,7 +83,7 @@ ZEND_END_ARG_INFO() /* }}} */ -zend_function_entry bz2_functions[] = { +static zend_function_entry bz2_functions[] = { PHP_FE(bzopen, arginfo_bzopen) PHP_FE(bzread, arginfo_bzread) PHP_FALIAS(bzwrite, fwrite, NULL) @@ -167,7 +167,7 @@ static int php_bz2iop_flush(php_stream *stream TSRMLS_DC) } /* }}} */ -php_stream_ops php_stream_bz2io_ops = { +static php_stream_ops php_stream_bz2io_ops = { php_bz2iop_write, php_bz2iop_read, php_bz2iop_close, php_bz2iop_flush, "BZip2", @@ -272,7 +272,7 @@ static php_stream_wrapper_ops bzip2_stream_wops = { NULL /* rmdir */ }; -php_stream_wrapper php_stream_bzip2_wrapper = { +static php_stream_wrapper php_stream_bzip2_wrapper = { &bzip2_stream_wops, NULL, 0 /* is_url */ @@ -280,14 +280,14 @@ php_stream_wrapper php_stream_bzip2_wrapper = { static void php_bz2_error(INTERNAL_FUNCTION_PARAMETERS, int); -PHP_MINIT_FUNCTION(bz2) +static PHP_MINIT_FUNCTION(bz2) { php_register_url_stream_wrapper("compress.bzip2", &php_stream_bzip2_wrapper TSRMLS_CC); php_stream_filter_register_factory("bzip2.*", &php_bz2_filter_factory TSRMLS_CC); return SUCCESS; } -PHP_MSHUTDOWN_FUNCTION(bz2) +static PHP_MSHUTDOWN_FUNCTION(bz2) { php_unregister_url_stream_wrapper("compress.bzip2" TSRMLS_CC); php_stream_filter_unregister_factory("bzip2.*" TSRMLS_CC); @@ -295,7 +295,7 @@ PHP_MSHUTDOWN_FUNCTION(bz2) return SUCCESS; } -PHP_MINFO_FUNCTION(bz2) +static PHP_MINFO_FUNCTION(bz2) { php_info_print_table_start(); php_info_print_table_row(2, "BZip2 Support", "Enabled"); @@ -307,7 +307,7 @@ PHP_MINFO_FUNCTION(bz2) /* {{{ proto string bzread(resource bz[, int length]) Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified */ -PHP_FUNCTION(bzread) +static PHP_FUNCTION(bzread) { zval *bz; long len = 1024; @@ -347,7 +347,7 @@ PHP_FUNCTION(bzread) /* {{{ proto resource bzopen(string|int file|fp, string mode) Opens a new BZip2 stream */ -PHP_FUNCTION(bzopen) +static PHP_FUNCTION(bzopen) { zval **file, /* The file to open */ **mode; /* The mode to open the stream with */ @@ -435,7 +435,7 @@ PHP_FUNCTION(bzopen) /* {{{ proto int bzerrno(resource bz) Returns the error number */ -PHP_FUNCTION(bzerrno) +static PHP_FUNCTION(bzerrno) { php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRNO); } @@ -443,7 +443,7 @@ PHP_FUNCTION(bzerrno) /* {{{ proto string bzerrstr(resource bz) Returns the error string */ -PHP_FUNCTION(bzerrstr) +static PHP_FUNCTION(bzerrstr) { php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRSTR); } @@ -451,7 +451,7 @@ PHP_FUNCTION(bzerrstr) /* {{{ proto array bzerror(resource bz) Returns the error number and error string in an associative array */ -PHP_FUNCTION(bzerror) +static PHP_FUNCTION(bzerror) { php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRBOTH); } @@ -459,7 +459,7 @@ PHP_FUNCTION(bzerror) /* {{{ proto string bzcompress(string source [, int blocksize100k [, int workfactor]]) Compresses a string into BZip2 encoded data */ -PHP_FUNCTION(bzcompress) +static PHP_FUNCTION(bzcompress) { zval **source, /* Source data to compress */ **zblock_size, /* Optional block size to use */ @@ -517,7 +517,7 @@ PHP_FUNCTION(bzcompress) /* {{{ proto string bzdecompress(string source [, int small]) Decompresses BZip2 compressed data */ -PHP_FUNCTION(bzdecompress) +static PHP_FUNCTION(bzdecompress) { char *source, *dest; int source_len, error; diff --git a/ext/bz2/php_bz2.h b/ext/bz2/php_bz2.h index 62646bf503..ace76e0714 100644 --- a/ext/bz2/php_bz2.h +++ b/ext/bz2/php_bz2.h @@ -29,16 +29,16 @@ extern zend_module_entry bz2_module_entry; /* Bzip2 includes */ #include <bzlib.h> -PHP_MINIT_FUNCTION(bz2); -PHP_MSHUTDOWN_FUNCTION(bz2); -PHP_MINFO_FUNCTION(bz2); -PHP_FUNCTION(bzopen); -PHP_FUNCTION(bzread); -PHP_FUNCTION(bzerrno); -PHP_FUNCTION(bzerrstr); -PHP_FUNCTION(bzerror); -PHP_FUNCTION(bzcompress); -PHP_FUNCTION(bzdecompress); +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 diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index 23aae50ee4..cccfe9e101 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -101,7 +101,7 @@ ZEND_END_ARG_INFO() /* {{{ ctype_functions[] * Every user visible function must have an entry in ctype_functions[]. */ -zend_function_entry ctype_functions[] = { +static zend_function_entry ctype_functions[] = { PHP_FE(ctype_alnum, arginfo_ctype_alnum) PHP_FE(ctype_alpha, arginfo_ctype_alpha) PHP_FE(ctype_cntrl, arginfo_ctype_cntrl) @@ -139,7 +139,7 @@ ZEND_GET_MODULE(ctype) /* {{{ PHP_MINFO_FUNCTION */ -PHP_MINFO_FUNCTION(ctype) +static PHP_MINFO_FUNCTION(ctype) { php_info_print_table_start(); php_info_print_table_row(2, "ctype functions", "enabled"); @@ -187,7 +187,7 @@ PHP_MINFO_FUNCTION(ctype) /* {{{ proto bool ctype_alnum(mixed c) Checks for alphanumeric character(s) */ -PHP_FUNCTION(ctype_alnum) +static PHP_FUNCTION(ctype_alnum) { CTYPE(isalnum); } @@ -195,7 +195,7 @@ PHP_FUNCTION(ctype_alnum) /* {{{ proto bool ctype_alpha(mixed c) Checks for alphabetic character(s) */ -PHP_FUNCTION(ctype_alpha) +static PHP_FUNCTION(ctype_alpha) { CTYPE(isalpha); } @@ -203,7 +203,7 @@ PHP_FUNCTION(ctype_alpha) /* {{{ proto bool ctype_cntrl(mixed c) Checks for control character(s) */ -PHP_FUNCTION(ctype_cntrl) +static PHP_FUNCTION(ctype_cntrl) { CTYPE(iscntrl); } @@ -211,7 +211,7 @@ PHP_FUNCTION(ctype_cntrl) /* {{{ proto bool ctype_digit(mixed c) Checks for numeric character(s) */ -PHP_FUNCTION(ctype_digit) +static PHP_FUNCTION(ctype_digit) { CTYPE(isdigit); } @@ -219,7 +219,7 @@ PHP_FUNCTION(ctype_digit) /* {{{ proto bool ctype_lower(mixed c) Checks for lowercase character(s) */ -PHP_FUNCTION(ctype_lower) +static PHP_FUNCTION(ctype_lower) { CTYPE(islower); } @@ -227,7 +227,7 @@ PHP_FUNCTION(ctype_lower) /* {{{ proto bool ctype_graph(mixed c) Checks for any printable character(s) except space */ -PHP_FUNCTION(ctype_graph) +static PHP_FUNCTION(ctype_graph) { CTYPE(isgraph); } @@ -235,7 +235,7 @@ PHP_FUNCTION(ctype_graph) /* {{{ proto bool ctype_print(mixed c) Checks for printable character(s) */ -PHP_FUNCTION(ctype_print) +static PHP_FUNCTION(ctype_print) { CTYPE(isprint); } @@ -243,7 +243,7 @@ PHP_FUNCTION(ctype_print) /* {{{ proto bool ctype_punct(mixed c) Checks for any printable character which is not whitespace or an alphanumeric character */ -PHP_FUNCTION(ctype_punct) +static PHP_FUNCTION(ctype_punct) { CTYPE(ispunct); } @@ -251,7 +251,7 @@ PHP_FUNCTION(ctype_punct) /* {{{ proto bool ctype_space(mixed c) Checks for whitespace character(s)*/ -PHP_FUNCTION(ctype_space) +static PHP_FUNCTION(ctype_space) { CTYPE(isspace); } @@ -259,7 +259,7 @@ PHP_FUNCTION(ctype_space) /* {{{ proto bool ctype_upper(mixed c) Checks for uppercase character(s) */ -PHP_FUNCTION(ctype_upper) +static PHP_FUNCTION(ctype_upper) { CTYPE(isupper); } @@ -267,7 +267,7 @@ PHP_FUNCTION(ctype_upper) /* {{{ proto bool ctype_xdigit(mixed c) Checks for character(s) representing a hexadecimal digit */ -PHP_FUNCTION(ctype_xdigit) +static PHP_FUNCTION(ctype_xdigit) { CTYPE(isxdigit); } diff --git a/ext/ctype/php_ctype.h b/ext/ctype/php_ctype.h index ec5d87384f..622123879d 100644 --- a/ext/ctype/php_ctype.h +++ b/ext/ctype/php_ctype.h @@ -33,23 +33,23 @@ extern zend_module_entry ctype_module_entry; #define PHP_CTYPE_API #endif -PHP_MINIT_FUNCTION(ctype); -PHP_MSHUTDOWN_FUNCTION(ctype); -PHP_RINIT_FUNCTION(ctype); -PHP_RSHUTDOWN_FUNCTION(ctype); -PHP_MINFO_FUNCTION(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); -PHP_FUNCTION(ctype_alnum); -PHP_FUNCTION(ctype_alpha); -PHP_FUNCTION(ctype_cntrl); -PHP_FUNCTION(ctype_digit); -PHP_FUNCTION(ctype_lower); -PHP_FUNCTION(ctype_graph); -PHP_FUNCTION(ctype_print); -PHP_FUNCTION(ctype_punct); -PHP_FUNCTION(ctype_space); -PHP_FUNCTION(ctype_upper); -PHP_FUNCTION(ctype_xdigit); +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 diff --git a/ext/pspell/php_pspell.h b/ext/pspell/php_pspell.h index 772d569ed6..5fb8447bbe 100644 --- a/ext/pspell/php_pspell.h +++ b/ext/pspell/php_pspell.h @@ -24,27 +24,27 @@ extern zend_module_entry pspell_module_entry; #define pspell_module_ptr &pspell_module_entry -PHP_MINIT_FUNCTION(pspell); -PHP_MINFO_FUNCTION(pspell); -PHP_FUNCTION(pspell_new); -PHP_FUNCTION(pspell_new_personal); -PHP_FUNCTION(pspell_new_config); -PHP_FUNCTION(pspell_check); -PHP_FUNCTION(pspell_suggest); -PHP_FUNCTION(pspell_store_replacement); -PHP_FUNCTION(pspell_add_to_personal); -PHP_FUNCTION(pspell_add_to_session); -PHP_FUNCTION(pspell_clear_session); -PHP_FUNCTION(pspell_save_wordlist); -PHP_FUNCTION(pspell_config_create); -PHP_FUNCTION(pspell_config_runtogether); -PHP_FUNCTION(pspell_config_mode); -PHP_FUNCTION(pspell_config_ignore); -PHP_FUNCTION(pspell_config_personal); -PHP_FUNCTION(pspell_config_dict_dir); -PHP_FUNCTION(pspell_config_data_dir); -PHP_FUNCTION(pspell_config_repl); -PHP_FUNCTION(pspell_config_save_repl); +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 diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 8936527298..a0ddad4034 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -119,7 +119,7 @@ static void php_pspell_close_config(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ PHP_MINIT_FUNCTION */ -PHP_MINIT_FUNCTION(pspell) +static PHP_MINIT_FUNCTION(pspell) { REGISTER_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS); @@ -133,7 +133,7 @@ PHP_MINIT_FUNCTION(pspell) /* {{{ proto int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]]) Load a dictionary */ -PHP_FUNCTION(pspell_new) +static PHP_FUNCTION(pspell_new) { zval **language,**spelling,**jargon,**encoding,**pmode; long mode = 0L, speed = 0L; @@ -236,7 +236,7 @@ PHP_FUNCTION(pspell_new) /* {{{ proto int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]]) Load a dictionary with a personal wordlist*/ -PHP_FUNCTION(pspell_new_personal) +static PHP_FUNCTION(pspell_new_personal) { zval **personal, **language,**spelling,**jargon,**encoding,**pmode; long mode = 0L, speed = 0L; @@ -352,7 +352,7 @@ PHP_FUNCTION(pspell_new_personal) /* {{{ proto int pspell_new_config(int config) Load a dictionary based on the given config */ -PHP_FUNCTION(pspell_new_config) +static PHP_FUNCTION(pspell_new_config) { int type; zval **conf; @@ -385,7 +385,7 @@ PHP_FUNCTION(pspell_new_config) /* {{{ proto bool pspell_check(int pspell, string word) Returns true if word is valid */ -PHP_FUNCTION(pspell_check) +static PHP_FUNCTION(pspell_check) { int type; zval **scin,**word; @@ -411,7 +411,7 @@ PHP_FUNCTION(pspell_check) /* {{{ proto array pspell_suggest(int pspell, string word) Returns array of suggestions */ -PHP_FUNCTION(pspell_suggest) +static PHP_FUNCTION(pspell_suggest) { zval **scin, **word; int argc; @@ -446,7 +446,7 @@ PHP_FUNCTION(pspell_suggest) /* {{{ proto bool pspell_store_replacement(int pspell, string misspell, string correct) Notify the dictionary of a user-selected replacement */ -PHP_FUNCTION(pspell_store_replacement) +static PHP_FUNCTION(pspell_store_replacement) { int type; zval **scin,**miss,**corr; @@ -474,7 +474,7 @@ PHP_FUNCTION(pspell_store_replacement) /* {{{ proto bool pspell_add_to_personal(int pspell, string word) Adds a word to a personal list */ -PHP_FUNCTION(pspell_add_to_personal) +static PHP_FUNCTION(pspell_add_to_personal) { int type; zval **scin,**word; @@ -506,7 +506,7 @@ PHP_FUNCTION(pspell_add_to_personal) /* {{{ proto bool pspell_add_to_session(int pspell, string word) Adds a word to the current session */ -PHP_FUNCTION(pspell_add_to_session) +static PHP_FUNCTION(pspell_add_to_session) { int type; zval **scin,**word; @@ -538,7 +538,7 @@ PHP_FUNCTION(pspell_add_to_session) /* {{{ proto bool pspell_clear_session(int pspell) Clears the current session */ -PHP_FUNCTION(pspell_clear_session) +static PHP_FUNCTION(pspell_clear_session) { int type; zval **scin; @@ -564,7 +564,7 @@ PHP_FUNCTION(pspell_clear_session) /* {{{ proto bool pspell_save_wordlist(int pspell) Saves the current (personal) wordlist */ -PHP_FUNCTION(pspell_save_wordlist) +static PHP_FUNCTION(pspell_save_wordlist) { int type; zval **scin; @@ -592,7 +592,7 @@ PHP_FUNCTION(pspell_save_wordlist) /* {{{ proto int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]]) Create a new config to be used later to create a manager */ -PHP_FUNCTION(pspell_config_create) +static PHP_FUNCTION(pspell_config_create) { zval **language,**spelling,**jargon,**encoding; int argc; @@ -667,7 +667,7 @@ PHP_FUNCTION(pspell_config_create) /* {{{ proto bool pspell_config_runtogether(int conf, bool runtogether) Consider run-together words as valid components */ -PHP_FUNCTION(pspell_config_runtogether) +static PHP_FUNCTION(pspell_config_runtogether) { int type; zval **conf, **runtogether; @@ -691,7 +691,7 @@ PHP_FUNCTION(pspell_config_runtogether) /* {{{ proto bool pspell_config_mode(int conf, long mode) Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS) */ -PHP_FUNCTION(pspell_config_mode) +static PHP_FUNCTION(pspell_config_mode) { int type; zval **conf, **mode; @@ -723,7 +723,7 @@ PHP_FUNCTION(pspell_config_mode) /* {{{ proto bool pspell_config_ignore(int conf, int ignore) Ignore words <= n chars */ -PHP_FUNCTION(pspell_config_ignore) +static PHP_FUNCTION(pspell_config_ignore) { int type; zval **conf, **pignore; @@ -797,7 +797,7 @@ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option) /* {{{ proto bool pspell_config_personal(int conf, string personal) Use a personal dictionary for this config */ -PHP_FUNCTION(pspell_config_personal) +static PHP_FUNCTION(pspell_config_personal) { pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "personal"); } @@ -805,7 +805,7 @@ PHP_FUNCTION(pspell_config_personal) /* {{{ proto bool pspell_config_dict_dir(int conf, string directory) location of the main word list */ -PHP_FUNCTION(pspell_config_dict_dir) +static PHP_FUNCTION(pspell_config_dict_dir) { pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "dict-dir"); } @@ -813,7 +813,7 @@ PHP_FUNCTION(pspell_config_dict_dir) /* {{{ proto bool pspell_config_data_dir(int conf, string directory) location of language data files */ -PHP_FUNCTION(pspell_config_data_dir) +static PHP_FUNCTION(pspell_config_data_dir) { pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "data-dir"); } @@ -821,7 +821,7 @@ PHP_FUNCTION(pspell_config_data_dir) /* {{{ proto bool pspell_config_repl(int conf, string repl) Use a personal dictionary with replacement pairs for this config */ -PHP_FUNCTION(pspell_config_repl) +static PHP_FUNCTION(pspell_config_repl) { int type; zval **conf, **repl; @@ -856,7 +856,7 @@ PHP_FUNCTION(pspell_config_repl) /* {{{ proto bool pspell_config_save_repl(int conf, bool save) Save replacement pairs when personal list is saved for this config */ -PHP_FUNCTION(pspell_config_save_repl) +static PHP_FUNCTION(pspell_config_save_repl) { int type; zval **conf, **save; @@ -880,7 +880,7 @@ PHP_FUNCTION(pspell_config_save_repl) /* {{{ PHP_MINFO_FUNCTION */ -PHP_MINFO_FUNCTION(pspell) +static PHP_MINFO_FUNCTION(pspell) { php_info_print_table_start(); php_info_print_table_row(2, "PSpell Support", "enabled"); |