[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.34 and 1.35

version 1.34, 1999/12/18 21:56:07 version 1.35, 1999/12/18 21:58:07
Line 435 
Line 435 
     GNode          *pgn = (GNode *) pgnp;      GNode          *pgn = (GNode *) pgnp;
     GNode          *cgn = (GNode *) cgnp;      GNode          *cgn = (GNode *) cgnp;
     if (Lst_Member (pgn->children, (ClientData)cgn) == NULL) {      if (Lst_Member (pgn->children, (ClientData)cgn) == NULL) {
         (void)Lst_AtEnd (pgn->children, (ClientData)cgn);          Lst_AtEnd(pgn->children, (ClientData)cgn);
         if (specType == Not) {          if (specType == Not) {
             (void)Lst_AtEnd (cgn->parents, (ClientData)pgn);              Lst_AtEnd(cgn->parents, (ClientData)pgn);
         }          }
         pgn->unmade += 1;          pgn->unmade += 1;
     }      }
Line 504 
Line 504 
          */           */
         Lst_ForEach(gn->parents, ParseLinkSrc, (ClientData)cohort);          Lst_ForEach(gn->parents, ParseLinkSrc, (ClientData)cohort);
         cohort->type = OP_DOUBLEDEP|OP_INVISIBLE;          cohort->type = OP_DOUBLEDEP|OP_INVISIBLE;
         (void)Lst_AtEnd(gn->cohorts, (ClientData)cohort);          Lst_AtEnd(gn->cohorts, (ClientData)cohort);
   
         /*          /*
          * Replace the node in the targets list with the new copy           * Replace the node in the targets list with the new copy
Line 552 
Line 552 
          * but checking is tedious, and the debugging output can show the           * but checking is tedious, and the debugging output can show the
          * problem           * problem
          */           */
         (void)Lst_AtEnd(p->successors, (ClientData)s);          Lst_AtEnd(p->successors, (ClientData)s);
         (void)Lst_AtEnd(s->preds, (ClientData)p);          Lst_AtEnd(s->preds, (ClientData)p);
         return 0;          return 0;
     }      }
     else      else
Line 612 
Line 612 
          * invoked if the user didn't specify a target on the command           * invoked if the user didn't specify a target on the command
          * line. This is to allow #ifmake's to succeed, or something...           * line. This is to allow #ifmake's to succeed, or something...
          */           */
         (void) Lst_AtEnd (create, (ClientData)estrdup(src));          Lst_AtEnd(create, (ClientData)estrdup(src));
         /*          /*
          * Add the name to the .TARGETS variable as well, so the user cna           * Add the name to the .TARGETS variable as well, so the user cna
          * employ that, if desired.           * employ that, if desired.
Line 627 
Line 627 
          */           */
         gn = Targ_FindNode(src, TARG_CREATE);          gn = Targ_FindNode(src, TARG_CREATE);
         if (predecessor != NULL) {          if (predecessor != NULL) {
             (void)Lst_AtEnd(predecessor->successors, (ClientData)gn);              Lst_AtEnd(predecessor->successors, (ClientData)gn);
             (void)Lst_AtEnd(gn->preds, (ClientData)predecessor);              Lst_AtEnd(gn->preds, (ClientData)predecessor);
         }          }
         /*          /*
          * The current source now becomes the predecessor for the next one.           * The current source now becomes the predecessor for the next one.
Line 671 
Line 671 
     }      }
   
     gn->order = waiting;      gn->order = waiting;
     (void)Lst_AtEnd(allsrc, (ClientData)gn);      Lst_AtEnd(allsrc, (ClientData)gn);
     if (waiting) {      if (waiting) {
         Lst_ForEach(allsrc, ParseAddDep, (ClientData)gn);          Lst_ForEach(allsrc, ParseAddDep, (ClientData)gn);
     }      }
Line 944 
Line 944 
                         if (paths == NULL) {                          if (paths == NULL) {
                             paths = Lst_Init();                              paths = Lst_Init();
                         }                          }
                         (void)Lst_AtEnd(paths, (ClientData)dirSearchPath);                          Lst_AtEnd(paths, (ClientData)dirSearchPath);
                         break;                          break;
                     case Main:                      case Main:
                         if (!Lst_IsEmpty(create)) {                          if (!Lst_IsEmpty(create)) {
Line 956 
Line 956 
                     case Interrupt:                      case Interrupt:
                         gn = Targ_FindNode(line, TARG_CREATE);                          gn = Targ_FindNode(line, TARG_CREATE);
                         gn->type |= OP_NOTMAIN;                          gn->type |= OP_NOTMAIN;
                         (void)Lst_AtEnd(targets, (ClientData)gn);                          Lst_AtEnd(targets, (ClientData)gn);
                         break;                          break;
                     case Default:                      case Default:
                         gn = Targ_NewGN(".DEFAULT");                          gn = Targ_NewGN(".DEFAULT");
                         gn->type |= (OP_NOTMAIN|OP_TRANSFORM);                          gn->type |= (OP_NOTMAIN|OP_TRANSFORM);
                         (void)Lst_AtEnd(targets, (ClientData)gn);                          Lst_AtEnd(targets, (ClientData)gn);
                         DEFAULT = gn;                          DEFAULT = gn;
                         break;                          break;
                     case NotParallel:                      case NotParallel:
Line 999 
Line 999 
                     if (paths == NULL) {                      if (paths == NULL) {
                         paths = Lst_Init();                          paths = Lst_Init();
                     }                      }
                     (void)Lst_AtEnd(paths, (ClientData)path);                      Lst_AtEnd(paths, (ClientData)path);
                 }                  }
             }              }
         }          }
Line 1028 
Line 1028 
                  * No wildcards, but we want to avoid code duplication,                   * No wildcards, but we want to avoid code duplication,
                  * so create a list with the word on it.                   * so create a list with the word on it.
                  */                   */
                 (void)Lst_AtEnd(curTargs, (ClientData)line);                  Lst_AtEnd(curTargs, (ClientData)line);
             }              }
   
             while((targName = (char *)Lst_DeQueue(curTargs)) != NULL) {              while((targName = (char *)Lst_DeQueue(curTargs)) != NULL) {
Line 1039 
Line 1039 
                 }                  }
   
                 if (gn != NULL)                  if (gn != NULL)
                     (void)Lst_AtEnd (targets, (ClientData)gn);                      Lst_AtEnd(targets, (ClientData)gn);
             }              }
         } else if (specType == ExPath && *line != '.' && *line != '\0') {          } else if (specType == ExPath && *line != '.' && *line != '\0') {
             Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", line);              Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", line);
Line 1589 
Line 1589 
     GNode *gn = (GNode *) gnp;      GNode *gn = (GNode *) gnp;
     /* if target already supplied, ignore commands */      /* if target already supplied, ignore commands */
     if (!(gn->type & OP_HAS_COMMANDS))      if (!(gn->type & OP_HAS_COMMANDS))
         (void)Lst_AtEnd(gn->commands, cmd);          Lst_AtEnd(gn->commands, cmd);
     return(0);      return(0);
 }  }
   
Line 1799 
Line 1799 
     oldFile->p = curPTR;      oldFile->p = curPTR;
     oldFile->lineno = lineno;      oldFile->lineno = lineno;
   
     (void) Lst_AtFront (includes, (ClientData)oldFile);      Lst_AtFront(includes, (ClientData)oldFile);
   
     /*      /*
      * Once the previous state has been saved, we can get down to reading       * Once the previous state has been saved, we can get down to reading
Line 1851 
Line 1851 
     oldFile->F = curFILE;      oldFile->F = curFILE;
     oldFile->p = curPTR;      oldFile->p = curPTR;
   
     (void) Lst_AtFront (includes, (ClientData)oldFile);      Lst_AtFront(includes, (ClientData)oldFile);
   
     curFILE = NULL;      curFILE = NULL;
     curPTR = (PTR *) emalloc (sizeof (PTR));      curPTR = (PTR *) emalloc (sizeof (PTR));
Line 1982 
Line 1982 
     oldFile->p = curPTR;      oldFile->p = curPTR;
     oldFile->lineno = lineno;      oldFile->lineno = lineno;
   
     (void) Lst_AtFront (includes, (ClientData)oldFile);      Lst_AtFront(includes, (ClientData)oldFile);
   
     /*      /*
      * Once the previous state has been saved, we can get down to reading       * Once the previous state has been saved, we can get down to reading
Line 2683 
Line 2683 
         Punt ("no target to make.");          Punt ("no target to make.");
         /*NOTREACHED*/          /*NOTREACHED*/
     } else if (mainNode->type & OP_DOUBLEDEP) {      } else if (mainNode->type & OP_DOUBLEDEP) {
         (void) Lst_AtEnd (listmain, (ClientData)mainNode);          Lst_AtEnd(listmain, (ClientData)mainNode);
         Lst_Concat(listmain, mainNode->cohorts, LST_CONCNEW);          Lst_Concat(listmain, mainNode->cohorts, LST_CONCNEW);
     }      }
     else      else
         (void) Lst_AtEnd (listmain, (ClientData)mainNode);          Lst_AtEnd(listmain, (ClientData)mainNode);
     return (listmain);      return (listmain);
 }  }
   

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35