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

Diff for /src/usr.bin/make/suff.c between version 1.30 and 1.31

version 1.30, 2000/06/17 14:43:36 version 1.31, 2000/06/23 16:15:50
Line 411 
Line 411 
     LstNode       ln;           /* current element in l we're examining */      LstNode       ln;           /* current element in l we're examining */
     Suff          *s2 = NULL;   /* the suffix descriptor in this element */      Suff          *s2 = NULL;   /* the suffix descriptor in this element */
   
     if (Lst_Open (l) == FAILURE) {      Lst_Open(l);
         return;      while ((ln = Lst_Next(l)) != NULL) {
     }          s2 = (Suff *)Lst_Datum(ln);
     while ((ln = Lst_Next (l)) != NULL) {  
         s2 = (Suff *) Lst_Datum (ln);  
         if (s2->sNum >= s->sNum) {          if (s2->sNum >= s->sNum) {
             break;              break;
         }          }
Line 534 
Line 532 
             }              }
             return (FALSE);              return (FALSE);
         }          }
         src = (Suff *) Lst_Datum (srcLn);          src = (Suff *)Lst_Datum(srcLn);
         str2 = str + src->nameLen;          str2 = str + src->nameLen;
         if (*str2 == '\0') {          if (*str2 == '\0') {
             single = src;              single = src;
Line 611 
Line 609 
          * free the commands themselves, because a given command can be           * free the commands themselves, because a given command can be
          * attached to several different transformations.           * attached to several different transformations.
          */           */
         gn = (GNode *) Lst_Datum (ln);          gn = (GNode *)Lst_Datum(ln);
         Lst_Destroy(&gn->commands, NOFREE);          Lst_Destroy(&gn->commands, NOFREE);
         Lst_Destroy(&gn->children, NOFREE);          Lst_Destroy(&gn->children, NOFREE);
         Lst_Init(&gn->commands);          Lst_Init(&gn->commands);
Line 850 
Line 848 
     LIST                inIncludes; /* Cumulative .INCLUDES path */      LIST                inIncludes; /* Cumulative .INCLUDES path */
     LIST                inLibs;     /* Cumulative .LIBS path */      LIST                inLibs;     /* Cumulative .LIBS path */
   
     if (Lst_Open(&sufflist) == FAILURE)      Lst_Open(&sufflist);
         return;  
   
     Lst_Init(&inIncludes);      Lst_Init(&inIncludes);
     Lst_Init(&inLibs);      Lst_Init(&inLibs);
   
     while ((ln = Lst_Next(&sufflist)) != NULL) {      while ((ln = Lst_Next(&sufflist)) != NULL) {
         s = (Suff *) Lst_Datum (ln);          s = (Suff *)Lst_Datum(ln);
         if (!Lst_IsEmpty(&s->searchPath)) {          if (!Lst_IsEmpty(&s->searchPath)) {
 #ifdef INCLUDES  #ifdef INCLUDES
             if (s->flags & SUFF_INCLUDE) {              if (s->flags & SUFF_INCLUDE) {
Line 911 
Line 908 
   
     ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname);      ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname);
     if (ln != NULL) {      if (ln != NULL) {
         s = (Suff *) Lst_Datum (ln);          s = (Suff *)Lst_Datum(ln);
         s->flags |= SUFF_INCLUDE;          s->flags |= SUFF_INCLUDE;
     }      }
 }  }
Line 941 
Line 938 
   
     ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname);      ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname);
     if (ln != NULL) {      if (ln != NULL) {
         s = (Suff *) Lst_Datum (ln);          s = (Suff *)Lst_Datum(ln);
         s->flags |= SUFF_LIBRARY;          s->flags |= SUFF_LIBRARY;
     }      }
 }  }
Line 1057 
Line 1054 
     Src *s;      Src *s;
     int t = 0;      int t = 0;
   
     if (Lst_Open (l) == FAILURE) {      Lst_Open(l);
         return 0;  
     }  
 #ifdef DEBUG_SRC  #ifdef DEBUG_SRC
     printf("cleaning %lx: ", (unsigned long) l);      printf("cleaning %lx: ", (unsigned long) l);
     Lst_Every(l, PrintAddr);      Lst_Every(l, PrintAddr);
Line 1068 
Line 1063 
   
   
     while ((ln = Lst_Next (l)) != NULL) {      while ((ln = Lst_Next (l)) != NULL) {
         s = (Src *) Lst_Datum (ln);          s = (Src *)Lst_Datum(ln);
         if (s->children == 0) {          if (s->children == 0) {
             free(s->file);              free(s->file);
             if (!s->parent)              if (!s->parent)
Line 1197 
Line 1192 
     char                *cp;      char                *cp;
   
     t = targ->node;      t = targ->node;
     (void) Lst_Open(&t->children);      Lst_Open(&t->children);
     prefLen = strlen (targ->pref);      prefLen = strlen (targ->pref);
   
     while ((ln = Lst_Next(&t->children)) != NULL) {      while ((ln = Lst_Next(&t->children)) != NULL) {
         s = (GNode *)Lst_Datum (ln);          s = (GNode *)Lst_Datum(ln);
   
         cp = strrchr (s->name, '/');          cp = strrchr (s->name, '/');
         if (cp == (char *)NULL) {          if (cp == (char *)NULL) {
Line 1222 
Line 1217 
                  *                   *
                  * XXX: Handle multi-stage transformations here, too.                   * XXX: Handle multi-stage transformations here, too.
                  */                   */
                 suff = (Suff *)Lst_Datum (ln);                  suff = (Suff *)Lst_Datum(ln);
   
                 if (Lst_Member(&suff->parents, targ->suff) != NULL)                  if (Lst_Member(&suff->parents, targ->suff) != NULL)
                 {                  {
Line 1517 
Line 1512 
          * sGn gets the target in its iParents list, however, as that           * sGn gets the target in its iParents list, however, as that
          * will be sufficient to get the .IMPSRC variable set for tGn           * will be sufficient to get the .IMPSRC variable set for tGn
          */           */
         for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Succ(ln)) {          for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) {
             gn = (GNode *)Lst_Datum(ln);              gn = (GNode *)Lst_Datum(ln);
   
             if (Lst_Member(&tGn->children, gn) == NULL) {              if (Lst_Member(&tGn->children, gn) == NULL) {
Line 2148 
Line 2143 
   
         ln = Lst_Find(&sufflist, SuffSuffHasNameP, LIBSUFF);          ln = Lst_Find(&sufflist, SuffSuffHasNameP, LIBSUFF);
         if (ln != NULL) {          if (ln != NULL) {
             gn->suffix = s = (Suff *) Lst_Datum (ln);              gn->suffix = s = (Suff *)Lst_Datum(ln);
             Arch_FindLib(gn, &s->searchPath);              Arch_FindLib(gn, &s->searchPath);
         } else {          } else {
             gn->suffix = NULL;              gn->suffix = NULL;

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31