2001-11-06 Fred Fish <fnf@redhat.com>
[deliverable/binutils-gdb.git] / bfd / archures.c
index af5f50b723d514fabdca54f10d0fe7902180b1b5..74d44249b2847b23305d1f493dbd84ebcd0b5d67 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
-#include <ctype.h>
+#include "safe-ctype.h"
 
 /*
 
@@ -137,11 +137,10 @@ DESCRIPTION
 .#define bfd_mach_mips10000            10000
 .#define bfd_mach_mips12000            12000
 .#define bfd_mach_mips16               16
-.#define bfd_mach_mips32                32
-.#define bfd_mach_mips32_4k             3204113 {* 32, 04, octal 'K' *}
 .#define bfd_mach_mips5                 5
-.#define bfd_mach_mips64                64
 .#define bfd_mach_mips_sb1              12310201 {* octal 'SB', 01 *}
+.#define bfd_mach_mipsisa32             32
+.#define bfd_mach_mipsisa64             64
 .  bfd_arch_i386,      {* Intel 386 *}
 .#define bfd_mach_i386_i386 0
 .#define bfd_mach_i386_i8086 1
@@ -259,6 +258,7 @@ DESCRIPTION
 .#define bfd_mach_s390_esa      0
 .#define bfd_mach_s390_esame    1
 .  bfd_arch_openrisc,  {* OpenRISC *}
+.  bfd_arch_mmix,      {* Donald Knuth's educational processor *}
 .  bfd_arch_last
 .  };
 */
@@ -337,6 +337,7 @@ extern const bfd_arch_info_type bfd_avr_arch;
 extern const bfd_arch_info_type bfd_ia64_arch;
 extern const bfd_arch_info_type bfd_s390_arch;
 extern const bfd_arch_info_type bfd_openrisc_arch;
+extern const bfd_arch_info_type bfd_mmix_arch;
 
 static const bfd_arch_info_type * const bfd_archures_list[] = {
 #ifdef SELECT_ARCHITECTURES
@@ -384,6 +385,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
   &bfd_ia64_arch,
   &bfd_s390_arch,
   &bfd_openrisc_arch,
+  &bfd_mmix_arch,
 #endif
   0
 };
@@ -459,6 +461,7 @@ bfd_arch_list ()
   const char **name_ptr;
   const char **name_list;
   const bfd_arch_info_type * const *app;
+  bfd_size_type amt;
 
   /* Determine the number of architectures.  */
   vec_length = 0;
@@ -471,8 +474,8 @@ bfd_arch_list ()
        }
     }
 
-  name_list = (const char **)
-    bfd_malloc ((vec_length + 1) * sizeof (char **));
+  amt = (vec_length + 1) * sizeof (char **);
+  name_list = (const char **) bfd_malloc (amt);
   if (name_list == NULL)
     return NULL;
 
@@ -752,7 +755,7 @@ bfd_default_scan (info, string)
   printable_name_colon = strchr (info->printable_name, ':');
   if (printable_name_colon == NULL)
     {
-      int strlen_arch_name = strlen (info->arch_name);
+      size_t strlen_arch_name = strlen (info->arch_name);
       if (strncasecmp (string, info->arch_name, strlen_arch_name) == 0)
        {
          if (string[strlen_arch_name] == ':')
@@ -774,7 +777,7 @@ bfd_default_scan (info, string)
      Attempt to match: <arch> <mach>?  */
   if (printable_name_colon != NULL)
     {
-      int colon_index = printable_name_colon - info->printable_name;
+      size_t colon_index = printable_name_colon - info->printable_name;
       if (strncasecmp (string, info->printable_name, colon_index) == 0
          && strcasecmp (string + colon_index,
                         info->printable_name + colon_index + 1) == 0)
@@ -813,7 +816,7 @@ bfd_default_scan (info, string)
     }
 
   number = 0;
-  while (isdigit ((unsigned char) *ptr_src))
+  while (ISDIGIT (*ptr_src))
     {
       number = number * 10 + *ptr_src - '0';
       ptr_src++;
This page took 0.023821 seconds and 4 git commands to generate.