[PHP-CVS] cvs: php4 /ext/java java.c

2002-12-04 Thread Sebastian Bergmann
sebastian   Wed Dec  4 03:18:02 2002 EDT

  Modified files:  
/php4/ext/java  java.c 
  Log:
  Fix bugs #20270, #15702, #18600. Patch by Tony J. White [EMAIL PROTECTED].
  
  
Index: php4/ext/java/java.c
diff -u php4/ext/java/java.c:1.69 php4/ext/java/java.c:1.70
--- php4/ext/java/java.c:1.69   Wed Aug 21 00:42:57 2002
+++ php4/ext/java/java.cWed Dec  4 03:18:01 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: java.c,v 1.69 2002/08/21 04:42:57 kalowsky Exp $ */
+/* $Id: java.c,v 1.70 2002/12/04 08:18:01 sebastian Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -45,7 +45,7 @@
 
 #ifdef PHP_WIN32
 #include win32/winutil.h
-#define DL_ERROR php_win_err()
+#define DL_ERROR php_win_err
 #endif
 
 
@@ -87,7 +87,6 @@
 static char *javahome  = 0;
 static char *javalib   = 0;
 
-static int iniUpdated  = 0;
 static void *dl_handle = 0;
 
 /* {{{ ZEND_BEGIN_MODULE_GLOBALS
@@ -113,22 +112,21 @@
 static PHP_INI_MH(OnIniUpdate)
 {
if (new_value) *(char**)mh_arg1 = new_value;
-   iniUpdated=1;
return SUCCESS;
 }
 
 /* {{{ PHP_INI_BEGIN 
  */
 PHP_INI_BEGIN()
-  PHP_INI_ENTRY1(java.class.path,   NULL, PHP_INI_ALL, OnIniUpdate, classpath)
+  PHP_INI_ENTRY1(java.class.path,   NULL, PHP_INI_SYSTEM, OnIniUpdate, classpath)
 #ifndef JNI_11
-  PHP_INI_ENTRY1(java.home, NULL, PHP_INI_ALL, OnIniUpdate, javahome)
-  PHP_INI_ENTRY1(java.library.path, NULL, PHP_INI_ALL, OnIniUpdate, libpath)
+  PHP_INI_ENTRY1(java.home, NULL, PHP_INI_SYSTEM, OnIniUpdate, javahome)
+  PHP_INI_ENTRY1(java.library.path, NULL, PHP_INI_SYSTEM,OnIniUpdate, libpath)
 #endif
 #ifdef JAVALIB
-  PHP_INI_ENTRY1(java.library, JAVALIB, PHP_INI_ALL, OnIniUpdate, javalib)
+  PHP_INI_ENTRY1(java.library, JAVALIB, PHP_INI_SYSTEM, OnIniUpdate, javalib)
 #else
-  PHP_INI_ENTRY1(java.library, NULL,PHP_INI_ALL, OnIniUpdate, javalib)
+  PHP_INI_ENTRY1(java.library, NULL,PHP_INI_SYSTEM, OnIniUpdate, javalib)
 #endif
 PHP_INI_END()
 /* }}} */
@@ -143,14 +141,7 @@
 void jvm_destroy(TSRMLS_D) 
 {
   if (JG(php_reflect)) (*JG(jenv))-DeleteGlobalRef(JG(jenv), JG(php_reflect));
-  if (JG(jvm)) {
-(*JG(jvm))-DetachCurrentThread(JG(jvm));
-(*JG(jvm))-DestroyJavaVM(JG(jvm));
-JG(jvm) = 0;
-  }
-  if (dl_handle) DL_UNLOAD(dl_handle);
   JG(php_reflect) = 0;
-  JG(jenv) = 0;
 }
 /* }}} */
 
@@ -196,14 +187,13 @@
 #endif
 #endif
 
-  iniUpdated=0;
 
   if (javalib) {
 dl_handle = DL_LOAD(javalib);
 
 if (!dl_handle) {
   php_error(E_ERROR, Unable to load Java Library %s, error: %s, 
-javalib, DL_ERROR);
+javalib, DL_ERROR());
   return -1;
 }
   }
@@ -452,7 +442,6 @@
 
   getParametersArray(ht, arg_count, arguments);
 
-  if (iniUpdated  JG(jenv)) jvm_destroy(TSRMLS_C);
   if (!JG(jenv)) jvm_create(TSRMLS_C);
   if (!JG(jenv)) return;
   jenv = JG(jenv);
@@ -854,7 +843,6 @@
 {
   jobject local_php_reflect;
 
-  iniUpdated=0;
   JG(jenv)=newJenv;
 
   if (!self) self = (*JG(jenv))-FindClass(JG(jenv), net/php/reflect);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) / NEWS

2002-12-04 Thread Sebastian Bergmann
sebastian   Wed Dec  4 03:34:29 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  MFH
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.13 php4/NEWS:1.1247.2.14
--- php4/NEWS:1.1247.2.13   Mon Nov 18 07:16:59 2002
+++ php4/NEWS   Wed Dec  4 03:34:24 2002
@@ -13,6 +13,7 @@
 - Moved extensions to PECL (http://pear.php.net/): (James, Derick)
   . ext/vpopmail
   . ext/cybermut
+- Fixed bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White)
 - Fixed bug #19566 (get_declared_classes() segfaults). (Moriyoshi, Marcus, Andi)
 - Fixed bug #20381 (array_merge_recursive mangles input arrays). (Moriyoshi) 
 - Added -n command switch to cli and cgi version which allows to skip php.ini



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/ircg ircg.c

2002-12-04 Thread Sascha Schumann
sas Wed Dec  4 08:10:23 2002 EDT

  Modified files:  
/php4/ext/ircg  ircg.c 
  Log:
  display data from IRCG's logging subsystem
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.154 php4/ext/ircg/ircg.c:1.155
--- php4/ext/ircg/ircg.c:1.154  Wed Dec  4 04:53:20 2002
+++ php4/ext/ircg/ircg.cWed Dec  4 08:10:23 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: ircg.c,v 1.154 2002/12/04 09:53:20 sas Exp $ */
+/* $Id: ircg.c,v 1.155 2002/12/04 13:10:23 sas Exp $ */
 
 /* {{{ includes */
 
@@ -2198,11 +2198,20 @@
 }
 /* }}} */
 
+#if IRCG_API_VERSION = 20021127
+#include ircg_log.h
+#endif
+
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(ircg)
 {
char buf[100];
+#if IRCG_API_VERSION = 20021127
+   int i;
+   const char *name;
+   ircg_log_int val;
+#endif
 
php_info_print_table_start();
php_info_print_table_header(2, ircg support, enabled);
@@ -2224,6 +2233,17 @@
php_info_print_table_row(2, Failed persistent HTTP connections, buf);
sprintf(buf, %lu, php_ircg-irc_wbuf_destructs);
php_info_print_table_row(2, Write buffer destructs, buf);
+
+#if IRCG_API_VERSION = 20021127
+
+   for (i = 0; i  IRCG_LOG_CNT_NR; i++) {
+   ircg_log_get(i, val, name);
+   sprintf(buf, IRCG_LOG_INT_FMT, val);
+   php_info_print_table_row(2, name, buf);
+   }
+
+#endif
+   
php_info_print_table_end();
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard array.c

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi   Wed Dec  4 11:41:29 2002 EDT

  Modified files:  
/php4/ext/standard  array.c 
  Log:
  Fixed segfaults of array_walk() when keys are passed to cb by reference.
  Fixed bug #12776.
  
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.206 php4/ext/standard/array.c:1.207
--- php4/ext/standard/array.c:1.206 Tue Dec  3 10:02:06 2002
+++ php4/ext/standard/array.c   Wed Dec  4 11:41:28 2002
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.206 2002/12/03 15:02:06 moriyoshi Exp $ */
+/* $Id: array.c,v 1.207 2002/12/04 16:41:28 moriyoshi Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -953,9 +953,6 @@
ulong  num_key;
HashPosition pos;
 
-   /* Allocate space for key */
-   MAKE_STD_ZVAL(key);
-   
/* Set up known arguments */
args[1] = key;
args[2] = userdata;
@@ -964,14 +961,15 @@
 
/* Iterate through hash */
while (zend_hash_get_current_data_ex(target_hash, (void **)args[0], pos) == 
SUCCESS) {
+   /* Allocate space for key */
+   MAKE_STD_ZVAL(key);
+
/* Set up the key */
if (zend_hash_get_current_key_ex(target_hash, string_key, 
string_key_len, num_key, 0, pos) == HASH_KEY_IS_LONG) {
Z_TYPE_P(key) = IS_LONG;
Z_LVAL_P(key) = num_key;
} else {
-   Z_TYPE_P(key) = IS_STRING;
-   Z_STRVAL_P(key) = string_key;
-   Z_STRLEN_P(key) = string_key_len-1;
+   ZVAL_STRINGL(key, string_key, string_key_len-1, 1);
}

/* Call the userland function */
@@ -992,9 +990,9 @@
break;
}
 
+   zval_ptr_dtor(key);
zend_hash_move_forward_ex(target_hash, pos);
}
-   zval_ptr_dtor(key);

return 0;
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard array.c

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi   Wed Dec  4 11:44:24 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  array.c 
  Log:
  MFH: fixed segfaults in array_walk() when keys are passed to cb by reference 
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.199.2.5 php4/ext/standard/array.c:1.199.2.6
--- php4/ext/standard/array.c:1.199.2.5 Tue Dec  3 10:02:55 2002
+++ php4/ext/standard/array.c   Wed Dec  4 11:44:24 2002
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.199.2.5 2002/12/03 15:02:55 moriyoshi Exp $ */
+/* $Id: array.c,v 1.199.2.6 2002/12/04 16:44:24 moriyoshi Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -953,9 +953,6 @@
ulong  num_key;
HashPosition pos;
 
-   /* Allocate space for key */
-   MAKE_STD_ZVAL(key);
-   
/* Set up known arguments */
args[1] = key;
args[2] = userdata;
@@ -964,6 +961,9 @@
 
/* Iterate through hash */
while (zend_hash_get_current_data_ex(target_hash, (void **)args[0], pos) == 
SUCCESS) {
+   /* Allocate space for key */
+   MAKE_STD_ZVAL(key);
+   
/* Set up the key */
if (zend_hash_get_current_key_ex(target_hash, string_key, 
string_key_len, num_key, 0, pos) == HASH_KEY_IS_LONG) {
Z_TYPE_P(key) = IS_LONG;
@@ -992,9 +992,9 @@
break;
}
 
+   zval_ptr_dtor(key);
zend_hash_move_forward_ex(target_hash, pos);
}
-   zval_ptr_dtor(key);

return 0;
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / NEWS

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi   Wed Dec  4 11:49:59 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Bug fix news
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1264 php4/NEWS:1.1265
--- php4/NEWS:1.1264Wed Dec  4 03:31:43 2002
+++ php4/NEWS   Wed Dec  4 11:49:59 2002
@@ -20,6 +20,7 @@
 - Moved extensions to PECL (http://pear.php.net/): (James, Derick)
   . ext/vpopmail
   . ext/cybermut
+- Fixed bug #12776 (array_walk crash). (Moriyoshi)
 - Fixed bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White)
 - Fixed bug #19566 (get_declared_classes() segfaults). (Moriyoshi, Marcus, Andi)
 - Fixed bug #20381 (array_merge_recursive mangles input arrays). (Moriyoshi) 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard/tests/array bug12776.phpt

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi   Wed Dec  4 12:01:07 2002 EDT

  Added files: 
/php4/ext/standard/tests/array  bug12776.phpt 
  Log:
  Added a test for bug #12776
  
  

Index: php4/ext/standard/tests/array/bug12776.phpt
+++ php4/ext/standard/tests/array/bug12776.phpt
--TEST--
Bug #12776 (array_walk crash)
--FILE--
?php

function test($val,$key)
{
global $globalArray;
$globalArray[]=$key; // this will end up crashing
$globalArray[]=(string)$key; // this will end up OK
print val: $val; key: $key\n; flush();
}

$arr=array('k'='v');
array_walk($arr,'test');

print First value: .$globalArray[0];

print \nDone\n;

?
--EXPECT--
val: v; key: k
First value: k
Done



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard/tests/array bug12776.phpt

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi   Wed Dec  4 12:02:21 2002 EDT

  Added files: (Branch: PHP_4_3)
/php4/ext/standard/tests/array  bug12776.phpt 
  Log:
  MFH
  
  

Index: php4/ext/standard/tests/array/bug12776.phpt
+++ php4/ext/standard/tests/array/bug12776.phpt
--TEST--
Bug #12776 (array_walk crash)
--FILE--
?php

function test($val,$key)
{
global $globalArray;
$globalArray[]=$key; // this will end up crashing
$globalArray[]=(string)$key; // this will end up OK
print val: $val; key: $key\n; flush();
}

$arr=array('k'='v');
array_walk($arr,'test');

print First value: .$globalArray[0];

print \nDone\n;

?
--EXPECT--
val: v; key: k
First value: k
Done



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard array.c

2002-12-04 Thread Moriyoshi Koizumi
moriyoshi   Wed Dec  4 12:12:21 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  array.c 
  Log:
  Forgot to merge this part 
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.199.2.6 php4/ext/standard/array.c:1.199.2.7
--- php4/ext/standard/array.c:1.199.2.6 Wed Dec  4 11:44:24 2002
+++ php4/ext/standard/array.c   Wed Dec  4 12:12:20 2002
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.199.2.6 2002/12/04 16:44:24 moriyoshi Exp $ */
+/* $Id: array.c,v 1.199.2.7 2002/12/04 17:12:20 moriyoshi Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -969,9 +969,7 @@
Z_TYPE_P(key) = IS_LONG;
Z_LVAL_P(key) = num_key;
} else {
-   Z_TYPE_P(key) = IS_STRING;
-   Z_STRVAL_P(key) = string_key;
-   Z_STRLEN_P(key) = string_key_len-1;
+   ZVAL_STRINGL(key, string_key, string_key_len-1, 1);
}

/* Call the userland function */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd/libgd gd_topal.c

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 12:16:19 2002 EDT

  Modified files:  
/php4/ext/gd/libgd  gd_topal.c 
  Log:
  Fixed a memory leak inside gdImageTrueColorToPalette().
  
  
Index: php4/ext/gd/libgd/gd_topal.c
diff -u php4/ext/gd/libgd/gd_topal.c:1.9 php4/ext/gd/libgd/gd_topal.c:1.10
--- php4/ext/gd/libgd/gd_topal.c:1.9Tue Nov 19 14:55:54 2002
+++ php4/ext/gd/libgd/gd_topal.cWed Dec  4 12:16:19 2002
@@ -1490,200 +1490,118 @@
 void
 gdImageTrueColorToPalette (gdImagePtr im, int dither, int colorsWanted)
 {
-  my_cquantize_ptr cquantize = 0;
-  int i;
-  size_t arraysize;
-  if (!im-trueColor || colorsWanted = 0)
-{
-  /* Nothing to do! */
-  return;
-}
-  if (colorsWanted  gdMaxColors)
-{
-  colorsWanted = gdMaxColors;
-}
-  im-pixels = gdCalloc (sizeof (unsigned char *), im-sy);
-  if (!im-pixels)
-{
-  /* No can do */
-  goto outOfMemory;
-}
-  for (i = 0; (i  im-sy); i++)
-{
-  im-pixels[i] = gdCalloc (sizeof (unsigned char *), im-sx);
-  if (!im-pixels[i])
-   {
- goto outOfMemory;
-   }
-}
-  cquantize = (my_cquantize_ptr) gdCalloc (sizeof (my_cquantizer), 1);
-  if (!cquantize)
-{
-  /* No can do */
-  goto outOfMemory;
-}
-  /* Allocate the histogram/inverse colormap storage */
-  cquantize-histogram = (hist4d) gdMalloc (HIST_C0_ELEMS * sizeof (hist3d));
-  for (i = 0; i  HIST_C0_ELEMS; i++)
-{
-  int j;
-  cquantize-histogram[i] = (hist3d) gdCalloc (HIST_C1_ELEMS,
-  sizeof (hist2d));
-  if (!cquantize-histogram[i])
-   {
- goto outOfMemory;
-   }
-  for (j = 0; (j  HIST_C1_ELEMS); j++)
-   {
- cquantize-histogram[i][j] = (hist2d) gdCalloc (HIST_C2_ELEMS * 
HIST_C3_ELEMS,
- sizeof (histcell));
- if (!cquantize-histogram[i][j])
-   {
- goto outOfMemory;
-   }
-   }
-}
-  cquantize-fserrors = (FSERRPTR) gdMalloc (4 * sizeof (FSERROR));
-  init_error_limit (im, cquantize);
-  arraysize = (size_t) ((im-sx + 2) *
-   (4 * sizeof (FSERROR)));
-  /* Allocate Floyd-Steinberg workspace. */
-  cquantize-fserrors = gdCalloc (arraysize, 1);
-  if (!cquantize-fserrors)
-{
-  goto outOfMemory;
-}
-  cquantize-on_odd_row = FALSE;
-
-  /* Do the work! */
-  zeroHistogram (cquantize-histogram);
-  prescan_quantize (im, cquantize);
-  select_colors (im, cquantize, colorsWanted);
-  /* TBB HACK REMOVE */
-#if 0
-  {
-FILE *out = fopen (palettemap.png, wb);
-int i;
-gdImagePtr im2 = gdImageCreateTrueColor (256, 256);
-for (i = 0; (i  256); i++)
-  {
-   gdImageFilledRectangle (im2, (i % 16) * 16, (i / 16) * 16,
-   (i % 16) * 16 + 15, (i / 16) * 16 + 15,
-   gdTrueColorAlpha (im-red[i], im-green[i],
-   im-blue[i], im-alpha[i]));
-  }
-gdImagePng (im2, out);
-fclose (out);
-gdImageDestroy (im2);
-  }
-#endif
-  zeroHistogram (cquantize-histogram);
-  if (dither)
-{
-  pass2_fs_dither (im, cquantize);
-}
-  else
-{
-  pass2_no_dither (im, cquantize);
-}
-  if (cquantize-transparentIsPresent)
-{
-  int mt = -1;
-  int mtIndex = -1;
-  for (i = 0; (i  im-colorsTotal); i++)
-   {
- if (im-alpha[i]  mt)
-   {
- mtIndex = i;
- mt = im-alpha[i];
-   }
-   }
-  for (i = 0; (i  im-colorsTotal); i++)
-   {
- if (im-alpha[i] == mt)
-   {
- im-alpha[i] = gdAlphaTransparent;
-   }
-   }
-}
-  if (cquantize-opaqueIsPresent)
-{
-  int mo = 128;
-  int moIndex = -1;
-  for (i = 0; (i  im-colorsTotal); i++)
-   {
- if (im-alpha[i]  mo)
-   {
- moIndex = i;
- mo = im-alpha[i];
-   }
-   }
-  for (i = 0; (i  im-colorsTotal); i++)
-   {
- if (im-alpha[i] == mo)
-   {
- im-alpha[i] = gdAlphaOpaque;
-   }
-   }
-}
-  /* Success! Get rid of the truecolor image data. */
-  im-trueColor = 0;
-  /* Junk the truecolor pixels */
-  for (i = 0; i  im-sy; i++)
-{
-  gdFree (im-tpixels[i]);
-}
-  gdFree (im-tpixels);
-  im-tpixels = 0;
-  /* Tediously free stuff. */
-outOfMemory:
-  if (im-trueColor)
-{
-  /* On failure only */
-  for (i = 0; i  im-sy; i++)
-   {
- if (im-pixels[i])
-   {
- gdFree (im-pixels[i]);
-   }
-   }
-  if (im-pixels)
-   {
- gdFree (im-pixels);
-   }
-  im-pixels = 0;
-}
-  for (i = 0; i  HIST_C0_ELEMS; i++)
-{
-  if (cquantize-histogram[i])
-   {
- int j;
- for (j = 0; j  HIST_C1_ELEMS; j++)
-   {
- if (cquantize-histogram[i][j])
-  

[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd gd.c /ext/gd/libgd gd_gd2.c gd_png.c gd_topal.c

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 12:28:56 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gdgd.c 
/php4/ext/gd/libgd  gd_gd2.c gd_png.c gd_topal.c 
  Log:
  MFH (truecolor fixes + gdImageTrueColorToPalette() fix).
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221.2.2 php4/ext/gd/gd.c:1.221.2.3
--- php4/ext/gd/gd.c:1.221.2.2  Sat Nov 23 06:26:13 2002
+++ php4/ext/gd/gd.cWed Dec  4 12:28:55 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.221.2.2 2002/11/23 11:26:13 moriyoshi Exp $ */
+/* $Id: gd.c,v 1.221.2.3 2002/12/04 17:28:55 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -1525,6 +1525,12 @@
}
(*func_p)(im, i, fp);
break;
+   case PHP_GDIMG_TYPE_GD:
+   if(im-trueColor){
+   gdImageTrueColorToPalette(im,1,256);
+   }
+   (*func_p)(im, fp);
+   break;
default:
(*func_p)(im, fp);
break;
@@ -1555,6 +1561,12 @@
if(gdImageRed(im, i) == 0) break;
}
(*func_p)(im, q, tmp);
+   break;
+   case PHP_GDIMG_TYPE_GD:
+   if (im-trueColor) {
+   gdImageTrueColorToPalette(im,1,256);
+   }
+   (*func_p)(im, tmp);
break;
default:
(*func_p)(im, tmp);
Index: php4/ext/gd/libgd/gd_gd2.c
diff -u php4/ext/gd/libgd/gd_gd2.c:1.4 php4/ext/gd/libgd/gd_gd2.c:1.4.2.1
--- php4/ext/gd/libgd/gd_gd2.c:1.4  Tue Nov 12 08:12:58 2002
+++ php4/ext/gd/libgd/gd_gd2.c  Wed Dec  4 12:28:55 2002
@@ -184,7 +184,7 @@
   goto fail1;
 }
 
-  im = gdImageCreate (*sx, *sy);
+  im = gdImageCreateTrueColor(*sx, *sy);
   if (im == NULL)
 {
   GD2_DBG (printf (Could not create gdImage\n));
@@ -286,144 +286,98 @@
   bytesPerPixel = im-trueColor ? 4 : 1;
   nc = ncx * ncy;
 
-  if (fmt == GD2_FMT_COMPRESSED)
-{
-  /* Find the maximum compressed chunk size. */
-  compMax = 0;
-  for (i = 0; (i  nc); i++)
-   {
- if (chunkIdx[i].size  compMax)
-   {
- compMax = chunkIdx[i].size;
-   };
-   };
-  compMax++;
-
-  /* Allocate buffers */
-  chunkMax = cs * bytesPerPixel * cs;
-  chunkBuf = gdCalloc (chunkMax, 1);
-  compBuf = gdCalloc (compMax, 1);
-  GD2_DBG (printf (Largest compressed chunk is %d bytes\n, compMax));
-};
-
-/*  if ( (ncx != sx / cs) || (ncy != sy / cs)) { */
-/*  goto fail2; */
-/*  }; */
-
-  /* Read the data... */
-  for (cy = 0; (cy  ncy); cy++)
-{
-  for (cx = 0; (cx  ncx); cx++)
-   {
-
- ylo = cy * cs;
- yhi = ylo + cs;
- if (yhi  im-sy)
-   {
- yhi = im-sy;
-   };
-
- GD2_DBG (printf (Processing Chunk %d (%d, %d), y from %d to %d\n, 
chunkNum, cx, cy, ylo, yhi));
-
- if (fmt == GD2_FMT_COMPRESSED)
-   {
-
- chunkLen = chunkMax;
-
- if (!_gd2ReadChunk (chunkIdx[chunkNum].offset,
- compBuf,
- chunkIdx[chunkNum].size,
- chunkBuf, chunkLen, in))
-   {
- GD2_DBG (printf (Error reading comproessed chunk\n));
- goto fail2;
-   };
+   if (fmt == GD2_FMT_COMPRESSED) {
+   /* Find the maximum compressed chunk size. */
+   compMax = 0;
+   for (i = 0; i  nc; i++) {
+   if (chunkIdx[i].size  compMax) {
+   compMax = chunkIdx[i].size;
+   }
+   }
+   compMax++;
 
- chunkPos = 0;
-   };
+   /* Allocate buffers */
+   chunkMax = cs * bytesPerPixel * cs;
+   chunkBuf = gdCalloc (chunkMax, 1);
+   compBuf = gdCalloc (compMax, 1);
+   GD2_DBG(printf(Largest compressed chunk is %d bytes\n, compMax));
+   }
 
- for (y = ylo; (y  yhi); y++)
-   {
+   /* Read the data... */
+   for (cy = 0; cy  ncy; cy++) {
+   for (cx = 0; cx  ncx; cx++) {
+   ylo = cy * cs;
+   yhi = ylo + cs;
+   if (yhi  im-sy) {
+   yhi = im-sy;
+   }
+  

[PHP-CVS] cvs: php4 / NEWS

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 12:29:48 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Bug fixing news.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1265 php4/NEWS:1.1266
--- php4/NEWS:1.1265Wed Dec  4 11:49:59 2002
+++ php4/NEWS   Wed Dec  4 12:29:48 2002
@@ -20,6 +20,13 @@
 - Moved extensions to PECL (http://pear.php.net/): (James, Derick)
   . ext/vpopmail
   . ext/cybermut
+- Fixed bug #20785 (crash when using pdf_open_memory_image() to load a
+  true-color image). (Ilia)
+- Fixed a crash when converting between true-color images (peg/jpeg) and
+  gd1/gd2 image formats, png/jpeg - gd1/gd2 - png/jpeg conversion now
+  works correctly. (Ilia, (Pierre-Alain Joye).
+- Fixed a memory leak in the bundled GD library inside 
+  gdImageTrueColorToPalette(). (Ilia)
 - Fixed bug #12776 (array_walk crash). (Moriyoshi)
 - Fixed bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White)
 - Fixed bug #19566 (get_declared_classes() segfaults). (Moriyoshi, Marcus, Andi)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) / NEWS

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 12:29:57 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  MFH
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.15 php4/NEWS:1.1247.2.16
--- php4/NEWS:1.1247.2.15   Wed Dec  4 11:54:59 2002
+++ php4/NEWS   Wed Dec  4 12:29:57 2002
@@ -13,6 +13,13 @@
 - Moved extensions to PECL (http://pear.php.net/): (James, Derick)
   . ext/vpopmail
   . ext/cybermut
+- Fixed bug #20785 (crash when using pdf_open_memory_image() to load a
+  true-color image). (Ilia)
+- Fixed a crash when converting between true-color images (peg/jpeg) and
+  gd1/gd2 image formats, png/jpeg - gd1/gd2 - png/jpeg conversion now
+  works correctly. (Ilia, (Pierre-Alain Joye).
+- Fixed a memory leak in the bundled GD library inside 
+  gdImageTrueColorToPalette(). (Ilia)
 - Fixed bug #12776 (array_walk crash). (Moriyoshi)
 - Fixed bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White)
 - Fixed bug #19566 (get_declared_classes() segfaults). (Moriyoshi, Marcus, Andi)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) / NEWS

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 12:31:24 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  Fixed a typo.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.16 php4/NEWS:1.1247.2.17
--- php4/NEWS:1.1247.2.16   Wed Dec  4 12:29:57 2002
+++ php4/NEWS   Wed Dec  4 12:31:23 2002
@@ -15,7 +15,7 @@
   . ext/cybermut
 - Fixed bug #20785 (crash when using pdf_open_memory_image() to load a
   true-color image). (Ilia)
-- Fixed a crash when converting between true-color images (peg/jpeg) and
+- Fixed a crash when converting between true-color images (png/jpeg) and
   gd1/gd2 image formats, png/jpeg - gd1/gd2 - png/jpeg conversion now
   works correctly. (Ilia, (Pierre-Alain Joye).
 - Fixed a memory leak in the bundled GD library inside 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / NEWS

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 12:31:36 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Fixed a typo.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1266 php4/NEWS:1.1267
--- php4/NEWS:1.1266Wed Dec  4 12:29:48 2002
+++ php4/NEWS   Wed Dec  4 12:31:35 2002
@@ -22,7 +22,7 @@
   . ext/cybermut
 - Fixed bug #20785 (crash when using pdf_open_memory_image() to load a
   true-color image). (Ilia)
-- Fixed a crash when converting between true-color images (peg/jpeg) and
+- Fixed a crash when converting between true-color images (png/jpeg) and
   gd1/gd2 image formats, png/jpeg - gd1/gd2 - png/jpeg conversion now
   works correctly. (Ilia, (Pierre-Alain Joye).
 - Fixed a memory leak in the bundled GD library inside 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd gd.c /ext/gd/libgd gd.h

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 15:58:04 2002 EDT

  Modified files:  
/php4/ext/gdgd.c 
/php4/ext/gd/libgd  gd.h 
  Log:
  Made imagecreatefromxpm() work once again.
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.232 php4/ext/gd/gd.c:1.233
--- php4/ext/gd/gd.c:1.232  Wed Dec  4 11:29:48 2002
+++ php4/ext/gd/gd.cWed Dec  4 15:58:03 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.232 2002/12/04 16:29:48 iliaa Exp $ */
+/* $Id: gd.c,v 1.233 2002/12/04 20:58:03 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -1418,10 +1418,16 @@
}

if (!im  fp)  {
-   if (image_type == PHP_GDIMG_TYPE_GD2PART) {
-   im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), 
Z_LVAL_PP(width), Z_LVAL_PP(height));
-   } else {
-   im = (*func_p)(fp);
+   switch (image_type) {
+   case PHP_GDIMG_TYPE_GD2PART:
+   im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), 
+Z_LVAL_PP(width), Z_LVAL_PP(height));
+   break;
+   case PHP_GDIMG_TYPE_XPM:
+   im = gdImageCreateFromXpm(fn);
+   break;
+   default:
+   im = (*func_p)(fp);
+   break;
}
 
fflush(fp);
@@ -1481,22 +1487,15 @@
 /* }}} */
 #endif /* HAVE_GD_XBM */
 
+#ifdef HAVE_GD_XPM
 /* {{{ proto int imagecreatefromxpm(string filename)
Create a new image from XPM file or URL */
 PHP_FUNCTION(imagecreatefromxpm)
 {
-   /*
-#ifdef HAVE_GD_XPM
_php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_XPM, 
XPM, gdImageCreateFromXpm, NULL);
-#else
-   */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, No XPM support in this PHP 
build);
-   RETURN_FALSE;
-   /*
-#endif
-   */
 }
 /* }}} */
+#endif
 
 #ifdef HAVE_GD_WBMP
 /* {{{ proto int imagecreatefromwbmp(string filename)
Index: php4/ext/gd/libgd/gd.h
diff -u php4/ext/gd/libgd/gd.h:1.10 php4/ext/gd/libgd/gd.h:1.11
--- php4/ext/gd/libgd/gd.h:1.10 Sun Dec  1 06:43:54 2002
+++ php4/ext/gd/libgd/gd.h  Wed Dec  4 15:58:04 2002
@@ -228,6 +228,8 @@
 
 gdImagePtr gdImageCreateFromXbm(FILE *fd);
 
+gdImagePtr gdImageCreateFromXpm (char *filename);
+
 void gdImageDestroy(gdImagePtr im);
 
 /* Replaces or blends with the background depending on the



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd/tests conv_test.gif conv_test.jpeg conv_test.png conv_test.xpm gif2gd.phpt gif2jpg.phpt gif2png.phpt jpeg2png.phpt jpg2gd.phpt png2gd.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 16:04:07 2002 EDT

  Added files: 
/php4/ext/gd/tests  conv_test.gif conv_test.jpeg conv_test.png 
conv_test.xpm gif2gd.phpt gif2jpg.phpt 
gif2png.phpt jpeg2png.phpt jpg2gd.phpt 
png2gd.phpt xpm2gd.phpt xpm2jpg.phpt 
xpm2png.phpt 
  Log:
  Added GD image conversion tests.
  
  

Index: php4/ext/gd/tests/conv_test.xpm
+++ php4/ext/gd/tests/conv_test.xpm
/* XPM */
static char * conv_test_xpm[] = {
50 50 1535 2,
   c None,
.  c #F81010,
+  c #F71112,
@  c #F51314,
#  c #F31517,
$  c #F01619,
%  c #EE181C,
  c #EC191E,
*  c #E91B21,
=  c #E71D24,
-  c #E41E26,
;  c #E22028,
  c #E0212B,
,  c #DE232D,
'  c #DB2430,
)  c #D92632,
!  c #D62835,
~  c #D42938,
{  c #D22B3A,
]  c #CF2C3D,
^  c #CD2E3F,
/  c #CB2F41,
(  c #C93144,
_  c #C63346,
:  c #C43449,
  c #C1364C,
[  c #BF374E,
}  c #BD3951,
|  c #BB3B53,
1  c #B83C55,
2  c #B63E58,
3  c #B43F5A,
4  c #B1415D,
5  c #AF4360,
6  c #AC4462,
7  c #AA4665,
8  c #A84767,
9  c #A6496A,
0  c #A34A6C,
a  c #A14C6E,
b  c #9F4D71,
c  c #9C4F74,
d  c #9A5176,
e  c #975279,
f  c #95547B,
g  c #93557E,
h  c #F71212,
i  c #F51315,
j  c #F21517,
k  c #F0161A,
l  c #EB191E,
m  c #E22029,
n  c #DD232E,
o  c #D92633,
p  c #D42A38,
q  c #CF2D3D,
r  c #CD2F3F,
s  c #CB3142,
t  c #C83244,
u  c #C63347,
v  c #C43549,
w  c #BF384E,
x  c #BA3B53,
y  c #B83C56,
z  c #B33F5B,
A  c #A5496A,
B  c #A14C6F,
C  c #9E4E71,
D  c #93567E,
E  c #905780,
F  c #F41315,
G  c #EB191F,
H  c #E61D24,
I  c #DB2530,
J  c #D92733,
K  c #D62936,
L  c #D22C3A,
M  c #D02E3D,
N  c #CD303F,
O  c #C93344,
P  c #C73447,
Q  c #C53649,
R  c #C2384C,
S  c #C0394F,
T  c #BD3A51,
U  c #BB3C53,
V  c #B83D56,
W  c #B63F58,
X  c #B3405B,
Y  c #AE4360,
Z  c #AC4463,
`  c #A74767,
 . c #A34B6C,
.. c #995177,
+. c #975379,
@. c #95547C,
#. c #8E5983,
$. c #F71213,
%. c #ED181C,
. c #EB1A1F,
*. c #E91B22,
=. c #E41E27,
-. c #DF222C,
;. c #DB2630,
. c #D82833,
,. c #D42B38,
'. c #D22D3B,
). c #D02F3D,
!. c #CE3040,
~. c #CB3242,
{. c #C93444,
]. c #C73547,
^. c #C53749,
/. c #C03A4F,
(. c #BE3B51,
_. c #BB3D54,
:. c #B93E56,
. c #B64059,
[. c #B4415B,
}. c #B2425D,
|. c #AF4460,
1. c #AC4563,
2. c #A74868,
3. c #A34B6D,
4. c #A04C6F,
5. c #9E4E72,
6. c #9C5074,
7. c #92567E,
8. c #905781,
9. c #8B5B86,
0. c #F61213,
a. c #F21518,
b. c #F0171A,
c. c #ED181D,
d. c #E81B22,
e. c #E41F27,
f. c #E12029,
g. c #DD242E,
h. c #DB2631,
i. c #D62A36,
j. c #D42C38,
k. c #D22E3B,
l. c #D0303D,
m. c #CD3140,
n. c #CB3342,
o. c #C93545,
p. c #C73647,
q. c #C5384A,
r. c #C3394C,
s. c #C03B4F,
t. c #BE3D51,
u. c #BC3E54,
v. c #BA3F56,
w. c #B74159,
x. c #B5425B,
y. c #B2435E,
z. c #B04560,
A. c #AD4663,
B. c #AA4765,
C. c #A84868,
D. c #9B5075,
E. c #94547C,
F. c #905881,
G. c #895C88,
H. c #F8,
I. c #F41415,
J. c #EF171A,
K. c #E81C22,
L. c #E61D25,
M. c #DA2731,
N. c #D92933,
O. c #D42D39,
P. c #D0303E,
Q. c #CD3240,
R. c #C33A4D,
S. c #BE3D52,
T. c #B94056,
U. c #B04561,
V. c #AE4763,
W. c #AB4866,
X. c #A94A68,
Y. c #A64B6B,
Z. c #A34C6D,
`. c #A14D6F,
 + c #97537A,
.+ c #94557C,
++ c #92567F,
@+ c #8D5983,
#+ c #865E8B,
$+ c #F41416,
%+ c #F11518,
+ c #EF171B,
*+ c #E31F27,
=+ c #E1202A,
-+ c #DF232C,
;+ c #DC252F,
+ c #D62B36,
,+ c #D22F3B,
'+ c #CF303E,
)+ c #CB3343,
!+ c #C73648,
~+ c #C23A4D,
{+ c #BB3E54,
]+ c #B94057,
^+ c #B5425C,
/+ c #B2445E,
(+ c #AC4866,
_+ c #AA4A68,
:+ c #A74C6B,
+ c #A44D6D,
[+ c #A24E70,
}+ c #9F4F72,
|+ c #9C5075,
1+ c #995277,
2+ c #96537A,
3+ c #8D5984,
4+ c #895C89,
5+ c #84608E,
6+ c #ED191D,
7+ c #EA1A20,
8+ c #E1212A,
9+ c #D92934,
0+ c #C83545,
a+ c #B74259,
b+ c #B4425C,
c+ c #AE4764,
d+ c #AC4966,
e+ c #A54D6D,
f+ c #A34F70,
g+ c #A05072,
h+ c #9D5275,
i+ c #9A5378,
j+ c #97547A,
k+ c #8F5881,
l+ c #885D89,
m+ c #865E8C,
n+ c #816191,
o+ c #F11618,
p+ c #EC191D,
q+ c #E81C23,
r+ c #E51E25,
s+ c #E31F28,
t+ c #D92A34,
u+ c #D62C37,
v+ c #D12F3C,
w+ c #CD3241,
x+ c #CA3343,
y+ c 

[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd gd.c /ext/gd/libgd gd.h /ext/gd/tests conv_test.gif conv_test.jpeg conv_test.png conv_test.xpm gif2gd.phpt gif2jpg.phpt gif2png.phpt jpeg2png.phpt jpg2gd.phpt png2gd.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 16:07:10 2002 EDT

  Added files: (Branch: PHP_4_3)
/php4/ext/gd/tests  conv_test.gif conv_test.jpeg conv_test.png 
conv_test.xpm gif2gd.phpt gif2jpg.phpt 
gif2png.phpt jpeg2png.phpt jpg2gd.phpt 
png2gd.phpt xpm2gd.phpt xpm2jpg.phpt 
xpm2png.phpt 

  Modified files:  
/php4/ext/gdgd.c 
/php4/ext/gd/libgd  gd.h 
  Log:
  MFH
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221.2.3 php4/ext/gd/gd.c:1.221.2.4
--- php4/ext/gd/gd.c:1.221.2.3  Wed Dec  4 12:28:55 2002
+++ php4/ext/gd/gd.cWed Dec  4 16:07:09 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.221.2.3 2002/12/04 17:28:55 iliaa Exp $ */
+/* $Id: gd.c,v 1.221.2.4 2002/12/04 21:07:09 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -1354,10 +1354,16 @@
}

if (!im  fp)  {
-   if (image_type == PHP_GDIMG_TYPE_GD2PART) {
-   im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), 
Z_LVAL_PP(width), Z_LVAL_PP(height));
-   } else {
-   im = (*func_p)(fp);
+   switch (image_type) {
+   case PHP_GDIMG_TYPE_GD2PART:
+   im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), 
+Z_LVAL_PP(width), Z_LVAL_PP(height));
+   break;
+   case PHP_GDIMG_TYPE_XPM:
+   im = gdImageCreateFromXpm(fn);
+   break;
+   default:
+   im = (*func_p)(fp);
+   break;
}
 
fflush(fp);
@@ -1417,22 +1423,15 @@
 /* }}} */
 #endif /* HAVE_GD_XBM */
 
+#ifdef HAVE_GD_XPM
 /* {{{ proto int imagecreatefromxpm(string filename)
Create a new image from XPM file or URL */
 PHP_FUNCTION(imagecreatefromxpm)
 {
-   /*
-#ifdef HAVE_GD_XPM
_php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_XPM, 
XPM, gdImageCreateFromXpm, NULL);
-#else
-   */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, No XPM support in this PHP 
build);
-   RETURN_FALSE;
-   /*
-#endif
-   */
 }
 /* }}} */
+#endif
 
 #ifdef HAVE_GD_WBMP
 /* {{{ proto int imagecreatefromwbmp(string filename)
Index: php4/ext/gd/libgd/gd.h
diff -u php4/ext/gd/libgd/gd.h:1.7 php4/ext/gd/libgd/gd.h:1.7.2.1
--- php4/ext/gd/libgd/gd.h:1.7  Tue Oct 29 18:08:01 2002
+++ php4/ext/gd/libgd/gd.h  Wed Dec  4 16:07:09 2002
@@ -223,6 +223,8 @@
 
 gdImagePtr gdImageCreateFromXbm(FILE *fd);
 
+gdImagePtr gdImageCreateFromXpm (char *filename);
+
 void gdImageDestroy(gdImagePtr im);
 
 /* Replaces or blends with the background depending on the

Index: php4/ext/gd/tests/conv_test.xpm
+++ php4/ext/gd/tests/conv_test.xpm
/* XPM */
static char * conv_test_xpm[] = {
50 50 1535 2,
   c None,
.  c #F81010,
+  c #F71112,
@  c #F51314,
#  c #F31517,
$  c #F01619,
%  c #EE181C,
  c #EC191E,
*  c #E91B21,
=  c #E71D24,
-  c #E41E26,
;  c #E22028,
  c #E0212B,
,  c #DE232D,
'  c #DB2430,
)  c #D92632,
!  c #D62835,
~  c #D42938,
{  c #D22B3A,
]  c #CF2C3D,
^  c #CD2E3F,
/  c #CB2F41,
(  c #C93144,
_  c #C63346,
:  c #C43449,
  c #C1364C,
[  c #BF374E,
}  c #BD3951,
|  c #BB3B53,
1  c #B83C55,
2  c #B63E58,
3  c #B43F5A,
4  c #B1415D,
5  c #AF4360,
6  c #AC4462,
7  c #AA4665,
8  c #A84767,
9  c #A6496A,
0  c #A34A6C,
a  c #A14C6E,
b  c #9F4D71,
c  c #9C4F74,
d  c #9A5176,
e  c #975279,
f  c #95547B,
g  c #93557E,
h  c #F71212,
i  c #F51315,
j  c #F21517,
k  c #F0161A,
l  c #EB191E,
m  c #E22029,
n  c #DD232E,
o  c #D92633,
p  c #D42A38,
q  c #CF2D3D,
r  c #CD2F3F,
s  c #CB3142,
t  c #C83244,
u  c #C63347,
v  c #C43549,
w  c #BF384E,
x  c #BA3B53,
y  c #B83C56,
z  c #B33F5B,
A  c #A5496A,
B  c #A14C6F,
C  c #9E4E71,
D  c #93567E,
E  c #905780,
F  c #F41315,
G  c #EB191F,
H  c #E61D24,
I  c #DB2530,
J  c #D92733,
K  c #D62936,
L  c #D22C3A,
M  c #D02E3D,
N  c #CD303F,
O  c #C93344,
P  c #C73447,
Q  c #C53649,
R  c #C2384C,
S  c #C0394F,
T  c #BD3A51,
U  c #BB3C53,
V  c #B83D56,
W  c #B63F58,
X  c #B3405B,
Y  c #AE4360,
Z  c #AC4463,
`  c #A74767,
 . c #A34B6C,
.. c #995177,
+. c #975379,
@. c #95547C,
#. c #8E5983,
$. c #F71213,
%. c #ED181C,
. c #EB1A1F,
*. c #E91B22,
=. c #E41E27,
-. c #DF222C,
;. c #DB2630,
. c #D82833,
,. c 

[PHP-CVS] cvs: php4 /ext/gd gd.c

2002-12-04 Thread Rasmus Lerdorf
rasmus  Wed Dec  4 18:21:31 2002 EDT

  Modified files:  
/php4/ext/gdgd.c 
  Log:
  Fix build
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.233 php4/ext/gd/gd.c:1.234
--- php4/ext/gd/gd.c:1.233  Wed Dec  4 15:58:03 2002
+++ php4/ext/gd/gd.cWed Dec  4 18:21:30 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.233 2002/12/04 20:58:03 iliaa Exp $ */
+/* $Id: gd.c,v 1.234 2002/12/04 23:21:30 rasmus Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -1422,9 +1422,11 @@
case PHP_GDIMG_TYPE_GD2PART:
im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), 
Z_LVAL_PP(width), Z_LVAL_PP(height));
break;
+#ifdef HAVE_GD_XPM
case PHP_GDIMG_TYPE_XPM:
im = gdImageCreateFromXpm(fn);
break;
+#endif
default:
im = (*func_p)(fp);
break;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd gd.c

2002-12-04 Thread Ilia Alshanetsky
iliaa   Wed Dec  4 18:43:06 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gdgd.c 
  Log:
  MFH (build fix, when xpm support is not avaliable).
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221.2.4 php4/ext/gd/gd.c:1.221.2.5
--- php4/ext/gd/gd.c:1.221.2.4  Wed Dec  4 16:07:09 2002
+++ php4/ext/gd/gd.cWed Dec  4 18:43:06 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.221.2.4 2002/12/04 21:07:09 iliaa Exp $ */
+/* $Id: gd.c,v 1.221.2.5 2002/12/04 23:43:06 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -1358,9 +1358,11 @@
case PHP_GDIMG_TYPE_GD2PART:
im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), 
Z_LVAL_PP(width), Z_LVAL_PP(height));
break;
+#ifdef HAVE_GD_XPM
case PHP_GDIMG_TYPE_XPM:
im = gdImageCreateFromXpm(fn);
break;
+#endif
default:
im = (*func_p)(fp);
break;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: CVSROOT / avail

2002-12-04 Thread Stig Bakken
ssb Wed Dec  4 18:45:16 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  * pear karma for mcmontero
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.551 CVSROOT/avail:1.552
--- CVSROOT/avail:1.551 Wed Dec  4 08:48:29 2002
+++ CVSROOT/avail   Wed Dec  4 18:45:15 2002
@@ -46,7 +46,7 @@
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP 4 tree, the PEAR website, and the PEAR documentation.
 
-avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud|pear,php4/pear,pearweb,peardoc
+avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero|pear,php4/pear,pearweb,peardoc
 
 avail|philip,sroebke|peardoc
 avail|nicos|pear,peardoc



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: CVSROOT / avail

2002-12-04 Thread Stig Bakken
ssb Wed Dec  4 18:56:23 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  pear karma for ruibarreiros
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.552 CVSROOT/avail:1.553
--- CVSROOT/avail:1.552 Wed Dec  4 18:45:15 2002
+++ CVSROOT/avail   Wed Dec  4 18:56:23 2002
@@ -46,7 +46,7 @@
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP 4 tree, the PEAR website, and the PEAR documentation.
 
-avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero|pear,php4/pear,pearweb,peardoc
+avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,ruibarreiros|pear,php4/pear,pearweb,peardoc
 
 avail|philip,sroebke|peardoc
 avail|nicos|pear,peardoc



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: CVSROOT / avail

2002-12-04 Thread Stig Bakken
ssb Wed Dec  4 19:07:28 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  * pear karma for mbretter
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.553 CVSROOT/avail:1.554
--- CVSROOT/avail:1.553 Wed Dec  4 18:56:23 2002
+++ CVSROOT/avail   Wed Dec  4 19:07:28 2002
@@ -46,7 +46,7 @@
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP 4 tree, the PEAR website, and the PEAR documentation.
 
-avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,ruibarreiros|pear,php4/pear,pearweb,peardoc
+avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,ruibarreiros,mbretter|pear,php4/pear,pearweb,peardoc
 
 avail|philip,sroebke|peardoc
 avail|nicos|pear,peardoc



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: CVSROOT / avail

2002-12-04 Thread Stig Bakken
ssb Wed Dec  4 19:39:30 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  * split pearweb and php4/pear from pear
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.554 CVSROOT/avail:1.555
--- CVSROOT/avail:1.554 Wed Dec  4 19:07:28 2002
+++ CVSROOT/avail   Wed Dec  4 19:39:30 2002
@@ -46,7 +46,11 @@
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP 4 tree, the PEAR website, and the PEAR documentation.
 
-avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,ruibarreiros,mbretter|pear,php4/pear,pearweb,peardoc
+avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,ruibarreiros,mbretter|pear,peardoc
+
+avail|cox,mj,vblavet|php4/pear
+avail|alan_k,chagenbu,cmv,cox,derick,dickmann,jon,mj,pajoye,richard,tal|pearweb
+avail|alexmerz,bjoern,chregu,dams,david,jmcastagnetto,rashid,tuupola|pearweb/weeklynews
 
 avail|philip,sroebke|peardoc
 avail|nicos|pear,peardoc



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php