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
sigset.c -> sigsetops.c, add sigsetops man page
[unix-history]
/
usr
/
src
/
usr.bin
/
find
/
find.c
diff --git
a/usr/src/usr.bin/find/find.c
b/usr/src/usr.bin/find/find.c
index
e7c0c71
..
69d7b2c
100644
(file)
--- a/
usr/src/usr.bin/find/find.c
+++ b/
usr/src/usr.bin/find/find.c
@@
-15,7
+15,7
@@
char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)find.c 4.
29
(Berkeley) %G%";
+static char sccsid[] = "@(#)find.c 4.
31
(Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
@@
-48,19
+48,25
@@
main(argc, argv)
usage();
paths = argv;
usage();
paths = argv;
- ftsoptions = FTS_
MULTIPLE|FTS_
NOSTAT|FTS_PHYSICAL;
+ ftsoptions = FTS_NOSTAT|FTS_PHYSICAL;
/*
/*
- * if arguments start with an option, it's new syntax; otherwise,
- * if has a "-option" anywhere it must be old syntax.
+ * if arguments start with an option, treat it like new syntax;
+ * otherwise, if has a "-option" anywhere (which isn't an argument
+ * to another command) treat it as old syntax.
*/
if (argv[1][0] != '-')
*/
if (argv[1][0] != '-')
- for (p = argv + 1; *p; ++p)
+ for (p = argv + 1; *p; ++p) {
+ if (!strcmp(*p, "exec") || !strcmp(*p, "ok")) {
+ while (p[1] && strcmp(*++p, ";"));
+ continue;
+ }
if (**p == '-') {
deprecated = 1;
oldsyntax(&argv);
break;
}
if (**p == '-') {
deprecated = 1;
oldsyntax(&argv);
break;
}
+ }
if (!deprecated)
newsyntax(argc, &argv);
if (!deprecated)
newsyntax(argc, &argv);