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)
{
/* {{{ 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);
}
/* {{{ 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);
}
/* {{{ 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);
}
/* {{{ 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);
}
= 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
#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 *);
{"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},
* System Functions *
********************/
-void php3_getenv(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(getenv)
{
#if FHTTPD
int i;
#if HAVE_PUTENV
-void php3_putenv(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(putenv)
{
pval *str;
#endif
-void php3_error_reporting(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(error_reporting)
{
pval *arg;
int old_error_reporting;
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
}
-void php3_key_sort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(key_sort)
{
pval *array;
HashTable *target_hash;
}
-void php3_count(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(count)
{
pval *array;
HashTable *target_hash;
return array_data_compare(a,b)*-1;
}
-void php3_asort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(asort)
{
pval *array;
HashTable *target_hash;
RETURN_TRUE;
}
-void php3_arsort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(arsort)
{
pval *array;
HashTable *target_hash;
RETURN_TRUE;
}
-void php3_sort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sort)
{
pval *array;
HashTable *target_hash;
RETURN_TRUE;
}
-void php3_rsort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(rsort)
{
pval *array;
HashTable *target_hash;
}
-void php3_user_sort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(user_sort)
{
pval *array;
pval *old_compare_func;
RETURN_TRUE;
}
-void php3_auser_sort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(auser_sort)
{
pval *array;
pval *old_compare_func;
}
-void php3_user_key_sort(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(user_key_sort)
{
pval *array;
pval *old_compare_func;
#ifdef __cplusplus
void php3_flush(HashTable *)
#else
-void php3_flush(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(flush)
#endif
{
SLS_FETCH();
}
-void php3_sleep(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sleep)
{
pval *num;
sleep(num->value.lval);
}
-void php3_usleep(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(usleep)
{
#if HAVE_USLEEP
pval *num;
#endif
}
-void php3_gettype(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(gettype)
{
pval *arg;
}
-void php3_settype(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(settype)
{
pval *var, *type;
char *new_type;
}
-void php3_min(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(min)
{
int argc=ARG_COUNT(ht);
pval **result;
}
-void php3_max(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(max)
{
int argc=ARG_COUNT(ht);
pval **result;
return 0;
}
-void php3_array_walk(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(array_walk) {
pval *array, *old_walk_func_name;
HashTable *target_hash;
}
#if 0
-void php3_max(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(max)
{
pval **argv;
int argc, i;
}
#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;
RETURN_STRING(value,1);
}
-void php3_set_magic_quotes_runtime(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(set_magic_quotes_runtime)
{
pval *new_setting;
PLS_FETCH();
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();
}
-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;
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;
}
-void php3_call_user_func(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(call_user_func)
{
pval **params;
pval retval;
}
-void php3_call_user_method(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(call_user_method)
{
pval **params;
pval retval;
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);
return 0;
}
-void php3_get_browser(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(get_browser)
{
pval *agent_name,*agent,tmp;
ELS_FETCH();
}
}
-void php3_crypt(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(crypt)
{
char salt[PHP3_MAX_SALT_LEN];
pval *arg1, *arg2;
/* {{{ 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;
#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 */
{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;
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);
}
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;
*
*/
#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;
#if HAVE_STRFTIME
-void php3_strftime(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(strftime)
{
pval *format_arg, *timestamp_arg;
char *format,*buf;
#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);
/* {{{ 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;
/* {{{ 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;
/* {{{ proto int chdir(string directory)
Change the current directory */
-void php3_chdir(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(chdir)
{
pval *arg;
int ret;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
#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
#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
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
#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
/* {{{ 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);
/* {{{ 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);
/* {{{ 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);
/* {{{ proto escapeshellcmd(string command)
escape shell metacharacters */
-void php3_escapeshellcmd(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(escapeshellcmd)
{
pval *arg1;
char *cmd;
#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 *);
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ proto int fclose(int fp)
Close an open file pointer */
-void php3_fclose(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(fclose)
{
pval *arg1;
int id, type;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
#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;
/* {{{ 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;
/* {{{ 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;
/* 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ proto int rmdir(string dirname)
Remove a directory */
-void php3_rmdir(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(rmdir)
{
pval *arg1;
int ret;
/* {{{ 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];
/* {{{ proto int umask([int mask])
Return or change the umask */
-void php3_fileumask(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(fileumask)
{
pval *arg1;
int oldumask;
*/
/* {{{ 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;
/* {{{ 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;
/* {{{ 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];
/* {{{ 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;
/* {{{ 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? */
#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 */
return SUCCESS;
}
-void php3_chgrp(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(chgrp)
{
#ifndef WINDOWS
pval *filename, *group;
}
-void php3_chown(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(chown)
{
#ifndef WINDOWS
pval *filename, *user;
}
-void php3_chmod(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(chmod)
{
pval *filename, *mode;
int ret;
}
-void php3_touch(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(touch)
{
#if HAVE_UTIME
pval *filename, *filetime;
}
-void php3_clearstatcache(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(clearstatcache)
{
if (CurrentStatFile) {
efree(CurrentStatFile);
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);
/* Implementation of the language Header() function */
-void php3_Header(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(Header)
{
pval *arg1;
}
/* php3_SetCookie(name,value,expires,path,domain,secure) */
-void php3_SetCookie(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(SetCookie)
{
char *cookie;
int len=sizeof("Set-Cookie: ");
#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);
/* {{{ 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);
}
/* {{{ 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);
}
#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 */
}
/* main function */
-void php3_getimagesize(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(getimagesize)
{
pval *arg1,*info = 0;
FILE *fp;
#ifndef _IMAGE_H
#define _IMAGE_H
-extern void php3_getimagesize(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(getimagesize);
#endif /* _IMAGE_H */
/* {{{ 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;
/* {{{ proto string phpversion(void)
Return the current PHP version */
-void php3_version(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(version)
{
RETURN_STRING(PHP_VERSION,1);
}
#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, ...);
#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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ proto int unlink(string filename)
Delete a file */
-void php3_unlink(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(unlink)
{
pval *filename;
int ret;
/* {{{ 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;
#else
-void php3_mail(INTERNAL_FUNCTION_PARAMETERS) {}
+PHP_FUNCTION(mail) {}
void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS) {}
#endif
/* {{{ 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) {
/* {{{ 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) {
/* {{{ 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) {
/* {{{ proto int round(double number)
Returns the rounded value of the number */
-void php3_round(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(round)
{
pval *value;
/* {{{ proto double sin(double number)
Returns the sine of the number in radians */
-void php3_sin(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sin)
{
pval *num;
/* {{{ proto double cos(double number)
Returns the cosine of the number in radians */
-void php3_cos(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(cos)
{
pval *num;
/* {{{ proto double tan(double number)
Returns the tangent of the number in radians */
-void php3_tan(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(tan)
{
pval *num;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ proto double log(double number)
Returns the natural logarithm of the number */
-void php3_log(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(log)
{
pval *num;
/* {{{ proto double log10(double number)
Returns the base-10 logarithm of the number */
-void php3_log10(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(log10)
{
pval *num;
/* {{{ proto double sqrt(double number)
Returns the square root of the number */
-void php3_sqrt(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(sqrt)
{
pval *num;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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='.';
/* {{{ 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];
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
#ifdef __cplusplus
void php3_microtime(HashTable *)
#else
-void php3_microtime(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(microtime)
#endif
{
#if HAVE_GETTIMEOFDAY
#ifndef _MICROTIME_H
#define _MICROTIME_H
-extern void php3_microtime(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(microtime);
#endif /* _MICROTIME_H */
#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
#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
/* {{{ proto int getmyuid(void)
Get PHP script owner's UID */
-void php3_getmyuid(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(getmyuid)
{
long uid;
/* {{{ proto int getmypid(void)
Get current process ID */
-void php3_getmypid(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(getmypid)
{
int pid;
/* {{{ 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) {
/* {{{ 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) {
#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);
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
#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
/* 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
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
#ifndef _PHPIPTC_H
#define _PHPIPTC_H
-extern void php3_iptcparse(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(iptcparse);
#endif /* _PHPIPTC_H */
#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 */
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
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);
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
#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 */
#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 */
*/
/* {{{ 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;
#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 */
#define PHP_RAND_MAX RAND_MAX
#endif
-void php3_srand(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(srand)
{
pval *arg;
#endif
}
-void php3_mt_srand(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mt_srand)
{
pval *arg;
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg) == FAILURE) {
seedMT(arg->value.lval);
}
-void php3_rand(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(rand)
{
pval *p_min=NULL, *p_max=NULL;
}
}
-void php3_mt_rand(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(mt_rand)
{
pval *p_min=NULL, *p_max=NULL;
}
}
-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;
/*
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)
{
/* {{{ 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);
}
/* {{{ 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);
}
/* {{{ 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);
}
/* {{{ 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);
}
= 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;
/* {{{ 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;
/* {{{ proto int strlen(string str)
Get string length */
-void php3_strlen(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(strlen)
{
pval *str;
/* {{{ proto int strcmp(string str1, string str2)
Binary safe string comparison */
-void php3_strcmp(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(strcmp)
{
pval *s1,*s2;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ proto string chop(string str)
Remove trailing whitespace */
-void php3_chop(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(chop)
{
pval *str;
register int i;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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
/* {{{ proto string strtoupper(string str)
Make a string uppercase */
-void php3_strtoupper(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(strtoupper)
{
pval *arg;
char *ret;
/* {{{ proto string strtolower(string str)
Make a string lowercase */
-void php3_strtolower(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(strtolower)
{
pval *str;
char *ret;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ 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;
/* {{{ proto string quotemeta(string str)
Quote meta characters */
-void php3_quotemeta(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(quotemeta)
{
pval *arg;
char *str, *old;
/* {{{ proto int ord(string character)
Return ASCII value of character */
-void php3_ord(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ord)
{
pval *str;
/* {{{ 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];
/* {{{ proto string(string str)
Make a string's first character uppercase */
-void php3_ucfirst(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(ucfirst)
{
pval *arg;
/* {{{ 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;
/* {{{ 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];
/* {{{ proto string strrev(string str)
Reverse a string */
-void php3_strrev(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(strrev)
{
pval *str;
int i,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;
/* {{{ proto string stripslashes(string str)
Strip backslashes from a string */
-void php3_stripslashes(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(stripslashes)
{
pval *str;
/* {{{ 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;
/* {{{ 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);
}
/* {{{ 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);
}
/* {{{ 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;
/* {{{ proto string setlocale(string category, string locale)
Set locale information */
-void php3_setlocale(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(setlocale)
{
pval *category, *locale;
int cat;
/* {{{ 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;
/* {{{ 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();
** 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) {
/* {{{ proto int closelog(void)
Close connection to system logger */
-void php3_closelog(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(closelog)
{
closelog();
if (syslog_device) {
/* {{{ proto int syslog(int priority, string message)
Generate a system log message */
-void php3_syslog(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(syslog)
{
pval *priority, *message;
/* {{{ proto string uniqid(string prefix)
Generate a unique id */
-void php3_uniqid(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(uniqid)
{
#ifdef HAVE_GETTIMEOFDAY
pval *prefix;
#ifndef _UNIQID_H
#define _UNIQID_H
-extern void php3_uniqid(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(uniqid);
#endif /* _UNIQID_H */
/* {{{ 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;
/* {{{ proto string urlencode(string str)
URL-encodes string */
-void php3_urlencode(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(urlencode)
{
pval *arg;
char *str;
/* {{{ proto string urldecode(string str)
Decodes URL-encoded string */
-void php3_urldecode(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(urldecode)
{
pval *arg;
int len;
/* {{{ proto string rawurlencode(string str)
URL-encodes string */
-void php3_rawurlencode(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(rawurlencode)
{
pval *arg;
char *str;
/* {{{ proto string rawurldecode(string str)
Decodes URL-encodes string */
-void php3_rawurldecode(INTERNAL_FUNCTION_PARAMETERS)
+PHP_FUNCTION(rawurldecode)
{
pval *arg;
int len;
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: