]> git.pld-linux.org Git - packages/cups-filters.git/blame - cups-filters-poppler.patch
- updated to 1.22.4
[packages/cups-filters.git] / cups-filters-poppler.patch
CommitLineData
f0e327c4
JB
1--- cups-filters-1.22.2/filter/pdftoopvp/oprs/OPVPSplashClip.cxx.orig 2019-03-15 19:53:00.000000000 +0100
2+++ cups-filters-1.22.2/filter/pdftoopvp/oprs/OPVPSplashClip.cxx 2019-03-27 17:10:02.624632722 +0100
3@@ -32,15 +32,15 @@
4 int i,j;
5 int y, x0, x1;
6 int txMin, tyMin, txMax, tyMax;
7- Guchar *cbuf,*tbuf;
8+ unsigned char *cbuf,*tbuf;
9 int blen;
10 OPVPSplashPath *p = new OPVPSplashPath();
11
12 getBBox(&txMin,&tyMin,&txMax,&tyMax);
13 if (txMin > txMax || tyMin > tyMax) return p;
14 blen = txMax-txMin+1;
15- cbuf = new Guchar[blen];
16- tbuf = new Guchar[blen];
17+ cbuf = new unsigned char[blen];
18+ tbuf = new unsigned char[blen];
19
20 for (y = tyMin;y <= tyMax;y++) {
21 /* clear buffer */
22--- cups-filters-1.22.2/filter/pdftoopvp/oprs/OPVPSplash.cxx.orig 2019-03-15 19:53:00.000000000 +0100
23+++ cups-filters-1.22.2/filter/pdftoopvp/oprs/OPVPSplash.cxx 2019-03-27 17:10:35.447788237 +0100
24@@ -1036,7 +1036,7 @@
25 opvp_fix_t opvpx,opvpy;
26 int opvpbytes;
27 int x0, y0;
28- Guchar *bp;
29+ unsigned char *bp;
30 SplashClipResult clipRes;
31 SplashCoord xt, yt;
32
33@@ -1060,7 +1060,7 @@
34
35 opvpbytes = (m+3)/4;
36 opvpbytes *= 4;
37- bp = (Guchar *)gmallocn(glyph->h,opvpbytes);
38+ bp = (unsigned char *)gmallocn(glyph->h,opvpbytes);
39 for (i = 0;i < glyph->h;i++) {
40 memcpy(bp+i*opvpbytes,glyph->data+i*m,m);
41 }
42@@ -1196,7 +1196,7 @@
43 opvp_fix_t opvpx,opvpy;
44 int opvpbytes;
45 opvp_ctm_t opvpctm;
46- Guchar *buf = 0, *bp;
47+ unsigned char *buf = 0, *bp;
48 SplashError result = splashOk;
49 SplashColorPtr lineBuf;
50
51@@ -1204,7 +1204,7 @@
52 /* align 4 */
53 opvpbytes = (opvpbytes+3)/4;
54 opvpbytes *= 4;
55- buf = (Guchar *)gmallocn(h,opvpbytes);
56+ buf = (unsigned char *)gmallocn(h,opvpbytes);
57 lineBuf = (SplashColorPtr)gmallocn(8,opvpbytes);
58
59 for (i = 0;i < h;i++) {
60@@ -1213,7 +1213,7 @@
61 bp = buf+opvpbytes*i;
62 (*src)(srcData, lineBuf);
63 for (j = 0;j < w;j += k) {
64- Guchar d;
65+ unsigned char d;
66
67 d = 0;
68 for (k = 0;k < 8 && j+k < w;k++) {
69@@ -1467,7 +1467,7 @@
70 int opvpbytes, linesize;
71 opvp_ctm_t opvpctm;
72 SplashError result = splashOk;
73- Guchar *buf = 0, *bp;
74+ unsigned char *buf = 0, *bp;
75 SplashColorPtr lineBuf = 0, color;
76 float e,f;
77 int hs,he, hstep;
78@@ -1537,7 +1537,7 @@
79 hs = h-1;
80 he = -1;
81 }
82- buf = (Guchar *)gmallocn(h,opvpbytes);
83+ buf = (unsigned char *)gmallocn(h,opvpbytes);
84 lineBuf = (SplashColorPtr)gmallocn(lineBufSize,1);
85 switch (colorMode) {
86 case splashModeMono1:
87@@ -1682,7 +1682,7 @@
88 opvp_fix_t opvpx,opvpy;
89 int opvpbytes;
90 opvp_ctm_t opvpctm;
91- Guchar *buf = 0, *bp;
92+ unsigned char *buf = 0, *bp;
93
94 switch (colorMode) {
95 case splashModeMono1:
96@@ -1699,7 +1699,7 @@
97 return splashErrOPVP;
98 break;
99 }
100- buf = (Guchar *)gmallocn(h,opvpbytes);
101+ buf = (unsigned char *)gmallocn(h,opvpbytes);
102
103 switch (colorMode) {
104 case splashModeMono1:
105@@ -1929,8 +1929,8 @@
106 p += linesize;
107 }
108 /* allocate line buffer */
109- Guchar *lineBuf = (Guchar *)gmallocn(opvpbytes,1);
110- Guchar *onBuf = (Guchar *)gmallocn(width,1);
111+ unsigned char *lineBuf = (unsigned char *)gmallocn(opvpbytes,1);
112+ unsigned char *onBuf = (unsigned char *)gmallocn(width,1);
113 OPVPSplashClip *clip;
114 opvpctm.a = 1.0;
115 opvpctm.b = 0.0;
116@@ -2025,7 +2025,7 @@
117 /* find end pixel */
118 for (ex = sx+1;onBuf[ex] != 0 && ex < width;ex++);
119 int n = ex-sx;
120- Guchar *bp;
121+ unsigned char *bp;
122 int ns;
123
124 switch (colorMode) {
125--- cups-filters-1.22.2/filter/pdftoopvp/OPVPOutputDev.h.orig 2019-03-15 19:53:00.000000000 +0100
126+++ cups-filters-1.22.2/filter/pdftoopvp/OPVPOutputDev.h 2019-03-27 17:11:39.447441521 +0100
127@@ -15,7 +15,6 @@
128 #pragma interface
129 #endif
130
131-#include "goo/gtypes.h"
132 #include "splash/SplashTypes.h"
133 #include "config.h"
134 #include "OutputDev.h"
135@@ -195,18 +194,18 @@
136 SplashPattern *getColor(GfxGray gray, GfxRGB *rgb);
137 OPVPSplashPath *convertPath(GfxState *state, GfxPath *path);
138 void drawType3Glyph(T3FontCache *t3Font,
139- T3FontCacheTag *tag, Guchar *data,
140+ T3FontCacheTag *tag, unsigned char *data,
141 double x, double y);
142 void patternFillChar(GfxState *state,
143 double x, double y, CharCode code);
144
145 static bool imageMaskSrc(void *data, SplashColorPtr line);
146 static bool imageSrc(void *data, SplashColorPtr line,
147- Guchar *alphaLine);
148+ unsigned char *alphaLine);
149 static bool alphaImageSrc(void *data, SplashColorPtr line,
150- Guchar *alphaLine);
151+ unsigned char *alphaLine);
152 static bool maskedImageSrc(void *data, SplashColorPtr line,
153- Guchar *alphaLine);
154+ unsigned char *alphaLine);
155
156 OPVPSplashPath *bitmapToPath(SplashBitmap *bitmapA, int width, int height);
157 void closeAllSubPath(OPVPSplashPath *path);
158--- cups-filters-1.22.2/filter/pdftoopvp/OPVPOutputDev.cxx.orig 2019-03-15 19:53:00.000000000 +0100
159+++ cups-filters-1.22.2/filter/pdftoopvp/OPVPOutputDev.cxx 2019-03-27 17:12:06.283962802 +0100
160@@ -89,8 +89,8 @@
161 //------------------------------------------------------------------------
162
163 struct T3FontCacheTag {
164- Gushort code;
165- Gushort mru; // valid bit (0x8000) and MRU index
166+ unsigned short code;
167+ unsigned short mru; // valid bit (0x8000) and MRU index
168 };
169
170 class T3FontCache {
171@@ -113,7 +113,7 @@
172 int glyphSize; // size of glyph bitmaps, in bytes
173 int cacheSets; // number of sets in cache
174 int cacheAssoc; // cache associativity (glyphs per set)
175- Guchar *cacheData; // glyph pixmap cache
176+ unsigned char *cacheData; // glyph pixmap cache
177 T3FontCacheTag *cacheTags; // cache tags, i.e., char codes
178 };
179
180@@ -147,7 +147,7 @@
181 } else {
182 cacheSets = 1;
183 }
184- cacheData = (Guchar *)gmallocn3(cacheSets , cacheAssoc , glyphSize);
185+ cacheData = (unsigned char *)gmallocn3(cacheSets , cacheAssoc , glyphSize);
186 cacheTags = (T3FontCacheTag *)gmallocn3(cacheSets , cacheAssoc ,
187 sizeof(T3FontCacheTag));
188 for (i = 0; i < cacheSets * cacheAssoc; ++i) {
189@@ -161,13 +161,13 @@
190 }
191
192 struct T3GlyphStack {
193- Gushort code; // character code
194+ unsigned short code; // character code
195 double x, y; // position to draw the glyph
196
197 //----- cache info
198 T3FontCache *cache; // font cache for the current font
199 T3FontCacheTag *cacheTag; // pointer to cache tag for the glyph
200- Guchar *cacheData; // pointer to cache data for the glyph
201+ unsigned char *cacheData; // pointer to cache data for the glyph
202
203 //----- saved state
204 SplashBitmap *origBitmap;
205@@ -1010,7 +1010,7 @@
206 }
207
208 void OPVPOutputDev::drawType3Glyph(T3FontCache *t3Font,
209- T3FontCacheTag *tag, Guchar *data,
210+ T3FontCacheTag *tag, unsigned char *data,
211 double x, double y) {
212 SplashGlyphBitmap glyph;
213
214@@ -1040,7 +1040,7 @@
215
216 bool OPVPOutputDev::imageMaskSrc(void *data, SplashColorPtr line) {
217 SplashOutImageMaskData *imgMaskData = (SplashOutImageMaskData *)data;
218- Guchar *p;
219+ unsigned char *p;
220 SplashColorPtr q;
221 int x;
222
223@@ -1101,10 +1101,10 @@
224 };
225
226 bool OPVPOutputDev::imageSrc(void *data, SplashColorPtr line,
227- Guchar *alphaLine)
228+ unsigned char *alphaLine)
229 {
230 SplashOutImageData *imgData = (SplashOutImageData *)data;
231- Guchar *p;
232+ unsigned char *p;
233 SplashColorPtr q, col;
234 GfxRGB rgb;
235 GfxGray gray;
236@@ -1212,16 +1212,16 @@
237 }
238
239 bool OPVPOutputDev::alphaImageSrc(void *data, SplashColorPtr line,
240- Guchar *alphaLine) {
241+ unsigned char *alphaLine) {
242 SplashOutImageData *imgData = (SplashOutImageData *)data;
243- Guchar *p;
244+ unsigned char *p;
245 SplashColorPtr q, col;
246 GfxRGB rgb;
247 GfxGray gray;
248 #if SPLASH_CMYK
249 GfxCMYK cmyk;
250 #endif
251- Guchar alpha;
252+ unsigned char alpha;
253 int nComps, x, i;
254
255 if (imgData->y == imgData->height) {
256@@ -1334,7 +1334,7 @@
257 #if SPLASH_CMYK
258 GfxCMYK cmyk;
259 #endif
260- Guchar pix;
261+ unsigned char pix;
262 int n, i;
263
264 ctm = state->getCTM();
265@@ -1366,7 +1366,7 @@
266 case splashModeMono8:
267 imgData.lookup = (SplashColorPtr)gmallocn(n,1);
268 for (i = 0; i < n; ++i) {
269- pix = (Guchar)i;
270+ pix = (unsigned char)i;
271 colorMap->getGray(&pix, &gray);
272 imgData.lookup[i] = colToByte(gray);
273 }
274@@ -1374,7 +1374,7 @@
275 case splashModeRGB8:
276 imgData.lookup = (SplashColorPtr)gmallocn(n,3);
277 for (i = 0; i < n; ++i) {
278- pix = (Guchar)i;
279+ pix = (unsigned char)i;
280 colorMap->getRGB(&pix, &rgb);
281 imgData.lookup[3*i] = colToByte(rgb.r);
282 imgData.lookup[3*i+1] = colToByte(rgb.g);
283@@ -1384,7 +1384,7 @@
284 case splashModeBGR8:
285 imgData.lookup = (SplashColorPtr)gmallocn(n,3);
286 for (i = 0; i < n; ++i) {
287- pix = (Guchar)i;
288+ pix = (unsigned char)i;
289 colorMap->getRGB(&pix, &rgb);
290 imgData.lookup[3*i] = colToByte(rgb.b);
291 imgData.lookup[3*i+1] = colToByte(rgb.g);
292@@ -1395,7 +1395,7 @@
293 case splashModeCMYK8:
294 imgData.lookup = (SplashColorPtr)gmallocn(n,4);
295 for (i = 0; i < n; ++i) {
296- pix = (Guchar)i;
297+ pix = (unsigned char)i;
298 colorMap->getCMYK(&pix, &cmyk);
299 imgData.lookup[4*i] = colToByte(cmyk.c);
300 imgData.lookup[4*i+1] = colToByte(cmyk.m);
301@@ -1440,9 +1440,9 @@
302 };
303
304 bool OPVPOutputDev::maskedImageSrc(void *data, SplashColorPtr line,
305- Guchar *alphaLine) {
306+ unsigned char *alphaLine) {
307 SplashOutMaskedImageData *imgData = (SplashOutMaskedImageData *)data;
308- Guchar *p;
309+ unsigned char *p;
310 SplashColor maskColor;
311 SplashColorPtr q, col;
312 GfxRGB rgb;
313@@ -1450,7 +1450,7 @@
314 #if SPLASH_CMYK
315 GfxCMYK cmyk;
316 #endif
317- Guchar alpha;
318+ unsigned char alpha;
319 int nComps, x;
320
321 if (imgData->y == imgData->height) {
322@@ -1562,7 +1562,7 @@
323 #if SPLASH_CMYK
324 GfxCMYK cmyk;
325 #endif
326- Guchar pix;
327+ unsigned char pix;
328 int n, i;
329
330 //----- scale the mask image to the same size as the source image
331@@ -1622,7 +1622,7 @@
332 case splashModeMono8:
333 imgData.lookup = (SplashColorPtr)gmallocn(n,1);
334 for (i = 0; i < n; ++i) {
335- pix = (Guchar)i;
336+ pix = (unsigned char)i;
337 colorMap->getGray(&pix, &gray);
338 imgData.lookup[i] = colToByte(gray);
339 }
340@@ -1630,7 +1630,7 @@
341 case splashModeRGB8:
342 imgData.lookup = (SplashColorPtr)gmallocn(n,3);
343 for (i = 0; i < n; ++i) {
344- pix = (Guchar)i;
345+ pix = (unsigned char)i;
346 colorMap->getRGB(&pix, &rgb);
347 imgData.lookup[3*i] = colToByte(rgb.r);
348 imgData.lookup[3*i+1] = colToByte(rgb.g);
349@@ -1640,7 +1640,7 @@
350 case splashModeBGR8:
351 imgData.lookup = (SplashColorPtr)gmallocn(n,3);
352 for (i = 0; i < n; ++i) {
353- pix = (Guchar)i;
354+ pix = (unsigned char)i;
355 colorMap->getRGB(&pix, &rgb);
356 imgData.lookup[3*i] = colToByte(rgb.b);
357 imgData.lookup[3*i+1] = colToByte(rgb.g);
358@@ -1651,7 +1651,7 @@
359 case splashModeCMYK8:
360 imgData.lookup = (SplashColorPtr)gmallocn(n,4);
361 for (i = 0; i < n; ++i) {
362- pix = (Guchar)i;
363+ pix = (unsigned char)i;
364 colorMap->getCMYK(&pix, &cmyk);
365 imgData.lookup[4*i] = colToByte(cmyk.c);
366 imgData.lookup[4*i+1] = colToByte(cmyk.m);
367@@ -1717,7 +1717,7 @@
368 #if SPLASH_CMYK
369 GfxCMYK cmyk;
370 #endif
371- Guchar pix;
372+ unsigned char pix;
373 int n, i;
374
375 ctm = state->getCTM();
376@@ -1743,7 +1743,7 @@
377 n = 1 << maskColorMap->getBits();
378 imgMaskData.lookup = (SplashColorPtr)gmallocn(n,1);
379 for (i = 0; i < n; ++i) {
380- pix = (Guchar)i;
381+ pix = (unsigned char)i;
382 maskColorMap->getGray(&pix, &gray);
383 imgMaskData.lookup[i] = colToByte(gray);
384 }
385@@ -1793,7 +1793,7 @@
386 case splashModeMono8:
387 imgData.lookup = (SplashColorPtr)gmallocn(n,1);
388 for (i = 0; i < n; ++i) {
389- pix = (Guchar)i;
390+ pix = (unsigned char)i;
391 colorMap->getGray(&pix, &gray);
392 imgData.lookup[i] = colToByte(gray);
393 }
394@@ -1801,7 +1801,7 @@
395 case splashModeRGB8:
396 imgData.lookup = (SplashColorPtr)gmallocn(n,3);
397 for (i = 0; i < n; ++i) {
398- pix = (Guchar)i;
399+ pix = (unsigned char)i;
400 colorMap->getRGB(&pix, &rgb);
401 imgData.lookup[3*i] = colToByte(rgb.r);
402 imgData.lookup[3*i+1] = colToByte(rgb.g);
403@@ -1811,7 +1811,7 @@
404 case splashModeBGR8:
405 imgData.lookup = (SplashColorPtr)gmallocn(n,3);
406 for (i = 0; i < n; ++i) {
407- pix = (Guchar)i;
408+ pix = (unsigned char)i;
409 colorMap->getRGB(&pix, &rgb);
410 imgData.lookup[3*i] = colToByte(rgb.b);
411 imgData.lookup[3*i+1] = colToByte(rgb.g);
412@@ -1822,7 +1822,7 @@
413 case splashModeCMYK8:
414 imgData.lookup = (SplashColorPtr)gmallocn(n,4);
415 for (i = 0; i < n; ++i) {
416- pix = (Guchar)i;
417+ pix = (unsigned char)i;
418 colorMap->getCMYK(&pix, &cmyk);
419 imgData.lookup[4*i] = colToByte(cmyk.c);
420 imgData.lookup[4*i+1] = colToByte(cmyk.m);
This page took 0.115343 seconds and 4 git commands to generate.