[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.70 and 1.71

version 1.70, 2007/09/17 10:06:44 version 1.71, 2007/09/17 12:50:59
Line 165 
Line 165 
 static bool parse_archive(Buffer, const char **, Lst, SymTable *);  static bool parse_archive(Buffer, const char **, Lst, SymTable *);
 static void add_archive_node(Lst, const char *);  static void add_archive_node(Lst, const char *);
   
 #ifdef SVR4ARCHIVES  
 struct SVR4namelist {  struct SVR4namelist {
         char *fnametab;         /* Extended name table strings */          char *fnametab;         /* Extended name table strings */
         size_t fnamesize;       /* Size of the string table */          size_t fnamesize;       /* Size of the string table */
Line 174 
Line 173 
 static const char *svr4list = "Archive list";  static const char *svr4list = "Archive list";
   
 static char *ArchSVR4Entry(struct SVR4namelist *, const char *, size_t, FILE *);  static char *ArchSVR4Entry(struct SVR4namelist *, const char *, size_t, FILE *);
 #endif  
   
 static struct arch_member *  static struct arch_member *
 new_arch_member(struct ar_hdr *hdr, const char *name)  new_arch_member(struct ar_hdr *hdr, const char *name)
Line 393 
Line 391 
         FILE *arch;       /* Stream to archive */          FILE *arch;       /* Stream to archive */
         char magic[SARMAG];          char magic[SARMAG];
         Arch *ar;          Arch *ar;
 #ifdef SVR4ARCHIVES  
         struct SVR4namelist list;          struct SVR4namelist list;
   
         list.fnametab = NULL;          list.fnametab = NULL;
 #endif  
   
         /* When we encounter an archive for the first time, we read its          /* When we encounter an archive for the first time, we read its
          * whole contents, to place it in the cache.  */           * whole contents, to place it in the cache.  */
Line 428 
Line 424 
   
                 /*  Whole archive read ok.  */                  /*  Whole archive read ok.  */
                 if (n == 0 && feof(arch)) {                  if (n == 0 && feof(arch)) {
 #ifdef SVR4ARCHIVES  
                         efree(list.fnametab);                          efree(list.fnametab);
 #endif  
                         fclose(arch);                          fclose(arch);
                         return ar;                          return ar;
                 }                  }
Line 514 
Line 508 
   
         fclose(arch);          fclose(arch);
         ohash_delete(&ar->members);          ohash_delete(&ar->members);
 #ifdef SVR4ARCHIVES  
         efree(list.fnametab);          efree(list.fnametab);
 #endif  
         free(ar);          free(ar);
         return NULL;          return NULL;
 }  }
Line 730 
Line 722 
         char      *cp;          char      *cp;
         char      magic[SARMAG];          char      magic[SARMAG];
         size_t    length;          size_t    length;
 #ifdef SVR4ARCHIVES  
         struct SVR4namelist list;          struct SVR4namelist list;
   
         list.fnametab = NULL;          list.fnametab = NULL;
 #endif  
   
         arch = fopen(archive, mode);          arch = fopen(archive, mode);
         if (arch == NULL)          if (arch == NULL)
Line 785 
Line 775 
 #endif  #endif
                         if (length == sizeof(arHeaderPtr->ar_name) ||                          if (length == sizeof(arHeaderPtr->ar_name) ||
                             memberName[length] == ' ') {                              memberName[length] == ' ') {
 #ifdef SVR4ARCHIVES  
                                 efree(list.fnametab);                                  efree(list.fnametab);
 #endif  
                                 return arch;                                  return arch;
                         }                          }
                 }                  }
Line 837 
Line 825 
                                 printf("ArchFind: Extended format entry for %s\n", ename);                                  printf("ArchFind: Extended format entry for %s\n", ename);
                         /* Found as extended name.      */                          /* Found as extended name.      */
                         if (strcmp(ename, member) == 0) {                          if (strcmp(ename, member) == 0) {
 #ifdef SVR4ARCHIVES  
                                 efree(list.fnametab);                                  efree(list.fnametab);
 #endif  
                                 return arch;                                  return arch;
                         }                          }
                 }                  }

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71