Author: bapt
Date: Sat Oct 15 13:45:09 2016
New Revision: 307372
URL: https://svnweb.freebsd.org/changeset/base/307372

Log:
  Move cleanup() into the edit.c file which is the only users of that function
  Remove common.{c,h}

Deleted:
  head/usr.bin/sdiff/common.c
  head/usr.bin/sdiff/common.h
Modified:
  head/usr.bin/sdiff/Makefile
  head/usr.bin/sdiff/edit.c

Modified: head/usr.bin/sdiff/Makefile
==============================================================================
--- head/usr.bin/sdiff/Makefile Sat Oct 15 13:44:13 2016        (r307371)
+++ head/usr.bin/sdiff/Makefile Sat Oct 15 13:45:09 2016        (r307372)
@@ -3,7 +3,7 @@
 .include <src.opts.mk>
 
 PROG=  sdiff
-SRCS=  common.c edit.c sdiff.c
+SRCS=  edit.c sdiff.c
 WARNS= 3
 
 MAN1=  sdiff.1

Modified: head/usr.bin/sdiff/edit.c
==============================================================================
--- head/usr.bin/sdiff/edit.c   Sat Oct 15 13:44:13 2016        (r307371)
+++ head/usr.bin/sdiff/edit.c   Sat Oct 15 13:45:09 2016        (r307372)
@@ -21,9 +21,17 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <unistd.h>
 
-#include "common.h"
 #include "extern.h"
 
+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
  * from the shell.  This means flags may be included.
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to