cvs: php4 /ext/gd gd.c
| From: | Derick Rethans | Date: | Sat, 02 Mar 2002 12:32:33 +0000 |
| Subject: | cvs: php4 /ext/gd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9569@lists.php.net to get a copy of this message | ||
derick Sat Mar 2 07:32:33 2002 EDT
Modified files:
/php4/ext/gd gd.c
Log:
- Make GD functions only available if they really exist (Patch by
matslin@orakel.ntnu.no)
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.178 php4/ext/gd/gd.c:1.179
--- php4/ext/gd/gd.c:1.178 Thu Feb 28 18:08:48 2002
+++ php4/ext/gd/gd.c Sat Mar 2 07:32:31 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.178 2002/02/28 23:08:48 rasmus Exp $ */
+/* $Id: gd.c,v 1.179 2002/03/02 12:32:31 derick Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -141,22 +141,45 @@
PHP_FE(imagecopymergegray, NULL)
PHP_FE(imagecreatefromstring, NULL)
+#ifdef HAVE_GD_PNG
PHP_FE(imagecreatefrompng, NULL)
+#endif
+#ifdef HAVE_GD_GIF_READ
PHP_FE(imagecreatefromgif, NULL)
+#endif
+#ifdef HAVE_GD_JPG
PHP_FE(imagecreatefromjpeg, NULL)
+#endif
+#ifdef HAVE_GD_WBMP
PHP_FE(imagecreatefromwbmp, NULL)
+#endif
+#ifdef HAVE_GD_XBM
PHP_FE(imagecreatefromxbm, NULL)
+#endif
+#ifdef HAVE_GD_XPM
PHP_FE(imagecreatefromxpm, NULL)
+#endif
PHP_FE(imagecreatefromgd, NULL)
+#ifdef HAVE_GD_GD2
PHP_FE(imagecreatefromgd2, NULL)
PHP_FE(imagecreatefromgd2part, NULL)
-
+#endif
+#ifdef HAVE_GD_PNG
PHP_FE(imagepng, NULL)
+#endif
+#ifdef HAVE_GD_GIF_CREATE
PHP_FE(imagegif, NULL)
+#endif
+#ifdef HAVE_GD_JPG
PHP_FE(imagejpeg, NULL)
+#endif
+#ifdef HAVE_GD_WBMP
PHP_FE(imagewbmp, NULL)
+#endif
PHP_FE(imagegd, NULL)
+#ifdef HAVE_GD_GD2
PHP_FE(imagegd2, NULL)
+#endif
PHP_FE(imagedestroy, NULL)
PHP_FE(imagegammacorrect, NULL)
@@ -177,10 +200,13 @@
PHP_FE(imagesx, NULL)
PHP_FE(imagesy, NULL)
PHP_FE(imagedashedline, NULL)
+#ifdef ENABLE_GD_TTF
PHP_FE(imagettfbbox, NULL)
PHP_FE(imagettftext, NULL)
- PHP_FE(imageftbbox, NULL)
- PHP_FE(imagefttext, NULL)
+ PHP_FE(imageftbbox, NULL)
+ PHP_FE(imagefttext, NULL)
+#endif
+#ifdef HAVE_LIBT1
PHP_FE(imagepsloadfont, NULL)
/*
PHP_FE(imagepscopyfont, NULL)
@@ -191,12 +217,18 @@
PHP_FE(imagepsslantfont, NULL)
PHP_FE(imagepstext, NULL)
PHP_FE(imagepsbbox, NULL)
+#endif
PHP_FE(imagetypes, NULL)
+#if defined(HAVE_GD_JPG) && defined(HAVE_GD_WBMP)
PHP_FE(jpeg2wbmp, NULL)
+#endif
+#if defined(HAVE_GD_PNG) && defined(HAVE_GD_WBMP)
PHP_FE(png2wbmp, NULL)
+#endif
+#ifdef HAVE_GD_WBMP
PHP_FE(image2wbmp, NULL)
-
+#endif
{NULL, NULL, NULL}
};
/* }}} */