void-packages/srcpkgs/fbv/patches/giflib-5.1.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

62 lines
1.7 KiB
Diff

diff -wbBur gif.c gif.c
--- a/gif.c 2003-08-25 00:23:02.000000000 +0400
+++ b/gif.c 2014-05-29 18:39:41.337332872 +0400
@@ -31,10 +31,10 @@
#include <string.h>
#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 @@
ColorMapObject *cmap;
int cmaps;
- gft=DGifOpenFileName(name);
+ gft=DGifOpenFileName(name, NULL);
if(gft==NULL){printf("err5\n"); gflush;} //////////
do
{
@@ -170,7 +170,7 @@
}
}
while( rt!= TERMINATE_RECORD_TYPE );
- DGifCloseFile(gft);
+ DGifCloseFile(gft, NULL);
return(FH_ERROR_OK);
}
@@ -184,7 +184,7 @@
int extcode;
GifRecordType rt;
- gft=DGifOpenFileName(name);
+ gft=DGifOpenFileName(name, NULL);
if(gft==NULL) gflush;
do
{
@@ -197,7 +197,7 @@
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 @@
}
}
while( rt!= TERMINATE_RECORD_TYPE );
- DGifCloseFile(gft);
+ DGifCloseFile(gft, NULL);
return(FH_ERROR_FORMAT);
}
#endif