This is the mail archive of the gdb-patches@sources.redhat.com 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]

[Commit] Slight adjustments to i18n mark-ups in Ada files.


A few of the mark-ups in ada-lang.c and ada-typeprint.c were for 
output of Ada keywords that should not be translated.  Also, a small
error was introduced in the process (missing "record" in plain record types).
Tested on GNU/Linux with no regressions.

Paul Hilfinger

ChangeLog
2004-12-21  Paul N. Hilfinger  <hilfingr@otisco.mckusick.com>

	* ada-lang.c (ada_print_subexp): Remove i18n markup from Ada code
	output.
	* ada-typeprint.c (ada_typedef_print): Ditto.
	(print_unchecked_union_type): Ditto.
	(print_record_type): Ditto, and correct output for non-derived
	types that was inadvertently left off during the markup.


Index: gdb/ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.64
diff -u -p -r1.64 ada-lang.c
--- gdb/ada-lang.c	12 Dec 2004 17:06:25 -0000	1.64
+++ gdb/ada-lang.c	21 Dec 2004 09:54:31 -0000
@@ -8384,9 +8384,9 @@ ada_print_subexp (struct expression *exp
       /* XXX: sprint_subexp */
       *pos += oplen;
       print_subexp (exp, pos, stream, PREC_SUFFIX);
-      fputs_filtered (_(" in "), stream);
+      fputs_filtered (" in ", stream);
       print_subexp (exp, pos, stream, PREC_SUFFIX);
-      fputs_filtered (_("'range"), stream);
+      fputs_filtered ("'range", stream);
       if (exp->elts[pc + 1].longconst > 1)
         fprintf_filtered (stream, "(%ld)",
                           (long) exp->elts[pc + 1].longconst);
@@ -8398,7 +8398,7 @@ ada_print_subexp (struct expression *exp
         fputs_filtered ("(", stream);
       /* XXX: sprint_subexp */
       print_subexp (exp, pos, stream, PREC_SUFFIX);
-      fputs_filtered (_(" in "), stream);
+      fputs_filtered (" in ", stream);
       print_subexp (exp, pos, stream, PREC_EQUAL);
       fputs_filtered (" .. ", stream);
       print_subexp (exp, pos, stream, PREC_EQUAL);
@@ -8451,7 +8451,7 @@ ada_print_subexp (struct expression *exp
       *pos += oplen;
       /* XXX: sprint_subexp */
       print_subexp (exp, pos, stream, PREC_SUFFIX);
-      fputs_filtered (_(" in "), stream);
+      fputs_filtered (" in ", stream);
       LA_PRINT_TYPE (exp->elts[pc + 1].type, "", stream, 1, 0);
       return;
     }
Index: gdb/ada-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-typeprint.c,v
retrieving revision 1.10
diff -u -p -r1.10 ada-typeprint.c
--- gdb/ada-typeprint.c	12 Dec 2004 17:06:26 -0000	1.10
+++ gdb/ada-typeprint.c	21 Dec 2004 09:54:31 -0000
@@ -125,7 +125,7 @@ ada_typedef_print (struct type *type, st
 		   struct ui_file *stream)
 {
    /* XXX: type_sprint */
-  fprintf_filtered (stream, _("type %.*s is "),
+  fprintf_filtered (stream, "type %.*s is ",
 		    ada_name_prefix_len (SYMBOL_PRINT_NAME (new)),
 		    SYMBOL_PRINT_NAME (new));
   type_print (type, "", stream, 1);
@@ -633,13 +633,15 @@ print_record_type (struct type *type0, s
 
   parent_type = ada_parent_type (type);
   if (ada_type_name (parent_type) != NULL)
-    fprintf_filtered (stream, _("new %s with record"),
+    fprintf_filtered (stream, "new %s with record",
 		      decoded_type_name (parent_type));
   else if (parent_type == NULL && ada_is_tagged_type (type, 0))
-    fprintf_filtered (stream, _("tagged record"));
+    fprintf_filtered (stream, "tagged record");
+  else
+    fprintf_filtered (stream, "record");
 
   if (show < 0)
-    fprintf_filtered (stream, _(" ... end record"));
+    fprintf_filtered (stream, " ... end record");
   else
     {
       int flds;
@@ -651,11 +653,11 @@ print_record_type (struct type *type0, s
       flds += print_record_field_types (type, type, stream, show, level);
 
       if (flds > 0)
-	fprintf_filtered (stream, _("\n%*send record"), level, "");
+	fprintf_filtered (stream, "\n%*send record", level, "");
       else if (flds < 0)
 	fprintf_filtered (stream, _(" <incomplete type> end record"));
       else
-	fprintf_filtered (stream, _(" null; end record"));
+	fprintf_filtered (stream, " null; end record");
     }
 }
 
@@ -668,18 +670,18 @@ print_unchecked_union_type (struct type 
 			    int show, int level)
 {
   if (show < 0)
-    fprintf_filtered (stream, _("record (?) is ... end record"));
+    fprintf_filtered (stream, "record (?) is ... end record");
   else if (TYPE_NFIELDS (type) == 0)
-    fprintf_filtered (stream, _("record (?) is null; end record"));
+    fprintf_filtered (stream, "record (?) is null; end record");
   else
     {
       int i;
 
-      fprintf_filtered (stream, _("record (?) is\n%*scase ? is"), level + 4, "");
+      fprintf_filtered (stream, "record (?) is\n%*scase ? is", level + 4, "");
 
       for (i = 0; i < TYPE_NFIELDS (type); i += 1)
 	{
-	  fprintf_filtered (stream, _("\n%*swhen ? =>\n%*s"), level + 8, "",
+	  fprintf_filtered (stream, "\n%*swhen ? =>\n%*s", level + 8, "",
 			    level + 12, "");
 	  ada_print_type (TYPE_FIELD_TYPE (type, i),
 			  TYPE_FIELD_NAME (type, i),
@@ -687,7 +689,7 @@ print_unchecked_union_type (struct type 
 	  fprintf_filtered (stream, ";");
 	}
 
-      fprintf_filtered (stream, _("\n%*send case;\n%*send record"),
+      fprintf_filtered (stream, "\n%*send case;\n%*send record",
 			level + 4, "", level, "");
     }
 }


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