helly Sat Apr 5 15:43:53 2003 EDT
Modified files:
/php4/ext/gd gd.c
Log:
Collate version handling and bump up version (noticed by Peter Neuman)
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.266 php4/ext/gd/gd.c:1.267
--- php4/ext/gd/gd.c:1.266 Thu Apr 3 20:33:57 2003
+++ php4/ext/gd/gd.c Sat Apr 5 15:43:53 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.266 2003/04/04 01:33:57 iliaa Exp $ */
+/* $Id: gd.c,v 1.267 2003/04/05 20:43:53 helly Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -439,6 +439,18 @@
#endif
/* }}} */
+#if HAVE_GD_BUNDLED
+#define PHP_GD_VERSION_STRING "bundled (2.0.12 compatible)"
+#elif HAVE_LIBGD20
+#define PHP_GD_VERSION_STRING "2.0 or higher"
+#elif HAVE_GDIMAGECOLORRESOLVE
+#define PHP_GD_VERSION_STRING "1.6.2 or higher"
+#elif HAVE_LIBGD13
+#define PHP_GD_VERSION_STRING "between 1.3 and 1.6.1"
+#else
+#define PHP_GD_VERSION_STRING "1.2"
+#endif
+
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(gd)
@@ -448,17 +460,7 @@
/* need to use a PHPAPI function here because it is external module in windows
*/
-#if HAVE_GD_BUNDLED
- php_info_print_table_row(2, "GD Version", "bundled (2.0.11 compatible)");
-#elif HAVE_LIBGD20
- php_info_print_table_row(2, "GD Version", "2.0 or higher");
-#elif HAVE_GDIMAGECOLORRESOLVE
- php_info_print_table_row(2, "GD Version", "1.6.2 or higher");
-#elif HAVE_LIBGD13
- php_info_print_table_row(2, "GD Version", "between 1.3 and 1.6.1");
-#else
- php_info_print_table_row(2, "GD Version", "1.2");
-#endif
+ php_info_print_table_row(2, "GD Version", PHP_GD_VERSION_STRING);
#ifdef ENABLE_GD_TTF
php_info_print_table_row(2, "FreeType Support", "enabled");
@@ -513,17 +515,7 @@
array_init(return_value);
-#if HAVE_GD_BUNDLED
- add_assoc_string(return_value, "GD Version", "bundled (2.0 compatible)", 1);
-#elif HAVE_LIBGD20
- add_assoc_string(return_value, "GD Version", "2.0 or higher", 1);
-#elif HAVE_GDIMAGECOLORRESOLVE
- add_assoc_string(return_value, "GD Version", "1.6.2 or higher", 1);
-#elif HAVE_LIBGD13
- add_assoc_string(return_value, "GD Version", "between 1.3 and 1.6.1", 1);
-#else
- add_assoc_string(return_value, "GD Version", "1.2", 1);
-#endif
+ add_assoc_string(return_value, "GD Version", PHP_GD_VERSION_STRING, 1);
#ifdef ENABLE_GD_TTF
add_assoc_bool(return_value, "FreeType Support", 1);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php