rpms/ghostscript/devel ghostscript-bitcmyk.patch, NONE, 1.1 ghostscript.spec, 1.181, 1.182

Tim Waugh twaugh at fedoraproject.org
Tue Feb 17 17:27:52 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/ghostscript/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8256

Modified Files:
	ghostscript.spec 
Added Files:
	ghostscript-bitcmyk.patch 
Log Message:
* Tue Feb 17 2009 Tim Waugh <twaugh at redhat.com> 8.64-3
- Fix bitcmyk driver (bug #486644).


ghostscript-bitcmyk.patch:

--- NEW FILE ghostscript-bitcmyk.patch ---
diff -up ghostscript-8.64/base/gdevbit.c.bitcmyk ghostscript-8.64/base/gdevbit.c
--- ghostscript-8.64/base/gdevbit.c.bitcmyk	2008-08-21 00:58:43.000000000 +0100
+++ ghostscript-8.64/base/gdevbit.c	2009-02-17 16:27:38.000000000 +0000
@@ -653,7 +653,7 @@ bit_put_params(gx_device * pdev, gs_para
 		     pdev->color_info.depth == 32 ? cmyk_8bit_map_cmyk_color :
 		     bit_map_cmyk_color);
     }
-    /* Reset the sparable and linear shift, masks, bits. */
+    /* Reset the separable and linear shift, masks, bits. */
     set_linear_color_bits_mask_shift(pdev);
     pdev->color_info.separable_and_linear = GX_CINFO_SEP_LIN;
     ((gx_device_bit *)pdev)->FirstLine = FirstLine;
@@ -671,16 +671,18 @@ bit_print_page(gx_device_printer * pdev,
     byte *in = gs_alloc_bytes(pdev->memory, line_size, "bit_print_page(in)");
     byte *data;
     int nul = !strcmp(pdev->fname, "nul") || !strcmp(pdev->fname, "/dev/null");
-    int lnum = ((gx_device_bit *)pdev)->FirstLine;
-    int bottom = ((gx_device_bit *)pdev)->LastLine;
+    int lnum = ((gx_device_bit *)pdev)->FirstLine >= pdev->height ?  pdev->height - 1 :
+	    ((gx_device_bit *)pdev)->FirstLine;
+    int bottom = ((gx_device_bit *)pdev)->LastLine >= pdev->height ?  pdev->height - 1 :
+	    ((gx_device_bit *)pdev)->LastLine;
     int line_count = any_abs(bottom - lnum);
     int i, step = lnum > bottom ? -1 : 1;
 
     if (in == 0)
 	return_error(gs_error_VMerror);
     if ((lnum == 0) && (bottom == 0))
-	bottom = pdev->height - 1;
-    for (i = 0; i < line_count; i++, lnum += step) {
+	line_count = pdev->height - 1;	/* default when LastLine == 0, FirstLine == 0 */
+    for (i = 0; i <= line_count; i++, lnum += step) {
 	gdev_prn_get_bits(pdev, lnum, in, &data);
 	if (!nul)
 	    fwrite(data, 1, line_size, prn_stream);


Index: ghostscript.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghostscript/devel/ghostscript.spec,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -r1.181 -r1.182
--- ghostscript.spec	4 Feb 2009 13:32:50 -0000	1.181
+++ ghostscript.spec	17 Feb 2009 17:27:22 -0000	1.182
@@ -5,7 +5,7 @@
 Name: ghostscript
 Version: %{gs_ver}
 
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPLv2
 URL: http://www.ghostscript.com/
@@ -21,6 +21,7 @@
 Patch5: ghostscript-runlibfileifexists.patch
 Patch6: ghostscript-system-jasper.patch
 Patch7: ghostscript-pksmraw.patch
+Patch8: ghostscript-bitcmyk.patch
 
 Requires: urw-fonts >= 1.1, ghostscript-fonts
 BuildRequires: libjpeg-devel, libXt-devel
@@ -104,6 +105,9 @@
 # Fix pksmraw output (bug #308211).  Still needed in 8.63.
 %patch7 -p1 -b .pksmraw
 
+# Fix bitcmyk driver (bug #486644).
+%patch8 -p1 -b .bitcmyk
+
 # Convert manual pages to UTF-8
 from8859_1() {
 	iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@@ -285,6 +289,9 @@
 %{_libdir}/libgs.so
 
 %changelog
+* Tue Feb 17 2009 Tim Waugh <twaugh at redhat.com> 8.64-3
+- Fix bitcmyk driver (bug #486644).
+
 * Wed Feb  4 2009 Tim Waugh <twaugh at redhat.com> 8.64-2
 - 8.64 (bug #483958).
 - Removed trade marks to avoid any potential confusion.




More information about the fedora-extras-commits mailing list