summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-12-18 18:35:33 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-12-18 18:35:33 -0500
commit8fad779ae21b1052268af0befa930c75d1dd780b (patch)
tree59fe107f78d9b53f0e6d3ac59e326105a2d06230 /eval.c
parente319411a3f2f4e82f3519cc1a1f45e7153a5e2af (diff)
downloadbfs-8fad779ae21b1052268af0befa930c75d1dd780b.tar.xz
Implement BSD find's -depth N
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 123c37a..b62c1b4 100644
--- a/eval.c
+++ b/eval.c
@@ -474,6 +474,13 @@ out:
}
/**
+ * -depth N test.
+ */
+bool eval_depth(const struct expr *expr, struct eval_state *state) {
+ return do_cmp(expr, state->ftwbuf->depth);
+}
+
+/**
* -empty test.
*/
bool eval_empty(const struct expr *expr, struct eval_state *state) {