[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.16 and 1.17

version 1.16, 2000/02/02 13:47:47 version 1.17, 2000/03/26 16:21:32
Line 252 
Line 252 
 {  {
 #ifdef CLEANUP  #ifdef CLEANUP
     dot->refCount -= 1;      dot->refCount -= 1;
     Dir_Destroy((ClientData) dot);      Dir_Destroy(dot);
     Dir_ClearPath(dirSearchPath);      Dir_ClearPath(dirSearchPath);
     Lst_Destroy(dirSearchPath, NOFREE);      Lst_Destroy(dirSearchPath, NOFREE);
     Dir_ClearPath(openDirectories);      Dir_ClearPath(openDirectories);
Line 663 
Line 663 
         }          }
     }      }
     if (DEBUG(DIR)) {      if (DEBUG(DIR)) {
         Lst_ForEach(expansions, DirPrintWord, (ClientData) 0);          Lst_ForEach(expansions, DirPrintWord, NULL);
         fputc('\n', stdout);          fputc('\n', stdout);
     }      }
 }  }
Line 881 
Line 881 
                 }                  }
                 entry = Hash_CreateEntry(&mtimes, (char *) file,                  entry = Hash_CreateEntry(&mtimes, (char *) file,
                                          (Boolean *)NULL);                                           (Boolean *)NULL);
                 Hash_SetValue(entry, (long)stb.st_mtime);                  /* XXX */
                   Hash_SetValue(entry, (ClientData)((long)stb.st_mtime));
                 nearmisses += 1;                  nearmisses += 1;
                 return (file);                  return (file);
             } else {              } else {
Line 959 
Line 960 
             printf("Caching %s for %s\n", Targ_FmtTime(stb.st_mtime),              printf("Caching %s for %s\n", Targ_FmtTime(stb.st_mtime),
                     name);                      name);
         }          }
         Hash_SetValue(entry, (long)stb.st_mtime);          /* XXX */
           Hash_SetValue(entry, (ClientData)(long)stb.st_mtime);
         return (estrdup (name));          return (estrdup (name));
     } else {      } else {
         if (DEBUG(DIR)) {          if (DEBUG(DIR)) {
Line 1071 
Line 1073 
     DIR           *d;         /* for reading directory */      DIR           *d;         /* for reading directory */
     register struct dirent *dp; /* entry in directory */      register struct dirent *dp; /* entry in directory */
   
     ln = Lst_Find(openDirectories, DirFindName, (ClientData)name);      ln = Lst_Find(openDirectories, DirFindName, name);
     if (ln != NULL) {      if (ln != NULL) {
         p = (Path *)Lst_Datum (ln);          p = (Path *)Lst_Datum (ln);
         if (Lst_Member(path, (ClientData)p) == NULL) {          if (Lst_Member(path, p) == NULL) {
             p->refCount += 1;              p->refCount += 1;
             Lst_AtEnd(path, (ClientData)p);              Lst_AtEnd(path, p);
         }          }
     } else {      } else {
         if (DEBUG(DIR)) {          if (DEBUG(DIR)) {
Line 1111 
Line 1113 
                 (void)Hash_CreateEntry(&p->files, dp->d_name, (Boolean *)NULL);                  (void)Hash_CreateEntry(&p->files, dp->d_name, (Boolean *)NULL);
             }              }
             (void) closedir (d);              (void) closedir (d);
             Lst_AtEnd(openDirectories, (ClientData)p);              Lst_AtEnd(openDirectories, p);
             Lst_AtEnd(path, (ClientData)p);              Lst_AtEnd(path, p);
         }          }
         if (DEBUG(DIR)) {          if (DEBUG(DIR)) {
             printf("done\n");              printf("done\n");
Line 1140 
Line 1142 
 {  {
     ((Path *) p)->refCount += 1;      ((Path *) p)->refCount += 1;
   
     return ((ClientData)p);      return p;
 }  }
   
 /*-  /*-
Line 1209 
Line 1211 
     if (p->refCount == 0) {      if (p->refCount == 0) {
         LstNode ln;          LstNode ln;
   
         ln = Lst_Member (openDirectories, (ClientData)p);          ln = Lst_Member(openDirectories, p);
         Lst_Remove(openDirectories, ln);          Lst_Remove(openDirectories, ln);
   
         Hash_DeleteTable (&p->files);          Hash_DeleteTable (&p->files);
Line 1238 
Line 1240 
 {  {
     Path    *p;      Path    *p;
     while ((p = (Path *)Lst_DeQueue(path)) != NULL)      while ((p = (Path *)Lst_DeQueue(path)) != NULL)
         Dir_Destroy((ClientData)p);          Dir_Destroy(p);
 }  }
   
   
Line 1266 
Line 1268 
   
     for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) {      for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) {
         p = (Path *)Lst_Datum(ln);          p = (Path *)Lst_Datum(ln);
         if (Lst_Member(path1, (ClientData)p) == NULL) {          if (Lst_Member(path1, p) == NULL) {
             p->refCount += 1;              p->refCount += 1;
             Lst_AtEnd(path1, (ClientData)p);              Lst_AtEnd(path1, p);
         }          }
     }      }
 }  }
Line 1307 
Line 1309 
 Dir_PrintPath (path)  Dir_PrintPath (path)
     Lst path;      Lst path;
 {  {
     Lst_ForEach (path, DirPrintDir, (ClientData)0);      Lst_ForEach(path, DirPrintDir, NULL);
 }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17