Symbol: plan
usr.bin/find/find.c
100
new->next = plan;
usr.bin/find/find.c
101
plan = new;
usr.bin/find/find.c
134
plan = paren_squish(plan); /* ()'s */
usr.bin/find/find.c
135
plan = not_squish(plan); /* !'s */
usr.bin/find/find.c
136
plan = or_squish(plan); /* -o's */
usr.bin/find/find.c
137
return (plan);
usr.bin/find/find.c
151
find_execute(PLAN *plan, /* search plan */
usr.bin/find/find.c
223
for (p = plan; p && (p->eval)(p, entry); p = p->next)
usr.bin/find/find.c
232
if ((r = find_traverse(plan, plan_cleanup, NULL)) != 0)
usr.bin/find/find.c
247
find_traverse(PLAN *plan, int (*func)(PLAN *, void *), void *arg)
usr.bin/find/find.c
253
for (p = plan; p; p = p->next) {
usr.bin/find/find.c
59
PLAN *plan, *tail, *new;
usr.bin/find/find.c
77
for (plan = tail = NULL; *argv;) {
usr.bin/find/find.c
80
if (plan == NULL)
usr.bin/find/find.c
81
tail = plan = new;
usr.bin/find/find.c
95
if (plan == NULL) {
usr.bin/find/find.c
97
tail = plan = new;
usr.bin/find/function.c
1002
f_links(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1004
COMPARE(entry->fts_statp->st_nlink, plan->l_data);
usr.bin/find/function.c
1029
f_ls(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1051
f_maxdepth(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1054
if (entry->fts_level >= plan->max_data)
usr.bin/find/function.c
1056
return (entry->fts_level <= plan->max_data);
usr.bin/find/function.c
1079
f_mindepth(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1082
return (entry->fts_level >= plan->min_data);
usr.bin/find/function.c
1105
f_mtime(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1109
SECSPERDAY, plan->sec_data);
usr.bin/find/function.c
1132
f_mmin(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1137
60, plan->sec_data);
usr.bin/find/function.c
1160
f_name(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1162
return (!fnmatch(plan->c_data, entry->fts_name, 0));
usr.bin/find/function.c
1182
f_iname(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1184
return (!fnmatch(plan->c_data, entry->fts_name, FNM_CASEFOLD));
usr.bin/find/function.c
1205
f_newer(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1208
return (entry->fts_statp->st_mtim.tv_sec > plan->t_data.tv_sec ||
usr.bin/find/function.c
1209
(entry->fts_statp->st_mtim.tv_sec == plan->t_data.tv_sec &&
usr.bin/find/function.c
1210
entry->fts_statp->st_mtim.tv_nsec > plan->t_data.tv_nsec));
usr.bin/find/function.c
122
find_parsenum(PLAN *plan, char *option, char *vp, char *endch)
usr.bin/find/function.c
1236
f_anewer(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1239
return (entry->fts_statp->st_atim.tv_sec > plan->t_data.tv_sec ||
usr.bin/find/function.c
1240
(entry->fts_statp->st_atim.tv_sec == plan->t_data.tv_sec &&
usr.bin/find/function.c
1241
entry->fts_statp->st_atim.tv_nsec > plan->t_data.tv_nsec));
usr.bin/find/function.c
1267
f_cnewer(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1270
return (entry->fts_statp->st_ctim.tv_sec > plan->t_data.tv_sec ||
usr.bin/find/function.c
1271
(entry->fts_statp->st_ctim.tv_sec == plan->t_data.tv_sec &&
usr.bin/find/function.c
1272
entry->fts_statp->st_ctim.tv_nsec > plan->t_data.tv_nsec));
usr.bin/find/function.c
1297
f_nogroup(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1317
f_nouser(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
132
plan->flags = F_GREATER;
usr.bin/find/function.c
1337
f_path(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1339
return (!fnmatch(plan->c_data, entry->fts_path, 0));
usr.bin/find/function.c
136
plan->flags = F_LESSTHAN;
usr.bin/find/function.c
1360
f_perm(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1366
if (plan->flags == F_ATLEAST)
usr.bin/find/function.c
1367
return ((plan->m_data | mode) == mode);
usr.bin/find/function.c
1369
return (mode == plan->m_data);
usr.bin/find/function.c
139
plan->flags = F_EQUAL;
usr.bin/find/function.c
1403
f_print(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1410
f_print0(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1439
f_prune(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1464
f_size(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1470
COMPARE(size, plan->o_data);
usr.bin/find/function.c
1497
f_type(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1499
return ((entry->fts_statp->st_mode & S_IFMT) == plan->m_data);
usr.bin/find/function.c
1549
f_user(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1551
return (entry->fts_statp->st_uid == plan->u_data);
usr.bin/find/function.c
1595
f_expr(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1600
for (p = plan->p_data[0];
usr.bin/find/function.c
1628
f_not(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1633
for (p = plan->p_data[0];
usr.bin/find/function.c
1651
f_or(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
1656
for (p = plan->p_data[0];
usr.bin/find/function.c
1662
for (p = plan->p_data[1];
usr.bin/find/function.c
1684
plan_cleanup(PLAN *plan, void *arg)
usr.bin/find/function.c
1686
if (plan->type==N_EXEC && plan->ep_narg)
usr.bin/find/function.c
1687
run_f_exec(plan);
usr.bin/find/function.c
1689
return plan->ep_rval; /* Passed save exit-status up chain */
usr.bin/find/function.c
175
f_amin(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
180
60 - 1) / 60, plan->sec_data);
usr.bin/find/function.c
203
f_atime(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
207
SECSPERDAY - 1) / SECSPERDAY, plan->sec_data);
usr.bin/find/function.c
230
f_cmin(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
235
60 - 1) / 60, plan->sec_data);
usr.bin/find/function.c
258
f_ctime(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
262
SECSPERDAY - 1) / SECSPERDAY, plan->sec_data);
usr.bin/find/function.c
286
f_always_true(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
303
f_delete(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
362
f_empty(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
418
f_exec(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
424
if (plan->flags & F_PLUSSET) {
usr.bin/find/function.c
430
if (plan->ep_p + l < plan->ep_ebp) {
usr.bin/find/function.c
431
plan->ep_bxp[plan->ep_narg++] = plan->ep_p;
usr.bin/find/function.c
432
strlcpy(plan->ep_p, entry->fts_path, l + 1);
usr.bin/find/function.c
433
plan->ep_p += l + 1;
usr.bin/find/function.c
435
if (plan->ep_narg == plan->ep_maxargs)
usr.bin/find/function.c
436
run_f_exec(plan);
usr.bin/find/function.c
443
run_f_exec(plan);
usr.bin/find/function.c
444
if (plan->ep_p + l < plan->ep_ebp) {
usr.bin/find/function.c
445
plan->ep_bxp[plan->ep_narg++] = plan->ep_p;
usr.bin/find/function.c
446
strlcpy(plan->ep_p, entry->fts_path, l + 1);
usr.bin/find/function.c
447
plan->ep_p += l + 1;
usr.bin/find/function.c
453
for (cnt = 0; plan->e_argv[cnt]; ++cnt)
usr.bin/find/function.c
454
if (plan->e_len[cnt])
usr.bin/find/function.c
455
brace_subst(plan->e_orig[cnt],
usr.bin/find/function.c
456
&plan->e_argv[cnt],
usr.bin/find/function.c
458
plan->e_len[cnt]);
usr.bin/find/function.c
459
if (plan->flags & F_NEEDOK && !queryuser(plan->e_argv))
usr.bin/find/function.c
475
execvp(plan->e_argv[0], plan->e_argv);
usr.bin/find/function.c
476
warn("%s", plan->e_argv[0]);
usr.bin/find/function.c
485
run_f_exec(PLAN *plan)
usr.bin/find/function.c
491
plan->ep_bxp[plan->ep_narg] = NULL;
usr.bin/find/function.c
506
execvp(plan->e_argv[0], plan->e_argv);
usr.bin/find/function.c
507
warn("%s", plan->e_argv[0]);
usr.bin/find/function.c
512
plan->ep_narg = 0;
usr.bin/find/function.c
513
plan->ep_bxp[plan->ep_narg] = NULL;
usr.bin/find/function.c
515
plan->ep_p = plan->ep_bbp;
usr.bin/find/function.c
516
*plan->ep_p = '\0';
usr.bin/find/function.c
529
plan->ep_rval = rval;
usr.bin/find/function.c
58
switch (plan->flags) { \
usr.bin/find/function.c
675
f_execdir(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
697
for (cnt = 0; plan->e_argv[cnt]; ++cnt)
usr.bin/find/function.c
698
if (plan->e_len[cnt])
usr.bin/find/function.c
699
brace_subst(plan->e_orig[cnt], &plan->e_argv[cnt],
usr.bin/find/function.c
700
base, plan->e_len[cnt]);
usr.bin/find/function.c
71
static long long find_parsenum(PLAN *plan, char *option, char *vp, char *endch);
usr.bin/find/function.c
711
execvp(plan->e_argv[0], plan->e_argv);
usr.bin/find/function.c
712
warn("%s", plan->e_argv[0]);
usr.bin/find/function.c
72
static void run_f_exec(PLAN *plan);
usr.bin/find/function.c
787
f_flags(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
794
if (plan->flags == F_ATLEAST)
usr.bin/find/function.c
797
return ((flags & plan->fl_mask) == plan->fl_flags);
usr.bin/find/function.c
799
return (flags == plan->fl_flags);
usr.bin/find/function.c
847
f_fstype(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
895
switch (plan->flags) {
usr.bin/find/function.c
897
return (val & plan->mt_data);
usr.bin/find/function.c
899
return (strncmp(fstype, plan->c_data, MFSNAMELEN) == 0);
usr.bin/find/function.c
943
f_group(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
945
return (entry->fts_statp->st_gid == plan->g_data);
usr.bin/find/function.c
975
f_inum(PLAN *plan, FTSENT *entry)
usr.bin/find/function.c
977
COMPARE(entry->fts_statp->st_ino, plan->i_data);
usr.bin/find/operator.c
122
paren_squish(PLAN *plan) /* plan with ( ) nodes */
usr.bin/find/operator.c
134
while ((expr = yankexpr(&plan)) != NULL) {
usr.bin/find/operator.c
159
not_squish(PLAN *plan) /* plan to process */
usr.bin/find/operator.c
168
while ((next = yanknode(&plan)) != NULL) {
usr.bin/find/operator.c
184
node = yanknode(&plan);
usr.bin/find/operator.c
187
node = yanknode(&plan);
usr.bin/find/operator.c
218
or_squish(PLAN *plan) /* plan with ors to be squished */
usr.bin/find/operator.c
226
while ((next = yanknode(&plan)) != NULL) {
usr.bin/find/operator.c
247
next->p_data[1] = or_squish(plan);
usr.sbin/ldapd/filter.c
116
ldap_filt_subs(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
121
if (plan->undefined)
usr.sbin/ldapd/filter.c
123
else if (plan->adesc != NULL)
usr.sbin/ldapd/filter.c
124
a = ldap_get_attribute(root, plan->adesc);
usr.sbin/ldapd/filter.c
126
a = ldap_find_attribute(root, plan->at);
usr.sbin/ldapd/filter.c
129
plan->adesc ? plan->adesc : ATTR_NAME(plan->at));
usr.sbin/ldapd/filter.c
140
switch (ldap_filt_subs_value(v, plan->assert.substring)) {
usr.sbin/ldapd/filter.c
155
ldap_filt_and(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
157
struct plan *arg;
usr.sbin/ldapd/filter.c
159
TAILQ_FOREACH(arg, &plan->args, next)
usr.sbin/ldapd/filter.c
167
ldap_filt_or(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
169
struct plan *arg;
usr.sbin/ldapd/filter.c
171
TAILQ_FOREACH(arg, &plan->args, next)
usr.sbin/ldapd/filter.c
179
ldap_filt_not(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
181
struct plan *arg;
usr.sbin/ldapd/filter.c
183
TAILQ_FOREACH(arg, &plan->args, next)
usr.sbin/ldapd/filter.c
191
ldap_filt_presence(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
195
if (plan->undefined)
usr.sbin/ldapd/filter.c
197
else if (plan->adesc != NULL)
usr.sbin/ldapd/filter.c
198
a = ldap_get_attribute(root, plan->adesc);
usr.sbin/ldapd/filter.c
200
a = ldap_find_attribute(root, plan->at);
usr.sbin/ldapd/filter.c
203
plan->adesc ? plan->adesc : ATTR_NAME(plan->at));
usr.sbin/ldapd/filter.c
211
ldap_matches_filter(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
213
if (plan == NULL)
usr.sbin/ldapd/filter.c
216
switch (plan->op) {
usr.sbin/ldapd/filter.c
219
return ldap_filt_eq(root, plan);
usr.sbin/ldapd/filter.c
221
return ldap_filt_subs(root, plan);
usr.sbin/ldapd/filter.c
223
return ldap_filt_and(root, plan);
usr.sbin/ldapd/filter.c
225
return ldap_filt_or(root, plan);
usr.sbin/ldapd/filter.c
227
return ldap_filt_not(root, plan);
usr.sbin/ldapd/filter.c
229
return ldap_filt_presence(root, plan);
usr.sbin/ldapd/filter.c
231
log_warnx("filter type %d not implemented", plan->op);
usr.sbin/ldapd/filter.c
28
static int ldap_filt_eq(struct ber_element *root, struct plan *plan);
usr.sbin/ldapd/filter.c
29
static int ldap_filt_subs(struct ber_element *root, struct plan *plan);
usr.sbin/ldapd/filter.c
30
static int ldap_filt_and(struct ber_element *root, struct plan *plan);
usr.sbin/ldapd/filter.c
31
static int ldap_filt_or(struct ber_element *root, struct plan *plan);
usr.sbin/ldapd/filter.c
32
static int ldap_filt_not(struct ber_element *root, struct plan *plan);
usr.sbin/ldapd/filter.c
35
ldap_filt_eq(struct ber_element *root, struct plan *plan)
usr.sbin/ldapd/filter.c
40
if (plan->undefined)
usr.sbin/ldapd/filter.c
42
else if (plan->adesc != NULL)
usr.sbin/ldapd/filter.c
43
a = ldap_get_attribute(root, plan->adesc);
usr.sbin/ldapd/filter.c
45
a = ldap_find_attribute(root, plan->at);
usr.sbin/ldapd/filter.c
48
plan->adesc ? plan->adesc : ATTR_NAME(plan->at));
usr.sbin/ldapd/filter.c
59
if (strcasecmp(plan->assert.value, vs) == 0)
usr.sbin/ldapd/ldapd.h
151
TAILQ_ENTRY(plan) next;
usr.sbin/ldapd/ldapd.h
152
TAILQ_HEAD(, plan) args;
usr.sbin/ldapd/ldapd.h
194
struct plan *plan;
usr.sbin/ldapd/ldapd.h
436
struct plan *plan);
usr.sbin/ldapd/search.c
1000
add_index(search->plan, "@%.*s,", sz, search->basedn);
usr.sbin/ldapd/search.c
1003
if (!search->plan->indexed)
usr.sbin/ldapd/search.c
196
filter_free(search->plan);
usr.sbin/ldapd/search.c
250
if (ldap_matches_filter(elm, search->plan) != 0) {
usr.sbin/ldapd/search.c
309
if (search->plan->indexed)
usr.sbin/ldapd/search.c
322
if (search->plan->indexed) {
usr.sbin/ldapd/search.c
323
search->cindx = TAILQ_FIRST(&search->plan->indices);
usr.sbin/ldapd/search.c
34
void filter_free(struct plan *filter);
usr.sbin/ldapd/search.c
345
if (rc == BT_SUCCESS && search->plan->indexed) {
usr.sbin/ldapd/search.c
360
search->plan->indexed > 1) {
usr.sbin/ldapd/search.c
384
if (search->plan->indexed) {
usr.sbin/ldapd/search.c
407
if (search->plan->indexed > 1 && is_dup(search, &key)) {
usr.sbin/ldapd/search.c
437
if (search->plan->indexed)
usr.sbin/ldapd/search.c
448
if (rc == BT_SUCCESS && search->plan->indexed > 1)
usr.sbin/ldapd/search.c
633
add_index(struct plan *plan, const char *fmt, ...)
usr.sbin/ldapd/search.c
652
TAILQ_INSERT_TAIL(&plan->indices, indx, next);
usr.sbin/ldapd/search.c
653
plan->indexed++;
usr.sbin/ldapd/search.c
659
plan_get_attr(struct plan *plan, struct namespace *ns, char *attr)
usr.sbin/ldapd/search.c
667
plan->at = lookup_attribute(conf->schema, "name");
usr.sbin/ldapd/search.c
668
plan->adesc = attr;
usr.sbin/ldapd/search.c
670
plan->at = lookup_attribute(conf->schema, attr);
usr.sbin/ldapd/search.c
672
if (plan->at == NULL) {
usr.sbin/ldapd/search.c
680
static struct plan *
usr.sbin/ldapd/search.c
688
struct plan *plan, *arg = NULL;
usr.sbin/ldapd/search.c
695
if ((plan = calloc(1, sizeof(*plan))) == NULL) {
usr.sbin/ldapd/search.c
699
plan->op = filter->be_type;
usr.sbin/ldapd/search.c
700
TAILQ_INIT(&plan->args);
usr.sbin/ldapd/search.c
701
TAILQ_INIT(&plan->indices);
usr.sbin/ldapd/search.c
708
if (plan_get_attr(plan, ns, attr) == -1)
usr.sbin/ldapd/search.c
709
plan->undefined = 1;
usr.sbin/ldapd/search.c
710
else if (plan->at->equality == NULL) {
usr.sbin/ldapd/search.c
713
plan->undefined = 1;
usr.sbin/ldapd/search.c
715
plan->assert.value = s;
usr.sbin/ldapd/search.c
717
add_index(plan, "%s=%s,", attr, s);
usr.sbin/ldapd/search.c
722
&attr, &plan->assert.substring, &class, &type, &s) != 0)
usr.sbin/ldapd/search.c
724
if (plan_get_attr(plan, ns, attr) == -1)
usr.sbin/ldapd/search.c
725
plan->undefined = 1;
usr.sbin/ldapd/search.c
726
else if (plan->at->substr == NULL) {
usr.sbin/ldapd/search.c
729
plan->undefined = 1;
usr.sbin/ldapd/search.c
734
add_index(plan, "%s=%s", attr, s);
usr.sbin/ldapd/search.c
740
if (plan_get_attr(plan, ns, attr) == -1)
usr.sbin/ldapd/search.c
741
plan->undefined = 1;
usr.sbin/ldapd/search.c
744
add_index(plan, "%s=", attr);
usr.sbin/ldapd/search.c
754
plan->undefined = 1;
usr.sbin/ldapd/search.c
757
TAILQ_INSERT_TAIL(&plan->args, arg, next);
usr.sbin/ldapd/search.c
761
if (plan->undefined)
usr.sbin/ldapd/search.c
765
TAILQ_FOREACH(arg, &plan->args, next) {
usr.sbin/ldapd/search.c
767
TAILQ_CONCAT(&plan->indices, &arg->indices,
usr.sbin/ldapd/search.c
769
plan->indexed = arg->indexed;
usr.sbin/ldapd/search.c
780
TAILQ_INSERT_TAIL(&plan->args, arg, next);
usr.sbin/ldapd/search.c
784
plan->undefined = 1;
usr.sbin/ldapd/search.c
785
TAILQ_FOREACH(arg, &plan->args, next)
usr.sbin/ldapd/search.c
787
plan->undefined = 0;
usr.sbin/ldapd/search.c
791
TAILQ_FOREACH(arg, &plan->args, next) {
usr.sbin/ldapd/search.c
793
plan->indexed = 0;
usr.sbin/ldapd/search.c
797
plan->indexed++;
usr.sbin/ldapd/search.c
798
TAILQ_CONCAT(&plan->indices, &arg->indices, next);
usr.sbin/ldapd/search.c
806
TAILQ_INSERT_TAIL(&plan->args, arg, next);
usr.sbin/ldapd/search.c
808
plan->undefined = arg->undefined;
usr.sbin/ldapd/search.c
809
if (plan->indexed) {
usr.sbin/ldapd/search.c
811
plan->indexed = 0;
usr.sbin/ldapd/search.c
817
plan->undefined = 1;
usr.sbin/ldapd/search.c
821
return plan;
usr.sbin/ldapd/search.c
824
free(plan);
usr.sbin/ldapd/search.c
829
filter_free(struct plan *filter)
usr.sbin/ldapd/search.c
832
struct plan *arg;
usr.sbin/ldapd/search.c
983
search->plan = search_planner(search->ns, search->filter);
usr.sbin/ldapd/search.c
984
if (search->plan == NULL) {
usr.sbin/ldapd/search.c
989
if (search->plan->undefined) {
usr.sbin/ldapd/search.c
995
if (!search->plan->indexed && search->scope == LDAP_SCOPE_ONELEVEL) {