diff options
author | foobar <sniper@php.net> | 2002-05-09 22:46:45 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-05-09 22:46:45 +0000 |
commit | c241dc5c8b08bff34664eb520596ce1f295d1057 (patch) | |
tree | df3b918d05ec0a0bb99d3c214cdf7b672842adc1 /main | |
parent | 3c8c01b47571e368ef360b66ad48374b1e64db37 (diff) | |
download | php-git-c241dc5c8b08bff34664eb520596ce1f295d1057.tar.gz |
ws fix
Diffstat (limited to 'main')
-rw-r--r-- | main/php_ini.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index b1354e63e3..33b09a6d7b 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -108,7 +108,7 @@ PHPAPI void display_ini_entries(zend_module_entry *module) if (module) { module_number = module->module_number; - } else { + } else { module_number = 0; } php_info_print_table_start(); @@ -122,25 +122,25 @@ PHPAPI void display_ini_entries(zend_module_entry *module) #ifdef ZTS # if (ZEND_DEBUG) -# define ZEND_EXTENSION_TOKEN "zend_extension_debug_ts" +# define ZEND_EXTENSION_TOKEN "zend_extension_debug_ts" # else -# define ZEND_EXTENSION_TOKEN "zend_extension_ts" +# define ZEND_EXTENSION_TOKEN "zend_extension_ts" # endif #else # if (ZEND_DEBUG) -# define ZEND_EXTENSION_TOKEN "zend_extension_debug" +# define ZEND_EXTENSION_TOKEN "zend_extension_debug" # else -# define ZEND_EXTENSION_TOKEN "zend_extension" +# define ZEND_EXTENSION_TOKEN "zend_extension" # endif #endif /* {{{ pvalue_config_destructor */ static void pvalue_config_destructor(zval *pvalue) -{ - if (Z_TYPE_P(pvalue) == IS_STRING && Z_STRVAL_P(pvalue) != empty_string) { - free(Z_STRVAL_P(pvalue)); - } +{ + if (Z_TYPE_P(pvalue) == IS_STRING && Z_STRVAL_P(pvalue) != empty_string) { + free(Z_STRVAL_P(pvalue)); + } } /* }}} */ @@ -157,14 +157,14 @@ static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, } if (!strcasecmp(Z_STRVAL_P(arg1), "extension")) { /* load function module */ zval copy; - + copy = *arg2; zval_copy_ctor(©); copy.refcount = 0; - zend_llist_add_element(&extension_lists.functions, ©); + zend_llist_add_element(&extension_lists.functions, ©); } else if (!strcasecmp(Z_STRVAL_P(arg1), ZEND_EXTENSION_TOKEN)) { /* load Zend extension */ char *extension_name = estrndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2)); - + zend_llist_add_element(&extension_lists.engine, &extension_name); } else { zend_hash_update(&configuration_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, arg2, sizeof(zval), (void **) &entry); @@ -212,7 +212,7 @@ int php_init_config(char *php_ini_path_override) zend_llist_init(&extension_lists.engine, sizeof(char *), (llist_dtor_func_t) free_estring, 1); zend_llist_init(&extension_lists.functions, sizeof(zval), (llist_dtor_func_t) ZVAL_DESTRUCTOR, 1); - + safe_mode_state = PG(safe_mode); open_basedir = PG(open_basedir); PG(safe_mode) = 0; @@ -284,11 +284,11 @@ int php_init_config(char *php_ini_path_override) fh.filename = php_ini_opened_path; zend_parse_ini_file(&fh, 1, php_config_ini_parser_cb, &extension_lists); - + /* If we succeeded in opening an INI file, preserve the name of the file opened. */ if (php_ini_opened_path) { zval tmp; - + Z_STRLEN(tmp) = strlen(php_ini_opened_path); Z_STRVAL(tmp) = zend_strndup(php_ini_opened_path, Z_STRLEN(tmp)); Z_TYPE(tmp) = IS_STRING; @@ -296,7 +296,7 @@ int php_init_config(char *php_ini_path_override) efree(php_ini_opened_path); php_ini_opened_path = zend_strndup(Z_STRVAL(tmp), Z_STRLEN(tmp)); } - + return SUCCESS; } /* }}} */ @@ -344,7 +344,7 @@ zval *cfg_get_entry(char *name, uint name_length) PHPAPI int cfg_get_long(char *varname, long *result) { zval *tmp, var; - + if (zend_hash_find(&configuration_hash, varname, strlen(varname)+1, (void **) &tmp)==FAILURE) { *result=(long)NULL; return FAILURE; @@ -362,7 +362,7 @@ PHPAPI int cfg_get_long(char *varname, long *result) PHPAPI int cfg_get_double(char *varname, double *result) { zval *tmp, var; - + if (zend_hash_find(&configuration_hash, varname, strlen(varname)+1, (void **) &tmp)==FAILURE) { *result=(double)0; return FAILURE; |