This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OBV] More message markup fixes


  FYI, one more bunch of ARI fixes
committed under obvious rule.

Pierre


2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>

	ARI fixes: Add missing internationalization markups throughout
	C source files.
	* darwin-nat-info.c: Ditto.
	* record.c: Ditto.
	* remote.c: Ditto.
	* mi/mi-main.c: Ditto.

Index: darwin-nat-info.c
===================================================================
RCS file: /cvs/src/src/gdb/darwin-nat-info.c,v
retrieving revision 1.14
diff -u -p -r1.14 darwin-nat-info.c
--- darwin-nat-info.c	27 Feb 2011 16:25:37 -0000	1.14
+++ darwin-nat-info.c	18 Mar 2011 14:19:02 -0000
@@ -51,7 +51,7 @@
 
 #define CHECK_ARGS(what, args) do { \
   if ((NULL == args) || ((args[0] != '0') && (args[1] != 'x'))) \
-    error("%s must be specified with 0x...", what);		\
+    error(_("%s must be specified with 0x..."), what);		\
 } while (0)
 
 #define PRINT_FIELD(structure, field) \
Index: record.c
===================================================================
RCS file: /cvs/src/src/gdb/record.c,v
retrieving revision 1.62
diff -u -p -r1.62 record.c
--- record.c	18 Mar 2011 13:09:47 -0000	1.62
+++ record.c	18 Mar 2011 14:19:02 -0000
@@ -739,8 +739,8 @@ record_exec_insn (struct regcache *regca
               {
                 entry->u.mem.mem_entry_not_accessible = 1;
                 if (record_debug)
-                  warning ("Process record: error reading memory at "
-			   "addr = %s len = %d.",
+                  warning (_("Process record: error reading memory at "
+			     "addr = %s len = %d."),
                            paddress (gdbarch, entry->u.mem.addr),
                            entry->u.mem.len);
               }
@@ -752,8 +752,8 @@ record_exec_insn (struct regcache *regca
                   {
                     entry->u.mem.mem_entry_not_accessible = 1;
                     if (record_debug)
-                      warning ("Process record: error writing memory at "
-			       "addr = %s len = %d.",
+                      warning (_("Process record: error writing memory at "
+				 "addr = %s len = %d."),
                                paddress (gdbarch, entry->u.mem.addr),
                                entry->u.mem.len);
                   }
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.440
diff -u -p -r1.440 remote.c
--- remote.c	16 Mar 2011 17:59:02 -0000	1.440
+++ remote.c	18 Mar 2011 14:19:03 -0000
@@ -3537,7 +3537,7 @@ remote_set_permissions (void)
   /* If the target didn't like the packet, warn the user.  Do not try
      to undo the user's settings, that would just be maddening.  */
   if (strcmp (rs->buf, "OK") != 0)
-    warning ("Remote refused setting permissions with: %s", rs->buf);
+    warning (_("Remote refused setting permissions with: %s"), rs->buf);
 }
 
 /* This type describes each known response to the qSupported
@@ -4549,7 +4549,7 @@ remote_resume (struct target_ops *ops,
     {
       /* We don't pass signals to the target in reverse exec mode.  */
       if (info_verbose && siggnal != TARGET_SIGNAL_0)
-	warning (" - Can't pass signal %d to target in reverse: ignored.\n",
+	warning (_(" - Can't pass signal %d to target in reverse:
ignored."),
 		 siggnal);
 
       if (step 
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.193
diff -u -p -r1.193 mi-main.c
--- mi/mi-main.c	21 Feb 2011 23:40:46 -0000	1.193
+++ mi/mi-main.c	18 Mar 2011 14:19:04 -0000
@@ -489,7 +489,7 @@ mi_cmd_thread_list_ids (char *command, c
   char *mi_error_message;
 
   if (argc != 0)
-    error ("-thread-list-ids: No arguments required.");
+    error (_("-thread-list-ids: No arguments required."));
 
   rc = gdb_list_thread_ids (uiout, &mi_error_message);
 
@@ -504,7 +504,7 @@ void
 mi_cmd_thread_info (char *command, char **argv, int argc)
 {
   if (argc != 0 && argc != 1)
-    error ("Invalid MI command");
+    error (_("Invalid MI command"));
 
   print_thread_info (uiout, argv[0], -1);
 }
@@ -827,8 +827,8 @@ mi_cmd_list_thread_groups (char *command
 	  else if (strcmp (optarg, "1") == 0)
 	    recurse = 1;
 	  else
-	    error ("only '0' and '1' are valid values "
-		   "for the '--recurse' option");
+	    error (_("only '0' and '1' are valid values "
+		     "for the '--recurse' option"));
 	  break;
 	}
     }
@@ -839,12 +839,12 @@ mi_cmd_list_thread_groups (char *command
       int inf;
 
       if (*(argv[optind]) != 'i')
-	error ("invalid syntax of group id '%s'", argv[optind]);
+	error (_("invalid syntax of group id '%s'"), argv[optind]);
 
       inf = strtoul (argv[optind] + 1, &end, 0);
 
       if (*end != '\0')
-	error ("invalid syntax of group id '%s'", argv[optind]);
+	error (_("invalid syntax of group id '%s'"), argv[optind]);
       VEC_safe_push (int, ids, inf);
     }
   if (VEC_length (int, ids) > 1)
@@ -865,7 +865,7 @@ mi_cmd_list_thread_groups (char *command
       struct inferior *inf = find_inferior_id (id);
 
       if (!inf)
-	error ("Non-existent thread group id '%d'", id);
+	error (_("Non-existent thread group id '%d'"), id);
       
       print_thread_info (uiout, NULL, inf->pid);
     }
@@ -927,7 +927,7 @@ mi_cmd_data_list_register_names (char *c
     {
       regnum = atoi (argv[i]);
       if (regnum < 0 || regnum >= numregs)
-	error ("bad register number");
+	error (_("bad register number"));
 
       if (gdbarch_register_name (gdbarch, regnum) == NULL
 	  || *(gdbarch_register_name (gdbarch, regnum)) == '\0')
@@ -979,8 +979,8 @@ mi_cmd_data_list_changed_registers (char
 	    continue;
 	  changed = register_changed_p (regnum, prev_regs, this_regs);
 	  if (changed < 0)
-	    error ("-data-list-changed-registers: "
-		   "Unable to read register contents.");
+	    error (_("-data-list-changed-registers: "
+		     "Unable to read register contents."));
 	  else if (changed)
 	    ui_out_field_int (uiout, NULL, regnum);
 	}
@@ -998,13 +998,13 @@ mi_cmd_data_list_changed_registers (char
 	{
 	  changed = register_changed_p (regnum, prev_regs, this_regs);
 	  if (changed < 0)
-	    error ("-data-list-changed-registers: "
-		   "Unable to read register contents.");
+	    error (_("-data-list-changed-registers: "
+		     "Unable to read register contents."));
 	  else if (changed)
 	    ui_out_field_int (uiout, NULL, regnum);
 	}
       else
-	error ("bad register number");
+	error (_("bad register number"));
     }
   do_cleanups (cleanup);
 }
@@ -1058,8 +1058,8 @@ mi_cmd_data_list_register_values (char *
      upon the particular processor being debugged.  */
 
   if (argc == 0)
-    error ("-data-list-register-values: Usage: "
-	   "-data-list-register-values <format> [<regnum1>...<regnumN>]");
+    error (_("-data-list-register-values: Usage: "
+	     "-data-list-register-values <format>
[<regnum1>...<regnumN>]"));
 
   format = (int) argv[0][0];
 
@@ -1101,7 +1101,7 @@ mi_cmd_data_list_register_values (char *
 	  do_cleanups (tuple_cleanup);
 	}
       else
-	error ("bad register number");
+	error (_("bad register number"));
     }
   do_cleanups (list_cleanup);
 }
@@ -1124,7 +1124,7 @@ get_register (struct frame_info *frame, 
   val = get_frame_register_value (frame, regnum);
 
   if (value_optimized_out (val))
-    error ("Optimized out");
+    error (_("Optimized out"));
 
   if (format == 'r')
     {
@@ -1183,20 +1183,20 @@ mi_cmd_data_write_register_values (char 
   numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
 
   if (argc == 0)
-    error ("-data-write-register-values: Usage: -data-write-register-"
-	   "values <format> [<regnum1> <value1>...<regnumN> <valueN>]");
+    error (_("-data-write-register-values: Usage: -data-write-register-"
+	     "values <format> [<regnum1> <value1>...<regnumN> <valueN>]"));
 
   format = (int) argv[0][0];
 
   if (!target_has_registers)
-    error ("-data-write-register-values: No registers.");
+    error (_("-data-write-register-values: No registers."));
 
   if (!(argc - 1))
-    error ("-data-write-register-values: No regs and values specified.");
+    error (_("-data-write-register-values: No regs and values
specified."));
 
   if ((argc - 1) % 2)
-    error ("-data-write-register-values: "
-	   "Regs and vals are not in pairs.");
+    error (_("-data-write-register-values: "
+	     "Regs and vals are not in pairs."));
 
   for (i = 1; i < argc; i = i + 2)
     {
@@ -1215,7 +1215,7 @@ mi_cmd_data_write_register_values (char 
 	  regcache_cooked_write_signed (regcache, regnum, value);
 	}
       else
-	error ("bad register number");
+	error (_("bad register number"));
     }
 }
 
@@ -1236,8 +1236,8 @@ mi_cmd_data_evaluate_expression (char *c
   if (argc != 1)
     {
       ui_out_stream_delete (stb);
-      error ("-data-evaluate-expression: "
-	     "Usage: -data-evaluate-expression expression");
+      error (_("-data-evaluate-expression: "
+	       "Usage: -data-evaluate-expression expression"));
     }
 
   expr = parse_expression (argv[0]);
@@ -1323,8 +1323,8 @@ mi_cmd_data_read_memory (char *command, 
   argc -= optind;
 
   if (argc < 5 || argc > 6)
-    error ("-data-read-memory: Usage: "
-	   "ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
+    error (_("-data-read-memory: Usage: "
+	     "ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR]."));
 
   /* Extract all the arguments. */
 
@@ -1360,12 +1360,12 @@ mi_cmd_data_read_memory (char *command, 
   /* The number of rows.  */
   nr_rows = atol (argv[3]);
   if (nr_rows <= 0)
-    error ("-data-read-memory: invalid number of rows.");
+    error (_("-data-read-memory: invalid number of rows."));
 
   /* Number of bytes per row.  */
   nr_cols = atol (argv[4]);
   if (nr_cols <= 0)
-    error ("-data-read-memory: invalid number of columns.");
+    error (_("-data-read-memory: invalid number of columns."));
 
   /* The un-printable character when printing ascii.  */
   if (argc == 6)
@@ -1384,7 +1384,7 @@ mi_cmd_data_read_memory (char *command, 
 			  TARGET_OBJECT_MEMORY, NULL, mbuf,
 			  addr, total_bytes);
   if (nr_bytes <= 0)
-    error ("Unable to read memory.");
+    error (_("Unable to read memory."));
 
   /* Output the header information.  */
   ui_out_field_core_addr (uiout, "addr", gdbarch, addr);
@@ -1507,7 +1507,7 @@ mi_cmd_data_read_memory_bytes (char *com
   argc -= optind;
 
   if (argc != 2)
-    error ("Usage: [ -o OFFSET ] ADDR LENGTH.");
+    error (_("Usage: [ -o OFFSET ] ADDR LENGTH."));
 
   addr = parse_and_eval_address (argv[0]) + offset;
   length = atol (argv[1]);
@@ -1517,7 +1517,7 @@ mi_cmd_data_read_memory_bytes (char *com
   cleanups = make_cleanup (free_memory_read_result_vector, result);
 
   if (VEC_length (memory_read_result_s, result) == 0)
-    error ("Unable to read memory.");
+    error (_("Unable to read memory."));
 
   make_cleanup_ui_out_list_begin_end (uiout, "memory");
   for (ix = 0;
@@ -1609,8 +1609,8 @@ mi_cmd_data_write_memory (char *command,
   argc -= optind;
 
   if (argc != 4)
-    error ("-data-write-memory: Usage: "
-	   "[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
+    error (_("-data-write-memory: Usage: "
+	     "[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE."));
 
   /* Extract all the arguments.  */
   /* Start address of the memory dump.  */
@@ -1650,7 +1650,7 @@ mi_cmd_data_write_memory_bytes (char *co
   struct cleanup *back_to;
 
   if (argc != 2)
-    error ("Usage: ADDR DATA.");
+    error (_("Usage: ADDR DATA."));
 
   addr = parse_and_eval_address (argv[0]);
   cdata = argv[1];
@@ -1694,7 +1694,7 @@ mi_cmd_enable_timings (char *command, ch
   return;
 
  usage_error:
-  error ("-enable-timings: Usage: %s {yes|no}", command);
+  error (_("-enable-timings: Usage: %s {yes|no}"), command);
 }
 
 void
@@ -1718,7 +1718,7 @@ mi_cmd_list_features (char *command, cha
       return;
     }
 
-  error ("-list-features should be passed no arguments");
+  error (_("-list-features should be passed no arguments"));
 }
 
 void
@@ -1738,7 +1738,7 @@ mi_cmd_list_target_features (char *comma
       return;
     }
 
-  error ("-list-target-features should be passed no arguments");
+  error (_("-list-target-features should be passed no arguments"));
 }
 
 void
@@ -1773,14 +1773,14 @@ mi_cmd_remove_inferior (char *command, c
   struct inferior *inf;
 
   if (argc != 1)
-    error ("-remove-inferior should be passed a single argument");
+    error (_("-remove-inferior should be passed a single argument"));
 
   if (sscanf (argv[0], "i%d", &id) != 1)
-    error ("the thread group id is syntactically invalid");
+    error (_("the thread group id is syntactically invalid"));
 
   inf = find_inferior_id (id);
   if (!inf)
-    error ("the specified thread group does not exist");
+    error (_("the specified thread group does not exist"));
 
   if (inf->pid != 0)
     error (_("cannot remove an active inferior"));



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]