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

Diff for /src/usr.bin/make/dir.c between version 1.22 and 1.23

version 1.22, 2000/06/23 16:15:49 version 1.23, 2000/06/23 16:41:52
Line 379 
Line 379 
         {          {
             Lst_AtEnd(expansions,              Lst_AtEnd(expansions,
                             (isDot ? estrdup(entry->name) :                              (isDot ? estrdup(entry->name) :
                              str_concat(p->name, entry->name,                               str_concat(p->name, entry->name, '/')));
                                         STR_ADDSLASH)));  
         }          }
     }      }
     return (0);      return (0);
Line 749 
Line 748 
                     continue;                      continue;
                 }                  }
             }              }
             file = str_concat (p->name, cp, STR_ADDSLASH);              file = str_concat(p->name, cp, '/');
             if (DEBUG(DIR)) {              if (DEBUG(DIR)) {
                 printf("returning %s\n", file);                  printf("returning %s\n", file);
             }              }
Line 806 
Line 805 
         while ((ln = Lst_Next (path)) != NULL) {          while ((ln = Lst_Next (path)) != NULL) {
             p = (Path *)Lst_Datum(ln);              p = (Path *)Lst_Datum(ln);
             if (p != dot) {              if (p != dot) {
                 file = str_concat (p->name, name, STR_ADDSLASH);                  file = str_concat(p->name, name, '/');
             } else {              } else {
                 /*                  /*
                  * Checking in dot -- DON'T put a leading ./ on the thing.                   * Checking in dot -- DON'T put a leading ./ on the thing.
Line 1135 
Line 1134 
     char          *flag;  /* flag which should precede each directory */      char          *flag;  /* flag which should precede each directory */
     Lst           path;   /* list of directories */      Lst           path;   /* list of directories */
 {  {
     char          *str;   /* the string which will be returned */  
     char          *tstr;  /* the current directory preceded by 'flag' */  
     LstNode       ln;     /* the node of the current directory */      LstNode       ln;     /* the node of the current directory */
     Path          *p;     /* the structure describing the current directory */      BUFFER        buf;
   
     str = estrdup("");      Buf_Init(&buf, 0);
   
     Lst_Open(path);      for (ln = Lst_First(path); ln != NULL; ln = Lst_Adv(ln)) {
     while ((ln = Lst_Next(path)) != NULL) {              Buf_AddString(&buf, flag);
         p = (Path *)Lst_Datum(ln);              Buf_AddString(&buf, ((Path *)Lst_Datum(ln))->name);
         tstr = str_concat(flag, p->name, 0);              Buf_AddSpace(&buf);
         str = str_concat(str, tstr, STR_ADDSPACE | STR_DOFREE);  
     }      }
     Lst_Close(path);  
   
     return str;      return Buf_Retrieve(&buf);
 }  }
   
 /*-  /*-

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23