projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_3_Reno release
[unix-history]
/
usr
/
src
/
usr.bin
/
diff
/
diff
/
diff.c
diff --git
a/usr/src/usr.bin/diff/diff/diff.c
b/usr/src/usr.bin/diff/diff/diff.c
index
0f937ee
..
ddab61f
100644
(file)
--- a/
usr/src/usr.bin/diff/diff/diff.c
+++ b/
usr/src/usr.bin/diff/diff/diff.c
@@
-1,13
+1,15
@@
-static char sccsid[] = "@(#)diff.c 4.
4 %G%
";
+static char sccsid[] = "@(#)diff.c 4.
7 5/11/89
";
#include "diff.h"
#include "diff.h"
+#include "pathnames.h"
+
/*
* diff - driver and subroutines
*/
/*
* diff - driver and subroutines
*/
-char diff[] = DIFF;
-char diffh[] = DIFFH;
-char pr[] = PR;
+char diff[] =
_PATH_
DIFF;
+char diffh[] =
_PATH_
DIFFH;
+char pr[] =
_PATH_
PR;
main(argc, argv)
int argc;
main(argc, argv)
int argc;
@@
-57,6
+59,9
@@
main(argc, argv)
case 'f':
opt = D_REVERSE;
continue;
case 'f':
opt = D_REVERSE;
continue;
+ case 'n':
+ opt = D_NREVERSE;
+ continue;
case 'b':
bflag = 1;
continue;
case 'b':
bflag = 1;
continue;
@@
-118,7
+123,7
@@
main(argc, argv)
file2 = argv[1];
if (hflag && opt) {
fprintf(stderr,
file2 = argv[1];
if (hflag && opt) {
fprintf(stderr,
- "diff: -h doesn't support -e, -f, -c, or -I\n");
+ "diff: -h doesn't support -e, -f, -
n, -
c, or -I\n");
done();
}
if (!strcmp(file1, "-"))
done();
}
if (!strcmp(file1, "-"))
@@
-173,7
+178,8
@@
max(a,b)
done()
{
done()
{
- unlink(tempfile);
+ if (tempfile)
+ unlink(tempfile);
exit(status);
}
exit(status);
}