Hi all,

Simple fix for the main, that i modified from a version someone at SUSE did for something similar, basicly they added another param to some functions to return a error code. Our functions already had a error code but i thought it would be bad form to change the existing function behavior by returning a bunch of new errors that could conflict with existing code. I just added the error param and discarded the results, there's almost certainly a better way but this should be a good start for someone.

I would have sent it via phab, but arc doesn't let me install certs

 arc install-certificate
Installing certificate for 'https://phab.enlightenment.org/api/'...
Trying to connect to server...
Connection OK!

LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricator if necessary:

    https://phab.enlightenment.org/conduit/token/

Then paste the token on that page below.

    Paste token from that page: mwvf2d6gba3tq6nx2gzc6itytjxgcythsjw3s7gw

Downloading authentication certificate...
Exception
ERR-BAD-TOKEN: Token does not exist or has expired.
(Run with --trace for a full exception trace.)

Cheers,
Simon
diff --git a/src/modules/evas/loaders/gif/evas_image_load_gif.c 
b/src/modules/evas/loaders/gif/evas_image_load_gif.c
index b39bd90..d77d47a 100644
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -695,7 +695,9 @@ evas_image_load_file_head_gif(Image_Entry *ie, const char 
*file, const char *key
    int            alpha;
    int            loop_count = -1;
    Eina_Bool      r = EINA_FALSE;
-
+#if GIFLIB_MAJOR >= 5
+   int            err;
+#endif
    w = 0;
    h = 0;
    alpha = -1;
@@ -716,7 +718,11 @@ evas_image_load_file_head_gif(Image_Entry *ie, const char 
*file, const char *key
    egi.length = eina_file_size_get(f);
    egi.position = 0;
 
+#if GIFLIB_MAJOR >= 5
+   gif = DGifOpen(&egi, _evas_image_load_file_read, &err);
+#else
    gif = DGifOpen(&egi, _evas_image_load_file_read);
+#endif
    if (!gif)
      {
         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
@@ -844,6 +850,9 @@ evas_image_load_specific_frame(Image_Entry *ie, const char 
*file, int frame_inde
    Image_Entry_Frame *frame = NULL;
    Gif_Frame         *gif_frame = NULL;
    Eina_Bool          r = EINA_FALSE;
+#if GIFLIB_MAJOR >= 5
+   int            err;
+#endif
 
    f = eina_file_open(file, EINA_FALSE);
    if (!f)
@@ -861,7 +870,11 @@ evas_image_load_specific_frame(Image_Entry *ie, const char 
*file, int frame_inde
    egi.length = eina_file_size_get(f);
    egi.position = 0;
 
+#if GIFLIB_MAJOR >= 5
+   gif = DGifOpen(&egi, _evas_image_load_file_read, &err);
+#else
    gif = DGifOpen(&egi, _evas_image_load_file_read);
+#endif
    if (!gif)
      {
         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
@@ -910,6 +923,10 @@ evas_image_load_file_data_gif(Image_Entry *ie, const char 
*file, const char *key
    int                cur_frame_index;
    Image_Entry_Frame *frame = NULL;
    Eina_Bool          hit;
+#if GIFLIB_MAJOR >= 5
+   int            err;
+#endif
+
 
    if(!ie->flags.animated)
      cur_frame_index = 1;
@@ -957,7 +974,11 @@ evas_image_load_file_data_gif(Image_Entry *ie, const char 
*file, const char *key
              egi.length = eina_file_size_get(f);
              egi.position = 0;
 
+#if GIFLIB_MAJOR >= 5
+             gif = DGifOpen(&egi, _evas_image_load_file_read, &err);
+#else
              gif = DGifOpen(&egi, _evas_image_load_file_read);
+#endif
              if (!gif)
                {
                   *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
@@ -1016,6 +1037,9 @@ evas_image_load_frame_duration_gif(Image_Entry *ie, const 
char *file, const int
    int            remain_frames = frame_num;
    double         duration = -1;
    int            frame_count = 0;
+#if GIFLIB_MAJOR >= 5
+   int            err;
+#endif
 
    frame_count = ie->frame_count;
 
@@ -1031,7 +1055,11 @@ evas_image_load_frame_duration_gif(Image_Entry *ie, 
const char *file, const int
    egi.length = eina_file_size_get(f);
    egi.position = 0;        
 
+#if GIFLIB_MAJOR >= 5
+   gif = DGifOpen(&egi, _evas_image_load_file_read, &err);
+#else
    gif = DGifOpen(&egi, _evas_image_load_file_read);
+#endif
    if (!gif) goto on_error;
 
    duration = 0;
    
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to