aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/ar.c6
-rw-r--r--binutils/nlmconv.c2
-rw-r--r--binutils/size.c4
4 files changed, 12 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index d047593..bc2bddc 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,10 @@
Wed Feb 2 13:42:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+ * nlmconv.c (main): Use bfd_get_flavour instead of struct member.
+ * ar.c (print_contents, extract_file), size.c
+ (print_berkeley_format): Use bfd_get_filename and
+ bfd_my_archive instead of dereferencing the structs directly.
+
* ar.c: Use bfd_fatal and bfd_nonfatal instead of bfd_perror and exit.
Indent. Remove DEFUNs.
diff --git a/binutils/ar.c b/binutils/ar.c
index 4afcff4..96f4213 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -528,7 +528,8 @@ print_contents (abfd)
nread = bfd_read (cbuf, 1, tocopy, abfd); /* oops -- broke
abstraction! */
if (nread != tocopy)
- fatal ("%s is not a valid archive", abfd->my_archive->filename);
+ fatal ("%s is not a valid archive",
+ bfd_get_filename (bfd_my_archive (abfd)));
fwrite (cbuf, 1, nread, stdout);
ncopied += tocopy;
}
@@ -583,7 +584,8 @@ extract_file (abfd)
nread = bfd_read (cbuf, 1, tocopy, abfd);
if (nread != tocopy)
- fatal ("%s is not a valid archive", abfd->my_archive->filename);
+ fatal ("%s is not a valid archive",
+ bfd_get_filename (bfd_my_archive (abfd)));
/* See comment above; this saves disk arm motion */
if (!ostream)
diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c
index 65f971c..14e444f 100644
--- a/binutils/nlmconv.c
+++ b/binutils/nlmconv.c
@@ -330,7 +330,7 @@ main (argc, argv)
if (! bfd_set_format (outbfd, bfd_object))
bfd_fatal (output_file);
- assert (outbfd->xvec->flavour == bfd_target_nlm_flavour);
+ assert (bfd_get_flavour (outbfd) == bfd_target_nlm_flavour);
if (bfd_arch_get_compatible (inbfd, outbfd) == NULL)
fprintf (stderr,
diff --git a/binutils/size.c b/binutils/size.c
index eeff86e..936747a 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -369,8 +369,8 @@ print_berkeley_format (abfd)
(unsigned long) total, (unsigned long) total);
fputs (bfd_get_filename (abfd), stdout);
- if (abfd->my_archive)
- printf (" (ex %s)", abfd->my_archive->filename);
+ if (bfd_my_archive (abfd))
+ printf (" (ex %s)", bfd_get_filename (bfd_my_archive (abfd)));
}
/* I REALLY miss lexical functions! */