summaryrefslogtreecommitdiffstats
path: root/usr.bin/sdiff/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/sdiff/edit.c')
-rw-r--r--usr.bin/sdiff/edit.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/sdiff/edit.c b/usr.bin/sdiff/edit.c
index 21f7cdc..993b515 100644
--- a/usr.bin/sdiff/edit.c
+++ b/usr.bin/sdiff/edit.c
@@ -21,10 +21,16 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-#include "common.h"
#include "extern.h"
-int editit(const char *);
+static void
+cleanup(const char *filename)
+{
+
+ if (unlink(filename))
+ err(2, "could not delete: %s", filename);
+ exit(2);
+}
/*
* Execute an editor on the specified pathname, which is interpreted
@@ -32,7 +38,7 @@ int editit(const char *);
*
* Returns -1 on error, or the exit value on success.
*/
-int
+static int
editit(const char *pathname)
{
sig_t sighup, sigint, sigquit, sigchld;
OpenPOWER on IntegriCloud