[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.90 and 1.91

version 1.90, 2015/01/23 22:35:58 version 1.91, 2016/10/21 16:12:38
Line 328 
Line 328 
         Suff *s2 = NULL;        /* the suffix descriptor in this element */          Suff *s2 = NULL;        /* the suffix descriptor in this element */
   
         for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) {          for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) {
                 s2 = (Suff *)Lst_Datum(ln);                  s2 = Lst_Datum(ln);
                 if (s2->order >= s->order)                  if (s2->order >= s->order)
                         break;                          break;
         }          }
Line 754 
Line 754 
   
   
         for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) {          for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) {
                 s = (Src *)Lst_Datum(ln);                  s = Lst_Datum(ln);
                 if (s->children == 0) {                  if (s->children == 0) {
                         free(s->file);                          free(s->file);
                         if (!s->parent)                          if (!s->parent)
Line 808 
Line 808 
   
         rs = NULL;          rs = NULL;
   
         while ((s = (Src *)Lst_DeQueue(srcs)) != NULL) {          while ((s = Lst_DeQueue(srcs)) != NULL) {
                 if (DEBUG(SUFF))                  if (DEBUG(SUFF))
                         printf("\ttrying %s...", s->file);                          printf("\ttrying %s...", s->file);
   
Line 869 
Line 869 
         prefixLen = strlen(targ->prefix);          prefixLen = strlen(targ->prefix);
   
         for (ln = Lst_First(&t->children); ln != NULL; ln = Lst_Adv(ln)) {          for (ln = Lst_First(&t->children); ln != NULL; ln = Lst_Adv(ln)) {
                 s = (GNode *)Lst_Datum(ln);                  s = Lst_Datum(ln);
   
                 cp = strrchr(s->name, '/');                  cp = strrchr(s->name, '/');
                 if (cp == NULL)                  if (cp == NULL)
Line 1001 
Line 1001 
             }              }
         }          }
         /* Add all elements of the members list to the parent node.  */          /* Add all elements of the members list to the parent node.  */
         while ((gn = (GNode *)Lst_DeQueue(&members)) != NULL) {          while ((gn = Lst_DeQueue(&members)) != NULL) {
                 if (DEBUG(SUFF))                  if (DEBUG(SUFF))
                         printf("%s...", gn->name);                          printf("%s...", gn->name);
                 if (Lst_Member(&pgn->children, gn) == NULL) {                  if (Lst_Member(&pgn->children, gn) == NULL) {
Line 1049 
Line 1049 
         Dir_Expand(cgn->name, path, &exp);          Dir_Expand(cgn->name, path, &exp);
   
         /* Fetch next expansion off the list and find its GNode.  */          /* Fetch next expansion off the list and find its GNode.  */
         while ((cp = (char *)Lst_DeQueue(&exp)) != NULL) {          while ((cp = Lst_DeQueue(&exp)) != NULL) {
                 GNode *gn;              /* New source 8) */                  GNode *gn;              /* New source 8) */
                 if (DEBUG(SUFF))                  if (DEBUG(SUFF))
                         printf("%s...", cp);                          printf("%s...", cp);
Line 1084 
Line 1084 
 SuffExpandChildren(LstNode ln, /* LstNode of child, so we can replace it */  SuffExpandChildren(LstNode ln, /* LstNode of child, so we can replace it */
     GNode *pgn)      GNode *pgn)
 {  {
         GNode   *cgn = (GNode *)Lst_Datum(ln);          GNode   *cgn = Lst_Datum(ln);
   
         /* First do variable expansion -- this takes precedence over wildcard          /* First do variable expansion -- this takes precedence over wildcard
          * expansion. If the result contains wildcards, they'll be gotten to           * expansion. If the result contains wildcards, they'll be gotten to
Line 1155 
Line 1155 
                  * only one implied src, as that will be sufficient to get                   * only one implied src, as that will be sufficient to get
                  * the .IMPSRC variable set for tGn.    */                   * the .IMPSRC variable set for tGn.    */
                 for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) {                  for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) {
                         gn = (GNode *)Lst_Datum(ln);                          gn = Lst_Datum(ln);
   
                         if (Lst_AddNew(&tGn->children, gn)) {                          if (Lst_AddNew(&tGn->children, gn)) {
                                 /* Not already linked, so form the proper links                                  /* Not already linked, so form the proper links
Line 1204 
Line 1204 
         Suff *s;          Suff *s;
   
         for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) {          for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) {
                 s = (Suff *)Lst_Datum(ln);                  s = Lst_Datum(ln);
                 if (suffix_is_suffix(s, b, e))                  if (suffix_is_suffix(s, b, e))
                         return s;                          return s;
         }          }
Line 1449 
Line 1449 
                 /* No known transformations -- use the first suffix found for                  /* No known transformations -- use the first suffix found for
                  * setting the local variables.  */                   * setting the local variables.  */
                 if (!Lst_IsEmpty(&targs))                  if (!Lst_IsEmpty(&targs))
                         targ = (Src *)Lst_Datum(Lst_First(&targs));                          targ = Lst_Datum(Lst_First(&targs));
                 else                  else
                         targ = NULL;                          targ = NULL;
         } else {          } else {

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91