--- a/configure +++ b/configure @@ -110,14 +110,14 @@ xdir="/usr/X11R6" ungif="no" echo "libungif check" >>./config.log echo " 1st:" >>./config.log -$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs +$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lgif $libs if [ -e \$\$~test ]; then - libs="-lungif $libs" ; ungif="yes" + libs="-lgif $libs" ; ungif="yes" else echo " 2nd: -lX11 -L$xdir/lib" >>./config.log - $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs + $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lgif -lX11 -L$xdir/lib $libs if [ -e \$\$~test ]; then - libs="-lungif -lX11 -L$xdir/lib $libs" ; ungif="yes" + libs="-lgif -lX11 -L$xdir/lib $libs" ; ungif="yes" fi fi rm -f \$\$~test --- a/gif.c +++ b/gif.c @@ -31,10 +31,10 @@ #include #define min(a,b) ((a) < (b) ? (a) : (b)) #define gflush return(FH_ERROR_FILE); -#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } -#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); } +#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } +#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } #define agflush return(FH_ERROR_FORMAT); -#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } +#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } int fh_gif_id(char *name) @@ -81,7 +81,7 @@ int fh_gif_load(char *name,unsigned char ColorMapObject *cmap; int cmaps; - gft=DGifOpenFileName(name); + gft=DGifOpenFileName(name, NULL); if(gft==NULL){printf("err5\n"); gflush;} ////////// do { @@ -170,7 +170,7 @@ int fh_gif_load(char *name,unsigned char } } while( rt!= TERMINATE_RECORD_TYPE ); - DGifCloseFile(gft); + DGifCloseFile(gft, NULL); return(FH_ERROR_OK); } @@ -184,7 +184,7 @@ int fh_gif_getsize(char *name,int *x,int int extcode; GifRecordType rt; - gft=DGifOpenFileName(name); + gft=DGifOpenFileName(name, NULL); if(gft==NULL) gflush; do { @@ -197,7 +197,7 @@ int fh_gif_getsize(char *name,int *x,int px=gft->Image.Width; py=gft->Image.Height; *x=px; *y=py; - DGifCloseFile(gft); + DGifCloseFile(gft, NULL); return(FH_ERROR_OK); break; case EXTENSION_RECORD_TYPE: @@ -210,7 +210,7 @@ int fh_gif_getsize(char *name,int *x,int } } while( rt!= TERMINATE_RECORD_TYPE ); - DGifCloseFile(gft); + DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } #endif --- a/png.c +++ b/png.c @@ -69,7 +69,7 @@ int fh_png_load(char *name,unsigned char fclose(fh); return(FH_ERROR_FORMAT); } rp=0; - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); if(rp) free(rp); @@ -161,7 +161,7 @@ int fh_png_getsize(char *name,int *x,int fclose(fh); return(FH_ERROR_FORMAT); } rp=0; - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); if(rp) free(rp);