diff options
author | Sascha Schumann <sas@php.net> | 1999-05-16 11:19:26 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 1999-05-16 11:19:26 +0000 |
commit | 39691bed9e9ce9480b2ee80edd275dca67ec840f (patch) | |
tree | 1157b0b5da25c06762da69493874e66e308e4c9c /ext/standard | |
parent | 5a4c63db531a762e2a2de025b0583293b1e7c679 (diff) | |
download | php-git-39691bed9e9ce9480b2ee80edd275dca67ec840f.tar.gz |
conv_proto *.[ch]
Diffstat (limited to 'ext/standard')
61 files changed, 459 insertions, 454 deletions
diff --git a/ext/standard/base64.c b/ext/standard/base64.c index fe52b79caf..69bdb9d4fa 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -140,7 +140,7 @@ unsigned char *_php3_base64_decode(const unsigned char *string, int length, int /* {{{ proto string base64_encode(string str) Encodes string using MIME base64 algorithm */ -void php3_base64_encode(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(base64_encode) { pval *string; unsigned char *result; int ret_length; @@ -163,7 +163,7 @@ void php3_base64_encode(INTERNAL_FUNCTION_PARAMETERS) { /* {{{ proto string base64_decode(string str) Decodes string using MIME base64 algorithm */ -void php3_base64_decode(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(base64_decode) { pval *string; unsigned char *result; int ret_length; diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 9dc2312551..b71898dac3 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -31,8 +31,8 @@ #ifndef _BASE64_h #define _BASE64_h -extern void php3_base64_decode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_base64_encode(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(base64_decode); +PHP_FUNCTION(base64_encode); extern unsigned char *_php3_base64_encode(const unsigned char *, int, int *); extern unsigned char *_php3_base64_decode(const unsigned char *, int, int *); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ed3ac07041..d0ca3da550 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -74,6 +74,7 @@ function_entry basic_functions[] = { {"strval", string_value, NULL}, PHP_FE(define, NULL) PHP_FE(defined, NULL) + PHP_FE(bin2hex, NULL) {"short_tags", php3_toggle_short_open_tag, NULL}, {"sleep", php3_sleep, NULL}, {"usleep", php3_usleep, NULL}, @@ -406,7 +407,7 @@ int php3_rshutdown_basic(SHUTDOWN_FUNC_ARGS) * System Functions * ********************/ -void php3_getenv(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getenv) { #if FHTTPD int i; @@ -459,7 +460,7 @@ void php3_getenv(INTERNAL_FUNCTION_PARAMETERS) #if HAVE_PUTENV -void php3_putenv(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(putenv) { pval *str; @@ -506,7 +507,7 @@ void php3_putenv(INTERNAL_FUNCTION_PARAMETERS) #endif -void php3_error_reporting(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(error_reporting) { pval *arg; int old_error_reporting; @@ -531,7 +532,7 @@ void php3_error_reporting(INTERNAL_FUNCTION_PARAMETERS) RETVAL_LONG(old_error_reporting); } -void php3_toggle_short_open_tag(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(toggle_short_open_tag) { /* has to be implemented within Zend */ #if 0 @@ -630,7 +631,7 @@ static int array_key_compare(const void *a, const void *b) } -void php3_key_sort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(key_sort) { pval *array; HashTable *target_hash; @@ -654,7 +655,7 @@ void php3_key_sort(INTERNAL_FUNCTION_PARAMETERS) } -void php3_count(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(count) { pval *array; HashTable *target_hash; @@ -731,7 +732,7 @@ static int array_reverse_data_compare(const void *a, const void *b) return array_data_compare(a,b)*-1; } -void php3_asort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(asort) { pval *array; HashTable *target_hash; @@ -754,7 +755,7 @@ void php3_asort(INTERNAL_FUNCTION_PARAMETERS) RETURN_TRUE; } -void php3_arsort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(arsort) { pval *array; HashTable *target_hash; @@ -777,7 +778,7 @@ void php3_arsort(INTERNAL_FUNCTION_PARAMETERS) RETURN_TRUE; } -void php3_sort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(sort) { pval *array; HashTable *target_hash; @@ -800,7 +801,7 @@ void php3_sort(INTERNAL_FUNCTION_PARAMETERS) RETURN_TRUE; } -void php3_rsort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rsort) { pval *array; HashTable *target_hash; @@ -847,7 +848,7 @@ static int array_user_compare(const void *a, const void *b) } -void php3_user_sort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(user_sort) { pval *array; pval *old_compare_func; @@ -873,7 +874,7 @@ void php3_user_sort(INTERNAL_FUNCTION_PARAMETERS) RETURN_TRUE; } -void php3_auser_sort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(auser_sort) { pval *array; pval *old_compare_func; @@ -947,7 +948,7 @@ static int array_user_key_compare(const void *a, const void *b) } -void php3_user_key_sort(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(user_key_sort) { pval *array; pval *old_compare_func; @@ -1177,7 +1178,7 @@ void array_current_key(INTERNAL_FUNCTION_PARAMETERS) #ifdef __cplusplus void php3_flush(HashTable *) #else -void php3_flush(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(flush) #endif { SLS_FETCH(); @@ -1201,7 +1202,7 @@ void php3_flush(INTERNAL_FUNCTION_PARAMETERS) } -void php3_sleep(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(sleep) { pval *num; @@ -1212,7 +1213,7 @@ void php3_sleep(INTERNAL_FUNCTION_PARAMETERS) sleep(num->value.lval); } -void php3_usleep(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(usleep) { #if HAVE_USLEEP pval *num; @@ -1225,7 +1226,7 @@ void php3_usleep(INTERNAL_FUNCTION_PARAMETERS) #endif } -void php3_gettype(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gettype) { pval *arg; @@ -1266,7 +1267,7 @@ void php3_gettype(INTERNAL_FUNCTION_PARAMETERS) } -void php3_settype(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(settype) { pval *var, *type; char *new_type; @@ -1296,7 +1297,7 @@ void php3_settype(INTERNAL_FUNCTION_PARAMETERS) } -void php3_min(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(min) { int argc=ARG_COUNT(ht); pval **result; @@ -1347,7 +1348,7 @@ void php3_min(INTERNAL_FUNCTION_PARAMETERS) } -void php3_max(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(max) { int argc=ARG_COUNT(ht); pval **result; @@ -1411,7 +1412,7 @@ static int _php3_array_walk(const void *a) return 0; } -void php3_array_walk(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(array_walk) { pval *array, *old_walk_func_name; HashTable *target_hash; @@ -1433,7 +1434,7 @@ void php3_array_walk(INTERNAL_FUNCTION_PARAMETERS) { } #if 0 -void php3_max(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(max) { pval **argv; int argc, i; @@ -1500,13 +1501,13 @@ void php3_max(INTERNAL_FUNCTION_PARAMETERS) } #endif -void php3_get_current_user(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(get_current_user) { RETURN_STRING(_php3_get_current_user(),1); } -void php3_get_cfg_var(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(get_cfg_var) { pval *varname; char *value; @@ -1523,7 +1524,7 @@ void php3_get_cfg_var(INTERNAL_FUNCTION_PARAMETERS) RETURN_STRING(value,1); } -void php3_set_magic_quotes_runtime(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(set_magic_quotes_runtime) { pval *new_setting; PLS_FETCH(); @@ -1537,14 +1538,14 @@ void php3_set_magic_quotes_runtime(INTERNAL_FUNCTION_PARAMETERS) RETURN_TRUE; } -void php3_get_magic_quotes_runtime(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(get_magic_quotes_runtime) { PLS_FETCH(); RETURN_LONG(PG(magic_quotes_runtime)); } -void php3_get_magic_quotes_gpc(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(get_magic_quotes_gpc) { PLS_FETCH(); @@ -1567,14 +1568,14 @@ void php3_is_type(INTERNAL_FUNCTION_PARAMETERS,int type) } -void php3_is_long(INTERNAL_FUNCTION_PARAMETERS) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_LONG); } -void php3_is_double(INTERNAL_FUNCTION_PARAMETERS) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_DOUBLE); } -void php3_is_string(INTERNAL_FUNCTION_PARAMETERS) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_STRING); } -void php3_is_array(INTERNAL_FUNCTION_PARAMETERS) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_ARRAY); } -void php3_is_object(INTERNAL_FUNCTION_PARAMETERS) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_OBJECT); } +PHP_FUNCTION(is_long) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_LONG); } +PHP_FUNCTION(is_double) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_DOUBLE); } +PHP_FUNCTION(is_string) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_STRING); } +PHP_FUNCTION(is_array) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_ARRAY); } +PHP_FUNCTION(is_object) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_OBJECT); } -void php3_leak(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(leak) { int leakbytes=3; pval *leak; @@ -1602,7 +1603,7 @@ void php3_leak(INTERNAL_FUNCTION_PARAMETERS) 3 = save to file in 3rd parameter */ -void php3_error_log(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(error_log) { pval *string, *erropt = NULL, *option = NULL, *emailhead = NULL; int opt_err = 0; @@ -1703,7 +1704,7 @@ PHPAPI int _php3_error_log(int opt_err,char *message,char *opt,char *headers){ } -void php3_call_user_func(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(call_user_func) { pval **params; pval retval; @@ -1729,7 +1730,7 @@ void php3_call_user_func(INTERNAL_FUNCTION_PARAMETERS) } -void php3_call_user_method(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(call_user_method) { pval **params; pval retval; diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 96f2e32951..a12c9720e6 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -43,61 +43,61 @@ extern int php3_minit_basic(INIT_FUNC_ARGS); extern int php3_mshutdown_basic(SHUTDOWN_FUNC_ARGS); extern int php3_rinit_basic(INIT_FUNC_ARGS); extern int php3_rshutdown_basic(SHUTDOWN_FUNC_ARGS); -extern void int_value(INTERNAL_FUNCTION_PARAMETERS); -extern void double_value(INTERNAL_FUNCTION_PARAMETERS); -extern void string_value(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_toggle_short_open_tag(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_sleep(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_usleep(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_key_sort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_asort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_arsort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_sort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rsort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_user_sort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_auser_sort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_user_key_sort(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_array_walk(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_count(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_flush(INTERNAL_FUNCTION_PARAMETERS); -extern void array_end(INTERNAL_FUNCTION_PARAMETERS); -extern void array_prev(INTERNAL_FUNCTION_PARAMETERS); -extern void array_next(INTERNAL_FUNCTION_PARAMETERS); -extern void array_each(INTERNAL_FUNCTION_PARAMETERS); -extern void array_reset(INTERNAL_FUNCTION_PARAMETERS); -extern void array_current(INTERNAL_FUNCTION_PARAMETERS); -extern void array_current_key(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gettype(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_settype(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_min(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_max(INTERNAL_FUNCTION_PARAMETERS); +void int_value(INTERNAL_FUNCTION_PARAMETERS); +void double_value(INTERNAL_FUNCTION_PARAMETERS); +void string_value(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(toggle_short_open_tag); +PHP_FUNCTION(sleep); +PHP_FUNCTION(usleep); +PHP_FUNCTION(key_sort); +PHP_FUNCTION(asort); +PHP_FUNCTION(arsort); +PHP_FUNCTION(sort); +PHP_FUNCTION(rsort); +PHP_FUNCTION(user_sort); +PHP_FUNCTION(auser_sort); +PHP_FUNCTION(user_key_sort); +PHP_FUNCTION(array_walk); +PHP_FUNCTION(count); +PHP_FUNCTION(flush); +void array_end(INTERNAL_FUNCTION_PARAMETERS); +void array_prev(INTERNAL_FUNCTION_PARAMETERS); +void array_next(INTERNAL_FUNCTION_PARAMETERS); +void array_each(INTERNAL_FUNCTION_PARAMETERS); +void array_reset(INTERNAL_FUNCTION_PARAMETERS); +void array_current(INTERNAL_FUNCTION_PARAMETERS); +void array_current_key(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(gettype); +PHP_FUNCTION(settype); +PHP_FUNCTION(min); +PHP_FUNCTION(max); /* system functions */ -extern void php3_getenv(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_putenv(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_error_reporting(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(getenv); +PHP_FUNCTION(putenv); +PHP_FUNCTION(error_reporting); -extern void php3_get_current_user(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_set_time_limit(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(get_current_user); +PHP_FUNCTION(set_time_limit); -extern void php3_get_cfg_var(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_set_magic_quotes_runtime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_get_magic_quotes_runtime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_get_magic_quotes_gpc(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(get_cfg_var); +PHP_FUNCTION(set_magic_quotes_runtime); +PHP_FUNCTION(get_magic_quotes_runtime); +PHP_FUNCTION(get_magic_quotes_gpc); -extern void php3_is_type(INTERNAL_FUNCTION_PARAMETERS, int type); -extern void php3_is_long(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_is_double(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_is_string(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_is_array(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_is_object(INTERNAL_FUNCTION_PARAMETERS); +void php3_is_type(INTERNAL_FUNCTION_PARAMETERS, int type); +PHP_FUNCTION(is_long); +PHP_FUNCTION(is_double); +PHP_FUNCTION(is_string); +PHP_FUNCTION(is_array); +PHP_FUNCTION(is_object); -extern void php3_leak(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(leak); -extern void php3_error_log(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(error_log); -extern void php3_call_user_func(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_call_user_method(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(call_user_func); +PHP_FUNCTION(call_user_method); PHP_FUNCTION(register_shutdown_function); PHP_FUNCTION(highlight_file); diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 95136da331..eae25b6c2b 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -72,7 +72,7 @@ static int browser_reg_compare(pval *browser) return 0; } -void php3_get_browser(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(get_browser) { pval *agent_name,*agent,tmp; ELS_FETCH(); diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index c57a64fd00..c0732baef0 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -128,7 +128,7 @@ static void php3i_to64(char *s, long v, int n) { } } -void php3_crypt(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(crypt) { char salt[PHP3_MAX_SALT_LEN]; pval *arg1, *arg2; diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index 5f36a479be..42237c1f53 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -280,7 +280,7 @@ static char * _php3_convert_cyr_string(unsigned char *str, char from, char to) /* {{{ proto string convert_cyr_string(string str, string from, string to) Convert from one Cyrillic character set to another */ -void php3_convert_cyr_string(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(convert_cyr_string) { pval *str_arg, *fr_cs, *to_cs; unsigned char *str; diff --git a/ext/standard/cyr_convert.h b/ext/standard/cyr_convert.h index c7ac46143e..91eb2346ec 100644 --- a/ext/standard/cyr_convert.h +++ b/ext/standard/cyr_convert.h @@ -32,7 +32,7 @@ #ifndef _CYR_CONVERT_H #define _CYR_CONVERT_H -extern void php3_convert_cyr_string(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(convert_cyr_string); #endif /* _CYR_CONVERT_H */ diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index a58a58c626..82ea84bc65 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -71,7 +71,7 @@ static int phpday_tab[2][12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} }; -void php3_time(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(time) { return_value->value.lval = (long) time(NULL); return_value->type = IS_LONG; @@ -131,12 +131,12 @@ void _php3_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm) return_value->type = IS_LONG; } -void php3_mktime(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(mktime) { _php3_mktime(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } -void php3_gmmktime(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gmmktime) { _php3_mktime(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -332,17 +332,17 @@ _php3_date(INTERNAL_FUNCTION_PARAMETERS, int gm) return_value->type = IS_STRING; } -void php3_date(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(date) { _php3_date(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } -void php3_gmdate(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gmdate) { _php3_date(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } -void php3_getdate(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getdate) { pval *timestamp_arg; struct tm *ta; @@ -414,7 +414,7 @@ char *php3_std_date(time_t t) * */ #define isleap(year) (((year%4) == 0 && (year%100)!=0) || (year%400)==0) -void php3_checkdate(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(checkdate) { pval *month, *day, *year; int m, d, y; @@ -448,7 +448,7 @@ void php3_checkdate(INTERNAL_FUNCTION_PARAMETERS) #if HAVE_STRFTIME -void php3_strftime(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strftime) { pval *format_arg, *timestamp_arg; char *format,*buf; diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h index 1cb6cf6723..0a27f5efa2 100644 --- a/ext/standard/datetime.h +++ b/ext/standard/datetime.h @@ -34,15 +34,15 @@ #ifndef _DATETIME_H #define _DATETIME_H -extern void php3_time(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_mktime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gmmktime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_date(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gmdate(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getdate(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_checkdate(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(time); +PHP_FUNCTION(mktime); +PHP_FUNCTION(gmmktime); +PHP_FUNCTION(date); +PHP_FUNCTION(gmdate); +PHP_FUNCTION(getdate); +PHP_FUNCTION(checkdate); #if HAVE_STRFTIME -extern void php3_strftime(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(strftime); #endif extern char *php3_std_date(time_t t); diff --git a/ext/standard/dir.c b/ext/standard/dir.c index e50158202a..a1dc5ccdfa 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -79,7 +79,7 @@ int php3_minit_dir(INIT_FUNC_ARGS) /* {{{ proto int opendir(string path) Open a directory and return a dir_handle */ -void php3_opendir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(opendir) { pval *arg; DIR *dirp; @@ -106,7 +106,7 @@ void php3_opendir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto void closedir([int dir_handle]) Close directory connection identified by the dir_handle */ -void php3_closedir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(closedir) { pval *id, *tmp; int id_to_find; @@ -141,7 +141,7 @@ void php3_closedir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int chdir(string directory) Change the current directory */ -void php3_chdir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chdir) { pval *arg; int ret; @@ -162,7 +162,7 @@ void php3_chdir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto void rewinddir([int dir_handle]) Rewind dir_handle back to the start */ -void php3_rewinddir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rewinddir) { pval *id, *tmp; int id_to_find; @@ -197,7 +197,7 @@ void php3_rewinddir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string readdir([int dir_handle]) Read directory entry from dir_handle */ -void php3_readdir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(readdir) { pval *id, *tmp; int id_to_find; @@ -237,7 +237,7 @@ void php3_readdir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto class dir(string directory) Directory class with properties, handle and class and methods read, rewind and close */ -void php3_getdir(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(getdir) { pval *arg; DIR *dirp; int ret; diff --git a/ext/standard/dl.h b/ext/standard/dl.h index a6e134e691..45e2c46098 100644 --- a/ext/standard/dl.h +++ b/ext/standard/dl.h @@ -35,7 +35,7 @@ #ifndef _DL_H #define _DL_H -extern void php3_dl(pval *file,int type,pval *return_value); +void php3_dl(pval *file,int type,pval *return_value); #if HAVE_LIBDL @@ -44,11 +44,11 @@ extern php3_module_entry dl_module_entry; #define dl_module_ptr &dl_module_entry /* dynamic loading functions */ -extern void dl(INTERNAL_FUNCTION_PARAMETERS); +void dl(INTERNAL_FUNCTION_PARAMETERS); extern int php3_minit_dl(INIT_FUNC_ARGS); extern int php3_mshutdown_dl(SHUTDOWN_FUNC_ARGS); extern int php3_rshutdown_dl(SHUTDOWN_FUNC_ARGS); -extern void php3_info_dl(ZEND_MODULE_INFO_FUNC_ARGS); +void php3_info_dl(ZEND_MODULE_INFO_FUNC_ARGS); #else diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 5f3a03ee0d..95d03aa208 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -65,7 +65,7 @@ char *_php3_gethostbyname(char *name); /* {{{ proto string gethostbyaddr(string ip_address) Get the Internet host name corresponding to a given IP address */ -void php3_gethostbyaddr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gethostbyaddr) { pval *arg; @@ -104,7 +104,7 @@ char *_php3_gethostbyaddr(char *ip) /* {{{ proto string gethostbyname(string hostname) Get the IP address corresponding to a given Internet host name */ -void php3_gethostbyname(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gethostbyname) { pval *arg; @@ -121,7 +121,7 @@ void php3_gethostbyname(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto array gethostbynamel(string hostname) Return a list of IP addresses that a given hostname resolves to. */ -void php3_gethostbynamel(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(gethostbynamel) { pval *arg; struct hostent *hp; @@ -174,7 +174,7 @@ char *_php3_gethostbyname(char *name) /* {{{ proto int checkdnsrr(string host [, string type]) Check DNS records corresponding to a given Internet host name or IP address */ -void php3_checkdnsrr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(checkdnsrr) { pval *arg1,*arg2; int type,i; @@ -234,7 +234,7 @@ void php3_checkdnsrr(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int getmxrr(string hostname, array mxhosts [, array weight]) Get MX records corresponding to a given Internet host name */ -void php3_getmxrr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getmxrr) { pval *host, *mx_list, *weight_list; pval tmp1,tmp2; diff --git a/ext/standard/dns.h b/ext/standard/dns.h index c9f3706848..9d2c6cec0b 100644 --- a/ext/standard/dns.h +++ b/ext/standard/dns.h @@ -34,12 +34,12 @@ #ifndef _DNS_H #define _DNS_H -extern void php3_gethostbyaddr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gethostbyname(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_gethostbynamel(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(gethostbyaddr); +PHP_FUNCTION(gethostbyname); +PHP_FUNCTION(gethostbynamel); #if !(WIN32|WINNT)||(HAVE_BINDLIB) -extern void php3_checkdnsrr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getmxrr(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(checkdnsrr); +PHP_FUNCTION(getmxrr); #endif #ifndef INT16SZ diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 3cd5b3a66b..121635589d 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -192,7 +192,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value) /* {{{ proto int exec(string command [, array output [, int return_value]]) Execute an external program */ -void php3_exec(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(exec) { pval *arg1, *arg2, *arg3; int arg_count = ARG_COUNT(ht); @@ -228,7 +228,7 @@ void php3_exec(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int system(string command [, int return_value]) Execute an external program and display output */ -void php3_system(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(system) { pval *arg1, *arg2; int arg_count = ARG_COUNT(ht); @@ -255,7 +255,7 @@ void php3_system(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int passthru(string command [, int return_value]) Execute an external program and display raw output */ -void php3_passthru(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(passthru) { pval *arg1, *arg2; int arg_count = ARG_COUNT(ht); @@ -320,7 +320,7 @@ char * _php3_escapeshellcmd(char *str) { /* {{{ proto escapeshellcmd(string command) escape shell metacharacters */ -void php3_escapeshellcmd(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(escapeshellcmd) { pval *arg1; char *cmd; diff --git a/ext/standard/exec.h b/ext/standard/exec.h index f8062ba828..a9e6a1e32d 100644 --- a/ext/standard/exec.h +++ b/ext/standard/exec.h @@ -33,10 +33,10 @@ #ifndef _EXEC_H #define _EXEC_H -extern void php3_system(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_exec(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_escapeshellcmd(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_passthru(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(system); +PHP_FUNCTION(exec); +PHP_FUNCTION(escapeshellcmd); +PHP_FUNCTION(passthru); PHP_FUNCTION(shell_exec); char *_php3_escapeshellcmd(char *); diff --git a/ext/standard/file.c b/ext/standard/file.c index ac951fa407..84f902d91d 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -266,7 +266,7 @@ PHP_FUNCTION(flock) /* {{{ proto array get_meta_tags(string filename [, int use_include_path]) Extracts all meta tag content attributes from a file and returns an array */ -void php3_get_meta_tags(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(get_meta_tags) { pval *filename, *arg2; FILE *fp; @@ -397,7 +397,7 @@ void php3_get_meta_tags(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto array file(string filename) Read entire file into an array */ -void php3_file(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(file) { pval *filename, *arg2; FILE *fp; @@ -507,7 +507,7 @@ int php3_minit_file(INIT_FUNC_ARGS) /* {{{ proto string tempnam(string dir, string prefix) Create a unique filename in a directory */ -void php3_tempnam(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(tempnam) { pval *arg1, *arg2; char *d; @@ -531,7 +531,7 @@ void php3_tempnam(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int fopen(string filename, string mode [, int use_include_path]) Open a file or a URL and return a file pointer */ -void php3_fopen(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fopen) { pval *arg1, *arg2, *arg3; FILE *fp; @@ -591,7 +591,7 @@ void php3_fopen(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int fclose(int fp) Close an open file pointer */ -void php3_fclose(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fclose) { pval *arg1; int id, type; @@ -615,7 +615,7 @@ void php3_fclose(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int popen(string command, string mode) Execute a command and open either a read or a write pipe to it */ -void php3_popen(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(popen) { pval *arg1, *arg2; FILE *fp; @@ -671,7 +671,7 @@ void php3_popen(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int pclose(int fp) Close a file pointer opened by popen() */ -void php3_pclose(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(pclose) { pval *arg1; int id,type; @@ -696,7 +696,7 @@ void php3_pclose(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int feof(int fp) Test for end-of-file on a file pointer */ -void php3_feof(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(feof) { pval *arg1; FILE *fp; @@ -732,7 +732,7 @@ void php3_feof(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int set_socket_blocking(int socket descriptor, int mode) Set blocking/non-blocking mode on a socket */ -void php3_set_socket_blocking(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(set_socket_blocking) { pval *arg1, *arg2; int id, type, block; @@ -794,7 +794,7 @@ void php3_set_socket_blocking(INTERNAL_FUNCTION_PARAMETERS) #if (0 && HAVE_SYS_TIME_H && HAVE_SETSOCKOPT && defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO)) /* this doesn't work, as it appears those properties are read-only :( */ -void php3_set_socket_timeout(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(set_socket_timeout) { pval *socket,*timeout; int type, *sock; @@ -822,7 +822,7 @@ void php3_set_socket_timeout(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string fgets(int fp, int length) Get a line from file pointer */ -void php3_fgets(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fgets) { pval *arg1, *arg2; FILE *fp; @@ -872,7 +872,7 @@ void php3_fgets(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string fgetc(int fp) Get a character from file pointer */ -void php3_fgetc(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(fgetc) { pval *arg1; FILE *fp; int id, type; @@ -914,7 +914,7 @@ void php3_fgetc(INTERNAL_FUNCTION_PARAMETERS) { /* Strip any HTML tags while reading */ /* {{{ proto string fgetss(int fp, int length) Get a line from file pointer and strip HTML tags */ -void php3_fgetss(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fgetss) { pval *fd, *bytes; FILE *fp; @@ -1038,7 +1038,7 @@ void php3_fgetss(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int fwrite(int fp, string str [, int length]) Binary-safe file write */ -void php3_fwrite(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fwrite) { pval *arg1, *arg2, *arg3=NULL; FILE *fp; @@ -1100,7 +1100,7 @@ void php3_fwrite(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int rewind(int fp) Rewind the position of a file pointer */ -void php3_rewind(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rewind) { pval *arg1; int id,type; @@ -1124,7 +1124,7 @@ void php3_rewind(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int ftell(int fp) Get file pointer's read/write position */ -void php3_ftell(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(ftell) { pval *arg1; int id, type; @@ -1149,7 +1149,7 @@ void php3_ftell(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int fseek(int fp, int offset) Seek on a file pointer */ -void php3_fseek(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fseek) { pval *arg1, *arg2; int ret,id,type; @@ -1186,7 +1186,7 @@ void php3_fseek(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int mkdir(string pathname, int mode) Create a directory */ -void php3_mkdir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(mkdir) { pval *arg1, *arg2; int ret,mode; @@ -1213,7 +1213,7 @@ void php3_mkdir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int rmdir(string dirname) Remove a directory */ -void php3_rmdir(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rmdir) { pval *arg1; int ret; @@ -1238,7 +1238,7 @@ void php3_rmdir(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int readfile(string filename [, int use_include_path]) Output a file or a URL */ -void php3_readfile(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(readfile) { pval *arg1, *arg2; char buf[8192]; @@ -1299,7 +1299,7 @@ void php3_readfile(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int umask([int mask]) Return or change the umask */ -void php3_fileumask(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fileumask) { pval *arg1; int oldumask; @@ -1327,7 +1327,7 @@ void php3_fileumask(INTERNAL_FUNCTION_PARAMETERS) */ /* {{{ proto int fpassthru(int fp) Output all remaining data from a file pointer */ -void php3_fpassthru(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fpassthru) { pval *arg1; FILE *fp; @@ -1377,7 +1377,7 @@ void php3_fpassthru(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int rename(string old_name, string new_name) Rename a file */ -void php3_rename(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rename) { pval *old_arg, *new_arg; char *old_name, *new_name; @@ -1412,7 +1412,7 @@ void php3_rename(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int copy(string source_file, string destination_file) Copy a file */ -void php3_file_copy(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(file_copy) { pval *source, *target; char buffer[8192]; @@ -1467,7 +1467,7 @@ void php3_file_copy(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int fread(int fp, int length) Binary-safe file read */ -void php3_fread(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(fread) { pval *arg1, *arg2; FILE *fp; @@ -1519,7 +1519,7 @@ PHPAPI int php3i_get_le_fp(void) /* {{{ proto array fgetcsv(int fp, int length) get line from file pointer and parse for CSV fields */ -void php3_fgetcsv(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(fgetcsv) { char *temp, *tptr, *bptr; char delimiter = ','; /* allow this to be set as parameter if required in future version? */ diff --git a/ext/standard/file.h b/ext/standard/file.h index fd4b634622..2cad2035f7 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -36,33 +36,33 @@ extern php3_module_entry php3_file_module_entry; #define php3_file_module_ptr &php3_file_module_entry extern int php3_minit_file(INIT_FUNC_ARGS); -extern void php3_tempnam(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fopen(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fclose(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_popen(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_pclose(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_feof(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fread(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fgetc(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fgets(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fgetss(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fgetcsv(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fwrite(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rewind(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_ftell(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fseek(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_mkdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rmdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fpassthru(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_readfile(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fileumask(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rename(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_file_copy(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_file(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_set_socket_blocking(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_set_socket_timeout(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_get_meta_tags(INTERNAL_FUNCTION_PARAMETERS); -extern PHP_FUNCTION(flock); +PHP_FUNCTION(tempnam); +PHP_FUNCTION(fopen); +PHP_FUNCTION(fclose); +PHP_FUNCTION(popen); +PHP_FUNCTION(pclose); +PHP_FUNCTION(feof); +PHP_FUNCTION(fread); +PHP_FUNCTION(fgetc); +PHP_FUNCTION(fgets); +PHP_FUNCTION(fgetss); +PHP_FUNCTION(fgetcsv); +PHP_FUNCTION(fwrite); +PHP_FUNCTION(rewind); +PHP_FUNCTION(ftell); +PHP_FUNCTION(fseek); +PHP_FUNCTION(mkdir); +PHP_FUNCTION(rmdir); +PHP_FUNCTION(fpassthru); +PHP_FUNCTION(readfile); +PHP_FUNCTION(fileumask); +PHP_FUNCTION(rename); +PHP_FUNCTION(file_copy); +PHP_FUNCTION(file); +PHP_FUNCTION(set_socket_blocking); +PHP_FUNCTION(set_socket_timeout); +PHP_FUNCTION(get_meta_tags); +PHP_FUNCTION(flock); #define phpext_file_ptr php3_file_module_ptr #endif /* _FILE_H */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index b956b3346f..2844ae2346 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -111,7 +111,7 @@ int php3_shutdown_filestat(SHUTDOWN_FUNC_ARGS) return SUCCESS; } -void php3_chgrp(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chgrp) { #ifndef WINDOWS pval *filename, *group; @@ -155,7 +155,7 @@ void php3_chgrp(INTERNAL_FUNCTION_PARAMETERS) } -void php3_chown(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chown) { #ifndef WINDOWS pval *filename, *user; @@ -197,7 +197,7 @@ void php3_chown(INTERNAL_FUNCTION_PARAMETERS) } -void php3_chmod(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chmod) { pval *filename, *mode; int ret; @@ -225,7 +225,7 @@ void php3_chmod(INTERNAL_FUNCTION_PARAMETERS) } -void php3_touch(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(touch) { #if HAVE_UTIME pval *filename, *filetime; @@ -292,7 +292,7 @@ void php3_touch(INTERNAL_FUNCTION_PARAMETERS) } -void php3_clearstatcache(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(clearstatcache) { if (CurrentStatFile) { efree(CurrentStatFile); diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h index 2d723daae1..fbd15c9948 100644 --- a/ext/standard/fsock.h +++ b/ext/standard/fsock.h @@ -47,8 +47,8 @@ extern php3_module_entry fsock_module_entry; #define fsock_module_ptr &fsock_module_entry -extern PHP_FUNCTION(fsockopen); -extern PHP_FUNCTION(pfsockopen); +PHP_FUNCTION(fsockopen); +PHP_FUNCTION(pfsockopen); extern int lookup_hostname(const char *addr, struct in_addr *in); extern int _php3_sock_fgets(char *buf, int maxlen, int socket); extern int _php3_sock_fread(char *buf, int maxlen, int socket); diff --git a/ext/standard/head.c b/ext/standard/head.c index 4d8b586f23..d2b3c89c3c 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -205,7 +205,7 @@ void php4i_add_header_information(char *header_information, uint header_length) /* Implementation of the language Header() function */ -void php3_Header(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(Header) { pval *arg1; @@ -429,7 +429,7 @@ CookieList *php3_PopCookieList(void) } /* php3_SetCookie(name,value,expires,path,domain,secure) */ -void php3_SetCookie(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(SetCookie) { char *cookie; int len=sizeof("Set-Cookie: "); diff --git a/ext/standard/head.h b/ext/standard/head.h index b054b135b8..977fc83345 100644 --- a/ext/standard/head.h +++ b/ext/standard/head.h @@ -53,8 +53,8 @@ extern php3_module_entry php3_header_module_entry; #define php3_header_module_ptr &php3_header_module_entry extern int php3_init_head(INIT_FUNC_ARGS); -extern void php3_Header(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_SetCookie(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(Header); +PHP_FUNCTION(SetCookie); void php4i_add_header_information(char *header_information, uint header_length); diff --git a/ext/standard/html.c b/ext/standard/html.c index db4c4364f6..78f179ba39 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -108,7 +108,7 @@ static void _php3_htmlentities(INTERNAL_FUNCTION_PARAMETERS, int all) /* {{{ proto string htmlspecialchars(string string) Convert special characters to HTML entities */ -void php3_htmlspecialchars(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(htmlspecialchars) { _php3_htmlentities(INTERNAL_FUNCTION_PARAM_PASSTHRU,0); } @@ -116,7 +116,7 @@ void php3_htmlspecialchars(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string htmlentities(string string) Convert all applicable characters to HTML entities */ -void php3_htmlentities(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(htmlentities) { _php3_htmlentities(INTERNAL_FUNCTION_PARAM_PASSTHRU,1); } diff --git a/ext/standard/html.h b/ext/standard/html.h index 892dfb6bed..3baddaf46e 100644 --- a/ext/standard/html.h +++ b/ext/standard/html.h @@ -32,7 +32,7 @@ #ifndef _HTML_H #define _HTML_H -extern void php3_htmlspecialchars(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_htmlentities(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(htmlspecialchars); +PHP_FUNCTION(htmlentities); #endif /* _HTML_H */ diff --git a/ext/standard/image.c b/ext/standard/image.c index f5400550e0..00490e1a08 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -304,7 +304,7 @@ static struct gfxinfo *php3_handle_jpeg(FILE *fp,pval *info) } /* main function */ -void php3_getimagesize(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getimagesize) { pval *arg1,*info = 0; FILE *fp; diff --git a/ext/standard/image.h b/ext/standard/image.h index f006ceba43..b6a7bde41e 100644 --- a/ext/standard/image.h +++ b/ext/standard/image.h @@ -31,6 +31,6 @@ #ifndef _IMAGE_H #define _IMAGE_H -extern void php3_getimagesize(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(getimagesize); #endif /* _IMAGE_H */ diff --git a/ext/standard/info.c b/ext/standard/info.c index bb09033794..4976e1c545 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -365,7 +365,7 @@ PHPAPI void php_info_print_table_row(int num_cols, ...) /* {{{ proto void phpinfo(void) Output a page of useful information about PHP and the current request */ -void php3_info(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(info) { _php3_info(); RETURN_TRUE; @@ -374,7 +374,7 @@ void php3_info(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string phpversion(void) Return the current PHP version */ -void php3_version(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(version) { RETURN_STRING(PHP_VERSION,1); } diff --git a/ext/standard/info.h b/ext/standard/info.h index 3384f0155a..957015ba37 100644 --- a/ext/standard/info.h +++ b/ext/standard/info.h @@ -36,8 +36,8 @@ #define PHP_CONTENTS_COLOR "#DDDDDD" #define PHP_HEADER_COLOR "#00DDDD" -void php3_version(INTERNAL_FUNCTION_PARAMETERS); -void php3_info(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(version); +PHP_FUNCTION(info); PHPAPI void _php3_info(void); PHPAPI void php_info_print_table_header(int num_cols, ...); diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index c0711d66be..5fe1a3ffbe 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -44,7 +44,7 @@ #include "php.h" #include "php3_iptc.h" -void php3_iptcparse(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(iptcparse) { unsigned int length, inx, len, inheader, tagsfound; unsigned char *buffer; diff --git a/ext/standard/link.c b/ext/standard/link.c index 6cf79471f4..0f5742901f 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -62,7 +62,7 @@ /* {{{ proto string readlink(string filename) Return the target of a symbolic link */ -void php3_readlink(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(readlink) { #if HAVE_SYMLINK pval *filename; @@ -88,7 +88,7 @@ void php3_readlink(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int linkinfo(string filename) Returns the st_dev field of the UNIX C stat structure describing the link */ -void php3_linkinfo(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(linkinfo) { #if HAVE_SYMLINK pval *filename; @@ -112,7 +112,7 @@ void php3_linkinfo(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int symlink(string target, string link) Create a symbolic link */ -void php3_symlink(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(symlink) { #if HAVE_SYMLINK pval *topath, *frompath; @@ -140,7 +140,7 @@ void php3_symlink(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int link(string target, string link) Create a hard link */ -void php3_link(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(link) { #if HAVE_LINK pval *topath, *frompath; @@ -168,7 +168,7 @@ void php3_link(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int unlink(string filename) Delete a file */ -void php3_unlink(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(unlink) { pval *filename; int ret; diff --git a/ext/standard/mail.c b/ext/standard/mail.c index a6e97161ed..3249cbf7ba 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -67,7 +67,7 @@ DLEXPORT php3_module_entry *get_module(void) { return &odbc_module_entry; } /* {{{ proto int mail(string to, string subject, string message [, string additional_headers]) Send an email message */ -void php3_mail(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(mail) { pval *argv[4]; char *to=NULL, *message=NULL, *headers=NULL, *subject=NULL; @@ -171,7 +171,7 @@ void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS) #else -void php3_mail(INTERNAL_FUNCTION_PARAMETERS) {} +PHP_FUNCTION(mail) {} void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS) {} #endif diff --git a/ext/standard/math.c b/ext/standard/math.c index 6641c4f037..44b21384a1 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -42,7 +42,7 @@ char *_php3_number_format(double, int, char ,char); /* {{{ proto int abs(int number) Return the absolute value of the number */ -void php3_abs(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(abs) { pval *value; if (ARG_COUNT(ht)!=1||getParameters(ht,1,&value)==FAILURE) { @@ -66,7 +66,7 @@ void php3_abs(INTERNAL_FUNCTION_PARAMETERS) { /* {{{ proto int ceil(double number) Returns the next highest integer value of the number */ -void php3_ceil(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(ceil) { pval *value; if (ARG_COUNT(ht)!=1||getParameters(ht,1,&value)==FAILURE) { @@ -90,7 +90,7 @@ void php3_ceil(INTERNAL_FUNCTION_PARAMETERS) { /* {{{ proto int floor(double number) Returns the next lowest integer value from the number */ -void php3_floor(INTERNAL_FUNCTION_PARAMETERS) { +PHP_FUNCTION(floor) { pval *value; if (ARG_COUNT(ht)!=1||getParameters(ht,1,&value)==FAILURE) { @@ -128,7 +128,7 @@ inline double rint(double n) /* {{{ proto int round(double number) Returns the rounded value of the number */ -void php3_round(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(round) { pval *value; @@ -150,7 +150,7 @@ void php3_round(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double sin(double number) Returns the sine of the number in radians */ -void php3_sin(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(sin) { pval *num; @@ -165,7 +165,7 @@ void php3_sin(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double cos(double number) Returns the cosine of the number in radians */ -void php3_cos(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(cos) { pval *num; @@ -180,7 +180,7 @@ void php3_cos(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double tan(double number) Returns the tangent of the number in radians */ -void php3_tan(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(tan) { pval *num; @@ -195,7 +195,7 @@ void php3_tan(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double asin(double number) Returns the arc sine of the number in radians */ -void php3_asin(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(asin) { pval *num; @@ -210,7 +210,7 @@ void php3_asin(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double acos(double number) Return the arc cosine of the number in radians */ -void php3_acos(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(acos) { pval *num; @@ -225,7 +225,7 @@ void php3_acos(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double atan(double number) Returns the arc tangent of the number in radians */ -void php3_atan(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(atan) { pval *num; @@ -240,7 +240,7 @@ void php3_atan(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double atan2(double y, double x) Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x */ -void php3_atan2(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(atan2) { pval *num1, *num2; @@ -256,7 +256,7 @@ void php3_atan2(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double pi(void) Returns an approximation of pi */ -void php3_pi(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(pi) { return_value->value.dval = M_PI; return_value->type = IS_DOUBLE; @@ -265,7 +265,7 @@ void php3_pi(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double pow(double base, double exponent) Returns base raised to the power of expopent */ -void php3_pow(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(pow) { pval *num1, *num2; @@ -280,7 +280,7 @@ void php3_pow(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double exp(double number) Returns e raised to the power of the number */ -void php3_exp(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(exp) { pval *num; @@ -295,7 +295,7 @@ void php3_exp(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double log(double number) Returns the natural logarithm of the number */ -void php3_log(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(log) { pval *num; @@ -310,7 +310,7 @@ void php3_log(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double log10(double number) Returns the base-10 logarithm of the number */ -void php3_log10(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(log10) { pval *num; @@ -325,7 +325,7 @@ void php3_log10(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double sqrt(double number) Returns the square root of the number */ -void php3_sqrt(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(sqrt) { pval *num; @@ -340,7 +340,7 @@ void php3_sqrt(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double deg2rad(double number) Converts the number in degrees to the radian equivalent */ -void php3_deg2rad(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(deg2rad) { pval *deg; @@ -354,7 +354,7 @@ void php3_deg2rad(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto double rad2deg(double number) Converts the radian number to the equivalent number in degrees */ -void php3_rad2deg(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rad2deg) { pval *rad; @@ -441,7 +441,7 @@ _php3_longtobase(pval *arg, int base) /* {{{ proto int bindec(string binary_number) Returns the decimal equivalent of the binary number */ -void php3_bindec(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bindec) { pval *arg; long ret; @@ -459,7 +459,7 @@ void php3_bindec(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int hexdec(string hexadimal_number) Returns the decimal equivalent of the hexadecimal number */ -void php3_hexdec(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(hexdec) { pval *arg; long ret; @@ -477,7 +477,7 @@ void php3_hexdec(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int octdec(string octal_number) Returns the decimal equivalent of an octal string */ -void php3_octdec(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(octdec) { pval *arg; long ret; @@ -495,7 +495,7 @@ void php3_octdec(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string decbin(int decimal_number) Returns a string containing a binary representation of the number */ -void php3_decbin(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(decbin) { pval *arg; char *result; @@ -515,7 +515,7 @@ void php3_decbin(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string decoct(int decimal_number) Returns a string containing an octal representation of the given number */ -void php3_decoct(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(decoct) { pval *arg; char *result; @@ -535,7 +535,7 @@ void php3_decoct(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string dechex(int decimal_number) Returns a string containing a hexadecimal representation of the given number */ -void php3_dechex(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(dechex) { pval *arg; char *result; @@ -557,7 +557,7 @@ void php3_dechex(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string base_convert(string number, int frombase, int tobase) Converts a number in a string from any base <= 36 to any base <= 36. */ -void php3_base_convert(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(base_convert) { pval *number, *frombase, *tobase, temp; char *result; @@ -644,7 +644,7 @@ char *_php3_number_format(double d,int dec,char dec_point,char thousand_sep) /* {{{ proto string number_format(double number, [,int num_decimal_places [, string dec_seperator, string thousands_seperator)]]) Formats a number with grouped thousands */ -void php3_number_format(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(number_format) { pval *num,*dec,*t_s,*d_p; char thousand_sep=',', dec_point='.'; diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 2aff1c07a4..67ec4601db 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -38,7 +38,7 @@ /* {{{ proto string md5(string str) Calculate the md5 hash of a string */ -void php3_md5(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(md5) { pval *arg; char md5str[33]; diff --git a/ext/standard/md5.h b/ext/standard/md5.h index 1c71321c2e..47ce03682e 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -66,6 +66,6 @@ void PHP3_MD5Init PROTO_LIST((PHP3_MD5_CTX *)); void PHP3_MD5Update PROTO_LIST((PHP3_MD5_CTX *, const unsigned char *, unsigned int)); void PHP3_MD5Final PROTO_LIST((unsigned char[16], PHP3_MD5_CTX *)); -extern void php3_md5(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(md5); #endif diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 3e1094acda..bc2bc7b3b1 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -57,7 +57,7 @@ #ifdef __cplusplus void php3_microtime(HashTable *) #else -void php3_microtime(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(microtime) #endif { #if HAVE_GETTIMEOFDAY diff --git a/ext/standard/microtime.h b/ext/standard/microtime.h index b827272779..fb4329d449 100644 --- a/ext/standard/microtime.h +++ b/ext/standard/microtime.h @@ -32,6 +32,6 @@ #ifndef _MICROTIME_H #define _MICROTIME_H -extern void php3_microtime(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(microtime); #endif /* _MICROTIME_H */ diff --git a/ext/standard/mime.h b/ext/standard/mime.h index df5d78799f..1633ee26c9 100644 --- a/ext/standard/mime.h +++ b/ext/standard/mime.h @@ -3,6 +3,6 @@ #include "php_globals.h" -extern void php3_mime_split(char *buf, int cnt, char *boundary, pval *http_post_vars PLS_DC); +void php3_mime_split(char *buf, int cnt, char *boundary, pval *http_post_vars PLS_DC); #endif diff --git a/ext/standard/pack.h b/ext/standard/pack.h index 6cc65f3a35..38a50a40a4 100644 --- a/ext/standard/pack.h +++ b/ext/standard/pack.h @@ -36,8 +36,8 @@ extern php3_module_entry pack_module_entry; #define pack_module_ptr &pack_module_entry extern int php3_minit_pack(INIT_FUNC_ARGS); -extern void php3_pack(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_unpack(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(pack); +PHP_FUNCTION(unpack); #define phpext_pack_ptr pack_module_ptr diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 35b4a471a5..d1b3887239 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -100,7 +100,7 @@ long _php3_getuid(void) /* {{{ proto int getmyuid(void) Get PHP script owner's UID */ -void php3_getmyuid(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getmyuid) { long uid; @@ -115,7 +115,7 @@ void php3_getmyuid(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int getmypid(void) Get current process ID */ -void php3_getmypid(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getmypid) { int pid; @@ -130,7 +130,7 @@ void php3_getmypid(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int getmyinode(void) Get the inode of the current script being parsed */ -void php3_getmyinode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getmyinode) { _php3_statpage(); if (page_inode < 0) { @@ -143,7 +143,7 @@ void php3_getmyinode(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int getlastmod(void) Get time of last page modification */ -void php3_getlastmod(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getlastmod) { _php3_statpage(); if (page_mtime < 0) { diff --git a/ext/standard/pageinfo.h b/ext/standard/pageinfo.h index 963fe1c1c7..d593ade004 100644 --- a/ext/standard/pageinfo.h +++ b/ext/standard/pageinfo.h @@ -1,10 +1,10 @@ #ifndef _PROCESS_H #define _PROCESS_H -extern void php3_getmyuid(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getmypid(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getmyinode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getlastmod(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(getmyuid); +PHP_FUNCTION(getmypid); +PHP_FUNCTION(getmyinode); +PHP_FUNCTION(getlastmod); extern long _php3_getuid(void); diff --git a/ext/standard/php3_browscap.h b/ext/standard/php3_browscap.h index b3720acca0..c59459e5da 100644 --- a/ext/standard/php3_browscap.h +++ b/ext/standard/php3_browscap.h @@ -37,7 +37,7 @@ extern php3_module_entry browscap_module_entry; extern int php3_minit_browscap(INIT_FUNC_ARGS); extern int php3_mshutdown_browscap(SHUTDOWN_FUNC_ARGS); -extern void php3_get_browser(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(get_browser); #define phpext_browscap_ptr browscap_module_ptr diff --git a/ext/standard/php3_crypt.h b/ext/standard/php3_crypt.h index 20671b2f6f..4885599ae0 100644 --- a/ext/standard/php3_crypt.h +++ b/ext/standard/php3_crypt.h @@ -4,7 +4,7 @@ #if HAVE_CRYPT extern php3_module_entry crypt_module_entry; #define crypt_module_ptr &crypt_module_entry -extern void php3_crypt(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(crypt); extern int php_minit_crypt(INIT_FUNC_ARGS); #else #define crypt_module_ptr NULL diff --git a/ext/standard/php3_dir.h b/ext/standard/php3_dir.h index 33e6f15643..1ab682ca84 100644 --- a/ext/standard/php3_dir.h +++ b/ext/standard/php3_dir.h @@ -38,12 +38,12 @@ extern php3_module_entry php3_dir_module_entry; /* directory functions */ extern int php3_minit_dir(INIT_FUNC_ARGS); -extern void php3_opendir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_closedir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rewinddir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_readdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getdir(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(opendir); +PHP_FUNCTION(closedir); +PHP_FUNCTION(chdir); +PHP_FUNCTION(rewinddir); +PHP_FUNCTION(readdir); +PHP_FUNCTION(getdir); #define phpext_dir_ptr php3_dir_module_ptr diff --git a/ext/standard/php3_filestat.h b/ext/standard/php3_filestat.h index 87ac93a697..d7fa84f460 100644 --- a/ext/standard/php3_filestat.h +++ b/ext/standard/php3_filestat.h @@ -34,29 +34,29 @@ extern int php3_init_filestat(INIT_FUNC_ARGS); extern int php3_shutdown_filestat(SHUTDOWN_FUNC_ARGS); -extern void php3_clearstatcache(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fileatime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_filectime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_filegroup(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fileinode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_filemtime(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fileowner(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fileperms(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_filesize(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_filetype(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_iswritable(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_isreadable(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_isexec(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_isfile(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_isdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_islink(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_fileexists(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_stat(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_lstat(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chown(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chgrp(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chmod(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_touch(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(clearstatcache); +PHP_FUNCTION(fileatime); +PHP_FUNCTION(filectime); +PHP_FUNCTION(filegroup); +PHP_FUNCTION(fileinode); +PHP_FUNCTION(filemtime); +PHP_FUNCTION(fileowner); +PHP_FUNCTION(fileperms); +PHP_FUNCTION(filesize); +PHP_FUNCTION(filetype); +PHP_FUNCTION(iswritable); +PHP_FUNCTION(isreadable); +PHP_FUNCTION(isexec); +PHP_FUNCTION(isfile); +PHP_FUNCTION(isdir); +PHP_FUNCTION(islink); +PHP_FUNCTION(fileexists); +PHP_FUNCTION(stat); +PHP_FUNCTION(lstat); +PHP_FUNCTION(chown); +PHP_FUNCTION(chgrp); +PHP_FUNCTION(chmod); +PHP_FUNCTION(touch); extern php3_module_entry php3_filestat_module_entry; #define php3_filestat_module_ptr &php3_filestat_module_entry diff --git a/ext/standard/php3_iptc.h b/ext/standard/php3_iptc.h index 4166fbd4ff..3a18915537 100644 --- a/ext/standard/php3_iptc.h +++ b/ext/standard/php3_iptc.h @@ -33,6 +33,6 @@ #ifndef _PHPIPTC_H #define _PHPIPTC_H -extern void php3_iptcparse(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(iptcparse); #endif /* _PHPIPTC_H */ diff --git a/ext/standard/php3_link.h b/ext/standard/php3_link.h index 80718a893b..8ffc61e646 100644 --- a/ext/standard/php3_link.h +++ b/ext/standard/php3_link.h @@ -32,10 +32,10 @@ #ifndef _PHP3_LINK_H #define _PHP3_LINK_H -extern void php3_link(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_unlink(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_readlink(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_linkinfo(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_symlink(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(link); +PHP_FUNCTION(unlink); +PHP_FUNCTION(readlink); +PHP_FUNCTION(linkinfo); +PHP_FUNCTION(symlink); #endif /* _PHP3_LINK_H */ diff --git a/ext/standard/php3_mail.h b/ext/standard/php3_mail.h index cd2acabfaf..70636ecb6b 100644 --- a/ext/standard/php3_mail.h +++ b/ext/standard/php3_mail.h @@ -36,8 +36,8 @@ extern php3_module_entry mail_module_entry; #define mail_module_ptr &mail_module_entry -extern void php3_mail(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS); +PHP_FUNCTION(mail); +void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS); extern int _php3_mail(char *to, char *subject, char *message, char *headers); #else diff --git a/ext/standard/php3_string.h b/ext/standard/php3_string.h index af90dbec5f..221c8e72d7 100644 --- a/ext/standard/php3_string.h +++ b/ext/standard/php3_string.h @@ -38,47 +38,47 @@ extern char *strtok_string; #endif -extern void php3_strlen(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strcmp(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strspn(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strcspn(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strcasecmp(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_str_replace(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chop(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_trim(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_ltrim(INTERNAL_FUNCTION_PARAMETERS); -extern void soundex(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(strlen); +PHP_FUNCTION(strcmp); +PHP_FUNCTION(strspn); +PHP_FUNCTION(strcspn); +PHP_FUNCTION(strcasecmp); +PHP_FUNCTION(str_replace); +PHP_FUNCTION(chop); +PHP_FUNCTION(trim); +PHP_FUNCTION(ltrim); +void soundex(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_explode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_implode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strtok(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strtoupper(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strtolower(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_basename(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_dirname(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strstr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strpos(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strrpos(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strrchr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_substr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_quotemeta(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_ucfirst(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_ucwords(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strtr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_strrev(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_hebrev(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_hebrev_with_conversion(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_user_sprintf(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_user_printf(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_addslashes(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_stripslashes(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_ord(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_newline_to_br(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_setlocale(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_stristr(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chunk_split(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_parsestr(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(explode); +PHP_FUNCTION(implode); +PHP_FUNCTION(strtok); +PHP_FUNCTION(strtoupper); +PHP_FUNCTION(strtolower); +PHP_FUNCTION(basename); +PHP_FUNCTION(dirname); +PHP_FUNCTION(strstr); +PHP_FUNCTION(strpos); +PHP_FUNCTION(strrpos); +PHP_FUNCTION(strrchr); +PHP_FUNCTION(substr); +PHP_FUNCTION(quotemeta); +PHP_FUNCTION(ucfirst); +PHP_FUNCTION(ucwords); +PHP_FUNCTION(strtr); +PHP_FUNCTION(strrev); +PHP_FUNCTION(hebrev); +PHP_FUNCTION(hebrev_with_conversion); +PHP_FUNCTION(user_sprintf); +PHP_FUNCTION(user_printf); +PHP_FUNCTION(addslashes); +PHP_FUNCTION(stripslashes); +PHP_FUNCTION(chr); +PHP_FUNCTION(ord); +PHP_FUNCTION(newline_to_br); +PHP_FUNCTION(setlocale); +PHP_FUNCTION(stristr); +PHP_FUNCTION(chunk_split); +PHP_FUNCTION(parsestr); PHP_FUNCTION(bin2hex); extern PHPAPI char *_php3_strtoupper(char *s); diff --git a/ext/standard/php3_syslog.h b/ext/standard/php3_syslog.h index 458e597254..2353d53bc2 100644 --- a/ext/standard/php3_syslog.h +++ b/ext/standard/php3_syslog.h @@ -38,10 +38,10 @@ extern php3_module_entry syslog_module_entry; extern int php3_minit_syslog(INIT_FUNC_ARGS); extern int php3_rinit_syslog(INIT_FUNC_ARGS); extern int php3_rshutdown_syslog(SHUTDOWN_FUNC_ARGS); -extern void php3_openlog(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_syslog(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_closelog(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_define_syslog_variables(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(openlog); +PHP_FUNCTION(syslog); +PHP_FUNCTION(closelog); +PHP_FUNCTION(define_syslog_variables); #else #define syslog_module_ptr NULL diff --git a/ext/standard/phpdir.h b/ext/standard/phpdir.h index 5813f79c36..7d7bc985cb 100644 --- a/ext/standard/phpdir.h +++ b/ext/standard/phpdir.h @@ -34,11 +34,11 @@ #define _PHPDIR_H /* directory functions */ -extern void php3_opendir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_closedir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_chdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rewinddir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_readdir(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getdir(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(opendir); +PHP_FUNCTION(closedir); +PHP_FUNCTION(chdir); +PHP_FUNCTION(rewinddir); +PHP_FUNCTION(readdir); +PHP_FUNCTION(getdir); #endif /* _PHPDIR_H */ diff --git a/ext/standard/phpmath.h b/ext/standard/phpmath.h index ed3759018b..f9d56abd5b 100644 --- a/ext/standard/phpmath.h +++ b/ext/standard/phpmath.h @@ -33,38 +33,38 @@ #ifndef _PHPMATH_H #define _PHPMATH_H -extern void php3_sin(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_cos(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_tan(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_asin(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_acos(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_atan(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_atan2(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_pi(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_exp(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_log(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_log10(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_pow(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_sqrt(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_srand(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rand(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_getrandmax(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_mt_srand(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_mt_rand(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_mt_getrandmax(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_abs(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_ceil(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_floor(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_round(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_decbin(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_dechex(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_decoct(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bindec(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_hexdec(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_octdec(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_base_convert(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_number_format(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_deg2rad(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rad2deg(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(sin); +PHP_FUNCTION(cos); +PHP_FUNCTION(tan); +PHP_FUNCTION(asin); +PHP_FUNCTION(acos); +PHP_FUNCTION(atan); +PHP_FUNCTION(atan2); +PHP_FUNCTION(pi); +PHP_FUNCTION(exp); +PHP_FUNCTION(log); +PHP_FUNCTION(log10); +PHP_FUNCTION(pow); +PHP_FUNCTION(sqrt); +PHP_FUNCTION(srand); +PHP_FUNCTION(rand); +PHP_FUNCTION(getrandmax); +PHP_FUNCTION(mt_srand); +PHP_FUNCTION(mt_rand); +PHP_FUNCTION(mt_getrandmax); +PHP_FUNCTION(abs); +PHP_FUNCTION(ceil); +PHP_FUNCTION(floor); +PHP_FUNCTION(round); +PHP_FUNCTION(decbin); +PHP_FUNCTION(dechex); +PHP_FUNCTION(decoct); +PHP_FUNCTION(bindec); +PHP_FUNCTION(hexdec); +PHP_FUNCTION(octdec); +PHP_FUNCTION(base_convert); +PHP_FUNCTION(number_format); +PHP_FUNCTION(deg2rad); +PHP_FUNCTION(rad2deg); #endif /* _PHPMATH_H */ diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index 55937d3b86..772fed8524 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -68,7 +68,7 @@ static char _php3_hex2int(int c) */ /* {{{ proto string quoted_printable_decode(string str) Convert a quoted-printable string to an 8 bit string */ -void php3_quoted_printable_decode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(quoted_printable_decode) { pval *arg1; char *str; diff --git a/ext/standard/quot_print.h b/ext/standard/quot_print.h index abd959545f..c8a826a6f5 100644 --- a/ext/standard/quot_print.h +++ b/ext/standard/quot_print.h @@ -32,6 +32,6 @@ #ifndef _QUOT_PRINT_H #define _QUOT_PRINT_H -extern void php3_quoted_printable_decode(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(quoted_printable_decode); #endif /* _QUOT_PRINT_H */ diff --git a/ext/standard/rand.c b/ext/standard/rand.c index e117833296..f93c5d6d24 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -212,7 +212,7 @@ static inline uint32 randomMT(void) #define PHP_RAND_MAX RAND_MAX #endif -void php3_srand(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(srand) { pval *arg; @@ -231,7 +231,7 @@ void php3_srand(INTERNAL_FUNCTION_PARAMETERS) #endif } -void php3_mt_srand(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(mt_srand) { pval *arg; if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) { @@ -241,7 +241,7 @@ void php3_mt_srand(INTERNAL_FUNCTION_PARAMETERS) seedMT(arg->value.lval); } -void php3_rand(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rand) { pval *p_min=NULL, *p_max=NULL; @@ -280,7 +280,7 @@ void php3_rand(INTERNAL_FUNCTION_PARAMETERS) } } -void php3_mt_rand(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(mt_rand) { pval *p_min=NULL, *p_max=NULL; @@ -319,13 +319,13 @@ void php3_mt_rand(INTERNAL_FUNCTION_PARAMETERS) } } -void php3_getrandmax(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(getrandmax) { return_value->type = IS_LONG; return_value->value.lval = PHP_RAND_MAX; } -void php3_mt_getrandmax(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(mt_getrandmax) { return_value->type = IS_LONG; /* diff --git a/ext/standard/reg.c b/ext/standard/reg.c index e7550db08d..738b34f000 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -80,31 +80,35 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) reg_cache *rc = NULL; REGLS_FETCH(); - if(_php3_hash_find(®(ht_rc), (char *) pattern, patlen, (void **) &rc) == FAILURE || + printf("called for pattern %s\n", pattern); + if(_php3_hash_find(®(ht_rc), (char *) pattern, patlen+1, (void **) &rc) == FAILURE || rc->cflags != cflags) { + printf("compiling it\n"); r = regcomp(preg, pattern, cflags); + printf("regcomp returned %d\n", r); if(!r) { reg_cache rcp; rcp.cflags = cflags; memcpy(&rcp.preg, preg, sizeof(*preg)); - _php3_hash_update(®(ht_rc), (char *) pattern, patlen, - (void *) &rcp, sizeof(*rc), NULL); + _php3_hash_update(®(ht_rc), (char *) pattern, patlen+1, + (void *) &rcp, sizeof(rcp), NULL); } } else { + printf("found it at %x\n", rc); memcpy(preg, &rc->preg, sizeof(*preg)); } return r; } -#define regfree(a); -#define regcomp _php_regcomp - static void _free_reg_cache(reg_cache *rc) { regfree(&rc->preg); } + +#define regfree(a); +#define regcomp(a,b,c) _php_regcomp(a,b,c) static void php_reg_init_globals(php_reg_globals *reg_globals) { @@ -289,7 +293,7 @@ static void _php3_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) /* {{{ proto int ereg(string pattern, string string [, array registers]) Regular expression match */ -void php3_ereg(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(ereg) { _php3_ereg(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -297,7 +301,7 @@ void php3_ereg(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int eregi(string pattern, string string [, array registers]) Case-insensitive regular expression match */ -void php3_eregi(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(eregi) { _php3_ereg(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -503,7 +507,7 @@ static void _php3_eregreplace(INTERNAL_FUNCTION_PARAMETERS, int icase) /* {{{ proto string ereg_replace(string pattern, string string [, array registers]) Replace regular expression */ -void php3_eregreplace(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(eregreplace) { _php3_eregreplace(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -511,7 +515,7 @@ void php3_eregreplace(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string eregi_replace(string pattern, string string [, array registers]) Case insensitive replace regular expression */ -void php3_eregireplace(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(eregireplace) { _php3_eregreplace(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -521,7 +525,7 @@ void php3_eregireplace(INTERNAL_FUNCTION_PARAMETERS) = split(":", $passwd_file, 5); */ /* {{{ proto array split(string pattern, string string [, int limit]) split string into array by regular expression */ -void php3_split(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(split) { pval *spliton, *str, *arg_count = NULL; regex_t re; @@ -616,7 +620,7 @@ void php3_split(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string sql_regcase(string string) Make regular expression for case insensitive match */ -PHPAPI void php3_sql_regcase(INTERNAL_FUNCTION_PARAMETERS) +PHPAPI PHP_FUNCTION(sql_regcase) { pval *string; char *tmp; diff --git a/ext/standard/string.c b/ext/standard/string.c index 2964d463ab..455300e861 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -90,7 +90,7 @@ PHP_FUNCTION(bin2hex) /* {{{ proto int strlen(string str) Get string length */ -void php3_strlen(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strlen) { pval *str; @@ -104,7 +104,7 @@ void php3_strlen(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int strcmp(string str1, string str2) Binary safe string comparison */ -void php3_strcmp(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strcmp) { pval *s1,*s2; @@ -119,7 +119,7 @@ void php3_strcmp(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int strcasecmp(string str1, string str2) Binary safe case-insensitive string comparison */ -void php3_strcasecmp(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strcasecmp) { pval *s1,*s2; @@ -134,7 +134,7 @@ void php3_strcasecmp(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int strspn(string str, string mask) Find length of initial segment consisting entirely of characters found in mask */ -void php3_strspn(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strspn) { pval *s1,*s2; @@ -149,7 +149,7 @@ void php3_strspn(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int strcspn(string str, string mask) Find length of initial segment consisting entirely of characters not found in mask */ -void php3_strcspn(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strcspn) { pval *s1,*s2; @@ -164,7 +164,7 @@ void php3_strcspn(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string chop(string str) Remove trailing whitespace */ -void php3_chop(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chop) { pval *str; register int i; @@ -194,7 +194,7 @@ void php3_chop(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string trim(string str) Strip whitespace from the beginning and end of a string */ -void php3_trim(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(trim) { pval *str; register int i; @@ -235,7 +235,7 @@ void php3_trim(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string ltrim(string str) Strip whitespace from the beginning of a string */ -void php3_ltrim(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(ltrim) { pval *str; register int i; @@ -266,7 +266,7 @@ void php3_ltrim(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto array(string separator, string str) Split a string on string separator and return array of components */ -void php3_explode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(explode) { pval *str, *delim; char *work_str, *p1, *p2; @@ -304,7 +304,7 @@ void php3_explode(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string implode(array src, string glue) Join array elements placing glue string between items and return one string */ -void php3_implode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(implode) { pval *arg1, *arg2, *delim, *tmp, *arr; int len = 0, count = 0; @@ -366,7 +366,7 @@ char *strtok_string; /* {{{ proto string strtok([string str,] string token) Tokenize a string */ -void php3_strtok(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strtok) { pval *str, *tok; #ifndef THREAD_SAFE @@ -440,7 +440,7 @@ PHPAPI char *_php3_strtoupper(char *s) /* {{{ proto string strtoupper(string str) Make a string uppercase */ -void php3_strtoupper(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strtoupper) { pval *arg; char *ret; @@ -471,7 +471,7 @@ PHPAPI char *_php3_strtolower(char *s) /* {{{ proto string strtolower(string str) Make a string lowercase */ -void php3_strtolower(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strtolower) { pval *str; char *ret; @@ -488,7 +488,7 @@ void php3_strtolower(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string basename(string path) Return the filename component of the path */ -void php3_basename(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(basename) { pval *str; char *ret, *c; @@ -540,7 +540,7 @@ PHPAPI void _php3_dirname(char *str, int len) { /* {{{ proto string dirname(string path) Return the directory name component of the path */ -void php3_dirname(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(dirname) { pval *str; char *ret; @@ -574,7 +574,7 @@ PHPAPI char *php3i_stristr(unsigned char *s, unsigned char *t) /* {{{ proto string strstr(string haystack, string needle) Find first occurrence of a string within another, case insensitive */ -void php3_stristr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(stristr) { pval *haystack, *needle; char *found = NULL; @@ -602,7 +602,7 @@ void php3_stristr(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string strstr(string haystack, string needle) Find first occurrence of a string within another */ -void php3_strstr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strstr) { pval *haystack, *needle; char *found = NULL; @@ -635,7 +635,7 @@ void php3_strstr(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int strpos(string haystack, string needle) Find position of first occurrence of a string within another */ -void php3_strpos(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strpos) { pval *haystack, *needle, *OFFSET; int offset = 0; @@ -684,7 +684,7 @@ void php3_strpos(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int strrpos(string haystack, string needle) Find the last occurrence of a character in a string within another */ -void php3_strrpos(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strrpos) { pval *haystack, *needle; char *found = NULL; @@ -711,7 +711,7 @@ void php3_strrpos(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string strrchr(string haystack, string needle) Find the last occurrence of a character in a string within another */ -void php3_strrchr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strrchr) { pval *haystack, *needle; char *found = NULL; @@ -774,7 +774,7 @@ _php3_chunk_split(char *src, int srclen, char *end, int endlen, int chunklen) /* {{{ proto string chunk_split(string str [, int chunklen [, string ending]]) Return split line */ -void php3_chunk_split(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chunk_split) { pval *p_str, *p_chunklen, *p_ending; int argc; @@ -822,7 +822,7 @@ void php3_chunk_split(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string substr(string str, int start [, int length]) Return part of a string */ -void php3_substr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(substr) { pval *string, *from, *len; int argc, l; @@ -880,7 +880,7 @@ void php3_substr(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string quotemeta(string str) Quote meta characters */ -void php3_quotemeta(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(quotemeta) { pval *arg; char *str, *old; @@ -926,7 +926,7 @@ void php3_quotemeta(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int ord(string character) Return ASCII value of character */ -void php3_ord(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(ord) { pval *str; @@ -940,7 +940,7 @@ void php3_ord(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string chr(int ascii) Convert ASCII code to a character */ -void php3_chr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(chr) { pval *num; char temp[2]; @@ -957,7 +957,7 @@ void php3_chr(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string(string str) Make a string's first character uppercase */ -void php3_ucfirst(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(ucfirst) { pval *arg; @@ -976,7 +976,7 @@ void php3_ucfirst(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string ucwords(string str) Uppercase the first character of every word in a string */ -void php3_ucwords(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(ucwords) { pval *arg; char *r; @@ -1003,7 +1003,7 @@ void php3_ucwords(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string strtr(string str, string from, string to) Translate characters in str using given translation tables */ -void php3_strtr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strtr) { /* strtr(STRING,FROM,TO) */ pval *str, *from, *to; unsigned char xlat[256]; @@ -1046,7 +1046,7 @@ void php3_strtr(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string strrev(string str) Reverse a string */ -void php3_strrev(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(strrev) { pval *str; int i,len; @@ -1123,7 +1123,7 @@ PHPAPI void _php3_stripslashes(char *string, int *len) /* {{{ proto string addslashes(string str) Escape single quote, double quotes and backslash characters in a string with backslashes */ -void php3_addslashes(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(addslashes) { pval *str; @@ -1138,7 +1138,7 @@ void php3_addslashes(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string stripslashes(string str) Strip backslashes from a string */ -void php3_stripslashes(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(stripslashes) { pval *str; @@ -1328,7 +1328,7 @@ finish: /* {{{ proto string str_replace(string needle, string str, string haystack) Replace all occurrences of needle in haystack with str */ -void php3_str_replace(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(str_replace) { pval *haystack, *needle, *str; char *new; @@ -1527,7 +1527,7 @@ static void _php3_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines) /* {{{ proto string hebrev(string str [, int max_chars_per_line]) Convert logical Hebrew text to visual text */ -void php3_hebrev(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(hebrev) { _php3_hebrev(INTERNAL_FUNCTION_PARAM_PASSTHRU,0); } @@ -1535,7 +1535,7 @@ void php3_hebrev(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string hebrev(string str [, int max_chars_per_line]) Convert logical Hebrew text to visual text with newline conversion */ -void php3_hebrev_with_conversion(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(hebrev_with_conversion) { _php3_hebrev(INTERNAL_FUNCTION_PARAM_PASSTHRU,1); } @@ -1543,7 +1543,7 @@ void php3_hebrev_with_conversion(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string nl2br(string str) Converts newlines to HTML line breaks */ -void php3_newline_to_br(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(newline_to_br) { pval *str; @@ -1559,7 +1559,7 @@ void php3_newline_to_br(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string setlocale(string category, string locale) Set locale information */ -void php3_setlocale(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(setlocale) { pval *category, *locale; int cat; @@ -1602,7 +1602,7 @@ void php3_setlocale(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto void parsestr(string encoded_string) Parses GET/POST/COOKIE data and sets global variables. */ -void php3_parsestr(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(parsestr) { pval *arg; char *res = NULL; diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index e1cdae36e4..472b181221 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -199,7 +199,7 @@ static void start_syslog(void) /* {{{ proto void define_syslog_variables(void) Initializes all syslog-related variables */ -void php3_define_syslog_variables(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(define_syslog_variables) { if (!syslog_started) { start_syslog(); @@ -213,7 +213,7 @@ void php3_define_syslog_variables(INTERNAL_FUNCTION_PARAMETERS) ** Syslog($LOG_EMERG, "help me!") ** CloseLog(); */ -void php3_openlog(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(openlog) { pval *ident, *option, *facility; if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &ident, &option, &facility) == FAILURE) { @@ -233,7 +233,7 @@ void php3_openlog(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int closelog(void) Close connection to system logger */ -void php3_closelog(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(closelog) { closelog(); if (syslog_device) { @@ -246,7 +246,7 @@ void php3_closelog(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto int syslog(int priority, string message) Generate a system log message */ -void php3_syslog(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(syslog) { pval *priority, *message; diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index e34d813138..88ab8f8655 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -50,7 +50,7 @@ /* {{{ proto string uniqid(string prefix) Generate a unique id */ -void php3_uniqid(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(uniqid) { #ifdef HAVE_GETTIMEOFDAY pval *prefix; diff --git a/ext/standard/uniqid.h b/ext/standard/uniqid.h index b241c35514..3666e0a8c2 100644 --- a/ext/standard/uniqid.h +++ b/ext/standard/uniqid.h @@ -32,6 +32,6 @@ #ifndef _UNIQID_H #define _UNIQID_H -extern void php3_uniqid(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(uniqid); #endif /* _UNIQID_H */ diff --git a/ext/standard/url.c b/ext/standard/url.c index e5acd6c578..675a687a7a 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -157,7 +157,7 @@ url *url_parse(char *string) /* {{{ proto array parse_url(string url) Parse a URL and return its components */ -void php3_parse_url(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(parse_url) { pval *string; url *resource; @@ -265,7 +265,7 @@ char *_php3_urlencode(char *s, int len) /* {{{ proto string urlencode(string str) URL-encodes string */ -void php3_urlencode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(urlencode) { pval *arg; char *str; @@ -286,7 +286,7 @@ void php3_urlencode(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string urldecode(string str) Decodes URL-encoded string */ -void php3_urldecode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(urldecode) { pval *arg; int len; @@ -360,7 +360,7 @@ char *_php3_rawurlencode(char *s, int len) /* {{{ proto string rawurlencode(string str) URL-encodes string */ -void php3_rawurlencode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rawurlencode) { pval *arg; char *str; @@ -381,7 +381,7 @@ void php3_rawurlencode(INTERNAL_FUNCTION_PARAMETERS) /* {{{ proto string rawurldecode(string str) Decodes URL-encodes string */ -void php3_rawurldecode(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(rawurldecode) { pval *arg; int len; diff --git a/ext/standard/url.h b/ext/standard/url.h index 22d6e4a984..eaf5c32f77 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -39,18 +39,18 @@ typedef struct url { char *fragment; } url; -extern void free_url(url *); +void free_url(url *); extern url *url_parse(char *); extern int _php3_urldecode(char *, int); /* return value: length of decoded string */ extern char *_php3_urlencode(char *, int); extern int _php3_rawurldecode(char *, int); /* return value: length of decoded string */ extern char *_php3_rawurlencode(char *, int); -extern void php3_parse_url(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_urlencode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_urldecode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rawurlencode(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_rawurldecode(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(parse_url); +PHP_FUNCTION(urlencode); +PHP_FUNCTION(urldecode); +PHP_FUNCTION(rawurlencode); +PHP_FUNCTION(rawurldecode); /* * Local variables: |