[BACK]Return to operator.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / find

Diff for /src/usr.bin/find/operator.c between version 1.7 and 1.8

version 1.7, 2003/06/03 02:56:08 version 1.8, 2003/06/26 07:27:29
Line 45 
Line 45 
 #include <stdio.h>  #include <stdio.h>
   
 #include "find.h"  #include "find.h"
   #include "extern.h"
   
 /*  /*
  * yanknode --   * yanknode --
  *      destructively removes the top from the plan   *      destructively removes the top from the plan
  */   */
 static PLAN *  static PLAN *
 yanknode(planp)  yanknode(PLAN **planp)          /* pointer to top of plan (modified) */
         PLAN **planp;           /* pointer to top of plan (modified) */  
 {  {
         PLAN *node;             /* top node removed from the plan */          PLAN *node;             /* top node removed from the plan */
   
Line 70 
Line 70 
  *      simple node or a N_EXPR node containing a list of simple nodes.   *      simple node or a N_EXPR node containing a list of simple nodes.
  */   */
 static PLAN *  static PLAN *
 yankexpr(planp)  yankexpr(PLAN **planp)          /* pointer to top of plan (modified) */
         PLAN **planp;           /* pointer to top of plan (modified) */  
 {  {
         PLAN *next;     /* temp node holding subexpression results */          PLAN *next;     /* temp node holding subexpression results */
         PLAN *node;             /* pointer to returned node or expression */          PLAN *node;             /* pointer to returned node or expression */
         PLAN *tail;             /* pointer to tail of subplan */          PLAN *tail;             /* pointer to tail of subplan */
         PLAN *subplan;          /* pointer to head of ( ) expression */          PLAN *subplan;          /* pointer to head of ( ) expression */
         int f_expr();          extern int f_expr(PLAN *, FTSENT *);
   
         /* first pull the top node from the plan */          /* first pull the top node from the plan */
         if ((node = yanknode(planp)) == NULL)          if ((node = yanknode(planp)) == NULL)
Line 125 
Line 124 
  *      replaces "parentheisized" plans in our search plan with "expr" nodes.   *      replaces "parentheisized" plans in our search plan with "expr" nodes.
  */   */
 PLAN *  PLAN *
 paren_squish(plan)  paren_squish(PLAN *plan)                /* plan with ( ) nodes */
         PLAN *plan;             /* plan with ( ) nodes */  
 {  {
         PLAN *expr;     /* pointer to next expression */          PLAN *expr;     /* pointer to next expression */
         PLAN *tail;     /* pointer to tail of result plan */          PLAN *tail;     /* pointer to tail of result plan */
Line 163 
Line 161 
  *      compresses "!" expressions in our search plan.   *      compresses "!" expressions in our search plan.
  */   */
 PLAN *  PLAN *
 not_squish(plan)  not_squish(PLAN *plan)          /* plan to process */
         PLAN *plan;             /* plan to process */  
 {  {
         PLAN *next;     /* next node being processed */          PLAN *next;     /* next node being processed */
         PLAN *node;     /* temporary node used in N_NOT processing */          PLAN *node;     /* temporary node used in N_NOT processing */
Line 223 
Line 220 
  *      compresses -o expressions in our search plan.   *      compresses -o expressions in our search plan.
  */   */
 PLAN *  PLAN *
 or_squish(plan)  or_squish(PLAN *plan)           /* plan with ors to be squished */
         PLAN *plan;             /* plan with ors to be squished */  
 {  {
         PLAN *next;     /* next node being processed */          PLAN *next;     /* next node being processed */
         PLAN *tail;     /* pointer to tail of result plan */          PLAN *tail;     /* pointer to tail of result plan */

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8