summaryrefslogtreecommitdiffstats
path: root/bfs.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-12-18 12:38:19 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-12-18 13:19:04 -0500
commit4b9592f93a68f88152b390898004e5e54b540cae (patch)
tree18930e6373e5e75aa2999f405971d7a29e4eebc8 /bfs.h
parent2ebbe75a8d272458cd3229b6033b2a5ce19b105b (diff)
downloadbfs-4b9592f93a68f88152b390898004e5e54b540cae.tar.xz
Implement -regex, -iregex, and -regextype/-E
Diffstat (limited to 'bfs.h')
-rw-r--r--bfs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfs.h b/bfs.h
index c8b4255..732a6c5 100644
--- a/bfs.h
+++ b/bfs.h
@@ -13,6 +13,7 @@
#define BFS_H
#include "color.h"
+#include <regex.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
@@ -240,6 +241,9 @@ struct expr {
/** Optional -exec flags. */
enum exec_flags exec_flags;
+ /** Optional compiled regex. */
+ regex_t *regex;
+
/** Optional integer data for this expression. */
long long idata;
@@ -293,6 +297,7 @@ bool eval_xtype(const struct expr *expr, struct eval_state *state);
bool eval_lname(const struct expr *expr, struct eval_state *state);
bool eval_name(const struct expr *expr, struct eval_state *state);
bool eval_path(const struct expr *expr, struct eval_state *state);
+bool eval_regex(const struct expr *expr, struct eval_state *state);
bool eval_delete(const struct expr *expr, struct eval_state *state);
bool eval_exec(const struct expr *expr, struct eval_state *state);