summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/diffdir.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-07-06 02:11:12 +0000
committermillert <millert@openbsd.org>2003-07-06 02:11:12 +0000
commit32cb395623f72eb243f257f8e61459a9e58317b9 (patch)
treec1300ac04e972210c0b6a9a20643b63c3b967c93 /usr.bin/diff/diffdir.c
parentconvert a bunch of strn{cpy,cat}->strl{cpy,cat} (diff)
downloadwireguard-openbsd-32cb395623f72eb243f257f8e61459a9e58317b9.tar.xz
wireguard-openbsd-32cb395623f72eb243f257f8e61459a9e58317b9.zip
Use symbolic constants for output format.
Diffstat (limited to 'usr.bin/diff/diffdir.c')
-rw-r--r--usr.bin/diff/diffdir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c
index 361bbf588c3..a197b3e357d 100644
--- a/usr.bin/diff/diffdir.c
+++ b/usr.bin/diff/diffdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffdir.c,v 1.17 2003/07/04 17:50:24 millert Exp $ */
+/* $OpenBSD: diffdir.c,v 1.18 2003/07/06 02:11:12 millert Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -121,7 +121,8 @@ diffdir(char **argv)
else
cmp = strcmp(d1->d_entry, d2->d_entry);
if (cmp < 0) {
- if (opt == 0 || opt == 2)
+ if (opt == D_NORMAL || opt == D_CONTEXT ||
+ opt == D_UNIFIED)
only(d1, 1);
d1++;
dirstatus |= 1;
@@ -130,7 +131,8 @@ diffdir(char **argv)
d1++;
d2++;
} else {
- if (opt == 0 || opt == 2)
+ if (opt == D_NORMAL || opt == D_CONTEXT ||
+ opt == D_UNIFIED)
only(d2, 2);
d2++;
dirstatus |= 1;