* bfd-in.h: Comment typo fix. Formatting.
[binutils-gdb.git] / binutils / bucomm.c
index 35112fc71661ae6973d6d75d22a7a629c238c53b..9609aeece77c18ae595bb997866f93497dd5a5ce 100644 (file)
@@ -107,7 +107,7 @@ set_default_bfd_target ()
           target, bfd_errmsg (bfd_get_error ()));
 }
 
-/* After a false return from bfd_check_format_matches with
+/* After a FALSE return from bfd_check_format_matches with
    bfd_get_error () == bfd_error_file_ambiguously_recognized, print
    the possible matching targets.  */
 
@@ -128,16 +128,18 @@ list_supported_targets (name, f)
      const char *name;
      FILE *f;
 {
-  extern const bfd_target *const *bfd_target_vector;
   int t;
+  const char **targ_names = bfd_target_list ();
 
   if (name == NULL)
     fprintf (f, _("Supported targets:"));
   else
     fprintf (f, _("%s: supported targets:"), name);
-  for (t = 0; bfd_target_vector[t] != NULL; t++)
-    fprintf (f, " %s", bfd_target_vector[t]->name);
+
+  for (t = 0; targ_names[t] != NULL; t++)
+    fprintf (f, " %s", targ_names[t]);
   fprintf (f, "\n");
+  free (targ_names);
 }
 
 /* List the supported architectures.  */
@@ -147,7 +149,7 @@ list_supported_architectures (name, f)
      const char *name;
      FILE *f;
 {
-  const char** arch;
+  const char **arch;
 
   if (name == NULL)
     fprintf (f, _("Supported architectures:"));
@@ -167,7 +169,7 @@ void
 print_arelt_descr (file, abfd, verbose)
      FILE *file;
      bfd *abfd;
-     boolean verbose;
+     bfd_boolean verbose;
 {
   struct stat buf;