[Pkg-cups-devel] r699 - in cupsys/trunk: . debian debian/patches

Martin Pitt mpitt at alioth.debian.org
Fri Mar 7 21:45:44 UTC 2008


Author: mpitt
Date: Fri Mar  7 21:45:43 2008
New Revision: 699

Log:
* Add debian/patches/pbmprint.dpatch: Fix printing of PBM files, thanks to
  Eugeniy Meshcheryakov! (Closes: #313536)

Added:
   cupsys/trunk/debian/patches/pbmprint.dpatch   (contents, props changed)
Modified:
   cupsys/trunk/   (props changed)
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/patches/00list

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Fri Mar  7 21:45:43 2008
@@ -9,8 +9,10 @@
     apt-cache search catching. (Closes: #426519)
   * Remove debian/NEWS, there's nothing new since Etch's release.
     (Closes: #376580)
+  * Add debian/patches/pbmprint.dpatch: Fix printing of PBM files, thanks to
+    Eugeniy Meshcheryakov! (Closes: #313536)
 
- -- Martin Pitt <mpitt at debian.org>  Fri, 07 Mar 2008 22:20:05 +0100
+ -- Martin Pitt <mpitt at debian.org>  Fri, 07 Mar 2008 22:30:32 +0100
 
 cupsys (1.3.6-1) unstable; urgency=low
 

Modified: cupsys/trunk/debian/patches/00list
==============================================================================
--- cupsys/trunk/debian/patches/00list	(original)
+++ cupsys/trunk/debian/patches/00list	Fri Mar  7 21:45:43 2008
@@ -13,3 +13,4 @@
 include_krb5_h_in_job_h.dpatch
 search_mime_files_in_usr_share.dpatch
 pdftops-cups-1.4.dpatch
+pbmprint.dpatch

Added: cupsys/trunk/debian/patches/pbmprint.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/pbmprint.dpatch	Fri Mar  7 21:45:43 2008
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## pbmprint.dpatch by  <mpitt at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix PBM printing: P1 was not handled at all, and P4 was inverted. (#313536)
+## DP: Forwarded to http://www.cups.org/str.php?L2746.
+
+ at DPATCH@
+diff -urNad trunk~/filter/image-pnm.c trunk/filter/image-pnm.c
+--- trunk~/filter/image-pnm.c	2008-01-16 23:20:33.000000000 +0100
++++ trunk/filter/image-pnm.c	2008-03-07 22:28:48.000000000 +0100
+@@ -178,6 +178,18 @@
+     switch (format)
+     {
+       case 1 :
++          for (x = img->xsize, inptr = in; x > 0; x --, inptr ++) {
++              int c;
++	      do {
++		 c = fgetc(fp);
++	      } while (c != '1' && c != '0' && c != EOF);
++	      if (c == '1')
++                  *inptr = 0;
++	      else if (c == '0')
++		  *inptr = 255;
++	  }
++          break;
++
+       case 2 :
+           for (x = img->xsize, inptr = in; x > 0; x --, inptr ++)
+             if (fscanf(fp, "%d", &val) == 1)
+@@ -203,9 +215,9 @@
+                x --, inptr ++)
+           {
+             if (*outptr & bit)
+-              *inptr = 255;
+-            else
+               *inptr = 0;
++            else
++              *inptr = 255;
+ 
+             if (bit > 1)
+               bit >>= 1;



More information about the Pkg-cups-devel mailing list