PHP_FE(cosh, arginfo_cosh)
PHP_FE(tanh, arginfo_tanh)
-#ifdef HAVE_ASINH
+#ifdef HAVE_ASINH
PHP_FE(asinh, arginfo_asinh)
#endif
#ifdef HAVE_ACOSH
#ifdef HAVE_GETOPT
PHP_FE(getopt, arginfo_getopt)
#endif
+
#ifdef HAVE_GETLOADAVG
PHP_FE(sys_getloadavg, arginfo_sys_getloadavg)
#endif
PHP_FE(parse_ini_file, arginfo_parse_ini_file)
#if ZEND_DEBUG
PHP_FE(dump_config_hash, arginfo_dump_config_hash)
-#endif
+#endif
PHP_FE(is_uploaded_file, arginfo_is_uploaded_file)
PHP_FE(move_uploaded_file, arginfo_move_uploaded_file)
/* functions from type.c */
PHP_FE(intval, arginfo_intval)
PHP_FE(floatval, arginfo_floatval)
- PHP_FALIAS(doubleval, floatval, arginfo_floatval)
+ PHP_FALIAS(doubleval, floatval, arginfo_floatval)
PHP_FE(strval, arginfo_strval)
PHP_FE(gettype, arginfo_gettype)
PHP_FE(settype, arginfo_settype)
PHP_FE(file, arginfo_file)
PHP_FE(file_get_contents, arginfo_file_get_contents)
PHP_FE(file_put_contents, arginfo_file_put_contents)
- PHP_FE(stream_select, arginfo_stream_select)
+ PHP_FE(stream_select, arginfo_stream_select)
PHP_FE(stream_context_create, arginfo_stream_context_create)
PHP_FE(stream_context_set_params, arginfo_stream_context_set_params)
PHP_FE(stream_context_set_option, arginfo_stream_context_set_option)
PHP_FE(stream_filter_append, arginfo_stream_filter_append)
PHP_FE(stream_filter_remove, arginfo_stream_filter_remove)
PHP_FE(stream_encoding, arginfo_stream_encoding)
- PHP_FE(stream_socket_client, arginfo_stream_socket_client)
- PHP_FE(stream_socket_server, arginfo_stream_socket_server)
- PHP_FE(stream_socket_accept, arginfo_stream_socket_accept)
+ PHP_FE(stream_socket_client, arginfo_stream_socket_client)
+ PHP_FE(stream_socket_server, arginfo_stream_socket_server)
+ PHP_FE(stream_socket_accept, arginfo_stream_socket_accept)
PHP_FE(stream_socket_get_name, arginfo_stream_socket_get_name)
PHP_FE(stream_socket_recvfrom, arginfo_stream_socket_recvfrom)
PHP_FE(stream_socket_sendto, arginfo_stream_socket_sendto)
PHP_FE(stream_resolve_include_path, arginfo_stream_resolve_include_path)
PHP_FE(fgetcsv, arginfo_fgetcsv)
PHP_FE(fputcsv, arginfo_fputcsv)
- PHP_FE(flock, arginfo_flock)
+ PHP_FE(flock, arginfo_flock)
PHP_FE(get_meta_tags, arginfo_get_meta_tags)
PHP_FE(stream_set_write_buffer, arginfo_stream_set_write_buffer)
PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_stream_set_write_buffer)
#endif
#ifdef HAVE_FNMATCH
- PHP_FE(fnmatch, arginfo_fnmatch)
+ PHP_FE(fnmatch, arginfo_fnmatch)
#endif
/* functions from fsock.c */
PHP_FE(chmod, arginfo_chmod)
#if HAVE_UTIME
PHP_FE(touch, arginfo_touch)
-#endif
+#endif
PHP_FE(clearstatcache, arginfo_clearstatcache)
PHP_FE(disk_total_space, arginfo_disk_total_space)
PHP_FE(disk_free_space, arginfo_disk_free_space)
PHP_FE(array_key_exists, arginfo_array_key_exists)
/* aliases from array.c */
- PHP_FALIAS(pos, current, arginfo_current)
+ PHP_FALIAS(pos, current, arginfo_current)
PHP_FALIAS(sizeof, count, arginfo_count)
PHP_FALIAS(key_exists, array_key_exists, arginfo_array_key_exists)
PHP_FE(assert, arginfo_assert)
PHP_FE(assert_options, arginfo_assert_options)
- /* functions from versioning.c */
- PHP_FE(version_compare, arginfo_version_compare)
+ /* functions from versioning.c */
+ PHP_FE(version_compare, arginfo_version_compare)
/* functions from ftok.c*/
#if HAVE_FTOK
/* }}} */
zend_module_entry basic_functions_module = { /* {{{ */
- STANDARD_MODULE_HEADER_EX,
+ STANDARD_MODULE_HEADER_EX,
NULL,
standard_deps,
"standard", /* extension name */
PHP_RINIT(basic), /* request startup */
PHP_RSHUTDOWN(basic), /* request shutdown */
PHP_MINFO(basic), /* extension info */
- PHP_VERSION, /* extension version */
+ PHP_VERSION, /* extension version */
STANDARD_MODULE_PROPERTIES
};
/* }}} */
tzset();
}
#endif
-
+
efree(pe->putenv_string);
efree(pe->key);
}
BG(rand_is_seeded) = 0;
BG(mt_rand_is_seeded) = 0;
BG(umask) = -1;
-
BG(next) = NULL;
BG(left) = -1;
BG(user_tick_functions) = NULL;
memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state)));
memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex)));
-
+
#if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
#endif
}
/* Check if locale was changed and change it back
- to the value in startup environment */
+ * to the value in startup environment */
if (BG(locale_string) != NULL) {
setlocale(LC_ALL, "C");
setlocale(LC_CTYPE, "");
STR_FREE(BG(locale_string));
BG(locale_string) = NULL;
- /*
- FG(stream_wrappers) and FG(stream_filters) are destroyed
- during php_request_shutdown()
- */
-
+ /* FG(stream_wrappers) and FG(stream_filters) are destroyed
+ * during php_request_shutdown() */
+
PHP_RSHUTDOWN(filestat)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
#ifdef HAVE_SYSLOG_H
#ifdef PHP_WIN32
}
PHP_RSHUTDOWN(user_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
-
+
return SUCCESS;
}
/* }}} */
#ifdef HAVE_IPV6
if (strchr(address, ':')) {
af = AF_INET6;
- } else
+ } else
#endif
if (!strchr(address, '.')) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized address %s", address);
}
if (addr_len == 0 || (ip = inet_addr(addr)) == INADDR_NONE) {
- /* the only special case when we should return -1 ourselves,
+ /* The only special case when we should return -1 ourselves,
* because inet_addr() considers it wrong. We return 0xFFFFFFFF and
- * not -1 or ~0 because of 32/64bit issues.
- */
+ * not -1 or ~0 because of 32/64bit issues. */
if (addr_len == sizeof("255.255.255.255") - 1 &&
- !memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)) {
+ !memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)
+ ) {
RETURN_LONG(0xFFFFFFFF);
}
-
RETURN_FALSE;
}
-
RETURN_LONG(ntohl(ip));
}
/* }}} */
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &ip, &ip_len) == FAILURE) {
return;
}
-
+
n = strtoul(ip, NULL, 0);
myaddr.s_addr = htonl(n);
#endif
#ifdef HAVE_GETOPT
-/* {{{ free_argv
+/* {{{ free_argv()
Free the memory allocated to an argv array. */
static void free_argv(char **argv, int argc)
{
/* }}} */
#ifdef HARTMUT_0
-/* {{{ free_longopts
+/* {{{ free_longopts()
Free the memory allocated to an longopt array. */
static void free_longopts(struct option *longopts)
{
struct option *p;
- if(longopts) {
- for(p=longopts; p->name; p++) {
+ if (longopts) {
+ for (p = longopts; p->name; p++) {
efree((char *)(p->name));
}
-
+
efree(longopts);
}
}
int longindex = 0;
#endif
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a",
- &options, &options_len, &p_longopts) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &options, &options_len, &p_longopts) == FAILURE) {
RETURN_FALSE;
}
- /*
- * Get argv from the global symbol table. We calculate argc ourselves
+ /* Get argv from the global symbol table. We calculate argc ourselves
* in order to be on the safe side, even though it is also available
- * from the symbol table.
- */
+ * from the symbol table. */
if (zend_ascii_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
- zend_ascii_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) {
+ zend_ascii_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE
+ ) {
int pos = 0;
zval **arg;
argc = zend_hash_num_elements(Z_ARRVAL_PP(args));
- /*
- * Attempt to allocate enough memory to hold all of the arguments
- * and a trailing NULL
- */
+ /* Attempt to allocate enough memory to hold all of the arguments
+ * and a trailing NULL */
argv = (char **) safe_emalloc(sizeof(char *), (argc + 1), 0);
/* Reset the array indexes. */
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args));
/* Iterate over the hash to construct the argv array. */
- while (zend_hash_get_current_data(Z_ARRVAL_PP(args),
- (void **)&arg) == SUCCESS) {
+ while (zend_hash_get_current_data(Z_ARRVAL_PP(args), (void **)&arg) == SUCCESS) {
argv[pos++] = estrdup(Z_STRVAL_PP(arg));
zend_hash_move_forward(Z_ARRVAL_PP(args));
}
- /*
- * The C Standard requires argv[argc] to be NULL - this might
- * keep some getopt implementations happy.
- */
+ /* The C Standard requires argv[argc] to be NULL - this might
+ * keep some getopt implementations happy. */
argv[argc] = NULL;
} else {
/* Return false if we can't find argv. */
RETURN_FALSE;
}
- if(p_longopts) {
+ if (p_longopts) {
#ifdef HARTMUT_0
int len, c = zend_hash_num_elements(Z_ARRVAL_P(p_longopts));
struct option *p;
longopts = (struct option *)ecalloc(c+1, sizeof(struct option));
- if(!longopts) RETURN_FALSE;
+ if (!longopts) {
+ RETURN_FALSE;
+ }
/* Reset the array indexes. */
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p_longopts));
p = longopts;
/* Iterate over the hash to construct the argv array. */
- while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts),
- (void **)&arg) == SUCCESS) {
+ while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), (void **)&arg) == SUCCESS) {
p->has_arg = 0;
name = estrdup(Z_STRVAL_PP(arg));
len = strlen(name);
- if((len > 0) && (name[len-1] == ':')) {
+ if ((len > 0) && (name[len-1] == ':')) {
p->has_arg++;
name[len-1] = '\0';
- if((len > 1) && (name[len-2] == ':')) {
+ if ((len > 1) && (name[len-2] == ':')) {
p->has_arg++;
name[len-2] = '\0';
}
}
-
- p->name = name;
+
+ p->name = name;
p->flag = NULL;
p->val = 0;
}
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No support for long options in this build");
-#endif
+#endif
}
/* Initialize the return value as an array. */
}
/* Prepare the option character and the argument string. */
- if(o == 0) {
+ if (o == 0) {
#ifdef HARTMUT_0
optname = (char *)longopts[longindex].name;
-#else
+#else
/* o == 0 shall never happen so this only fixes a compiler warning */
optname = NULL;
#endif
- } else {
- if(o == 1) o = '-';
+ } else {
+ if (o == 1) {
+ o = '-';
+ }
opt[0] = o;
optname = opt;
}
if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) {
/* numeric string */
int optname_int = atoi(optname);
- if(zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) {
- if(Z_TYPE_PP(args) != IS_ARRAY) {
+ if (zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) {
+ if (Z_TYPE_PP(args) != IS_ARRAY) {
convert_to_array_ex(args);
}
zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
}
} else {
/* other strings */
- if(zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) {
- if(Z_TYPE_PP(args) != IS_ARRAY) {
+ if (zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) {
+ if (Z_TYPE_PP(args) != IS_ARRAY) {
convert_to_array_ex(args);
}
zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL);
{
long tv_sec, tv_nsec;
struct timespec php_req, php_rem;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &tv_sec, &tv_nsec) == FAILURE) {
return;
}
double d_ts, c_ts;
struct timeval tm;
struct timespec php_req, php_rem;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &d_ts) == FAILURE) {
return;
}
int varname_len;
char *value;
zval *retval;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &varname, &varname_len, UG(utf8_conv)) == FAILURE) {
return;
}
4th arg = used for additional headers if email
error options:
- 0 = send to php_error_log (uses syslog or file depending on ini setting)
+ 0 = send to php_error_log (uses syslog or file depending on ini setting)
1 = send via email to 3rd parameter 4th option = additional headers
2 = send via tcp/ip to 3rd parameter (name or ip:port)
3 = save to file in 3rd parameter
convert_to_long_ex(erropt);
opt_err = Z_LVAL_PP(erropt);
break;
-
+
case 3:
if (zend_get_parameters_ex(3, &string, &erropt, &option) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments");
convert_to_string_ex(option);
opt = Z_STRVAL_PP(option);
break;
-
+
case 4:
if (zend_get_parameters_ex (4, &string, &erropt, &option, &emailhead) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid arguments");
RETURN_FALSE;
}
break;
-
+
default:
WRONG_PARAM_COUNT;
}
if (_php_error_log(opt_err, message, opt, headers TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
-
+
RETURN_TRUE;
}
/* }}} */
name[len] = '\0';
SG(request_info).current_user_length = len;
SG(request_info).current_user = estrndup(name, len);
- return SG(request_info).current_user;
-#else
+ return SG(request_info).current_user;
+#else
struct passwd *pwd;
if ((pwd=getpwuid(pstat->st_uid))==NULL) {
return SG(request_info).current_user;
#endif
}
-}
+}
/* }}} */
/* {{{ proto array error_get_last() U
}
if (Z_TYPE_P(object) != IS_OBJECT &&
- Z_TYPE_P(object) != IS_STRING &&
- Z_TYPE_P(object) != IS_UNICODE) {
+ Z_TYPE_P(object) != IS_STRING &&
+ Z_TYPE_P(object) != IS_UNICODE
+ ) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
efree(params);
RETURN_FALSE;
}
if (Z_TYPE_P(object) != IS_OBJECT &&
- Z_TYPE_P(object) != IS_STRING &&
- Z_TYPE_P(object) != IS_UNICODE) {
+ Z_TYPE_P(object) != IS_STRING &&
+ Z_TYPE_P(object) != IS_UNICODE
+ ) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name");
RETURN_FALSE;
}
method_args = (zval ***) safe_emalloc(sizeof(zval **), num_elems, 0);
for (zend_hash_internal_pointer_reset(params_ar);
- zend_hash_get_current_data(params_ar, (void **) &(method_args[element])) == SUCCESS;
- zend_hash_move_forward(params_ar)
- ) {
+ zend_hash_get_current_data(params_ar, (void **) &(method_args[element])) == SUCCESS;
+ zend_hash_move_forward(params_ar)
+ ) {
element++;
}
-
+
if (call_user_function_ex(EG(function_table), &object, callback, &retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) {
COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
} else {
php_error(E_WARNING, "(Registered shutdown functions) Unable to call %R() - function does not exist", Z_TYPE(function_name), Z_UNIVAL(function_name));
zval_dtor(&function_name);
return 0;
- }
+ }
zval_dtor(&function_name);
-
+
if (call_user_function(EG(function_table), NULL,
shutdown_function_entry->arguments[0],
- &retval,
+ &retval,
shutdown_function_entry->arg_count - 1,
- shutdown_function_entry->arguments + 1
+ shutdown_function_entry->arguments + 1
TSRMLS_CC ) == SUCCESS)
{
zval_dtor(&retval);
- }
+ }
return 0;
}
/* }}} */
{
zval retval;
zval *function = tick_fe->arguments[0];
-
+
/* Prevent reentrant calls to the same user ticks function */
if (! tick_fe->calling) {
tick_fe->calling = 1;
- if (call_user_function( EG(function_table), NULL,
- function,
+ if (call_user_function( EG(function_table), NULL,
+ function,
&retval,
tick_fe->arg_count - 1,
tick_fe->arguments+1
if (Z_TYPE_P(function) == IS_STRING || Z_TYPE_P(function) == IS_UNICODE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %R() - function does not exist", Z_TYPE_P(function), Z_UNIVAL_P(function));
- } else if ( Z_TYPE_P(function) == IS_ARRAY
+ } else if ( Z_TYPE_P(function) == IS_ARRAY
&& zend_hash_index_find(Z_ARRVAL_P(function), 0, (void **) &obj) == SUCCESS
&& zend_hash_index_find(Z_ARRVAL_P(function), 1, (void **) &method) == SUCCESS
&& Z_TYPE_PP(obj) == IS_OBJECT
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call tick function");
}
}
-
+
tick_fe->calling = 0;
}
}
efree(shutdown_function_entry.arguments);
RETURN_FALSE;
}
-
+
/* Prevent entering of anything but valid callback (syntax check only!) */
if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%R' passed", Z_TYPE(function_name), Z_UNIVAL(function_name));
}
zend_strip(TSRMLS_C);
-
+
zend_destroy_file_handle(&file_handle TSRMLS_CC);
if (filename_type == IS_UNICODE) {
/* Note to next person looking at this function.
* Don't try to be clever by saying:
* file_handle.free_filename = (filename_type == IS_UNICODE)
- * It won't work the way you think --Sara
- */
+ * It won't work the way you think --Sara */
efree(filename);
}
efree(hicompiled_string_description);
EG(error_reporting) = old_error_reporting;
if (i) {
- php_output_end(TSRMLS_C);
+ php_output_end(TSRMLS_C);
}
RETURN_FALSE;
}
return 0;
}
- if (hash_key->nKeyLength == 0 ||
- hash_key->type != IS_STRING ||
- hash_key->arKey.s[0] != 0) {
-
+ if (hash_key->nKeyLength == 0 ||
+ hash_key->type != IS_STRING ||
+ hash_key->arKey.s[0] != 0
+ ) {
MAKE_STD_ZVAL(option);
array_init(option);
char *extname = NULL;
int extname_len = 0, extnumber = 0;
zend_module_entry *module;
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s&", &extname, &extname_len, UG(ascii_conv)) == FAILURE) {
return;
}
if ( option_len != (new_option_len-1) ) {
return 0;
}
-
+
return !strncmp(option_name, new_option_name, option_len);
}
/* }}} */
zend_uchar type;
char *old_value;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&t",
- &varname, &varname_len, UG(utf8_conv),
- &new_value, &new_value_len, &type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&t", &varname, &varname_len, UG(utf8_conv), &new_value, &new_value_len, &type) == FAILURE) {
return;
}
}
#define _CHECK_PATH(var, var_len, ini) php_ini_check_path(var, var_len, ini, sizeof(ini))
-
- /* basedir check */
+
+ /* open_basedir check */
if (PG(open_basedir)) {
char *path = NULL;
int path_len;
_CHECK_PATH(varname, varname_len, "java.home") ||
_CHECK_PATH(varname, varname_len, "java.library.path") ||
_CHECK_PATH(varname, varname_len, "vpopmail.directory")) {
-
+
/* convert to filesystem encoding to check against open_basedir */
if (type == IS_UNICODE) {
if (FAILURE == php_stream_path_encode(NULL, &path, &path_len, new_value.u, new_value_len, REPORT_ERRORS, FG(default_context))) {
efree(path);
}
}
- }
+ }
/* now convert to UTF-8 for the INI system */
if (type == IS_UNICODE) {
RETVAL_FALSE;
}
- /*
- * We always want to convert IS_UNICODE to UTF-8 and pass to INI subsystem.
+ /* We always want to convert IS_UNICODE to UTF-8 and pass to INI subsystem.
* For binary strings, however, we want to convert only if UG(unicode) is
* on, in which case we check whether filesystem encoding is already UTF-8,
- * and if it's not, we convert from that to UTF-8.
- */
+ * and if it's not, we convert from that to UTF-8. */
if (type == IS_UNICODE) {
zend_unicode_to_string(UG(utf8_conv), &temp, &temp_len, new_value.u, new_value_len TSRMLS_CC);
new_value.s = temp;
UErrorCode status = U_ZERO_ERROR;
if (ucnv_getType(ZEND_U_CONVERTER(UG(filesystem_encoding_conv))) != UCNV_UTF8) {
- zend_convert_encodings(UG(utf8_conv), ZEND_U_CONVERTER(UG(filesystem_encoding_conv)),
- &temp, &temp_len, new_value.s, new_value_len, &status);
+ zend_convert_encodings(UG(utf8_conv), ZEND_U_CONVERTER(UG(filesystem_encoding_conv)), &temp, &temp_len, new_value.s, new_value_len, &status);
if (U_FAILURE(status)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not convert path parameter from filesystem encoding to UTF-8");
zval_dtor(return_value);
Get the current include_path configuration option */
PHP_FUNCTION(get_include_path)
{
- char *str;
+ char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
return;
}
+
str = zend_ini_string("include_path", sizeof("include_path"), 0);
+
if (str == NULL) {
RETURN_FALSE;
}
+
RETURN_UTF8_STRING(str, ZSTR_DUPLICATE);
}
/* }}} */
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &do_return) == FAILURE) {
RETURN_FALSE;
}
-
+
if (do_return) {
php_output_start_default(TSRMLS_C);
}
int arg_len;
int old_setting;
- old_setting = PG(ignore_user_abort);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s&", &arg, &arg_len,
- UG(ascii_conv)) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s&", &arg, &arg_len, UG(ascii_conv)) == FAILURE) {
return;
}
+ old_setting = PG(ignore_user_abort);
+
if (arg) {
zend_alter_ini_entry_ex("ignore_user_abort", sizeof("ignore_user_abort"), arg, arg_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
int name_len, proto_len;
struct servent *serv;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&s&", &name, &name_len,
- UG(ascii_conv), &proto, &proto_len, UG(ascii_conv)) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&s&", &name, &name_len, UG(ascii_conv), &proto, &proto_len, UG(ascii_conv)) == FAILURE) {
return;
}
if (serv == NULL) {
RETURN_FALSE;
}
-
+
RETURN_LONG(ntohs(serv->s_port));
}
/* }}} */
long port;
struct servent *serv;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls&", &port, &proto,
- &proto_len, UG(ascii_conv)) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls&", &port, &proto, &proto_len, UG(ascii_conv)) == FAILURE) {
return;
}
if (serv == NULL) {
RETURN_FALSE;
}
-
+
RETURN_ASCII_STRING(serv->s_name, 1);
}
/* }}} */
int name_len;
struct protoent *ent;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &name, &name_len,
- UG(ascii_conv)) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &name, &name_len, UG(ascii_conv)) == FAILURE) {
return;
}
if (!BG(user_tick_functions)) {
return;
}
-
+
if (Z_TYPE_P(function) != IS_ARRAY) {
convert_to_text(function);
}
-
+
tick_fe.arguments = (zval **) emalloc(sizeof(zval *));
tick_fe.arguments[0] = function;
tick_fe.arg_count = 1;
return;
}
- /*
- * The filenames are stored as IS_UNICODE or IS_STRING in the hash, not
- * using filesytem_encoding.
- */
+ /* The filenames are stored as IS_UNICODE or IS_STRING in the hash, not
+ * using filesytem_encoding. */
if (zend_u_hash_exists(SG(rfc1867_uploaded_files), type, path, path_len+1)) {
RETURN_TRUE;
} else {
} else {
ini_parser_cb = (zend_ini_parser_cb_t) php_simple_ini_parser_cb;
}
-
+
/* Setup filehandle */
memset(&fh, 0, sizeof(fh));
fh.filename = filename;
if (!prefix_len && !hash_key->nKeyLength) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Numeric key detected - possible security hazard");
return 0;
- }
+ }
if (hash_key->nKeyLength) {
php_prefix_varname(&new_key, prefix, hash_key->arKey, hash_key->nKeyLength-1, hash_key->type, 0 TSRMLS_CC);
for (p = types; p && *p; p++) {
switch (*p) {
-
+
case 'g':
case 'G':
zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]), (apply_func_args_t) copy_request_variable, 1, prefix);
break;
-
+
case 'p':
case 'P':
zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]), (apply_func_args_t) copy_request_variable, 1, prefix);
/* }}} */
#endif
-
/*
* Local variables:
* tab-width: 4