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

Diff for /src/usr.bin/make/parse.c between version 1.39 and 1.40

version 1.39, 2000/04/17 23:54:47 version 1.40, 2000/06/10 01:26:37
Line 457 
Line 457 
  *      operators are incompatible, a major error is taken.   *      operators are incompatible, a major error is taken.
  *   *
  * Results:   * Results:
  *      Always 0   *      0 if a problem, 1 if ok.
  *   *
  * Side Effects:   * Side Effects:
  *      The type field of the node is altered to reflect any new bits in   *      The type field of the node is altered to reflect any new bits in
Line 478 
Line 478 
      * the operator actually has some dependency information in it, complain.       * the operator actually has some dependency information in it, complain.
      */       */
     if (((op & OP_OPMASK) != (gn->type & OP_OPMASK)) &&      if (((op & OP_OPMASK) != (gn->type & OP_OPMASK)) &&
         !OP_NOP(gn->type) && !OP_NOP(op))          !OP_NOP(gn->type) && !OP_NOP(op)) {
     {          Parse_Error(PARSE_FATAL, "Inconsistent operator for %s", gn->name);
         Parse_Error (PARSE_FATAL, "Inconsistent operator for %s", gn->name);          return 0;
         return (1);  
     }      }
   
     if ((op == OP_DOUBLEDEP) && ((gn->type & OP_OPMASK) == OP_DOUBLEDEP)) {      if ((op == OP_DOUBLEDEP) && ((gn->type & OP_OPMASK) == OP_DOUBLEDEP)) {
Line 523 
Line 522 
      */       */
     gn->type |= op;      gn->type |= op;
   
     return (0);      return 1;
 }  }
   
 /*-  /*-
Line 534 
Line 533 
  *      .WAIT directive.   *      .WAIT directive.
  *   *
  * Results:   * Results:
  *      Returns 1 if the two targets need to be ordered, 0 otherwise.   *      Returns 0 if the two targets need to be ordered, 1 otherwise.
  *      If it returns 1, the search can stop   *      If it returns 0, the search can stop
  *   *
  * Side Effects:   * Side Effects:
  *      A dependency can be added between the two nodes.   *      A dependency can be added between the two nodes.
Line 558 
Line 557 
          */           */
         Lst_AtEnd(p->successors, s);          Lst_AtEnd(p->successors, s);
         Lst_AtEnd(s->preds, p);          Lst_AtEnd(s->preds, p);
         return 0;          return 1;
     }      }
     else      else
         return 1;          return 0;
 }  }
   
   
Line 596 
Line 595 
         if (keywd != -1) {          if (keywd != -1) {
             int op = parseKeywords[keywd].op;              int op = parseKeywords[keywd].op;
             if (op != 0) {              if (op != 0) {
                 Lst_ForEach (targets, ParseDoOp, &op);                  Lst_Find(targets, ParseDoOp, &op);
                 return;                  return;
             }              }
             if (parseKeywords[keywd].spec == Wait) {              if (parseKeywords[keywd].spec == Wait) {
Line 676 
Line 675 
   
     gn->order = waiting;      gn->order = waiting;
     Lst_AtEnd(allsrc, gn);      Lst_AtEnd(allsrc, gn);
     if (waiting) {      if (waiting)
         Lst_ForEach(allsrc, ParseAddDep, gn);          Lst_Find(allsrc, ParseAddDep, gn);
     }  
 }  }
   
 /*-  /*-
Line 689 
Line 687 
  *      yet.   *      yet.
  *   *
  * Results:   * Results:
  *      0 if main not found yet, 1 if it is.   *      1 if main not found yet, 0 if it is.
  *   *
  * Side Effects:   * Side Effects:
  *      mainNode is changed and Targ_SetMain is called.   *      mainNode is changed and Targ_SetMain is called.
Line 705 
Line 703 
     if ((gn->type & OP_NOTARGET) == 0) {      if ((gn->type & OP_NOTARGET) == 0) {
         mainNode = gn;          mainNode = gn;
         Targ_SetMain(gn);          Targ_SetMain(gn);
         return (dummy ? 1 : 1);  
     } else {  
         return (dummy ? 0 : 0);          return (dummy ? 0 : 0);
       } else {
           return (dummy ? 1 : 1);
     }      }
 }  }
   
Line 1120 
Line 1118 
   
     cp++;                       /* Advance beyond operator */      cp++;                       /* Advance beyond operator */
   
     Lst_ForEach (targets, ParseDoOp, &op);      Lst_Find(targets, ParseDoOp, &op);
   
     /*      /*
      * Get to the first source       * Get to the first source
Line 1303 
Line 1301 
          * the first dependency line that is actually a real target           * the first dependency line that is actually a real target
          * (i.e. isn't a .USE or .EXEC rule) to be made.           * (i.e. isn't a .USE or .EXEC rule) to be made.
          */           */
         Lst_ForEach(targets, ParseFindMain, NULL);          Lst_Find(targets, ParseFindMain, NULL);
     }      }
   
     /*      /*

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40