summaryrefslogtreecommitdiffstats
path: root/src/ctx.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-12-20 20:18:35 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-12-20 20:37:44 -0500
commit70092ae5c8f83a99fbc98dc8e2ca2eaab676a5a8 (patch)
tree3c1ff27c143258cdaa4218972b2960ef4653212a /src/ctx.h
parent9c6e4ce18304c395338c7c5b2bac9eb89583a568 (diff)
downloadbfs-70092ae5c8f83a99fbc98dc8e2ca2eaab676a5a8.tar.xz
expr: Arena-allocate expressions
Diffstat (limited to 'src/ctx.h')
-rw-r--r--src/ctx.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ctx.h b/src/ctx.h
index 75891da..aa91f2c 100644
--- a/src/ctx.h
+++ b/src/ctx.h
@@ -8,9 +8,11 @@
#ifndef BFS_CTX_H
#define BFS_CTX_H
+#include "alloc.h"
#include "bftw.h"
#include "config.h"
#include "diag.h"
+#include "expr.h"
#include "trie.h"
#include <stddef.h>
#include <sys/resource.h>
@@ -34,6 +36,10 @@ struct bfs_ctx {
struct bfs_expr *expr;
/** An expression for files to filter out. */
struct bfs_expr *exclude;
+ /** A list of allocated expressions. */
+ struct bfs_exprs expr_list;
+ /** bfs_expr arena. */
+ struct arena expr_arena;
/** -mindepth option. */
int mindepth;