diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-12-18 12:38:19 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-12-18 13:19:04 -0500 |
commit | 4b9592f93a68f88152b390898004e5e54b540cae (patch) | |
tree | 18930e6373e5e75aa2999f405971d7a29e4eebc8 /bfs.h | |
parent | 2ebbe75a8d272458cd3229b6033b2a5ce19b105b (diff) | |
download | bfs-4b9592f93a68f88152b390898004e5e54b540cae.tar.xz |
Implement -regex, -iregex, and -regextype/-E
Diffstat (limited to 'bfs.h')
-rw-r--r-- | bfs.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |