Magellan Linux

Annotation of /trunk/kdenetwork/patches/kdenetwork-4.9.4-giflib5.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1997 - (hide annotations) (download)
Fri Dec 21 11:25:48 2012 UTC (11 years, 6 months ago) by niro
File size: 1896 byte(s)
-added patch to support giflib-5.x
1 niro 1997 diff -Naur kdenetwork-4.9.4/kopete/protocols/wlm/wlmchatsession.cpp kdenetwork-4.9.4-giflib5/kopete/protocols/wlm/wlmchatsession.cpp
2     --- kdenetwork-4.9.4/kopete/protocols/wlm/wlmchatsession.cpp 2012-11-30 01:32:44.000000000 +0100
3     +++ kdenetwork-4.9.4-giflib5/kopete/protocols/wlm/wlmchatsession.cpp 2012-12-21 14:29:19.626776830 +0100
4     @@ -467,11 +467,20 @@
5     {
6     #ifdef HAVE_GIFLIB
7     #ifdef HAVE_GIF_ERROR_STRING // giflib 4.2.0+
8     +#if GIFLIB_MAJOR >= 5
9     + int ErrorCode;
10     + const char * errorString = GifErrorString(ErrorCode);
11     +#else
12     const char * errorString = GifErrorString();
13     +#endif
14     if (errorString)
15     fprintf(stderr, "GIF-LIB error: %s\n", errorString);
16     else
17     +#if GIFLIB_MAJOR >= 5
18     + fprintf(stderr, "GIF-LIB undefined error.\n");
19     +#else
20     fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
21     +#endif
22     #else // older giflib versions, libungif
23     PrintGifError();
24     #endif // HAVE_GIF_ERROR_STRING
25     @@ -489,12 +498,12 @@
26     ColorMapObject *imageColourmap;
27     QImage img = ink.toImage().convertToFormat(QImage::Format_Indexed8);
28    
29     - imageColourmap= MakeMapObject(256, NULL);
30     + imageColourmap= GifMakeMapObject(256, NULL);
31     if (!imageColourmap) {
32     return;
33     }
34    
35     - screenColourmap= MakeMapObject(256, NULL);
36     + screenColourmap= GifMakeMapObject(256, NULL);
37     if (!screenColourmap) {
38     return;
39     }
40     @@ -525,10 +534,15 @@
41     }
42     }
43    
44     +#if GIFLIB_MAJOR >= 5
45     + int ErrorCode;
46     + GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0, &ErrorCode);
47     +#else
48     GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0);
49     +#endif
50     if (!GifFile) {
51     - FreeMapObject(imageColourmap);
52     - FreeMapObject(screenColourmap);
53     + GifFreeMapObject(imageColourmap);
54     + GifFreeMapObject(screenColourmap);
55     return;
56     }
57