Debian Codegraph @

debian/patches/37_giflib5.patch

raw symbols SCIP
1 From: Matthias Klose <[email protected]>
2 Subject: modification to source code
3
4 --- a/src/gifSave.cpp
5 +++ b/src/gifSave.cpp
6 @@ -63,10 +63,10 @@
7 b[i]=data[j++];
8 }
9
10 - outputPalette = MakeMapObject(paletteSize, NULL);
11 + outputPalette = GifMakeMapObject(paletteSize, NULL);
12 if (!outputPalette) return false;
13
14 - if (QuantizeBuffer(sx, sy, &paletteSize,
15 + if (GifQuantizeBuffer(sx, sy, &paletteSize,
16 &(r[0]),&(g[0]),&(b[0]), &(output[0]),
17 outputPalette->Colors) == GIF_ERROR) return false;
18
19 @@ -114,7 +114,10 @@
20 unsigned char nsle[12] = "NETSCAPE2.0";
21 unsigned char subblock[3];
22 //if (EGifPutExtension(gf, 0xFF, 11, nsle) == GIF_ERROR) {
23 - if (EGifPutExtensionFirst(gf, APPLICATION_EXT_FUNC_CODE, 11, nsle) == GIF_ERROR) {
24 + if (EGifPutExtensionLeader(gf, APPLICATION_EXT_FUNC_CODE) == GIF_ERROR) {
25 + return false;
26 + }
27 + if (EGifPutExtensionBlock(gf, 11, nsle) == GIF_ERROR) {
28 //gif_push_error();
29 //i_push_error(0, "writing loop extension");
30 return false;
31 @@ -123,7 +126,7 @@
32 subblock[2] = loop_count % 256;
33 subblock[1] = loop_count / 256;
34 //if (EGifPutExtension(gf, 0, 3, subblock) == GIF_ERROR) {
35 - if (EGifPutExtensionLast(gf, APPLICATION_EXT_FUNC_CODE, 3, subblock) == GIF_ERROR) {
36 + if (EGifPutExtensionTrailer(gf) == GIF_ERROR) {
37 //gif_push_error();
38 //i_push_error(0, "writing loop extention sub-block");
39 return false;
40 @@ -144,7 +147,7 @@
41 if (frames.size()==0) return false;
42
43
44 - GifFileType *GifFile = EGifOpenFileName(filename, FALSE);
45 + GifFileType *GifFile = EGifOpenFileName(filename, 0, NULL);
46
47 if (!GifFile) return false;
48
49 @@ -172,7 +175,7 @@
50
51 if (EGifPutImageDesc(
52 GifFile,
53 - 0, 0, gifsx, gifsy, FALSE, NULL
54 + 0, 0, gifsx, gifsy, 0, NULL
55 ) == GIF_ERROR) return false;
56
57
58 @@ -181,7 +184,7 @@
59 }
60 }
61
62 - if (EGifCloseFile(GifFile) == GIF_ERROR) return false;
63 + if (EGifCloseFile(GifFile, NULL) == GIF_ERROR) return false;
64
65 mode_t mask = umask(0);
66 umask(mask);