2005-02-14 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / memattr.c
index 05ad413cc0afb63486d3f12660bc9809568f3033..7f4f0740b3e21681dbed11431bb6df2d7d25452a 100644 (file)
@@ -49,7 +49,7 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
   /* lo == hi is a useless empty region */
   if (lo >= hi && hi != 0)
     {
-      printf_unfiltered ("invalid memory region: low >= high\n");
+      printf_unfiltered (_("invalid memory region: low >= high\n"));
       return NULL;
     }
 
@@ -61,7 +61,7 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
          || (hi > n->lo && (hi <= n->hi || n->hi == 0))
          || (lo <= n->lo && (hi >= n->hi || hi == 0)))
        {
-         printf_unfiltered ("overlapping memory region\n");
+         printf_unfiltered (_("overlapping memory region\n"));
          return NULL;
        }
       n = n->next;
@@ -140,16 +140,16 @@ mem_command (char *args, int from_tty)
   struct mem_attrib attrib;
 
   if (!args)
-    error_no_arg ("No mem");
+    error_no_arg (_("No mem"));
 
   tok = strtok (args, " \t");
   if (!tok)
-    error ("no lo address");
+    error (_("no lo address"));
   lo = parse_and_eval_address (tok);
 
   tok = strtok (NULL, " \t");
   if (!tok)
-    error ("no hi address");
+    error (_("no hi address"));
   hi = parse_and_eval_address (tok);
 
   attrib = default_mem_attrib;
@@ -167,19 +167,19 @@ mem_command (char *args, int from_tty)
       else if (strcmp (tok, "16") == 0)
        {
          if ((lo % 2 != 0) || (hi % 2 != 0))
-           error ("region bounds not 16 bit aligned");
+           error (_("region bounds not 16 bit aligned"));
          attrib.width = MEM_WIDTH_16;
        }
       else if (strcmp (tok, "32") == 0)
        {
          if ((lo % 4 != 0) || (hi % 4 != 0))
-           error ("region bounds not 32 bit aligned");
+           error (_("region bounds not 32 bit aligned"));
          attrib.width = MEM_WIDTH_32;
        }
       else if (strcmp (tok, "64") == 0)
        {
          if ((lo % 8 != 0) || (hi % 8 != 0))
-           error ("region bounds not 64 bit aligned");
+           error (_("region bounds not 64 bit aligned"));
          attrib.width = MEM_WIDTH_64;
        }
 
@@ -203,7 +203,7 @@ mem_command (char *args, int from_tty)
 #endif
 
       else
-       error ("unknown attribute: %s", tok);
+       error (_("unknown attribute: %s"), tok);
     }
 
   create_mem_region (lo, hi, &attrib);
@@ -218,7 +218,7 @@ mem_info_command (char *args, int from_tty)
 
   if (!mem_region_chain)
     {
-      printf_unfiltered ("There are no memory regions defined.\n");
+      printf_unfiltered (_("There are no memory regions defined.\n"));
       return;
     }
 
@@ -240,9 +240,9 @@ mem_info_command (char *args, int from_tty)
                       m->number,
                       m->enabled_p ? 'y' : 'n');
       if (TARGET_ADDR_BIT <= 32)
-       tmp = local_hex_string_custom ((unsigned long) m->lo, "08l");
+       tmp = hex_string_custom ((unsigned long) m->lo, 8);
       else
-       tmp = local_hex_string_custom ((unsigned long) m->lo, "016l");
+       tmp = hex_string_custom ((unsigned long) m->lo, 16);
       
       printf_filtered ("%s ", tmp);
 
@@ -251,14 +251,14 @@ mem_info_command (char *args, int from_tty)
        if (m->hi == 0)
          tmp = "0x100000000";
        else
-         tmp = local_hex_string_custom ((unsigned long) m->hi, "08l");
+         tmp = hex_string_custom ((unsigned long) m->hi, 8);
        }
       else
        {
        if (m->hi == 0)
          tmp = "0x10000000000000000";
        else
-         tmp = local_hex_string_custom ((unsigned long) m->hi, "016l");
+         tmp = hex_string_custom ((unsigned long) m->hi, 16);
        }
 
       printf_filtered ("%s ", tmp);
@@ -346,7 +346,7 @@ mem_enable (int num)
        m->enabled_p = 1;
        return;
       }
-  printf_unfiltered ("No memory region number %d.\n", num);
+  printf_unfiltered (_("No memory region number %d.\n"), num);
 }
 
 static void
@@ -371,7 +371,7 @@ mem_enable_command (char *args, int from_tty)
        while (*p1 >= '0' && *p1 <= '9')
          p1++;
        if (*p1 && *p1 != ' ' && *p1 != '\t')
-         error ("Arguments must be memory region numbers.");
+         error (_("Arguments must be memory region numbers."));
 
        num = atoi (p);
        mem_enable (num);
@@ -396,7 +396,7 @@ mem_disable (int num)
        m->enabled_p = 0;
        return;
       }
-  printf_unfiltered ("No memory region number %d.\n", num);
+  printf_unfiltered (_("No memory region number %d.\n"), num);
 }
 
 static void
@@ -421,7 +421,7 @@ mem_disable_command (char *args, int from_tty)
        while (*p1 >= '0' && *p1 <= '9')
          p1++;
        if (*p1 && *p1 != ' ' && *p1 != '\t')
-         error ("Arguments must be memory region numbers.");
+         error (_("Arguments must be memory region numbers."));
 
        num = atoi (p);
        mem_disable (num);
@@ -455,7 +455,7 @@ mem_delete (int num)
 
   if (!mem_region_chain)
     {
-      printf_unfiltered ("No memory region number %d.\n", num);
+      printf_unfiltered (_("No memory region number %d.\n"), num);
       return;
     }
 
@@ -501,7 +501,7 @@ mem_delete_command (char *args, int from_tty)
       while (*p1 >= '0' && *p1 <= '9')
        p1++;
       if (*p1 && *p1 != ' ' && *p1 != '\t')
-       error ("Arguments must be memory region numbers.");
+       error (_("Arguments must be memory region numbers."));
 
       num = atoi (p);
       mem_delete (num);
@@ -514,6 +514,8 @@ mem_delete_command (char *args, int from_tty)
   dont_repeat ();
 }
 \f
+extern initialize_file_ftype _initialize_mem; /* -Wmissing-prototype */
+
 void
 _initialize_mem (void)
 {
This page took 0.026668 seconds and 4 git commands to generate.