Browse Source

A bunch of grunt work updating function entries and declarations.

experimetnal/RETURN_REF_PATCH
Andrey Hristov 27 years ago
parent
commit
736f4831a5
  1. 18
      ext/ereg/ereg.c
  2. 4
      ext/ereg/php_ereg.h
  3. 443
      ext/standard/basic_functions.c
  4. 28
      ext/standard/basic_functions.h
  5. 2
      ext/standard/browscap.c
  6. 2
      ext/standard/crypt.c
  7. 10
      ext/standard/dir.c
  8. 1
      ext/standard/dl.c
  9. 4
      ext/standard/file.c
  10. 59
      ext/standard/filestat.c
  11. 4
      ext/standard/fsock.c
  12. 4
      ext/standard/head.c
  13. 2
      ext/standard/head.h
  14. 10
      ext/standard/link.c
  15. 2
      ext/standard/mail.c
  16. 1
      ext/standard/microtime.h
  17. 4
      ext/standard/pack.c
  18. 15
      ext/standard/php3_filestat.h
  19. 4
      ext/standard/php3_string.h
  20. 18
      ext/standard/reg.c
  21. 4
      ext/standard/reg.h
  22. 2
      ext/standard/soundex.c
  23. 4
      ext/standard/string.c
  24. 8
      ext/standard/syslog.c
  25. 2
      main/main.c

18
ext/ereg/ereg.c

@ -28,13 +28,13 @@
unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
function_entry reg_functions[] = {
{"ereg", php3_ereg, third_argument_force_ref },
{"ereg_replace", php3_eregreplace, NULL },
{"eregi", php3_eregi, third_argument_force_ref },
{"eregi_replace", php3_eregireplace, NULL },
{"split", php3_split, NULL},
{"join", php3_implode, NULL},
{"sql_regcase", php3_sql_regcase, NULL},
PHP_FE(ereg, third_argument_force_ref)
PHP_FE(ereg_replace, NULL)
PHP_FE(eregi, third_argument_force_ref)
PHP_FE(eregi_replace, NULL)
PHP_FE(split, NULL)
PHP_FALIAS(join, implode, NULL)
PHP_FE(sql_regcase, NULL)
{NULL, NULL, NULL}
};
@ -491,7 +491,7 @@ static void _php3_eregreplace(INTERNAL_FUNCTION_PARAMETERS, int icase)
/* {{{ proto string ereg_replace(string pattern, string string [, array registers])
Replace regular expression */
PHP_FUNCTION(eregreplace)
PHP_FUNCTION(ereg_replace)
{
_php3_eregreplace(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
@ -499,7 +499,7 @@ PHP_FUNCTION(eregreplace)
/* {{{ proto string eregi_replace(string pattern, string string [, array registers])
Case insensitive replace regular expression */
PHP_FUNCTION(eregireplace)
PHP_FUNCTION(eregi_replace)
{
_php3_eregreplace(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}

4
ext/ereg/php_ereg.h

@ -40,8 +40,8 @@ char *_php3_regreplace(const char *pattern, const char *replace, const char *str
PHP_FUNCTION(ereg);
PHP_FUNCTION(eregi);
PHP_FUNCTION(eregireplace);
PHP_FUNCTION(eregreplace);
PHP_FUNCTION(eregi_replace);
PHP_FUNCTION(ereg_replace);
PHP_FUNCTION(split);
PHPAPI PHP_FUNCTION(sql_regcase);

443
ext/standard/basic_functions.c

@ -58,216 +58,223 @@ int user_shutdown_function_executor(pval *user_shutdown_function_name);
void php3_call_shutdown_functions(void);
function_entry basic_functions[] = {
{"intval", int_value, NULL},
{"doubleval", double_value, NULL},
{"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},
{"ksort", php3_key_sort, first_arg_force_ref},
{"asort", php3_asort, first_arg_force_ref},
{"arsort", php3_arsort, first_arg_force_ref},
{"sort", php3_sort, first_arg_force_ref},
{"rsort", php3_rsort, first_arg_force_ref},
{"usort", php3_user_sort, first_arg_force_ref},
{"uasort", php3_auser_sort, first_arg_force_ref},
{"uksort", php3_user_key_sort, first_arg_force_ref},
{"array_walk", php3_array_walk, first_arg_force_ref},
{"sizeof", php3_count, first_arg_allow_ref},
{"count", php3_count, first_arg_allow_ref},
{"time", php3_time, NULL},
{"mktime", php3_mktime, NULL},
{"gmmktime", php3_gmmktime, NULL},
PHP_FE(intval, NULL)
PHP_FE(doubleval, NULL)
PHP_FE(strval, NULL)
PHP_FE(define, NULL)
PHP_FE(defined, NULL)
PHP_FE(bin2hex, NULL)
PHP_FE(toggle_short_open_tag, NULL)
PHP_FE(sleep, NULL)
PHP_FE(usleep, NULL)
PHP_FE(ksort, first_arg_force_ref)
PHP_FE(asort, first_arg_force_ref)
PHP_FE(arsort, first_arg_force_ref)
PHP_FE(sort, first_arg_force_ref)
PHP_FE(rsort, first_arg_force_ref)
PHP_FE(usort, first_arg_force_ref)
PHP_FE(uasort, first_arg_force_ref)
PHP_FE(uksort, first_arg_force_ref)
PHP_FE(array_walk, first_arg_force_ref)
PHP_FALIAS(sizeof, count, first_arg_force_ref)
PHP_FE(count, first_arg_force_ref)
PHP_FE(end, first_arg_force_ref)
PHP_FE(prev, first_arg_force_ref)
PHP_FE(next, first_arg_force_ref)
PHP_FE(reset, first_arg_force_ref)
PHP_FE(current, first_arg_force_ref)
PHP_FE(key, first_arg_force_ref)
PHP_FE(each, first_arg_force_ref)
PHP_FALIAS(pos, current, first_arg_force_ref)
PHP_FE(time, NULL)
PHP_FE(mktime, NULL)
PHP_FE(gmmktime, NULL)
#if HAVE_STRFTIME
{"strftime", php3_strftime, NULL},
PHP_FE(strftime, NULL)
#endif
PHP_FE(strtotime, NULL)
{"date", php3_date, NULL},
{"gmdate", php3_gmdate, NULL},
{"getdate", php3_getdate, NULL},
{"checkdate", php3_checkdate, NULL},
{"chr", php3_chr, NULL},
{"ord", php3_ord, NULL},
{"flush", php3_flush, NULL},
{"end", array_end, first_arg_force_ref},
{"prev", array_prev, first_arg_force_ref},
{"next", array_next, first_arg_force_ref},
{"reset", array_reset, first_arg_force_ref},
{"current", array_current, first_arg_force_ref},
{"key", array_current_key, first_arg_force_ref},
{"each", array_each, first_arg_force_ref},
{"gettype", php3_gettype, NULL},
{"settype", php3_settype, first_arg_force_ref},
{"min", php3_min, NULL},
{"max", php3_max, NULL},
{"addslashes", php3_addslashes, NULL},
{"chop", php3_chop, NULL},
{"str_replace", php3_str_replace, NULL},
{"chunk_split", php3_chunk_split, NULL},
{"trim", php3_trim, NULL},
{"ltrim", php3_ltrim, NULL},
{"rtrim", php3_chop, NULL},
PHP_FE(strip_tags, NULL)
PHP_FE(similar_text, NULL)
{"pos", array_current, first_arg_force_ref},
{"getimagesize", php3_getimagesize, NULL},
{"htmlspecialchars", php3_htmlspecialchars, NULL},
{"htmlentities", php3_htmlentities, NULL},
{"md5", php3_md5, NULL},
{"iptcparse", php3_iptcparse, NULL},
{"iptcembed", php3_iptcembed, NULL},
{"parse_url", php3_parse_url, NULL},
{"parse_str", php3_parsestr, NULL},
PHP_FE(phpinfo, NULL)
PHP_FE(phpversion, NULL)
PHP_FE(phpcredits, NULL)
{"strlen", php3_strlen, NULL},
{"strcmp", php3_strcmp, NULL},
{"strspn", php3_strspn, NULL},
{"strcspn", php3_strcspn, NULL},
{"strcasecmp", php3_strcasecmp, NULL},
{"strtok", php3_strtok, NULL},
{"strtoupper", php3_strtoupper, NULL},
{"strtolower", php3_strtolower, NULL},
{"strchr", php3_strstr, NULL},
{"strpos", php3_strpos, NULL},
{"strrpos", php3_strrpos, NULL},
{"strrev", php3_strrev, NULL},
{"hebrev", php3_hebrev, NULL},
PHP_FE(hebrevc, NULL)
PHP_FE(nl2br, NULL)
{"basename", php3_basename, NULL},
{"dirname", php3_dirname, NULL},
{"stripslashes", php3_stripslashes, NULL},
{"strstr", php3_strstr, NULL},
{"stristr", php3_stristr, NULL},
{"strrchr", php3_strrchr, NULL},
{"substr", php3_substr, NULL},
{"quotemeta", php3_quotemeta, NULL},
{"urlencode", php3_urlencode, NULL},
{"urldecode", php3_urldecode, NULL},
{"rawurlencode", php3_rawurlencode, NULL},
{"rawurldecode", php3_rawurldecode, NULL},
{"ucfirst", php3_ucfirst, NULL},
{"ucwords", php3_ucwords, NULL},
{"strtr", php3_strtr, NULL},
{"sprintf", php3_user_sprintf, NULL},
{"printf", php3_user_printf, NULL},
{"setlocale", php3_setlocale, NULL},
{"exec", php3_exec, second_and_third_args_force_ref},
{"system", php3_system, second_arg_force_ref},
{"escapeshellcmd", php3_escapeshellcmd, NULL},
{"passthru", php3_passthru, second_arg_force_ref},
PHP_FE(shell_exec, NULL)
{"soundex", soundex, NULL},
{"rand", php3_rand, NULL},
{"srand", php3_srand, NULL},
{"getrandmax", php3_getrandmax, NULL},
{"mt_rand", php3_mt_rand, NULL},
{"mt_srand", php3_mt_srand, NULL},
{"mt_getrandmax", php3_mt_getrandmax, NULL},
{"gethostbyaddr", php3_gethostbyaddr, NULL},
{"gethostbyname", php3_gethostbyname, NULL},
{"gethostbynamel", php3_gethostbynamel, NULL},
PHP_FE(strtotime, NULL)
PHP_FE(date, NULL)
PHP_FE(gmdate, NULL)
PHP_FE(getdate, NULL)
PHP_FE(checkdate, NULL)
PHP_FE(flush, NULL)
PHP_FE(gettype, NULL)
PHP_FE(settype, first_arg_force_ref)
PHP_FE(min, NULL)
PHP_FE(max, NULL)
PHP_FE(getimagesize, NULL)
PHP_FE(htmlspecialchars, NULL)
PHP_FE(htmlentities, NULL)
PHP_FE(md5, NULL)
PHP_FE(iptcparse, NULL)
PHP_FE(iptcembed, NULL)
PHP_FE(phpinfo, NULL)
PHP_FE(phpversion, NULL)
PHP_FE(phpcredits, NULL)
PHP_FE(strlen, NULL)
PHP_FE(strcmp, NULL)
PHP_FE(strspn, NULL)
PHP_FE(strcspn, NULL)
PHP_FE(strcasecmp, NULL)
PHP_FE(strtok, NULL)
PHP_FE(strtoupper, NULL)
PHP_FE(strtolower, NULL)
PHP_FE(strpos, NULL)
PHP_FE(strrpos, NULL)
PHP_FE(strrev, NULL)
PHP_FE(hebrev, NULL)
PHP_FE(hebrevc, NULL)
PHP_FE(nl2br, NULL)
PHP_FE(basename, NULL)
PHP_FE(dirname, NULL)
PHP_FE(stripslashes, NULL)
PHP_FE(strstr, NULL)
PHP_FE(stristr, NULL)
PHP_FE(strrchr, NULL)
PHP_FE(substr, NULL)
PHP_FE(quotemeta, NULL)
PHP_FE(ucfirst, NULL)
PHP_FE(ucwords, NULL)
PHP_FE(strtr, NULL)
PHP_FE(addslashes, NULL)
PHP_FE(chop, NULL)
PHP_FE(str_replace, NULL)
PHP_FE(chunk_split, NULL)
PHP_FE(trim, NULL)
PHP_FE(ltrim, NULL)
PHP_FE(strip_tags, NULL)
PHP_FE(similar_text, NULL)
PHP_FE(explode, NULL)
PHP_FE(implode, NULL)
PHP_FE(setlocale, NULL)
PHP_FE(soundex, NULL)
PHP_FE(chr, NULL)
PHP_FE(ord, NULL)
PHP_FE(parse_str, NULL)
PHP_FALIAS(rtrim, chop, NULL)
PHP_FALIAS(strchr, strstr, NULL)
PHP_NAMED_FE(sprintf, php3_user_sprintf, NULL)
PHP_NAMED_FE(printf, php3_user_printf, NULL)
PHP_FE(parse_url, NULL)
PHP_FE(urlencode, NULL)
PHP_FE(urldecode, NULL)
PHP_FE(rawurlencode, NULL)
PHP_FE(rawurldecode, NULL)
PHP_FE(exec, second_and_third_args_force_ref)
PHP_FE(system, second_arg_force_ref)
PHP_FE(escapeshellcmd, NULL)
PHP_FE(passthru, second_arg_force_ref)
PHP_FE(shell_exec, NULL)
PHP_FE(rand, NULL)
PHP_FE(srand, NULL)
PHP_FE(getrandmax, NULL)
PHP_FE(mt_rand, NULL)
PHP_FE(mt_srand, NULL)
PHP_FE(mt_getrandmax, NULL)
PHP_FE(gethostbyaddr, NULL)
PHP_FE(gethostbyname, NULL)
PHP_FE(gethostbynamel, NULL)
#if !(WIN32|WINNT)||HAVE_BINDLIB
{"checkdnsrr", php3_checkdnsrr, NULL},
{"getmxrr", php3_getmxrr, second_and_third_args_force_ref},
PHP_FE(checkdnsrr, NULL)
PHP_FE(getmxrr, second_and_third_args_force_ref)
#endif
{"explode", php3_explode, NULL},
{"implode", php3_implode, NULL},
{"getenv", php3_getenv, NULL},
{"error_reporting", php3_error_reporting, NULL},
{"clearstatcache", php3_clearstatcache, NULL},
{"unlink", php3_unlink, NULL},
PHP_FE(error_reporting, NULL)
{"getmyuid", php3_getmyuid, NULL},
{"getmypid", php3_getmypid, NULL},
PHP_FE(getmyuid, NULL)
PHP_FE(getmypid, NULL)
PHP_FE(getmyinode, NULL)
PHP_FE(getlastmod, NULL)
/*getmyiid is here for forward compatibility with 3.1
See pageinfo.c in 3.1 for more information*/
{"getmyiid", php3_getmypid, NULL},
{"getmyinode", php3_getmyinode, NULL},
{"getlastmod", php3_getlastmod, NULL},
{"base64_decode", php3_base64_decode, NULL},
{"base64_encode", php3_base64_encode, NULL},
{"abs", php3_abs, NULL},
{"ceil", php3_ceil, NULL},
{"floor", php3_floor, NULL},
{"round", php3_round, NULL},
{"sin", php3_sin, NULL},
{"cos", php3_cos, NULL},
{"tan", php3_tan, NULL},
{"asin", php3_asin, NULL},
{"acos", php3_acos, NULL},
{"atan", php3_atan, NULL},
{"atan2", php3_atan2, NULL},
{"pi", php3_pi, NULL},
{"pow", php3_pow, NULL},
{"exp", php3_exp, NULL},
{"log", php3_log, NULL},
{"log10", php3_log10, NULL},
{"sqrt", php3_sqrt, NULL},
{"deg2rad", php3_deg2rad, NULL},
{"rad2deg", php3_rad2deg, NULL},
{"bindec", php3_bindec, NULL},
{"hexdec", php3_hexdec, NULL},
{"octdec", php3_octdec, NULL},
{"decbin", php3_decbin, NULL},
{"decoct", php3_decoct, NULL},
{"dechex", php3_dechex, NULL},
{"base_convert",php3_base_convert, NULL},
{"number_format", php3_number_format, NULL},
/* {"getmyiid", php3_getmypid, NULL}, */
PHP_FE(base64_decode, NULL)
PHP_FE(base64_encode, NULL)
PHP_FE(abs, NULL)
PHP_FE(ceil, NULL)
PHP_FE(floor, NULL)
PHP_FE(round, NULL)
PHP_FE(sin, NULL)
PHP_FE(cos, NULL)
PHP_FE(tan, NULL)
PHP_FE(asin, NULL)
PHP_FE(acos, NULL)
PHP_FE(atan, NULL)
PHP_FE(atan2, NULL)
PHP_FE(pi, NULL)
PHP_FE(pow, NULL)
PHP_FE(exp, NULL)
PHP_FE(log, NULL)
PHP_FE(log10, NULL)
PHP_FE(sqrt, NULL)
PHP_FE(deg2rad, NULL)
PHP_FE(rad2deg, NULL)
PHP_FE(bindec, NULL)
PHP_FE(hexdec, NULL)
PHP_FE(octdec, NULL)
PHP_FE(decbin, NULL)
PHP_FE(decoct, NULL)
PHP_FE(dechex, NULL)
PHP_FE(base_convert, NULL)
PHP_FE(number_format, NULL)
PHP_FE(getenv, NULL)
#ifdef HAVE_PUTENV
{"putenv", php3_putenv, NULL},
PHP_FE(putenv, NULL)
#endif
{"microtime", php3_microtime, NULL},
{"uniqid", php3_uniqid, NULL},
{"linkinfo", php3_linkinfo, NULL},
{"readlink", php3_readlink, NULL},
{"symlink", php3_symlink, NULL},
{"link", php3_link, NULL},
{"quoted_printable_decode", php3_quoted_printable_decode, NULL},
{"convert_cyr_string", php3_convert_cyr_string, NULL},
{"get_current_user", php3_get_current_user, NULL},
{"set_time_limit", php3_set_time_limit, NULL},
{"get_cfg_var", php3_get_cfg_var, NULL},
{"magic_quotes_runtime", php3_set_magic_quotes_runtime, NULL},
{"set_magic_quotes_runtime", php3_set_magic_quotes_runtime, NULL},
{"get_magic_quotes_gpc", php3_get_magic_quotes_gpc, NULL},
{"get_magic_quotes_runtime", php3_get_magic_quotes_runtime, NULL},
{"is_long", php3_is_long, first_arg_allow_ref},
{"is_int", php3_is_long, first_arg_allow_ref},
{"is_integer", php3_is_long, first_arg_allow_ref},
{"is_float", php3_is_double, first_arg_allow_ref},
{"is_double", php3_is_double, first_arg_allow_ref},
{"is_real", php3_is_double, first_arg_allow_ref},
{"is_string", php3_is_string, first_arg_allow_ref},
{"is_array", php3_is_array, first_arg_allow_ref},
{"is_object", php3_is_object, first_arg_allow_ref},
{"leak", php3_leak, NULL},
{"error_log", php3_error_log, NULL},
{"call_user_func", php3_call_user_func, NULL},
{"call_user_method", php3_call_user_method, NULL},
PHP_FE(var_dump, NULL)
PHP_FE(serialize, first_arg_allow_ref)
PHP_FE(unserialize, first_arg_allow_ref)
PHP_FE(microtime, NULL)
PHP_FE(getrusage, NULL)
PHP_FE(uniqid, NULL)
PHP_FE(quoted_printable_decode, NULL)
PHP_FE(convert_cyr_string, NULL)
PHP_FE(get_current_user, NULL)
PHP_FE(set_time_limit, NULL)
PHP_FE(get_cfg_var, NULL)
PHP_FALIAS(magic_quotes_runtime, set_magic_quotes_runtime, NULL)
PHP_FE(set_magic_quotes_runtime, NULL)
PHP_FE(get_magic_quotes_gpc, NULL)
PHP_FE(get_magic_quotes_runtime, NULL)
PHP_FE(is_long, first_arg_allow_ref)
PHP_FALIAS(is_int, is_long, first_arg_allow_ref)
PHP_FALIAS(is_integer, is_long, first_arg_allow_ref)
PHP_FALIAS(is_float, is_double, first_arg_allow_ref)
PHP_FE(is_double, first_arg_allow_ref)
PHP_FALIAS(is_real, is_double, first_arg_allow_ref)
PHP_FE(is_string, first_arg_allow_ref)
PHP_FE(is_array, first_arg_allow_ref)
PHP_FE(is_object, first_arg_allow_ref)
PHP_FE(leak, NULL)
PHP_FE(error_log, NULL)
PHP_FE(call_user_func, NULL)
PHP_FE(call_user_method, NULL)
PHP_FE(var_dump, NULL)
PHP_FE(serialize, first_arg_allow_ref)
PHP_FE(unserialize, first_arg_allow_ref)
PHP_FE(register_shutdown_function, NULL)
@ -285,9 +292,11 @@ function_entry basic_functions[] = {
PHP_FE(ini_restore, NULL)
PHP_FE(print_r, NULL)
{"setcookie", php3_SetCookie, NULL},
{"header", php3_Header, NULL},
PHP_FE(headers_sent, NULL)
PHP_FE(setcookie, NULL)
PHP_FE(Header, NULL)
PHP_FE(headers_sent, NULL)
PHP_FE(function_exists, NULL)
PHP_FE(in_array, NULL)
PHP_FE(extract, NULL)
@ -562,7 +571,7 @@ PHP_FUNCTION(toggle_short_open_tag)
* Basic Functions *
*******************/
void int_value(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(intval)
{
pval *num, *arg_base;
int base;
@ -590,7 +599,7 @@ void int_value(INTERNAL_FUNCTION_PARAMETERS)
}
void double_value(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(doubleval)
{
pval *num;
@ -602,7 +611,7 @@ void double_value(INTERNAL_FUNCTION_PARAMETERS)
}
void string_value(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(strval)
{
pval *num;
@ -639,7 +648,7 @@ static int array_key_compare(const void *a, const void *b)
}
PHP_FUNCTION(key_sort)
PHP_FUNCTION(ksort)
{
pval *array;
HashTable *target_hash;
@ -856,7 +865,7 @@ static int array_user_compare(const void *a, const void *b)
}
PHP_FUNCTION(user_sort)
PHP_FUNCTION(usort)
{
pval *array;
pval *old_compare_func;
@ -882,7 +891,7 @@ PHP_FUNCTION(user_sort)
RETURN_TRUE;
}
PHP_FUNCTION(auser_sort)
PHP_FUNCTION(uasort)
{
pval *array;
pval *old_compare_func;
@ -956,7 +965,7 @@ static int array_user_key_compare(const void *a, const void *b)
}
PHP_FUNCTION(user_key_sort)
PHP_FUNCTION(uksort)
{
pval *array;
pval *old_compare_func;
@ -983,7 +992,7 @@ PHP_FUNCTION(user_key_sort)
}
void array_end(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(end)
{
pval *array, **entry;
HashTable *target_hash;
@ -1008,7 +1017,7 @@ void array_end(INTERNAL_FUNCTION_PARAMETERS)
}
void array_prev(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(prev)
{
pval *array, **entry;
HashTable *target_hash;
@ -1031,7 +1040,7 @@ void array_prev(INTERNAL_FUNCTION_PARAMETERS)
}
void array_next(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(next)
{
pval *array, **entry;
HashTable *target_hash;
@ -1054,7 +1063,7 @@ void array_next(INTERNAL_FUNCTION_PARAMETERS)
}
void array_each(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(each)
{
pval *array,*entry,**entry_ptr, *tmp;
char *string_key;
@ -1106,7 +1115,7 @@ void array_each(INTERNAL_FUNCTION_PARAMETERS)
}
void array_reset(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(reset)
{
pval *array, **entry;
HashTable *target_hash;
@ -1129,7 +1138,7 @@ void array_reset(INTERNAL_FUNCTION_PARAMETERS)
INIT_PZVAL(return_value);
}
void array_current(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(current)
{
pval *array, **entry;
HashTable *target_hash;
@ -1150,7 +1159,7 @@ void array_current(INTERNAL_FUNCTION_PARAMETERS)
}
void array_current_key(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(key)
{
pval *array;
char *string_key;

28
ext/standard/basic_functions.h

@ -43,30 +43,30 @@ 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);
void int_value(INTERNAL_FUNCTION_PARAMETERS);
void double_value(INTERNAL_FUNCTION_PARAMETERS);
void string_value(INTERNAL_FUNCTION_PARAMETERS);
PHP_FUNCTION(intval);
PHP_FUNCTION(doubleval);
PHP_FUNCTION(strval);
PHP_FUNCTION(toggle_short_open_tag);
PHP_FUNCTION(sleep);
PHP_FUNCTION(usleep);
PHP_FUNCTION(key_sort);
PHP_FUNCTION(ksort);
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(usort);
PHP_FUNCTION(uasort);
PHP_FUNCTION(uksort);
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(end);
PHP_FUNCTION(prev);
PHP_FUNCTION(next);
PHP_FUNCTION(each);
PHP_FUNCTION(reset);
PHP_FUNCTION(current);
PHP_FUNCTION(key);
PHP_FUNCTION(gettype);
PHP_FUNCTION(settype);
PHP_FUNCTION(min);

2
ext/standard/browscap.c

@ -30,7 +30,7 @@ static pval *found_browser_entry;
#endif
function_entry browscap_functions[] = {
{"get_browser", php3_get_browser, NULL},
PHP_FE(get_browser, NULL)
{NULL, NULL, NULL}
};

2
ext/standard/crypt.c

@ -49,7 +49,7 @@ extern char *crypt(char *__key,char *__salt);
#include "php3_crypt.h"
function_entry crypt_functions[] = {
{"crypt", php3_crypt, NULL},
PHP_FE(crypt, NULL)
{NULL, NULL, NULL}
};

10
ext/standard/dir.c

@ -45,11 +45,11 @@ static int le_dirp;
static zend_class_entry *dir_class_entry_ptr;
static zend_function_entry php_dir_functions[] = {
PHP_FE(opendir, NULL)
PHP_FE(closedir, NULL)
PHP_FE(chdir, NULL)
PHP_FE(rewinddir, NULL)
PHP_FE(readdir, NULL)
PHP_FE(opendir, NULL)
PHP_FE(closedir, NULL)
PHP_FE(chdir, NULL)
PHP_FE(rewinddir, NULL)
PHP_FE(readdir, NULL)
PHP_FALIAS(dir, getdir, NULL)
{NULL, NULL, NULL}
};

1
ext/standard/dl.c

@ -105,6 +105,7 @@ void php3_dl(pval *file,int type,pval *return_value)
#if MSVC5
php3_error(E_ERROR,"Unable to load dynamic library '%s'<br>\n%s",libpath,php3_win_err());
#else
printf("dlerror = %s\n", dlerror());
php3_error(E_ERROR,"Unable to load dynamic library '%s' - %s",libpath,dlerror());
#endif
RETURN_FALSE;

4
ext/standard/file.c

@ -196,7 +196,7 @@ function_entry php3_file_functions[] = {
PHP_FE(fseek, NULL)
PHP_FE(ftell, NULL)
PHP_FE(fwrite, NULL)
{"fputs", php3_fwrite, NULL},
PHP_FALIAS(fputs, fwrite, NULL)
PHP_FE(mkdir, NULL)
PHP_FE(rename, NULL)
PHP_FE(copy, NULL)
@ -1027,7 +1027,7 @@ PHP_FUNCTION(fwrite)
/*
wrapper for setvbuf()
*/
void php3_set_file_buffer(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(set_file_buffer)
{
pval *arg1, *arg2;
FILE *fp;

59
ext/standard/filestat.c

@ -442,39 +442,40 @@ FileFunction(php3_fileatime,5)
FileFunction(php3_filemtime,6)
FileFunction(php3_filectime,7)
FileFunction(php3_filetype, 8)
FileFunction(php3_iswritable, 9)
FileFunction(php3_isreadable,10)
FileFunction(php3_isexec,11)
FileFunction(php3_isfile,12)
FileFunction(php3_isdir,13)
FileFunction(php3_islink,14)
FileFunction(php3_fileexists,15)
FileFunction(php3_is_writable, 9)
FileFunction(php3_is_readable,10)
FileFunction(php3_is_executable,11)
FileFunction(php3_is_file,12)
FileFunction(php3_is_dir,13)
FileFunction(php3_is_link,14)
FileFunction(php3_file_exists,15)
FileFunction(php3_lstat,16)
FileFunction(php3_stat,17)
function_entry php3_filestat_functions[] = {
{"fileatime", php3_fileatime, NULL},
{"filectime", php3_filectime, NULL},
{"filegroup", php3_filegroup, NULL},
{"fileinode", php3_fileinode, NULL},
{"filemtime", php3_filemtime, NULL},
{"fileowner", php3_fileowner, NULL},
{"fileperms", php3_fileperms, NULL},
{"filesize", php3_filesize, NULL},
{"filetype", php3_filetype, NULL},
{"file_exists", php3_fileexists, NULL},
{"is_writeable",php3_iswritable, NULL},
{"is_readable", php3_isreadable, NULL},
{"is_executable",php3_isexec, NULL},
{"is_file", php3_isfile, NULL},
{"is_dir", php3_isdir, NULL},
{"is_link", php3_islink, NULL},
{"stat", php3_stat, NULL},
{"lstat", php3_lstat, NULL},
{"chown", php3_chown, NULL},
{"chgrp", php3_chgrp, NULL},
{"chmod", php3_chmod, NULL},
{"touch", php3_touch, NULL},
PHP_FE(fileatime, NULL)
PHP_FE(filectime, NULL)
PHP_FE(filegroup, NULL)
PHP_FE(fileinode, NULL)
PHP_FE(filemtime, NULL)
PHP_FE(fileowner, NULL)
PHP_FE(fileperms, NULL)
PHP_FE(filesize, NULL)
PHP_FE(filetype, NULL)
PHP_FE(file_exists, NULL)
PHP_FE(is_writable, NULL)
PHP_FE(is_readable, NULL)
PHP_FE(is_executable, NULL)
PHP_FE(is_file, NULL)
PHP_FE(is_dir, NULL)
PHP_FE(is_link, NULL)
PHP_FE(stat, NULL)
PHP_FE(lstat, NULL)
PHP_FE(chown, NULL)
PHP_FE(chgrp, NULL)
PHP_FE(chmod, NULL)
PHP_FE(touch, NULL)
PHP_FE(clearstatcache, NULL)
{NULL, NULL, NULL}
};

4
ext/standard/fsock.c

@ -83,8 +83,8 @@ extern int le_fp;
static unsigned char third_and_fourth_args_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE };
function_entry fsock_functions[] = {
PHP_FE(fsockopen, third_and_fourth_args_force_ref)
PHP_FE(pfsockopen, third_and_fourth_args_force_ref)
PHP_FE(fsockopen, third_and_fourth_args_force_ref)
PHP_FE(pfsockopen, third_and_fourth_args_force_ref)
{NULL, NULL, NULL}
};

4
ext/standard/head.c

@ -418,8 +418,8 @@ CookieList *php3_PopCookieList(void)
return (ret);
}
/* php3_SetCookie(name,value,expires,path,domain,secure) */
PHP_FUNCTION(SetCookie)
/* php3_setcookie(name,value,expires,path,domain,secure) */
PHP_FUNCTION(setcookie)
{
char *cookie;
int len=sizeof("Set-Cookie: ");

2
ext/standard/head.h

@ -54,7 +54,7 @@ extern php3_module_entry php3_header_module_entry;
extern int php3_init_head(INIT_FUNC_ARGS);
PHP_FUNCTION(Header);
PHP_FUNCTION(SetCookie);
PHP_FUNCTION(setcookie);
PHP_FUNCTION(headers_sent);
void php4i_add_header_information(char *header_information, uint header_length);

10
ext/standard/link.c

@ -183,11 +183,11 @@ PHP_FUNCTION(unlink)
/* }}} */
function_entry link_functions[] = {
{"readlink", php3_readlink, NULL},
{"linkinfo", php3_linkinfo, NULL},
{"symlink", php3_symlink, NULL},
{"link", php3_link, NULL},
{"unlink", php3_unlink, NULL},
PHP_FE(readlink, NULL)
PHP_FE(linkinfo, NULL)
PHP_FE(symlink, NULL)
PHP_FE(link, NULL)
PHP_FE(unlink, NULL)
{NULL, NULL, NULL}
};

2
ext/standard/mail.c

@ -40,7 +40,7 @@
#endif
function_entry mail_functions[] = {
{"mail", php3_mail, NULL},
PHP_FE(mail, NULL)
{NULL, NULL, NULL}
};

1
ext/standard/microtime.h

@ -33,5 +33,6 @@
#define _MICROTIME_H
PHP_FUNCTION(microtime);
PHP_FUNCTION(getrusage);
#endif /* _MICROTIME_H */

4
ext/standard/pack.c

@ -51,8 +51,8 @@
#endif
function_entry pack_functions[] = {
{"pack", php3_pack, NULL},
{"unpack", php3_unpack, NULL},
PHP_FE(pack, NULL)
PHP_FE(unpack, NULL)
{NULL, NULL, NULL}
};

15
ext/standard/php3_filestat.h

@ -44,19 +44,20 @@ 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(is_writable);
PHP_FUNCTION(is_readable);
PHP_FUNCTION(is_executable);
PHP_FUNCTION(is_file);
PHP_FUNCTION(is_dir);
PHP_FUNCTION(is_link);
PHP_FUNCTION(file_exists);
PHP_FUNCTION(stat);
PHP_FUNCTION(lstat);
PHP_FUNCTION(chown);
PHP_FUNCTION(chgrp);
PHP_FUNCTION(chmod);
PHP_FUNCTION(touch);
PHP_FUNCTION(clearstatcache);
extern php3_module_entry php3_filestat_module_entry;
#define php3_filestat_module_ptr &php3_filestat_module_entry

4
ext/standard/php3_string.h

@ -49,7 +49,7 @@ PHP_FUNCTION(str_replace);
PHP_FUNCTION(chop);
PHP_FUNCTION(trim);
PHP_FUNCTION(ltrim);
void soundex(INTERNAL_FUNCTION_PARAMETERS);
PHP_FUNCTION(soundex);
PHP_FUNCTION(explode);
PHP_FUNCTION(implode);
@ -80,7 +80,7 @@ PHP_FUNCTION(nl2br);
PHP_FUNCTION(setlocale);
PHP_FUNCTION(stristr);
PHP_FUNCTION(chunk_split);
PHP_FUNCTION(parsestr);
PHP_FUNCTION(parse_str);
PHP_FUNCTION(bin2hex);
PHP_FUNCTION(similar_text);
PHP_FUNCTION(strip_tags);

18
ext/standard/reg.c

@ -28,13 +28,13 @@
unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
function_entry reg_functions[] = {
{"ereg", php3_ereg, third_argument_force_ref },
{"ereg_replace", php3_eregreplace, NULL },
{"eregi", php3_eregi, third_argument_force_ref },
{"eregi_replace", php3_eregireplace, NULL },
{"split", php3_split, NULL},
{"join", php3_implode, NULL},
{"sql_regcase", php3_sql_regcase, NULL},
PHP_FE(ereg, third_argument_force_ref)
PHP_FE(ereg_replace, NULL)
PHP_FE(eregi, third_argument_force_ref)
PHP_FE(eregi_replace, NULL)
PHP_FE(split, NULL)
PHP_FALIAS(join, implode, NULL)
PHP_FE(sql_regcase, NULL)
{NULL, NULL, NULL}
};
@ -491,7 +491,7 @@ static void _php3_eregreplace(INTERNAL_FUNCTION_PARAMETERS, int icase)
/* {{{ proto string ereg_replace(string pattern, string string [, array registers])
Replace regular expression */
PHP_FUNCTION(eregreplace)
PHP_FUNCTION(ereg_replace)
{
_php3_eregreplace(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
@ -499,7 +499,7 @@ PHP_FUNCTION(eregreplace)
/* {{{ proto string eregi_replace(string pattern, string string [, array registers])
Case insensitive replace regular expression */
PHP_FUNCTION(eregireplace)
PHP_FUNCTION(eregi_replace)
{
_php3_eregreplace(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}

4
ext/standard/reg.h

@ -40,8 +40,8 @@ char *_php3_regreplace(const char *pattern, const char *replace, const char *str
PHP_FUNCTION(ereg);
PHP_FUNCTION(eregi);
PHP_FUNCTION(eregireplace);
PHP_FUNCTION(eregreplace);
PHP_FUNCTION(eregi_replace);
PHP_FUNCTION(ereg_replace);
PHP_FUNCTION(split);
PHPAPI PHP_FUNCTION(sql_regcase);

2
ext/standard/soundex.c

@ -26,7 +26,7 @@
/* Simple soundex algorithm as described by Knuth in TAOCP, vol 3 */
/* {{{ proto string soundex(string str)
Calculate the soundex key of a string */
void soundex(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(soundex)
{
char l, u;
char *somestring;

4
ext/standard/string.c

@ -1712,9 +1712,9 @@ PHP_FUNCTION(setlocale)
}
/* }}} */
/* {{{ proto void parsestr(string encoded_string)
/* {{{ proto void parse_str(string encoded_string)
Parses GET/POST/COOKIE data and sets global variables. */
PHP_FUNCTION(parsestr)
PHP_FUNCTION(parse_str)
{
pval *arg;
char *res = NULL;

8
ext/standard/syslog.c

@ -257,10 +257,10 @@ PHP_FUNCTION(syslog)
function_entry syslog_functions[] = {
{"openlog", php3_openlog, NULL},
{"syslog", php3_syslog, NULL},
{"closelog", php3_closelog, NULL},
{"define_syslog_variables", php3_define_syslog_variables, NULL},
PHP_FE(openlog, NULL)
PHP_FE(syslog, NULL)
PHP_FE(closelog, NULL)
PHP_FE(define_syslog_variables, NULL)
{NULL, NULL, NULL}
};

2
main/main.c

@ -508,7 +508,7 @@ static void php3_unset_timeout()
}
void php3_set_time_limit(INTERNAL_FUNCTION_PARAMETERS)
PHP_FUNCTION(set_time_limit)
{
pval *new_timeout;
PLS_FETCH();

Loading…
Cancel
Save