]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* nlmconv.c (main): Use bfd_get_flavour instead of struct member.
authorDavid MacKenzie <djm@cygnus>
Thu, 3 Feb 1994 01:39:10 +0000 (01:39 +0000)
committerDavid MacKenzie <djm@cygnus>
Thu, 3 Feb 1994 01:39:10 +0000 (01:39 +0000)
* 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.

binutils/ChangeLog
binutils/ar.c
binutils/nlmconv.c
binutils/size.c

index d0475938eb142059b654237f21fa1d0a32606fe4..bc2bddc2b55abf78304745d4acbdf9d4c6e50b28 100644 (file)
@@ -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.
 
index 4afcff47eaa5f5cef2325f39ee2e298287186c68..96f4213ec745b10ab913bce7962f5757c3c27f91 100644 (file)
@@ -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)
index 65f971c36eb5e21e036a9bb759db3aa2f486c02d..14e444f47ddebac879cd9783ca062253b356a507 100644 (file)
@@ -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,
index eeff86e7040fc78cc342d6da12d718ccfddc3d5f..936747ac9b3fc1e978a6ffe72159a15743d17a82 100644 (file)
@@ -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! */