cvs: php4 /ext/gd gd.c php_gd.h
| From: | Jani Taskinen | Date: | Fri, 28 Jun 2002 12:35:31 +0000 |
| Subject: | cvs: php4 /ext/gd gd.c php_gd.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12601@lists.php.net to get a copy of this message | ||
sniper Fri Jun 28 08:35:31 2002 EDT
Modified files:
/php4/ext/gd gd.c php_gd.h
Log:
Moved all gd.h related stuff to gd.c
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.197 php4/ext/gd/gd.c:1.198
--- php4/ext/gd/gd.c:1.197 Fri Jun 28 05:53:25 2002
+++ php4/ext/gd/gd.c Fri Jun 28 08:35:30 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.197 2002/06/28 09:53:25 sniper Exp $ */
+/* $Id: gd.c,v 1.198 2002/06/28 12:35:30 sniper Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -52,6 +52,8 @@
static int le_gd, le_gd_font;
#if HAVE_LIBT1
static int le_ps_font, le_ps_enc;
+static void php_free_ps_font(zend_rsrc_list_entry *rsrc TSRMLS_DC);
+static void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#endif
#include <gd.h>
@@ -96,6 +98,14 @@
#define CTX_PUTC(c, fp) fputc(c, fp)
#endif
+#ifndef HAVE_GDIMAGECOLORRESOLVE
+extern int gdImageColorResolve(gdImagePtr, int, int, int);
+#endif
+
+#if HAVE_COLORCLOSESTHWB
+int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b);
+#endif
+
static gdImagePtr _php_image_create_from_string (zval **Data, char *tn, gdImagePtr
(*ioctx_func_p)() TSRMLS_DC);
static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn,
gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)());
static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void
(*func_p)());
@@ -2745,7 +2755,7 @@
/* {{{ php_free_ps_font
*/
-void php_free_ps_font(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+static void php_free_ps_font(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
int *font = (int *)rsrc->ptr;
@@ -2756,7 +2766,7 @@
/* {{{ php_free_ps_enc
*/
-void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+static void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
char **enc = (char **)rsrc->ptr;
@@ -2764,9 +2774,6 @@
}
/* }}} */
-#endif
-
-#if HAVE_LIBT1
/* {{{ proto int imagepsloadfont(string pathname)
Load a new font from specified file */
PHP_FUNCTION(imagepsloadfont)
@@ -2816,7 +2823,6 @@
/* The function in t1lib which this function uses seem to be buggy...
PHP_FUNCTION(imagepscopyfont)
{
-#if HAVE_LIBT1
zval **fnt;
int l_ind, type;
gd_ps_font *nf_ind, *of_ind;
@@ -2863,10 +2869,6 @@
nf_ind->extend = 1;
l_ind = zend_list_insert(nf_ind, le_ps_font);
RETURN_LONG(l_ind);
-#else
- php_error(E_WARNING, "ImagePsCopyFont: No T1lib support in this PHP build");
- RETURN_FALSE;
-#endif
}
*/
/* }}} */
Index: php4/ext/gd/php_gd.h
diff -u php4/ext/gd/php_gd.h:1.40 php4/ext/gd/php_gd.h:1.41
--- php4/ext/gd/php_gd.h:1.40 Fri Jun 28 08:25:57 2002
+++ php4/ext/gd/php_gd.h Fri Jun 28 08:35:30 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_gd.h,v 1.40 2002/06/28 12:25:57 sniper Exp $ */
+/* $Id: php_gd.h,v 1.41 2002/06/28 12:35:30 sniper Exp $ */
#ifndef PHP_GD_H
#define PHP_GD_H
@@ -59,9 +59,6 @@
PHP_MINIT_FUNCTION(gd);
PHP_MSHUTDOWN_FUNCTION(gd);
-#ifndef HAVE_GDIMAGECOLORRESOLVE
-extern int gdImageColorResolve(gdImagePtr, int, int, int);
-#endif
PHP_FUNCTION(imagearc);
PHP_FUNCTION(imagechar);
PHP_FUNCTION(imagecharup);
@@ -159,11 +156,6 @@
PHP_FUNCTION(image2wbmp);
PHP_GD_API int phpi_get_le_gd(void);
-
-/* This is missing from gd.h */
-#if HAVE_COLORCLOSESTHWB
-int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b);
-#endif
#else