Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / misc / drivers / epson-201401w / fixbuild.patch
blob4baa029a5739650e4055dcf3a21613b7b3e1cd04
1 diff --git a/src/pagemanager/pagemanager.c b/src/pagemanager/pagemanager.c
2 index 029e6d3..3c1f450 100644
3 --- a/src/pagemanager/pagemanager.c
4 +++ b/src/pagemanager/pagemanager.c
5 @@ -22,7 +22,7 @@
6 #include "epcgdef.h"
7 #include "debuglog.h"
8 #include "memory.h"
9 -#include "raster.h"
10 +#include "raster-helper.h"
11 #include "pagemanager.h"
13 extern int JobCanceled;
14 @@ -45,7 +45,7 @@ fetchRaster(EpsPageManager *pageManager)
15 int error = 0;
16 int did_fetch = 0;
17 int read_bytes = 0;
18 - int nraster;
19 + size_t nraster;
21 while (error == 0 && did_fetch == 0 && JobCanceled == 0) {
22 eps_raster_fetch(privateData->raster_h, NULL, 0, 0, &status);
23 @@ -212,7 +212,7 @@ int pageManagerGetPageRegion(EpsPageManager *pageManager, EpsPageRegion *pageReg
24 return EPS_OK;
27 -int pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize)
28 +size_t pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize)
30 PageManagerPrivateData *privateData = NULL;
31 int error = EPS_OK;
32 diff --git a/src/pagemanager/pagemanager.h b/src/pagemanager/pagemanager.h
33 index 87fbbd5..c9743fb 100644
34 --- a/src/pagemanager/pagemanager.h
35 +++ b/src/pagemanager/pagemanager.h
36 @@ -31,7 +31,7 @@ extern "C"
37 #define EPS_ERROR -1
38 #define EPS_OK 0
40 -typedef int (*EpsRasterSource)(char *buf, int bufSize);
41 +typedef size_t (*EpsRasterSource)(char *buf, int bufSize);
43 typedef struct {
44 EpsRasterSource rasterSource;
45 @@ -47,7 +47,7 @@ typedef struct {
46 EpsPageManager* pageManagerCreate(EpsPageRegion pageRegion, EpsFilterPrintOption filterPrintOption, EpsRasterSource rasterSource);
47 void pageManagerDestroy(EpsPageManager *pageManager);
48 int pageManagerGetPageRegion(EpsPageManager *pageManager, EpsPageRegion *pageRegion);
49 -int pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize);
50 +size_t pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize);
51 int pageManagerIsNextPage(EpsPageManager *pageManager);
53 #ifdef __cplusplus
54 diff --git a/src/raster/raster.c b/src/raster/raster.c
55 index 7e4946b..dd5aef6 100644
56 --- a/src/raster/raster.c
57 +++ b/src/raster/raster.c
58 @@ -218,7 +218,7 @@ eps_raster_init (RASTER * handle, EpsRasterOpt * data, EpsRasterPipeline * pipel
60 /* if raster_p equals NULL means that it is need to flush a page. */
61 int
62 -eps_raster_print (RASTER handle, char * raster_p, int raster_bytes, int pixel_num, int * outraster)
63 +eps_raster_print (RASTER handle, char * raster_p, int raster_bytes, int pixel_num, size_t * outraster)
65 EpsRaster * raster = (EpsRaster *) handle;
66 EpsRasterPipeline * pipeline = NULL;
67 diff --git a/src/raster/raster.h b/src/raster/raster.h
68 index 9be0977..cc5054d 100644
69 --- a/src/raster/raster.h
70 +++ b/src/raster/raster.h
71 @@ -143,7 +143,7 @@ typedef enum {
72 } EpsRasterFetchStatus;
74 int eps_raster_init (RASTER *, EpsRasterOpt *, EpsRasterPipeline *);
75 -int eps_raster_print (RASTER, char *, int, int, int *);
76 +int eps_raster_print (RASTER, char *, int, int, size_t *);
77 int eps_raster_fetch (RASTER, char *, int, int, EpsRasterFetchStatus *);
78 int eps_raster_free (RASTER);
80 diff --git a/src/raster_to_epson.c b/src/raster_to_epson.c
81 index 6e621c8..a0811d6 100644
82 --- a/src/raster_to_epson.c
83 +++ b/src/raster_to_epson.c
84 @@ -33,7 +33,7 @@
85 #include <cups/ppd.h>
86 #include <cups/raster.h>
88 -#include "raster.h"
89 +#include "raster-helper.h"
90 #include "memory.h"
91 #include "raster_to_epson.h"
92 #include "pagemanager.h"
93 @@ -75,7 +75,7 @@ static int page_no = 0;
94 static int pageHeight = 0;
95 #endif
97 -int rasterSource(char *buf, int bufSize)
98 +size_t rasterSource(char *buf, int bufSize)
100 int readBytes = 0;
101 if (JobCanceled == 0) {