From c24f0d3bdf8846189791c8d93da130dd90b8b57a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 21 Jul 2003 21:57:23 +0000 Subject: 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). --- usr.bin/diff/diff.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'usr.bin/diff/diff.c') 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 @@ -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 @@ -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; } -- cgit v1.2.3