diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-21 21:57:23 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-21 21:57:23 +0000 |
commit | c24f0d3bdf8846189791c8d93da130dd90b8b57a (patch) | |
tree | fde9d5bb9af8bb154572249f336136cbd2574332 /usr.bin/diff/diff.c | |
parent | 7a40925232a1a38dee2be684d8b11624260f6d64 (diff) |
POSIX-compliant output when there are two paths w/ the same name but
one is a file and the other is a directory in -r mode (cosmetic).
Diffstat (limited to 'usr.bin/diff/diff.c')
-rw-r--r-- | usr.bin/diff/diff.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index 15c112bab53..7b762eb4932 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.28 2003/07/09 00:39:25 millert Exp $ */ +/* $OpenBSD: diff.c,v 1.29 2003/07/21 21:57:22 millert Exp $ */ /* * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -21,7 +21,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diff.c,v 1.28 2003/07/09 00:39:25 millert Exp $"; +static const char rcsid[] = "$OpenBSD: diff.c,v 1.29 2003/07/21 21:57:22 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -334,8 +334,12 @@ print_status(int val, char *path1, char *path2, char *entry) path1, entry ? entry : "", path2, entry ? entry : ""); break; - case D_MISMATCH: - printf("File %s/%s is a directory but file %s/%s is not\n", + case D_MISMATCH1: + printf("File %s/%s is a directory while file %s/%s is a file\n", + path1, entry ? entry : "", path2, entry ? entry : ""); + break; + case D_MISMATCH2: + printf("File %s/%s is a file while file %s/%s is a directory\n", path1, entry ? entry : "", path2, entry ? entry : ""); break; } |