Lines Matching defs:plan
63 * process the command line and create a "plan" corresponding to the
66 PLAN *
69 PLAN *plan, *tail, *new;
73 * it is, create the appropriate node type and add the new plan node
74 * to the end of the existing plan. The resulting plan is a linked
75 * list of plan nodes. For example, the string:
79 * results in the plan:
83 * in this diagram, `[-name foo]' represents the plan node generated
85 * plan->next pointer.
87 for (plan = tail = NULL; *argv;) {
90 if (plan == NULL)
91 tail = plan = new;
104 if (plan == NULL) {
106 tail = plan = new;
109 new->next = plan;
110 plan = new;
121 * the command line has been completely processed into a search plan
122 * except for the (, ), !, and -o operators. Rearrange the plan so
123 * that the portions of the plan which are affected by the operators
143 plan = paren_squish(plan); /* ()'s */
144 plan = not_squish(plan); /* !'s */
145 plan = or_squish(plan); /* -o's */
146 return (plan);
198 * take a search plan and an array of search paths and executes the plan
202 find_execute(PLAN *plan, char **paths)
204 PLAN *p;
247 * Call all the functions in the execution plan until one is
252 for (p = plan; p && (p->eval)(p, g_entry); p = p->next)
269 if ((r = find_traverse(plan, plan_cleanup, NULL)) != 0)
277 * traverse the plan tree and execute func() on all plans. This
278 * does not evaluate each plan's eval() function; it is intended
285 find_traverse(PLAN *plan, int (*func)(PLAN *, void *), void *arg)
287 PLAN *p;
291 for (p = plan; p; p = p->next) {