pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/print/cups-drivers-Magicolor5440DL



Module Name:    pkgsrc
Committed By:   joerg
Date:           Sat Jul  1 22:13:26 UTC 2017

Modified Files:
        pkgsrc/print/cups-drivers-Magicolor5440DL: distinfo
Added Files:
        pkgsrc/print/cups-drivers-Magicolor5440DL/patches: patch-src_bmp.c
            patch-src_rastertokmlf.c

Log Message:
Fix build against CUPS 2.0. While here, fix format string (ab)use.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/print/cups-drivers-Magicolor5440DL/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c \
    pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/print/cups-drivers-Magicolor5440DL/distinfo
diff -u pkgsrc/print/cups-drivers-Magicolor5440DL/distinfo:1.7 pkgsrc/print/cups-drivers-Magicolor5440DL/distinfo:1.8
--- pkgsrc/print/cups-drivers-Magicolor5440DL/distinfo:1.7      Wed Nov  4 01:01:32 2015
+++ pkgsrc/print/cups-drivers-Magicolor5440DL/distinfo  Sat Jul  1 22:13:26 2017
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.7 2015/11/04 01:01:32 agc Exp $
+$NetBSD: distinfo,v 1.8 2017/07/01 22:13:26 joerg Exp $
 
 SHA1 (5440DL_lin64bit_1_2_1.zip) = 130092a9345ec32a2681bacafaeadcc85563f1fa
 RMD160 (5440DL_lin64bit_1_2_1.zip) = a0a5a51eef1a7798d0f8b8d07873bd60ac2cba9b
 SHA512 (5440DL_lin64bit_1_2_1.zip) = 2686c06a18f4f23488a7de9820cc18e4e902805adebe5959b2f6a26e973082468aa6993421efcdbf690651d319b86147e382e15271a2895a3210c240a932f846
 Size (5440DL_lin64bit_1_2_1.zip) = 767491 bytes
 SHA1 (patch-aa) = dc05cf3551ea421ac0b807752e86de27f1fe229e
+SHA1 (patch-src_bmp.c) = 15fe81ab79ba9bcd1ecfcf413122a8e4ad217818
+SHA1 (patch-src_rastertokmlf.c) = c3f3c3e795b91300b0d5e80b3113b8a7541727a6

Added files:

Index: pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c
diff -u /dev/null pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c:1.1
--- /dev/null   Sat Jul  1 22:13:26 2017
+++ pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c   Sat Jul  1 22:13:26 2017
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_bmp.c,v 1.1 2017/07/01 22:13:26 joerg Exp $
+
+Fix *print use.
+
+--- src/bmp.c.orig     2017-07-01 21:10:21.915538844 +0000
++++ src/bmp.c
+@@ -140,7 +140,7 @@ int write_bmp_header(cups_page_header_t 
+ 
+ int getHalftoneByResolution (PIMAGEHEADER pImage)
+ {
+-      BYTE szFile[ 256 ];
++      char szFile[ 256 ];
+    FILE *fh;
+       size_t numread;
+       PBITMAPFILEHEADER pbmpfh;
+@@ -155,7 +155,7 @@ int getHalftoneByResolution (PIMAGEHEADE
+ 
+       for(plane=startplane; plane <4; plane++) //cmyk 0 1 2 3
+       {
+-              sprintf(szFile, 
++              snprintf(szFile, sizeof(szFile),
+                       "%s/Halftones/km_ht_%d%d.bmp",
+                       KM_DATADIR, pImage->xResolution/1200, plane); 
+               
+@@ -171,7 +171,7 @@ int getHalftoneByResolution (PIMAGEHEADE
+               numread = fread(pbmpfh,1,sizeof(BITMAPFILEHEADER),fh);
+               if(numread != sizeof(BITMAPFILEHEADER))
+               {
+-                      fprintf(stderr, "ERROR: numread=%d, size=%d\n",numread,sizeof(BITMAPFILEHEADER));
++                      fprintf(stderr, "ERROR: numread=%zu, size=%zu\n",numread,sizeof(BITMAPFILEHEADER));
+                       return CUPS_FALSE;
+               }
+               BMP_ASSIGN_DWORD(pbmpfh->bfSize,pbmpfh->bfSize);
+@@ -197,8 +197,8 @@ int getHalftoneByResolution (PIMAGEHEADE
+ 
+               if(pHTtmp == NULL)
+               {
+-                      fprintf(stderr, "ERROR: pbih->width=%d,height=%d\n)",pbih->biWidth,pbih->biHeight);
+-                      fprintf(stderr, "ERROR: size=%d,NULL pHTtmp\n",sizeof(HTHEADER));
++                      fprintf(stderr, "ERROR: pbih->width=%lu,height=%lu\n)",(unsigned long)pbih->biWidth,(unsigned long)pbih->biHeight);
++                      fprintf(stderr, "ERROR: size=%zu,NULL pHTtmp\n",sizeof(HTHEADER));
+                       return CUPS_FALSE;
+               }
+               pHTtmp->wID = plane;// * (objtype+1);
Index: pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c
diff -u /dev/null pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c:1.1
--- /dev/null   Sat Jul  1 22:13:26 2017
+++ pkgsrc/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c  Sat Jul  1 22:13:26 2017
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_rastertokmlf.c,v 1.1 2017/07/01 22:13:26 joerg Exp $
+
+Fix build with CUPS 2.0.
+
+--- src/rastertokmlf.c.orig    2017-07-01 21:05:32.072615512 +0000
++++ src/rastertokmlf.c
+@@ -53,6 +53,7 @@
+  */
+ 
+ #include <cups/cups.h>
++#include <cups/ppd.h>
+ //#include <cups/string.h>
+ #include <cups/language.h>
+ #include <cups/raster.h>



Home | Main Index | Thread Index | Old Index