From cab5d83c9d6e6ab1ee51c5ad293daabd8930d5f9 Mon Sep 17 00:00:00 2001 From: millert Date: Sun, 6 Jul 2003 22:17:21 +0000 Subject: Add -q option from GNU diff --- usr.bin/diff/diffreg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.bin/diff/diffreg.c') diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 3a5852125e5..4e15c6b8ac1 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.27 2003/07/06 20:48:59 millert Exp $ */ +/* $OpenBSD: diffreg.c,v 1.28 2003/07/06 22:17:21 millert Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -65,7 +65,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.27 2003/07/06 20:48:59 millert Exp $"; +static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.28 2003/07/06 22:17:21 millert Exp $"; #endif /* not lint */ #include @@ -340,6 +340,10 @@ notsame: * Files certainly differ at this point; set status accordingly */ status |= 1; + if (format == D_BRIEF) { + printf("Files %s and %s differ\n", file1, file2); + goto closem; + } if (flags & D_HEADER) { if (format == D_EDIT) printf("ed - %s << '-*-END-*-'\n", basename(file1)); -- cgit v1.2.3-59-g8ed1b