1/*-
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Cimarron D. Taylor of the University of California, Berkeley.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 27 unchanged lines hidden (view full) ---
36
37#ifndef lint
38#if 0
39static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94";
40#else
41#endif
42#endif /* not lint */
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/usr.bin/find/find.c 97736 2002-06-02 12:57:41Z tjr $");
45
46#include <sys/types.h>
47#include <sys/stat.h>
48
49#include <err.h>
50#include <errno.h>
51#include <fts.h>
52#include <regex.h>
--- 177 unchanged lines hidden (view full) ---
230 for (p = plan; p && (p->execute)(p, entry); p = p->next);
231
232 if (maxdepth != -1 && entry->fts_level >= maxdepth) {
233 if (fts_set(tree, entry, FTS_SKIP))
234 err(1, "%s", entry->fts_path);
235 continue;
236 }
237 }
238 /* Finish any pending -exec ... {} + functions. */
239 for (p = plan; p != NULL; p = p->next)
240 if (p->execute == f_exec && p->flags & F_EXECPLUS)
241 (p->execute)(p, NULL);
242 if (errno)
243 err(1, "fts_read");
244 return (rval);
245}
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Cimarron D. Taylor of the University of California, Berkeley.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 27 unchanged lines hidden (view full) ---
36
37#ifndef lint
38#if 0
39static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94";
40#else
41#endif
42#endif /* not lint */
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/usr.bin/find/find.c 97736 2002-06-02 12:57:41Z tjr $");
45
46#include <sys/types.h>
47#include <sys/stat.h>
48
49#include <err.h>
50#include <errno.h>
51#include <fts.h>
52#include <regex.h>
--- 177 unchanged lines hidden (view full) ---
230 for (p = plan; p && (p->execute)(p, entry); p = p->next);
231
232 if (maxdepth != -1 && entry->fts_level >= maxdepth) {
233 if (fts_set(tree, entry, FTS_SKIP))
234 err(1, "%s", entry->fts_path);
235 continue;
236 }
237 }
238 /* Finish any pending -exec ... {} + functions. */
239 for (p = plan; p != NULL; p = p->next)
240 if (p->execute == f_exec && p->flags & F_EXECPLUS)
241 (p->execute)(p, NULL);
242 if (errno)
243 err(1, "fts_read");
244 return (rval);
245}