861ac185a6
```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 ```
18 lines
262 B
Diff
18 lines
262 B
Diff
--- a/test/fpurge.c
|
|
+++ b/test/fpurge.c
|
|
@@ -29,15 +29,11 @@
|
|
int
|
|
main()
|
|
{
|
|
- static FILE fp_bad;
|
|
FILE *fp;
|
|
|
|
if (fpurge(NULL) == 0)
|
|
return 1;
|
|
|
|
- if (fpurge(&fp_bad) == 0)
|
|
- return 1;
|
|
-
|
|
fp = fopen("/dev/zero", "r");
|
|
if (fpurge(fp) < 0)
|
|
return 1;
|