aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>1999-09-22 23:48:58 +0000
committerArchie Cobbs <archie@FreeBSD.org>1999-09-22 23:48:58 +0000
commit32e29e4547d0e5093cba57a91449a5ce07d7b047 (patch)
tree6d06d4bc1fb16381ed5940869857ec462893e031 /tools
parent466d6dc43b41719454e643027ea71f03b4b9a287 (diff)
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/README6
-rw-r--r--tools/tools/diffburst/Makefile9
-rw-r--r--tools/tools/diffburst/diffburst.123
-rw-r--r--tools/tools/diffburst/main.c44
4 files changed, 3 insertions, 79 deletions
diff --git a/tools/tools/README b/tools/tools/README
index 4ae496136ddf..43f354bcfb8b 100644
--- a/tools/tools/README
+++ b/tools/tools/README
@@ -22,6 +22,6 @@ tcl_bmake Generates a bmake Makefile for src/lib/libtcl.
upgrade Scripts used for upgrading an installed system.
vop_table Generates a HTML document that shows all the VOP's in
the kernel.
-diffburst Reads the output of 'diff -r' and splits it into separate
- patch files, one per file. The files are named 'patch-XX'
- where XX is aa, ab, ac, ... Useful when creating ports.
+diffburst OBSOLETE: equivalent functionality is available via split -p.
+ For example: "cat patchfile | split -p ^diff". See split(1).
+
diff --git a/tools/tools/diffburst/Makefile b/tools/tools/diffburst/Makefile
deleted file mode 100644
index 6cec60ba256a..000000000000
--- a/tools/tools/diffburst/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= diffburst
-SRCS= main.c
-MAN1= diffburst.1
-
-COPTS+= -g -Wall
-
-.include <bsd.prog.mk>
diff --git a/tools/tools/diffburst/diffburst.1 b/tools/tools/diffburst/diffburst.1
deleted file mode 100644
index 5c2bd009b34b..000000000000
--- a/tools/tools/diffburst/diffburst.1
+++ /dev/null
@@ -1,23 +0,0 @@
-.\" $FreeBSD$
-.\"
-.Dd Jan 7, 1999
-.Dt DIFFBURST 1
-.Os BSD 4.4
-.Sh NAME
-.Nm diffburst
-.Nd split recursive diff output into separate files
-.Sh SYNOPSIS
-.Nm diffburst < input
-.Sh DESCRIPTION
-.Nm
-reads the output of a recursive diff from standard input,
-and writes it back out as a series of patchfiles, where each patchfile
-contains the diff for a single file. The files are named
-patch-aa, patch-ab, and so on.
-.Pp
-This program is intended to aid in developing
-.Fx
-ports,
-where the 'one patchfile per file' rule applies.
-.Sh AUTHORS
-.An Archie Cobbs Aq archie@whistle.com
diff --git a/tools/tools/diffburst/main.c b/tools/tools/diffburst/main.c
deleted file mode 100644
index a38e40c5e1f1..000000000000
--- a/tools/tools/diffburst/main.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <err.h>
-
-/* Split a recursive diff into sub-patches to satisfy the requirement
- that each patch only patch a single file */
-
-int
-main(int ac, char *av[])
-{
- int ln;
- char line[8192];
- char suf[2] = { 'a', 'a' };
- FILE *fp = NULL;
-
- memset(line, 0, sizeof(line));
- for (ln = 1; fgets(line, sizeof(line) - 1, stdin); ln++)
- {
- if (line[strlen(line) - 1] != '\n')
- errx(1, "line %d is too long", ln);
- if (!strncmp(line, "diff", 4) && fp != NULL)
- {
- fclose(fp);
- fp = NULL;
- }
- if (fp == NULL)
- {
- char name[200];
-
- snprintf(name, sizeof(name), "patch-%c%c", suf[0], suf[1]);
- if (suf[1]++ == 'z')
- {
- suf[1] = 'a';
- suf[0]++;
- }
- if ((fp = fopen(name, "w")) == NULL)
- err(1, "%s", name);
- }
- fprintf(fp, "%s", line);
- }
- return(0);
-}
-