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

Diff for /src/usr.bin/make/arch.c between version 1.26 and 1.27

version 1.26, 2000/03/26 16:21:32 version 1.27, 2000/06/10 01:41:05
Line 129 
Line 129 
     size_t        fnamesize;  /* Size of the string table */      size_t        fnamesize;  /* Size of the string table */
 } Arch;  } Arch;
   
 static int ArchFindArchive __P((ClientData, ClientData));  static int ArchFindArchive __P((void *, void *));
 #ifdef CLEANUP  #ifdef CLEANUP
 static void ArchFree __P((ClientData));  static void ArchFree __P((void *));
 #endif  #endif
 static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));  static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
 static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));  static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
Line 158 
Line 158 
  */   */
 static void  static void
 ArchFree(ap)  ArchFree(ap)
     ClientData ap;      void *ap;
 {  {
     Arch *a = (Arch *) ap;      Arch *a = (Arch *) ap;
     Hash_Search   search;      Hash_Search   search;
Line 168 
Line 168 
     for (entry = Hash_EnumFirst(&a->members, &search);      for (entry = Hash_EnumFirst(&a->members, &search);
          entry != NULL;           entry != NULL;
          entry = Hash_EnumNext(&search))           entry = Hash_EnumNext(&search))
         free((Address) Hash_GetValue (entry));          free(Hash_GetValue(entry));
   
     free(a->name);      free(a->name);
     efree(a->fnametab);      efree(a->fnametab);
     Hash_DeleteTable(&a->members);      Hash_DeleteTable(&a->members);
     free((Address) a);      free(a);
 }  }
 #endif  #endif
   
Line 443 
Line 443 
  */   */
 static int  static int
 ArchFindArchive (ar, archName)  ArchFindArchive (ar, archName)
     ClientData    ar;             /* Current list element */      void *ar;             /* Current list element */
     ClientData    archName;       /* Name we want */      void *archName;       /* Name we want */
 {  {
     return (strcmp ((char *) archName, ((Arch *) ar)->name));      return strcmp ((char *)archName, ((Arch *)ar)->name);
 }  }
   
 /*-  /*-
Line 634 
Line 634 
             }              }
 #endif  #endif
   
             he = Hash_CreateEntry (&ar->members, memName, NULL);              he = Hash_CreateEntry(&ar->members, memName, NULL);
             Hash_SetValue (he, emalloc (sizeof (struct ar_hdr)));              Hash_SetValue(he, emalloc(sizeof(struct ar_hdr)));
             memcpy ((Address)Hash_GetValue (he), (Address)&arh,              memcpy(Hash_GetValue(he), &arh, sizeof(struct ar_hdr));
                 sizeof (struct ar_hdr));  
         }          }
         fseek (arch, (size + 1) & ~1, SEEK_CUR);          fseek (arch, (size + 1) & ~1, SEEK_CUR);
     }      }
Line 659 
Line 658 
     }      }
   
 badarch:  badarch:
     fclose (arch);      fclose(arch);
     Hash_DeleteTable (&ar->members);      Hash_DeleteTable(&ar->members);
     efree(ar->fnametab);      efree(ar->fnametab);
     free ((Address)ar);      free(ar);
     return (NULL);      return NULL;
 }  }
   
 #ifdef SVR4ARCHIVES  #ifdef SVR4ARCHIVES

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27