diff options
Diffstat (limited to 'bfd/archive.c')
-rw-r--r-- | bfd/archive.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/bfd/archive.c b/bfd/archive.c index 2f91901..fdac8df 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -1,23 +1,22 @@ +/* BFD back-end for archive files (libraries). + Copyright (C) 1990-1991 Free Software Foundation, Inc. + Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. +This file is part of BFD, the Binary File Descriptor library. -/* Copyright (C) 1990, 1991 Free Software Foundation, Inc. - -This file is part of BFD, the Binary File Diddler. - -BFD is free software; you can redistribute it and/or modify +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -BFD is distributed in the hope that it will be useful, +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with BFD; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /*doc* @setfilename archive-info @@ -25,12 +24,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ Gumby, you promised to write this bit... -Archives are supported in bfd in @code{archive.c}. +Archives are supported in BFD in @code{archive.c}. -An archive is represented internally just like another bfd, with a -pointer to a chain of contained bfds. Archives can be created by -opening bfds, linking them together and attatching them as children to -another bfd and then closing the parent bfd. +An archive is represented internally just like another BFD, with a +pointer to a chain of contained BFDs. Archives can be created by +opening BFDs, linking them together and attatching them as children to +another BFD and then closing the parent BFD. *-*/ @@ -125,7 +124,7 @@ _bfd_create_empty_archive_element_shell (obfd) } /*proto* bfd_set_archive_head -Used whilst processing archives. Sets the head of the chain of bfds +Used whilst processing archives. Sets the head of the chain of BFDs contained in an archive to @var{new_head}. (see chapter on archives) *; PROTO(boolean, bfd_set_archive_head, (bfd *output, bfd *new_head)); */ @@ -289,7 +288,7 @@ snarf_ar_hdr (abfd) ared = (struct areltdata *) allocptr; ared->arch_header = allocptr + sizeof (struct areltdata); - memcpy ((char *) ared->arch_header, &hdr, sizeof (struct ar_hdr)); + memcpy ((char *) ared->arch_header, (char *) &hdr, sizeof (struct ar_hdr)); ared->parsed_size = parsed_size; if (filename != NULL) ared->filename = filename; @@ -340,6 +339,11 @@ get_elt_at_filepos (archive, filepos) return NULL; } +/*proto* bfd_get_elt_at_index + +*; PROTO(bfd *, bfd_get_elt_at_index, (bfd *, int)); + +*/ bfd * bfd_get_elt_at_index (abfd, index) bfd *abfd; @@ -352,10 +356,10 @@ bfd_get_elt_at_index (abfd, index) } /*proto* bfd_openr_next_archived_file -Initially provided a bfd containing an archive and NULL, opens a bfd +Initially provided a BFD containing an archive and NULL, opens a BFD on the first contained element and returns that. Subsequent calls to bfd_openr_next_archived_file should pass the archive and the previous -return value to return a created bfd to the next contained element. +return value to return a created BFD to the next contained element. NULL is returned when there are no more. *; PROTO(bfd*, bfd_openr_next_archived_file, @@ -596,7 +600,7 @@ bfd_slurp_coff_armap (abfd) /* We'd like to release these allocations, but we have allocated stuff since then (using the same obstack, if bfd_release is obstack based). - So they will stick around until the bfd is closed. */ + So they will stick around until the BFD is closed. */ /* bfd_release (abfd, (PTR)raw_armap); bfd_release (abfd, (PTR)mapdata); */ bfd_has_map (abfd) = true; @@ -954,7 +958,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr) PROTO (boolean, compute_and_write_armap, (bfd *arch, unsigned int elength)); -/* The bfd is open for write and has its format set to bfd_archive */ +/* The BFD is open for write and has its format set to bfd_archive */ boolean _bfd_write_archive_contents (arch) bfd *arch; |