Home | History | Annotate | Download | only in find

Lines Matching refs:plan

52 static PLAN *yanknode(PLAN **);
53 static PLAN *yankexpr(PLAN **);
57 * destructively removes the top from the plan
59 static PLAN *
60 yanknode(PLAN **planp) /* pointer to top of plan (modified) */
62 PLAN *node; /* top node removed from the plan */
73 * Removes one expression from the plan. This is used mainly by
77 static PLAN *
78 yankexpr(PLAN **planp) /* pointer to top of plan (modified) */
80 PLAN *next; /* temp node holding subexpression results */
81 PLAN *node; /* pointer to returned node or expression */
82 PLAN *tail; /* pointer to tail of subplan */
83 PLAN *subplan; /* pointer to head of ( ) expression */
85 /* first pull the top node from the plan */
128 * replaces "parentheisized" plans in our search plan with "expr" nodes.
130 PLAN *
131 paren_squish(PLAN *plan) /* plan with ( ) nodes */
133 PLAN *expr; /* pointer to next expression */
134 PLAN *tail; /* pointer to tail of result plan */
135 PLAN *result; /* pointer to head of result plan */
143 while ((expr = yankexpr(&plan)) != NULL) {
151 /* add the expression to our result plan */
165 * compresses "!" expressions in our search plan.
167 PLAN *
168 not_squish(PLAN *plan) /* plan to process */
170 PLAN *next; /* next node being processed */
171 PLAN *node; /* temporary node used in N_NOT processing */
172 PLAN *tail; /* pointer to tail of result plan */
173 PLAN *result; /* pointer to head of result plan */
177 while ((next = yanknode(&plan)) != NULL) {
193 node = yanknode(&plan);
196 node = yanknode(&plan);
210 /* add the node to our result plan */
224 * compresses -o expressions in our search plan.
226 PLAN *
227 or_squish(PLAN *plan) /* plan with ors to be squished */
229 PLAN *next; /* next node being processed */
230 PLAN *tail; /* pointer to tail of result plan */
231 PLAN *result; /* pointer to head of result plan */
235 while ((next = yanknode(&plan)) != NULL) {
248 * if we encounter an or, then place our collected plan in the
256 next->p_data[1] = or_squish(plan);
262 /* add the node to our result plan */