aboutsummaryrefslogtreecommitdiff
path: root/opcodes/cgen-asm.in
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-04-28 00:07:48 +0000
committerNick Clifton <nickc@redhat.com>1998-04-28 00:07:48 +0000
commit240f5c9faaf37d76a793c86a5b880edc37105249 (patch)
treeaeb30b222ed45483e1d8b3fcc4ff6b0492e4f3c6 /opcodes/cgen-asm.in
parentd9e3a135fab5123dd33b4bbbf677f82ec0351e1d (diff)
downloadgdb-240f5c9faaf37d76a793c86a5b880edc37105249.zip
gdb-240f5c9faaf37d76a793c86a5b880edc37105249.tar.gz
gdb-240f5c9faaf37d76a793c86a5b880edc37105249.tar.bz2
Added Internationalisation macros to English text strings.
Diffstat (limited to 'opcodes/cgen-asm.in')
-rw-r--r--opcodes/cgen-asm.in30
1 files changed, 16 insertions, 14 deletions
diff --git a/opcodes/cgen-asm.in b/opcodes/cgen-asm.in
index 722c0be..b714009 100644
--- a/opcodes/cgen-asm.in
+++ b/opcodes/cgen-asm.in
@@ -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;
}