diff options
author | foobar <sniper@php.net> | 2003-04-03 01:16:34 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-04-03 01:16:34 +0000 |
commit | c94eeb9fadddd71030bb0dc643aaf9d7a5cd187b (patch) | |
tree | ba4e6ffcfa3ebf7e18e0aa36e34662aa295e16a6 /ext/bcmath | |
parent | 16da825c7c39d4b157dae3a4faa9ed86e167cd39 (diff) | |
download | php-git-c94eeb9fadddd71030bb0dc643aaf9d7a5cd187b.tar.gz |
Another CS fix.
# Rasmus, at least try keep the style consistent..
Diffstat (limited to 'ext/bcmath')
-rw-r--r-- | ext/bcmath/bcmath.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index b5b16716b7..1799f0e64b 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -97,7 +97,11 @@ PHP_RINIT_FUNCTION(bcmath) if (cfg_get_long("bcmath.scale", &bc_precision) == FAILURE) { bc_precision = 0; } - if(bc_precision<0) bc_precision=0; + + if (bc_precision < 0) { + bc_precision = 0; + } + bc_init_numbers(TSRMLS_C); return SUCCESS; @@ -145,7 +149,7 @@ PHP_FUNCTION(bcadd) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -191,7 +195,7 @@ PHP_FUNCTION(bcsub) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -237,7 +241,7 @@ PHP_FUNCTION(bcmul) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -283,7 +287,7 @@ PHP_FUNCTION(bcdiv) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -296,7 +300,7 @@ PHP_FUNCTION(bcdiv) bc_init_num(&result TSRMLS_CC); php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC); php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC); - switch (bc_divide (first, second, &result, scale TSRMLS_CC)) { + switch (bc_divide(first, second, &result, scale TSRMLS_CC)) { case 0: /* OK */ if (result->n_scale > scale) { result->n_scale = scale; @@ -411,7 +415,7 @@ PHP_FUNCTION(bcpow) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -457,7 +461,7 @@ PHP_FUNCTION(bcsqrt) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -500,7 +504,7 @@ PHP_FUNCTION(bccomp) WRONG_PARAM_COUNT; } convert_to_long_ex(scale_param); - scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param); + scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param); break; default: WRONG_PARAM_COUNT; @@ -534,7 +538,7 @@ PHP_FUNCTION(bcscale) } convert_to_long_ex(new_scale); - bc_precision = (Z_LVAL_PP(new_scale)<0) ? 0 : Z_LVAL_PP(new_scale); + bc_precision = (Z_LVAL_PP(new_scale) < 0) ? 0 : Z_LVAL_PP(new_scale); RETURN_TRUE; } |