[Pkg-gs-devel] r105 - in ghostscript/trunk/debian: . patches

Masayuki Hatta mhatta at alioth.debian.org
Sun Jan 4 02:35:33 UTC 2009


Author: mhatta
Date: Sun Jan  4 02:35:33 2009
New Revision: 105

Log:
Added 32_bad-params-to-xinitimage-on-large-bitmaps.dpatch.


Added:
   ghostscript/trunk/debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch   (contents, props changed)
Modified:
   ghostscript/trunk/debian/changelog
   ghostscript/trunk/debian/patches/00list

Modified: ghostscript/trunk/debian/changelog
==============================================================================
--- ghostscript/trunk/debian/changelog	(original)
+++ ghostscript/trunk/debian/changelog	Sun Jan  4 02:35:33 2009
@@ -6,6 +6,9 @@
   * debian/patches/32_improve-handling-of-media-size-changes-from-gv.dpatch: 
     Allow gv to change the image and media size (Upstream bug #688943) 
     - closes: #142228
+  * debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch:
+    Fixed zooming problem in gv (Upstream bug #689547)
+    - closes: #419183
   * Sync'd with the Ubuntu 8.63.dfsg.1-0ubuntu13.
 	
   [Till Kamppeter]

Modified: ghostscript/trunk/debian/patches/00list
==============================================================================
--- ghostscript/trunk/debian/patches/00list	(original)
+++ ghostscript/trunk/debian/patches/00list	Sun Jan  4 02:35:33 2009
@@ -16,6 +16,7 @@
 30_ps2pdf_man_improvement
 31_fix-gc-sigbus
 32_improve-handling-of-media-size-changes-from-gv
+33_bad-params-to-xinitimage-on-large-bitmaps
 35_disable_libcairo
 38_pxl-duplex
 39_pxl-resolution

Added: ghostscript/trunk/debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch
==============================================================================
--- (empty file)
+++ ghostscript/trunk/debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch	Sun Jan  4 02:35:33 2009
@@ -0,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 33_bad-params-to-xinitimage-on-large-bitmaps.dpatch by Masayuki Hatta (mhatta) <mhatta at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad ghostscript-8.63.dfsg.1~/src/gdevx.c ghostscript-8.63.dfsg.1/src/gdevx.c
+--- ghostscript-8.63.dfsg.1~/src/gdevx.c	2007-11-03 04:09:03.000000000 +0900
++++ ghostscript-8.63.dfsg.1/src/gdevx.c	2009-01-04 11:29:32.000000000 +0900
+@@ -565,15 +565,24 @@
+ 	X_SET_FORE_COLOR(xdev, pixel);
+ 	XDrawPoint(xdev->dpy, xdev->dest, xdev->gc, x, y);
+     } else {
+-	xdev->image.width = sourcex + w;
++        /* Reduce base, sourcex  */
++	int width = sourcex + w;
++        int vdepth = xdev->vinfo->depth;
++        xdev->image.width = width;
+ 	xdev->image.height = h;
+ 	xdev->image.format = ZPixmap;
+ 	xdev->image.data = (char *)base;
+-	xdev->image.depth = xdev->vinfo->depth;
+-	xdev->image.bytes_per_line = raster;
++        xdev->image.depth = vdepth;
++        xdev->image.bitmap_pad = 8;
++        if (width * vdepth < raster * 8)
++	   xdev->image.bytes_per_line = raster;
++        else
++	   xdev->image.bytes_per_line = 0;
+ 	xdev->image.bits_per_pixel = depth;
+-	if (XInitImage(&xdev->image) == 0)
++        if (XInitImage(&xdev->image) == 0){
++	    errprintf("XInitImage failed in x_copy_image.\n");
+ 	    return_error(gs_error_unknownerror);
++	}
+ 	XPutImage(xdev->dpy, xdev->dest, xdev->gc, &xdev->image,
+ 		  sourcex, 0, x, y, w, h);
+ 	xdev->image.depth = xdev->image.bits_per_pixel = 1;



More information about the Pkg-gs-devel mailing list