Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/editors
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4766

Added Files:
        xemacs.patch 
Log Message:
backport https://bitbucket.org/xemacs/xemacs-21.4/changeset/bcefd94fa651/ for 
png15 support

--- NEW FILE: xemacs.patch ---
diff -uNr xemacs-21.4.22/src/glyphs-eimage.c 
xemacs-21.4.22.png15/src/glyphs-eimage.c
--- xemacs-21.4.22/src/glyphs-eimage.c  2007-08-20 15:52:28.000000000 -0400
+++ xemacs-21.4.22.png15/src/glyphs-eimage.c    2013-05-27 10:27:48.000000000 
-0400
@@ -937,8 +937,8 @@
   {
     int y;
     unsigned char **row_pointers;
-    height = info_ptr->height;
-    width = info_ptr->width;
+    height = png_get_image_height(png_ptr, info_ptr);
+    width = png_get_image_width(png_ptr, info_ptr);
 
     /* Wow, allocate all the memory.  Truly, exciting. */
     unwind.eimage = xnew_array_and_zero (unsigned char, width * height * 3);
@@ -990,22 +990,22 @@
     /* Now that we're using EImage, ask for 8bit RGB triples for any type
        of image*/
     /* convert palette images to full RGB */
-    if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
+    if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE)
       png_set_expand (png_ptr);
     /* send grayscale images to RGB too */
-    if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
-        info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+    if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
+        png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
       png_set_gray_to_rgb (png_ptr);
     /* we can't handle alpha values */
-    if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+    if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
       png_set_strip_alpha (png_ptr);
     /* tell libpng to strip 16 bit depth files down to 8 bits */
-    if (info_ptr->bit_depth == 16)
+    if (png_get_bit_depth(png_ptr, info_ptr) == 16)
       png_set_strip_16 (png_ptr);
     /* if the image is < 8 bits, pad it out */
-    if (info_ptr->bit_depth < 8)
+    if (png_get_bit_depth(png_ptr, info_ptr) < 8)
       {
-       if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
+       if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY)
          png_set_expand (png_ptr);
        else
          png_set_packing (png_ptr);
@@ -1023,17 +1023,22 @@
      * from lisp anyway. - WMP
      */
     {
-      int i;
+      int i, num_text = 0;
+      png_textp text_ptr = NULL;
 
-      for (i = 0 ; i < info_ptr->num_text ; i++)
+      if (png_get_text (png_ptr, info_ptr, &text_ptr, &num_text) > 0)
        {
-         /* How paranoid do I have to be about no trailing NULLs, and
-            using (int)info_ptr->text[i].text_length, and strncpy and a temp
-            string somewhere? */
-
-         warn_when_safe (Qpng, Qinfo, "%s - %s",
-                         info_ptr->text[i].key,
-                         info_ptr->text[i].text);
+         for (i = 0 ; i < num_text ; i++)
+           {
+
+             /* How paranoid do I have to be about no trailing NULLs, and
+                using (int)info_ptr->text[i].text_length, and strncpy and a 
temp
+                string somewhere? */
+
+             warn_when_safe (Qpng, Qinfo, "%s - %s",
+                             text_ptr[i].key, text_ptr[i].text);
+           }
+
        }
     }
 #endif


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to