giflib5_api.diff 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. diff -Naur fbv-1.0b/gif.c fbv-1.0b.patched/gif.c
  2. --- fbv-1.0b/gif.c 2003-08-24 16:23:02.000000000 -0400
  3. +++ fbv-1.0b.patched/gif.c 2015-11-22 12:16:54.093999000 -0500
  4. @@ -31,10 +31,10 @@
  5. #include <string.h>
  6. #define min(a,b) ((a) < (b) ? (a) : (b))
  7. #define gflush return(FH_ERROR_FILE);
  8. -#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
  9. -#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
  10. +#define grflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
  11. +#define mgrflush { int dummy; free(lb); free(slb); DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
  12. #define agflush return(FH_ERROR_FORMAT);
  13. -#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
  14. +#define agrflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
  15. int fh_gif_id(char *name)
  16. @@ -80,8 +80,9 @@
  17. GifRecordType rt;
  18. ColorMapObject *cmap;
  19. int cmaps;
  20. + int dummyopenarg;
  21. - gft=DGifOpenFileName(name);
  22. + gft=DGifOpenFileName(name, &dummyopenarg);
  23. if(gft==NULL){printf("err5\n"); gflush;} //////////
  24. do
  25. {
  26. @@ -170,7 +171,7 @@
  27. }
  28. }
  29. while( rt!= TERMINATE_RECORD_TYPE );
  30. - DGifCloseFile(gft);
  31. + DGifCloseFile(gft, &dummyopenarg);
  32. return(FH_ERROR_OK);
  33. }
  34. @@ -183,8 +184,9 @@
  35. GifByteType *extension;
  36. int extcode;
  37. GifRecordType rt;
  38. + int dummyopenarg;
  39. - gft=DGifOpenFileName(name);
  40. + gft=DGifOpenFileName(name, &dummyopenarg);
  41. if(gft==NULL) gflush;
  42. do
  43. {
  44. @@ -197,7 +199,7 @@
  45. px=gft->Image.Width;
  46. py=gft->Image.Height;
  47. *x=px; *y=py;
  48. - DGifCloseFile(gft);
  49. + DGifCloseFile(gft, &dummyopenarg);
  50. return(FH_ERROR_OK);
  51. break;
  52. case EXTENSION_RECORD_TYPE:
  53. @@ -210,7 +212,7 @@
  54. }
  55. }
  56. while( rt!= TERMINATE_RECORD_TYPE );
  57. - DGifCloseFile(gft);
  58. + DGifCloseFile(gft, &dummyopenarg);
  59. return(FH_ERROR_FORMAT);
  60. }
  61. #endif