From 52e5bd6b2a3d4d3aa0fc9fae85991484eb9a66f0 Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 22 Jul 2003 00:20:40 +0000 Subject: Historically, when comparing two directories in -e mode, BSD diff printed a header that turned the output into an actual script that called ed(1) to make the changes. This conflicts with POSIX so the header has been removed and the standard diff header is used instead. --- usr.bin/diff/diffreg.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'usr.bin/diff/diffreg.c') diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index aa07122fc86..7f2eda06521 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.39 2003/07/22 00:15:55 millert Exp $ */ +/* $OpenBSD: diffreg.c,v 1.40 2003/07/22 00:20:40 millert Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -65,7 +65,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.39 2003/07/22 00:15:55 millert Exp $"; +static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.40 2003/07/22 00:20:40 millert Exp $"; #endif /* not lint */ #include @@ -76,7 +76,6 @@ static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.39 2003/07/22 00:15:55 mill #include #include #include -#include #include #include #include @@ -397,15 +396,8 @@ notsame: rewind(stdout); free(header); } - } else { - if (flags & D_HEADER) { - if (format == D_EDIT) - printf("ed - %s << '-*-END-*-'\n", - basename(file1)); - else - printf("%s %s %s\n", diffargs, file1, file2); - } - } + } else if (flags & D_HEADER) + printf("%s %s %s\n", diffargs, file1, file2); prepare(0, f1); prepare(1, f2); prune(); @@ -447,8 +439,7 @@ notsame: close(ostdout); } waitpid(pid, &wstatus, 0); - } else if ((flags & D_HEADER) && format == D_EDIT) - printf("w\nq\n-*-END-*-\n"); + } closem: if (f1 != NULL) fclose(f1); -- cgit v1.2.3-59-g8ed1b