CVS update: php3/functions
| From: | rasmus | Date: | Sat, 14 Nov 1998 00:09:34 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2392@lists.php.net to get a copy of this message | ||
Date: Friday November 13, 1998 @ 19:09
Author: rasmus
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv6229/functions
Modified Files:
bcmath.c pdf.c soundex.c uniqid.c
Log Message:
Some more prototype comments
Index: php3/functions/bcmath.c
diff -c php3/functions/bcmath.c:1.24 php3/functions/bcmath.c:1.25
*** php3/functions/bcmath.c:1.24 Sat May 16 11:28:24 1998
--- php3/functions/bcmath.c Fri Nov 13 19:09:30 1998
***************
*** 83,88 ****
--- 83,90 ----
return SUCCESS;
}
+ /* {{{ 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)
{
pval *left, *right,*scale_param;
***************
*** 121,129 ****
free_num(&second);
free_num(&result);
return;
! }
!
void php3_bcmath_sub(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right,*scale_param;
--- 123,132 ----
free_num(&second);
free_num(&result);
return;
! } /* }}} */
! /* {{{ 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)
{
pval *left, *right,*scale_param;
***************
*** 162,170 ****
free_num(&second);
free_num(&result);
return;
! }
!
void php3_bcmath_mul(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right,*scale_param;
--- 165,174 ----
free_num(&second);
free_num(&result);
return;
! } /* }}} */
+ /* {{{ 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)
{
pval *left, *right,*scale_param;
***************
*** 203,210 ****
free_num(&second);
free_num(&result);
return;
! }
void php3_bcmath_div(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right,*scale_param;
--- 207,216 ----
free_num(&second);
free_num(&result);
return;
! } /* }}} */
+ /* {{{ 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)
{
pval *left, *right,*scale_param;
***************
*** 249,256 ****
free_num(&second);
free_num(&result);
return;
! }
void php3_bcmath_mod(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right;
--- 255,264 ----
free_num(&second);
free_num(&result);
return;
! } /* }}} */
+ /* {{{ 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)
{
pval *left, *right;
***************
*** 287,294 ****
free_num(&second);
free_num(&result);
return;
! }
void php3_bcmath_pow(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right,*scale_param;
--- 295,304 ----
free_num(&second);
free_num(&result);
return;
! } /* }}} */
+ /* {{{ 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)
{
pval *left, *right,*scale_param;
***************
*** 327,334 ****
free_num(&second);
free_num(&result);
return;
! }
void php3_bcmath_sqrt(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left,*scale_param;
--- 337,346 ----
free_num(&second);
free_num(&result);
return;
! } /* }}} */
+ /* {{{ proto string bcsqrt(string operand [, int scale])
+ Returns the square root of an arbitray precision number */
void php3_bcmath_sqrt(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left,*scale_param;
***************
*** 364,371 ****
}
free_num(&result);
return;
! }
void php3_bcmath_comp(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right, *scale_param;
--- 376,385 ----
}
free_num(&result);
return;
! } /* }}} */
+ /* {{{ proto string bccomp(string left_operand, string right_operand [, int scale])
+ Compares two arbitrary precision numbers */
void php3_bcmath_comp(INTERNAL_FUNCTION_PARAMETERS)
{
pval *left, *right, *scale_param;
***************
*** 403,410 ****
free_num(&first);
free_num(&second);
return;
! }
void php3_bcmath_set_scale(INTERNAL_FUNCTION_PARAMETERS)
{
pval *new_scale;
--- 417,426 ----
free_num(&first);
free_num(&second);
return;
! } /* }}} */
+ /* {{{ proto string bcscale(int scale)
+ Sets default scale parameter for all bc math functions */
void php3_bcmath_set_scale(INTERNAL_FUNCTION_PARAMETERS)
{
pval *new_scale;
***************
*** 416,422 ****
convert_to_long(new_scale);
GLOBAL(bc_precision) = new_scale->value.lval;
RETURN_TRUE;
! }
#endif
--- 432,438 ----
convert_to_long(new_scale);
GLOBAL(bc_precision) = new_scale->value.lval;
RETURN_TRUE;
! } /* }}} */
#endif
Index: php3/functions/pdf.c
diff -c php3/functions/pdf.c:1.8 php3/functions/pdf.c:1.9
*** php3/functions/pdf.c:1.8 Fri Nov 13 04:57:49 1998
--- php3/functions/pdf.c Fri Nov 13 19:09:31 1998
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: pdf.c,v 1.8 1998/11/13 09:57:49 steinm Exp $ */
/* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: pdf.c,v 1.9 1998/11/14 00:09:31 rasmus Exp $ */
/* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
***************
*** 679,686 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_set_text_pos(int pdfdoc, double x-koor, double y-koor)
! */
void php3_pdf_set_text_pos(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
int id, type;
--- 679,686 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_set_text_pos(int pdfdoc, double x, double y)
! */
void php3_pdf_set_text_pos(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
int id, type;
***************
*** 861,868 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_translate(int pdfdoc, double x-koor, double y-koor)
! Sets origin of koordinate system */
void php3_pdf_translate(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
int id, type;
--- 861,868 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_translate(int pdfdoc, double x, double y)
! Sets origin of coordinate system */
void php3_pdf_translate(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
int id, type;
***************
*** 1118,1124 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_moveto(int pdfdoc, double x-koor, double y-koor)
Sets current point */
void php3_pdf_moveto(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
--- 1118,1124 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_moveto(int pdfdoc, double x, double y)
Sets current point */
void php3_pdf_moveto(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
***************
*** 1181,1187 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_lineto(int pdfdoc, double x-koor, double y-koor)
Draws a line */
void php3_pdf_lineto(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
--- 1181,1187 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_lineto(int pdfdoc, double x, double y)
Draws a line */
void php3_pdf_lineto(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3;
***************
*** 1208,1214 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_circle(int pdfdoc, double x-koor, double y-koor, double radius)
Draws a circle */
void php3_pdf_circle(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4;
--- 1208,1214 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_circle(int pdfdoc, double x, double y, double radius)
Draws a circle */
void php3_pdf_circle(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4;
***************
*** 1236,1242 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_arc(int pdfdoc, double x-koor, double y-koor, double radius, double start,
double end)
Draws an arc */
void php3_pdf_arc(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6;
--- 1236,1242 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_arc(int pdfdoc, double x, double y, double radius, double start, double end)
Draws an arc */
void php3_pdf_arc(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6;
***************
*** 1267,1273 ****
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_rect(int pdfdoc, double x-koor, double y-koor, double width, double height)
Draws a rectangle */
void php3_pdf_rect(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
--- 1267,1273 ----
RETURN_TRUE;
} /* }}} */
! /* {{{ proto void pdf_rect(int pdfdoc, double x, double y, double width, double height)
Draws a rectangle */
void php3_pdf_rect(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
Index: php3/functions/soundex.c
diff -c php3/functions/soundex.c:1.27 php3/functions/soundex.c:1.28
*** php3/functions/soundex.c:1.27 Fri May 15 06:57:37 1998
--- php3/functions/soundex.c Fri Nov 13 19:09:32 1998
***************
*** 26,32 ****
| Author: Bjørn Borud - Guardian Networks AS <borud@guardian.no> |
+----------------------------------------------------------------------+
*/
! /* $Id: soundex.c,v 1.27 1998/05/15 10:57:37 zeev Exp $ */
#include "php.h"
#include "internal_functions.h"
--- 26,32 ----
| Author: Bjørn Borud - Guardian Networks AS <borud@guardian.no> |
+----------------------------------------------------------------------+
*/
! /* $Id: soundex.c,v 1.28 1998/11/14 00:09:32 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
***************
*** 36,41 ****
--- 36,43 ----
#include "php3_string.h"
/* Simple soundex algorithm as described by Knuth in TAOCP, vol 3 */
+ /* {{{ proto string soundex(string str)
+ Calculate the soundex key of a string */
void soundex(INTERNAL_FUNCTION_PARAMETERS)
{
char l, u;
***************
*** 124,130 ****
return_value->value.str.val = estrndup(soundex, 4);
return_value->value.str.len = strlen(soundex);
return_value->type = IS_STRING;
! }
/*
* Local variables:
--- 126,132 ----
return_value->value.str.val = estrndup(soundex, 4);
return_value->value.str.len = strlen(soundex);
return_value->type = IS_STRING;
! } /* }}} */
/*
* Local variables:
Index: php3/functions/uniqid.c
diff -c php3/functions/uniqid.c:1.29 php3/functions/uniqid.c:1.30
*** php3/functions/uniqid.c:1.29 Fri May 15 06:57:40 1998
--- php3/functions/uniqid.c Fri Nov 13 19:09:32 1998
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: uniqid.c,v 1.29 1998/05/15 10:57:40 zeev Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: uniqid.c,v 1.30 1998/11/14 00:09:32 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
***************
*** 51,56 ****
--- 51,58 ----
#include "uniqid.h"
+ /* {{{ proto string uniqid(string prefix)
+ Generate a unique id */
void php3_uniqid(INTERNAL_FUNCTION_PARAMETERS)
{
#ifdef HAVE_GETTIMEOFDAY
***************
*** 86,92 ****
RETURN_STRING(uniqid,1);
#endif
! }
function_entry uniqid_functions[] = {
{"uniqid", php3_uniqid, NULL},
--- 88,94 ----
RETURN_STRING(uniqid,1);
#endif
! } /* }}} */
function_entry uniqid_functions[] = {
{"uniqid", php3_uniqid, NULL},
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net