]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Added Internationalisation macros to English text strings.
authorNick Clifton <nickc@redhat.com>
Tue, 28 Apr 1998 00:07:48 +0000 (00:07 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 28 Apr 1998 00:07:48 +0000 (00:07 +0000)
opcodes/ChangeLog
opcodes/cgen-asm.c
opcodes/cgen-asm.in
opcodes/opintl.h
opcodes/po/POTFILES.in

index 0e3bfa89e120ab65e3396319b08c6d3a70c79b62..25f60c8eb57ed2af388f76bc8a2b538b11744542 100644 (file)
@@ -17,7 +17,30 @@ Mon Apr 27 14:31:00 1998  Nick Clifton  <nickc@cygnus.com>
        * aclocal.m4: Rebuilt.
        * config.in: Rebuilt.
        * configure: Rebuilt.
+       * alpha-opc.c: Internationalised.
+       * arc-dis.c: Internationalised.
+       * arc-opc.c: Internationalised.
        * arm-dis.c: Internationalised.
+       * cgen-asm.c: Internationalised.
+       * cgen-asm.in: Internationalised.
+       * cgen-dis.in: Internationalised.
+       * d30v-dis.c: Internationalised.
+       * dis-buf.c: Internationalised.
+       * dvp-dis.c: Internationalised.
+       * dvp-opc.c: Internationalised. 
+       * dvp-opc.c: Internationalised.
+       * h8300-dis.c: Internationalised.
+       * h8500-dis.c: Internationalised.
+       * i386-dis.c: Internationalised.
+       * m10200-dis.c: Internationalised.
+       * m10300-dis.c: Internationalised.
+       * m68k-dis.c: Internationalised.
+       * m88k-dis.c: Internationalised.
+       * mips-dis.c: Internationalised.
+       * ns32k-dis.c: Internationalised.
+       * opintl.h: Internationalised.
+       * ppc-opc.c: Internationalised.
+       * sparc-dis.c: Internationalised.
        * v850-dis.c: Internationalised.
        * v850-opc.c: Internationalised.
        
index 3519f8a7494ed7ca430381deccdaa2e226e19750..e522d160157e116f4fea1264939a1d3655f2830e 100644 (file)
@@ -26,6 +26,7 @@
 #include "bfd.h"
 #include "symcat.h"
 #include "opcode/cgen.h"
+#include "opintl.h"
 
 /* Operand parsing callback.  */
 const char * (*cgen_parse_operand_fn)
@@ -235,7 +236,7 @@ cgen_parse_keyword (strp, keyword_table, valuep)
     ++p;
 
   if (p - start >= (int) sizeof (buf))
-    return "unrecognized keyword/register name";
+    return _("unrecognized keyword/register name");
 
   memcpy (buf, start, p - start);
   buf[p - start] = 0;
@@ -331,11 +332,11 @@ cgen_validate_signed_integer (value, min, max)
 {
   if (value < min || value > max)
     {
-      const char *err =
-       "operand out of range (%ld not between %ld and %ld)";
       static char buf[100];
 
-      sprintf (buf, err, value, min, max);
+      /* xgettext:c-format */
+      sprintf (buf, _("operand out of range (%ld not between %ld and %ld)"),
+                     value, min, max);
       return buf;
     }
 
@@ -352,11 +353,10 @@ cgen_validate_unsigned_integer (value, min, max)
 {
   if (value < min || value > max)
     {
-      const char *err =
-       "operand out of range (%lu not between %lu and %lu)";
       static char buf[100];
 
-      sprintf (buf, err, value, min, max);
+      sprintf (buf, _("operand out of range (%lu not between %lu and %lu)"),
+              value, min, max);
       return buf;
     }
 
index 722c0be876277ebc19575b3187da8ae217b51002..b714009d69b840beac69fb3e3b842075080a942d 100644 (file)
@@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "bfd.h"
 #include "symcat.h"
 #include "@arch@-opc.h"
+#include "opintl.h"
 
 /* ??? The layout of this stuff is still work in progress.
    For speed in assembly/disassembly, we use inline functions.  That of course
@@ -76,9 +77,8 @@ insert_normal (value, attrs, start, length, total_length, buffer)
       unsigned long max = (1 << length) - 1;
       if ((unsigned long) value > max)
        {
-         const char *err = "operand out of range (%lu not between 0 and %lu)";
-
-         sprintf (buf, err, value, max);
+         sprintf (buf, _("operand out of range (%lu not between 0 and %lu)"),
+                  value, max);
          return buf;
        }
     }
@@ -87,12 +87,9 @@ insert_normal (value, attrs, start, length, total_length, buffer)
       long min = - (1 << (length - 1));
       long max = (1 << (length - 1)) - 1;
       if (value < min || value > max)
-       {
-         const char *err = "operand out of range (%ld not between %ld and %ld)";
-
-         sprintf (buf, err, value, min, max);
-         return buf;
-       }
+       return sprintf
+         (buf, _("operand out of range (%ld not between %ld and %ld)"),
+          value, min, max);
     }
 
 #if 0 /*def CGEN_INT_INSN*/
@@ -182,8 +179,9 @@ parse_insn_normal (insn, strp, fields)
   p = CGEN_INSN_MNEMONIC (insn);
   while (* p && * p == * str)
     ++ p, ++ str;
+  
   if (* p || (* str && !isspace (* str)))
-    return "unrecognized instruction";
+    return _("unrecognized instruction");
 
   CGEN_INIT_PARSE ();
   cgen_init_parse_operand ();
@@ -221,7 +219,7 @@ parse_insn_normal (insn, strp, fields)
              /* Syntax char didn't match.  Can't be this insn.  */
              /* FIXME: would like to return something like
                 "expected char `c'" */
-             return "syntax error";
+             return _("syntax error");
            }
          continue;
        }
@@ -247,7 +245,7 @@ parse_insn_normal (insn, strp, fields)
        ++ str;
 
       if (* str != '\0')
-       return "junk at end of line"; /* FIXME: would like to include `str' */
+       return _("junk at end of line"); /* FIXME: would like to include `str' */
 
       return NULL;
     }
@@ -397,8 +395,12 @@ const CGEN_INSN *
      Need to track why it failed and pick the right one.  */
   {
     static char errbuf[100];
-    sprintf (errbuf, "bad instruction `%.50s%s'",
-            start, strlen (start) > 50 ? "..." : "");
+    /* xgettext:c-format */
+    if (strlen (start) > 50)
+      sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+    else
+      sprintf (errbuf, _("bad instruction `%.50s'"), start);
+      
     *errmsg = errbuf;
     return NULL;
   }
index 87f1d26f9c40d3b388e42b4f9ef295407b319e6e..8a5203f73ba0d931ff7a7b54b53b299ffbb1d30e 100644 (file)
    02111-1307, USA. */
 
 #ifdef ENABLE_NLS
-#include <libintl.h>
-#define _(String) gettext (String)
-#ifdef gettext_noop
-#define N_(String) gettext_noop (String)
-#else
-#define N_(String) (String)
-#endif
+# include <libintl.h>
+# define _(String) gettext (String)
+# ifdef gettext_noop
+#  define N_(String) gettext_noop (String)
+# else
+#  define N_(String) (String)
+# endif
 #else
 /* Stubs that do something close enough.  */
-#define textdomain(String) (String)
-#define gettext(String) (String)
-#define dgettext(Domain,Message) (Message)
-#define dcgettext(Domain,Message,Type) (Message)
-#define bindtextdomain(Domain,Directory) (Domain)
-#define _(String) (String)
-#define N_(String) (String)
+# define textdomain(String) (String)
+# define gettext(String) (String)
+# define dgettext(Domain,Message) (Message)
+# define dcgettext(Domain,Message,Type) (Message)
+# define bindtextdomain(Domain,Directory) (Domain)
+# define _(String) (String)
+# define N_(String) (String)
 /* In this case we don't care about the value.  */
-#ifndef LC_MESSAGES
-#define LC_MESSAGES 0
-#endif
+# ifndef LC_MESSAGES
+#  define LC_MESSAGES 0
+# endif
 #endif
index b175de3137ede74712c9f149f2f9cf252aba1d76..36c079c31686bf953c3541f6aa63d6d70f541618 100644 (file)
@@ -1,5 +1,4 @@
 a29k-dis.c
-acconfig.h
 alpha-dis.c
 alpha-opc.c
 arc-dis.c
@@ -41,14 +40,12 @@ mips-dis.c
 mips-opc.c
 mips16-opc.c
 ns32k-dis.c
-opintl.h
 ppc-dis.c
 ppc-opc.c
 sh-dis.c
 sh-opc.h
 sparc-dis.c
 sparc-opc.c
-sysdep.h
 tic30-dis.c
 tic80-dis.c
 tic80-opc.c