Date: 10/26/98
- Next message: steinm: "[PHP-DEV] CVS update: php3/doc/functions"
- Previous message: ssb: "[PHP-DEV] CVS update: php3/doc/functions"
- Next in thread: ssb: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Monday October 26, 1998 @ 11:05
Author: steinm
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv25035/functions
Modified Files:
pdf.c
Log Message:
more documentation and parameter checking
Index: php3/functions/pdf.c
diff -c php3/functions/pdf.c:1.3 php3/functions/pdf.c:1.4
*** php3/functions/pdf.c:1.3 Tue Oct 20 08:40:22 1998
--- php3/functions/pdf.c Mon Oct 26 11:05:38 1998
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: pdf.c,v 1.3 1998/10/20 12:40:22 steinm Exp $ */
/* pdflib 0.4 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: pdf.c,v 1.4 1998/10/26 16:05:38 steinm Exp $ */
/* pdflib 0.4 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
***************
*** 934,939 ****
--- 934,944 ----
RETURN_FALSE;
}
+ if((arg2->value.lval > 100) && (arg2->value.lval < 0)) {
+ php3_error(E_WARNING,"Parameter of pdf_setflat() has to between 0 and 100");
+ RETURN_FALSE;
+ }
+
PDF_setflat(pdf, (float) arg2->value.dval);
RETURN_TRUE;
***************
*** 958,963 ****
--- 963,973 ----
RETURN_FALSE;
}
+ if((arg2->value.lval > 2) && (arg2->value.lval < 0)) {
+ php3_error(E_WARNING,"Parameter of pdf_setlinejoin() has to between 0 and 2");
+ RETURN_FALSE;
+ }
+
PDF_setlinejoin(pdf, (byte) arg2->value.lval);
RETURN_TRUE;
***************
*** 982,987 ****
--- 992,1002 ----
RETURN_FALSE;
}
+ if((arg2->value.lval > 2) && (arg2->value.lval < 0)) {
+ php3_error(E_WARNING,"Parameter of pdf_setlinecap() has to be > 0 and =< 2");
+ RETURN_FALSE;
+ }
+
PDF_setlinecap(pdf, (byte) arg2->value.lval);
RETURN_TRUE;
***************
*** 1003,1008 ****
--- 1018,1028 ----
pdf = php3_list_find(id,&type);
if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
php3_error(E_WARNING,"Unable to find file identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ if(arg2->value.dval < 1) {
+ php3_error(E_WARNING,"Parameter of pdf_setmiterlimit() has to be >= 1");
RETURN_FALSE;
}
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: steinm: "[PHP-DEV] CVS update: php3/doc/functions"
- Previous message: ssb: "[PHP-DEV] CVS update: php3/doc/functions"
- Next in thread: ssb: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

