/* $Id$
* $Log$
- * Revision 1.3 1991/04/04 14:56:42 gumby
+ * Revision 1.4 1991/04/04 17:55:47 steve
+ * *** empty log message ***
+ *
+ * Revision 1.3 1991/04/04 14:56:42 gumby
* Minor format fixes.
*
* Revision 1.2 1991/04/03 22:09:43 steve
carsym *carsyms;
if (bfd_read ((void *)&nextname, 1, 1, abfd) != 1) {
+ bfd_seek (abfd, -1L, SEEK_CUR);
bfd_has_map(abfd) = false;
return true;
}
+ bfd_seek (abfd, -1L, SEEK_CUR);
if (nextname != '/') {
/* Actually I think this is an error for a COFF archive */
return true;
}
- bfd_seek (abfd, -1L, SEEK_CUR);
mapdata = snarf_ar_hdr (abfd);
if (mapdata == NULL) return false;
char *normal =normalize( current->filename);
unsigned int thislen = strlen (normal);
if (thislen > maxname) {
+ /* Works for now; may need to be re-engineered if we encounter an oddball
+ archive format and want to generalise this hack. */
+ struct ar_hdr *hdr = arch_hdr(current);
strcpy (strptr, normal);
- current->filename[0] = ' ';
+ hdr->ar_name[0] = ' ';
/* We know there will always be enough room (one of the few cases
where you may safely use sprintf). */
- sprintf ((current->filename) + 1, "-%o", (unsigned) (strptr - *tabloc));
+ sprintf ((hdr->ar_name) + 1, "%-o", (unsigned) (strptr - *tabloc));
strptr += thislen + 1;
}
bfd *this_element;
/* Read each archive element in turn from the input, copy the
contents to a temp file, and keep the temp file handle */
- char *dir = cat("./",make_tempname(this_element->filename),"copy-dir");
+ char *dir = cat("./",make_tempname(""),"copy-dir");
/* Make a temp directory to hold the contents */
mkdir(dir,0777);