summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-29 19:05:50 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-29 19:05:50 -0400
commitecb0f5651b779c38ef25787cd26fc9a83687badc (patch)
treee8773e22ac104da8f0e0aacdff263ba78552a3b9 /parse.c
parentfda29616c7af6b6e2a79c596cc01123a2d68ee02 (diff)
downloadbfs-ecb0f5651b779c38ef25787cd26fc9a83687badc.tar.xz
Implement an iterative deepening mode (-ids)
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 7d98ffe..b8ef413 100644
--- a/parse.c
+++ b/parse.c
@@ -2150,7 +2150,7 @@ static struct expr *parse_samefile(struct parser_state *state, int arg1, int arg
}
/**
- * Parse -bfs, -dfs.
+ * Parse -bfs, -dfs, -ids.
*/
static struct expr *parse_search_strategy(struct parser_state *state, int strategy, int arg2) {
struct cmdline *cmdline = state->cmdline;
@@ -2660,6 +2660,7 @@ static const struct table_entry parse_table[] = {
{"-group", false, parse_group},
{"-help", false, parse_help},
{"-hidden", false, parse_hidden},
+ {"-ids", false, parse_search_strategy, BFTW_IDS},
{"-ignore_readdir_race", false, parse_ignore_races, true},
{"-ilname", false, parse_lname, true},
{"-iname", false, parse_name, true},
@@ -3049,6 +3050,9 @@ void dump_cmdline(const struct cmdline *cmdline, bool verbose) {
case BFTW_DFS:
cfprintf(cerr, "${cyn}-dfs${rs} ");
break;
+ case BFTW_IDS:
+ cfprintf(cerr, "${cyn}-ids${rs} ");
+ break;
}
if (cmdline->flags & BFTW_LOGICAL) {