summaryrefslogtreecommitdiffstats
path: root/eval.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-09-27 12:55:55 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-09-27 13:23:49 -0400
commit62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc (patch)
treec770ff13f37023cae132108b29077a904e6d4dfb /eval.h
parent3c83bf4e1920be909f65945e56dc8b779c472a59 (diff)
downloadbfs-62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc.tar.xz
Rename struct cmdline to bfs_ctx
The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index a95c3ac..9a1885b 100644
--- a/eval.h
+++ b/eval.h
@@ -22,9 +22,21 @@
#ifndef BFS_EVAL_H
#define BFS_EVAL_H
+#include "ctx.h"
#include "expr.h"
+/**
+ * Evaluate the command line.
+ *
+ * @param ctx
+ * The bfs context to evaluate.
+ * @return
+ * EXIT_SUCCESS on success, otherwise on failure.
+ */
+int bfs_eval(const struct bfs_ctx *ctx);
+
// Predicate evaluation functions
+
bool eval_true(const struct expr *expr, struct eval_state *state);
bool eval_false(const struct expr *expr, struct eval_state *state);