cvs: /php4/ext/pdf pdf.c

From: Date: Tue, 07 Mar 2000 17:29:54 +0000
Subject: cvs: /php4/ext/pdf pdf.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-11694@lists.php.net to get a copy of this message
steinm Tue Mar 7 09:29:54 2000 EDT Modified files: /php4/ext/pdf pdf.c Log: - quick hack to support pdflib 3.0 (not tested) Index: php4/ext/pdf/pdf.c diff -u php4/ext/pdf/pdf.c:1.27 php4/ext/pdf/pdf.c:1.28 --- php4/ext/pdf/pdf.c:1.27 Sat Feb 26 03:58:48 2000 +++ php4/ext/pdf/pdf.c Tue Mar 7 09:29:24 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdf.c,v 1.27 2000/02/26 11:58:48 steinm Exp $ */ +/* $Id: pdf.c,v 1.28 2000/03/07 17:29:24 steinm Exp $ */ /* pdflib 2.01 is subject to the ALADDIN FREE PUBLIC LICENSE. Copyright (C) 1997 Thomas Merz. */ @@ -2344,7 +2344,7 @@ } -#if PDFLIB_MINORVERSION == 0 +#if PDFLIB_MAJORVERSION < 3 & PDFLIB_MINORVERSION == 0 pdf_image = PDF_open_memory_image(pdf, buffer, im->sx, im->sy, 3, 8); #else pdf_image = PDF_open_image(pdf, "raw", "memory", buffer, im->sx*im->sy*3, im->sx, im->sy, 3, 8, NULL); @@ -2440,7 +2440,7 @@ /* {{{ proto void pdf_put_image(int pdf, int pdfimage) Stores image in the pdf document for later use */ PHP_FUNCTION(pdf_put_image) { -#if PDFLIB_MINORVERSION > 0 +#if PDFLIB_MINORVERSION > 0 | PDFLIB_MAJORVERSION > 2 #else pval *arg1, *arg2; int id, type; @@ -2449,8 +2449,8 @@ #endif PDF_TLS_VARS; -#if PDFLIB_MINORVERSION > 0 - php_error(E_WARNING, "Version 2.01 of pdflib does not need the pdf_put_image() anymore, check the docs!"); +#if PDFLIB_MINORVERSION > 0 | PDFLIB_MAJORVERSION > 2 + php_error(E_WARNING, "Version 2.01 and higher of pdflib does not need the pdf_put_image() anymore, check the docs!"); #else if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) { WRONG_PARAM_COUNT; @@ -2482,7 +2482,7 @@ /* {{{ proto void pdf_execute_image(int pdf, int pdfimage, int x, int y, int scale) Places stored image in the pdf document */ PHP_FUNCTION(pdf_execute_image) { -#if PDFLIB_MINORVERSION >= 01 +#if PDFLIB_MINORVERSION >= 01 | PDFLIB_MAJORVERSION > 2 #else pval *arg1, *arg2, *arg3, *arg4, *arg5; int id, type; @@ -2491,8 +2491,8 @@ PDF_TLS_VARS; #endif -#if PDFLIB_MINORVERSION >= 01 - php_error(E_WARNING, "Version 2.01 of pdflib does not need the pdf_execute_image() anymore, check the docs!"); +#if PDFLIB_MINORVERSION >= 01 | PDFLIB_MAJORVERSION > 2 + php_error(E_WARNING, "Version 2.01 and higher of pdflib does not need the pdf_execute_image() anymore, check the docs!"); #else if (ARG_COUNT(ht) != 5 || getParameters(ht, 5, &arg1, &arg2, &arg3, &arg4, &arg5) == FAILURE) { WRONG_PARAM_COUNT;

« previous php.version4 (#11694) next »