[PHP4BETA] CVS update: php4/ext/bcmath

From: Date: Fri, 21 May 1999 10:05:43 +0000
Subject: [PHP4BETA] CVS update: php4/ext/bcmath
Groups: php.version4 
Request: Send a blank email to php-version4+get-941@lists.php.net to get a copy of this message
Date: Friday May 21, 1999 @ 6:05 Author: sas Update of /repository/php4/ext/bcmath In directory php:/tmp/cvs-serv14196/ext/bcmath Modified Files: bcmath.c number.h php3_bcmath.h Log Message: - run ext sources through conv_proto - add necessary phpext_*_ptr Index: php4/ext/bcmath/bcmath.c diff -u php4/ext/bcmath/bcmath.c:1.3 php4/ext/bcmath/bcmath.c:1.4 --- php4/ext/bcmath/bcmath.c:1.3 Fri Apr 23 20:11:50 1999 +++ php4/ext/bcmath/bcmath.c Fri May 21 06:05:43 1999 @@ -76,7 +76,7 @@ /* {{{ proto string bcadd(string left_operand, string right_operand [, int scale]) Returns the sum of two arbitrary precision numbers */ -void php3_bcmath_add(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_add) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -119,7 +119,7 @@ /* {{{ proto string bcsub(string left_operand, string right_operand [, int scale]) Returns the difference between two arbitrary precision numbers (subtration) */ -void php3_bcmath_sub(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_sub) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -162,7 +162,7 @@ /* {{{ proto string bcmul(string left_operand, string right_operand [, int scale]) Returns the multiplication of two arbitrary precision numbers */ -void php3_bcmath_mul(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_mul) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -205,7 +205,7 @@ /* {{{ proto string bcdiv(string left_operand, string right_operand [, int scale]) Returns the quotient of two arbitrary precision numbers (division) */ -void php3_bcmath_div(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_div) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -254,7 +254,7 @@ /* {{{ proto string bcmod(string left_operand, string right_operand) Returns the modulus of the two arbitrary precision operands */ -void php3_bcmath_mod(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_mod) { pval *left, *right; bc_num first, second, result; @@ -295,7 +295,7 @@ /* {{{ proto string bcpow(string x, string y [, int scale]) Returns the value of an arbitrary precision number raised to the power of another */ -void php3_bcmath_pow(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_pow) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -338,7 +338,7 @@ /* {{{ proto string bcsqrt(string operand [, int scale]) Returns the square root of an arbitray precision number */ -void php3_bcmath_sqrt(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_sqrt) { pval *left,*scale_param; bc_num result; @@ -378,7 +378,7 @@ /* {{{ proto string bccomp(string left_operand, string right_operand [, int scale]) Compares two arbitrary precision numbers */ -void php3_bcmath_comp(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_comp) { pval *left, *right, *scale_param; bc_num first, second; @@ -420,7 +420,7 @@ /* {{{ proto string bcscale(int scale) Sets default scale parameter for all bc math functions */ -void php3_bcmath_set_scale(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(bcmath_set_scale) { pval *new_scale; Index: php4/ext/bcmath/number.h diff -u php4/ext/bcmath/number.h:1.1 php4/ext/bcmath/number.h:1.2 --- php4/ext/bcmath/number.h:1.1 Wed Apr 21 19:28:00 1999 +++ php4/ext/bcmath/number.h Fri May 21 06:05:43 1999 @@ -99,20 +99,20 @@ #define FALSE 0 #endif -extern void init_numbers (void); -extern void destruct_numbers (void); -extern void str2num (bc_num *num, char *str, int scale); +void init_numbers (void); +void destruct_numbers (void); +void str2num (bc_num *num, char *str, int scale); extern char *num2str (bc_num num); -extern void bc_add ( bc_num n1, bc_num n2, bc_num *result, int scale_min); -extern void bc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min); -extern void bc_multiply (bc_num n1, bc_num n2, bc_num *prod, int scale); +void bc_add ( bc_num n1, bc_num n2, bc_num *result, int scale_min); +void bc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min); +void bc_multiply (bc_num n1, bc_num n2, bc_num *prod, int scale); extern int bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale); extern int bc_modulo (bc_num num1, bc_num num2, bc_num *result, int scale); -extern void bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale); +void bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale); extern int bc_sqrt (bc_num *num, int scale); extern int bc_compare (bc_num n1, bc_num n2); -extern void free_num (bc_num *num); -extern void init_num (bc_num *num); +void free_num (bc_num *num); +void init_num (bc_num *num); #endif Index: php4/ext/bcmath/php3_bcmath.h diff -u php4/ext/bcmath/php3_bcmath.h:1.2 php4/ext/bcmath/php3_bcmath.h:1.3 --- php4/ext/bcmath/php3_bcmath.h:1.2 Mon May 3 07:11:20 1999 +++ php4/ext/bcmath/php3_bcmath.h Fri May 21 06:05:43 1999 @@ -28,7 +28,7 @@ */ -/* $Id: php3_bcmath.h,v 1.2 1999/05/03 11:11:20 ssb Exp $ */ +/* $Id: php3_bcmath.h,v 1.3 1999/05/21 10:05:43 sas Exp $ */ #ifndef _PHP3_BCMATH_H #define _PHP3_BCMATH_H @@ -45,15 +45,15 @@ extern int php3_rinit_bcmath(INIT_FUNC_ARGS); extern int php3_rend_bcmath(SHUTDOWN_FUNC_ARGS); -extern void php3_bcmath_add(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_sub(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_mul(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_div(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_mod(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_pow(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_sqrt(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_comp(INTERNAL_FUNCTION_PARAMETERS); -extern void php3_bcmath_set_scale(INTERNAL_FUNCTION_PARAMETERS); +PHP_FUNCTION(bcmath_add); +PHP_FUNCTION(bcmath_sub); +PHP_FUNCTION(bcmath_mul); +PHP_FUNCTION(bcmath_div); +PHP_FUNCTION(bcmath_mod); +PHP_FUNCTION(bcmath_pow); +PHP_FUNCTION(bcmath_sqrt); +PHP_FUNCTION(bcmath_comp); +PHP_FUNCTION(bcmath_set_scale); #else -- PHP 4 Beta

« previous php.version4 (#941) next »