=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/diff/diff.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- src/usr.bin/diff/diff.c 2003/07/06 20:48:59 1.23 +++ src/usr.bin/diff/diff.c 2003/07/06 22:02:36 1.24 @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.23 2003/07/06 20:48:59 millert Exp $ */ +/* $OpenBSD: diff.c,v 1.24 2003/07/06 22:02:36 millert Exp $ */ /* * Copyright (c) 2003 Todd C. Miller @@ -21,7 +21,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diff.c,v 1.23 2003/07/06 20:48:59 millert Exp $"; +static const char rcsid[] = "$OpenBSD: diff.c,v 1.24 2003/07/06 22:02:36 millert Exp $"; #endif /* not lint */ #include @@ -38,13 +38,13 @@ #include "diff.h" -int aflag, bflag, iflag, Nflag, rflag, sflag, tflag, wflag; +int aflag, bflag, iflag, Nflag, Pflag, rflag, sflag, tflag, wflag; int format, context, status; char *start, *ifdefname, *diffargs; struct stat stb1, stb2; struct excludes *excludes_list; -#define OPTIONS "abC:cD:efhinNrS:stU:uwX:x:" +#define OPTIONS "abC:cD:efhinNPrS:stU:uwX:x:" static struct option longopts[] = { { "text", no_argument, 0, 'a' }, { "ignore-space-change", no_argument, 0, 'b' }, @@ -55,6 +55,7 @@ { "ignore-case", no_argument, 0, 'i' }, { "new-file", no_argument, 0, 'N' }, { "rcs", no_argument, 0, 'n' }, + { "unidirectional-new-file", no_argument, 0, 'P' }, { "recursive", no_argument, 0, 'r' }, { "report-identical-files", no_argument, 0, 's' }, { "starting-file", required_argument, 0, 'S' }, @@ -121,6 +122,9 @@ case 'n': format = D_NREVERSE; break; + case 'P': + Pflag = 1; + break; case 'r': rflag = 1; break; @@ -314,7 +318,7 @@ " diff [-bitw] -C number file1 file2\n" " diff [-bitw] -D string file1 file2\n" " diff [-bitw] -U number file1 file2\n" - " diff [-biNwt] [-c | -e | -f | -n | -u ] [-r] [-s] [-S name]" + " diff [-biNPwt] [-c | -e | -f | -n | -u ] [-r] [-s] [-S name]" " [-X file]\n [-x pattern] dir1 dir2\n"); exit(2);