aboutsummaryrefslogtreecommitdiff
path: root/graphics/peps/files
diff options
context:
space:
mode:
authorJoseph Koshy <jkoshy@FreeBSD.org>2003-06-17 01:31:54 +0000
committerJoseph Koshy <jkoshy@FreeBSD.org>2003-06-17 01:31:54 +0000
commitcf8e9ef60bc1f04a04045f4b6d4b3b9a1075c622 (patch)
tree81b2000fd80119b6589f9779862eaed080f35c72 /graphics/peps/files
parentc02183a616cc4479ac2d62406603cb0a107f2b7e (diff)
downloadports-cf8e9ef60bc1f04a04045f4b6d4b3b9a1075c622.tar.gz
ports-cf8e9ef60bc1f04a04045f4b6d4b3b9a1075c622.zip
Notes
Diffstat (limited to 'graphics/peps/files')
-rw-r--r--graphics/peps/files/patch-peps.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/graphics/peps/files/patch-peps.c b/graphics/peps/files/patch-peps.c
new file mode 100644
index 000000000000..93e23e2a9f55
--- /dev/null
+++ b/graphics/peps/files/patch-peps.c
@@ -0,0 +1,37 @@
+--- peps.c- Thu Jul 5 05:29:56 2001
++++ peps.c Mon Jun 16 15:13:13 2003
+@@ -62,6 +62,7 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <sys/wait.h>
+
+ char gsargs[] = "gs "
+ "-q "
+@@ -181,7 +182,8 @@
+ }
+
+ int main(int argc, char *argv[]) {
+- register int i;
++ register int i;
++ int status, error;
+ register char *charptr;
+ FILE *gs, *eps;
+
+@@ -420,8 +422,14 @@
+ input, input
+ );
+
+- pclose(gs);
++ status = pclose(gs);
+
+- return 0;
++ error = !WIFEXITED(status) || WEXITSTATUS(status);
++
++ if (error && output)
++ (void) remove(output);
++
++ exit(error);
++
+ }
+