summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-13 09:38:04 +0000
committerNick Clifton <nickc@redhat.com>2001-10-13 09:38:04 +0000
commit3c87e32cdd7f00d883bd7c0f68d86577e60eb91b (patch)
tree11d94ec3755fd7b24e7d5b2143c1c0cb891ad808
parentdcd25285ee2f919b7fcaca539909153d07b68162 (diff)
downloadgdb-3c87e32cdd7f00d883bd7c0f68d86577e60eb91b.tar.gz
Use safe-ctype.h not ctype.h
-rw-r--r--opcodes/ChangeLog20
-rw-r--r--opcodes/cgen-asm.in39
-rw-r--r--opcodes/cgen-ibld.in2
-rw-r--r--opcodes/fr30-asm.c39
-rw-r--r--opcodes/fr30-desc.c1
-rw-r--r--opcodes/fr30-ibld.c2
-rw-r--r--opcodes/m32r-asm.c39
-rw-r--r--opcodes/m32r-desc.c1
-rw-r--r--opcodes/m32r-ibld.c2
-rw-r--r--opcodes/openrisc-asm.c39
-rw-r--r--opcodes/openrisc-desc.c1
-rw-r--r--opcodes/openrisc-ibld.c2
-rw-r--r--opcodes/po/opcodes.pot46
13 files changed, 117 insertions, 116 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index e1decdb35c9..6e979478d92 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,23 @@
+2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * cgen-ibld.in: Include safe-ctype.h in preference to
+ ctype.h.
+ * cgen-asm.in: Include safe-ctype.h in preference to
+ ctype.h. Fix formatting. Use ISSPACE instead of isspace and
+ TOLOWER instead of tolower.
+ (@arch@_cgen_build_insn_regex): Remove duplication of syntax
+ string elements in constructed regular expression.
+ * fr30-asm.c: Regenerate.
+ * fr30-desc.c: Regenerate.
+ * fr30-ibld.c: Regenerate.
+ * m32r-asm.c: Regenerate.
+ * m32r-desc.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * openrisc-asm.c: Regenerate.
+ * openrisc-desc.c: Regenerate.
+ * openrisc-ibld.c: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
2001-10-12 matthew green <mrg@redhat.com>
* ppc-opc.c (insert_de, extract_de, insert_des, extract_des): New
diff --git a/opcodes/cgen-asm.in b/opcodes/cgen-asm.in
index 4ae36d00438..475a4f14690 100644
--- a/opcodes/cgen-asm.in
+++ b/opcodes/cgen-asm.in
@@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "bfd.h"
@@ -36,29 +35,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "xregex.h"
#include "libiberty.h"
+#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-/* -- assembler routines inserted here */
+/* -- assembler routines inserted here. */
-/*
- Regex construction routine.
+/* Regex construction routine.
- This translates an opcode syntax string into a regex string,
- by replacing any non-character syntax element (such as an
- opcode) with the pattern '.*'
+ This translates an opcode syntax string into a regex string,
+ by replacing any non-character syntax element (such as an
+ opcode) with the pattern '.*'
- It then compiles the regex and stores it in the opcode, for
- later use by @arch@_cgen_assemble_insn
+ It then compiles the regex and stores it in the opcode, for
+ later use by @arch@_cgen_assemble_insn
- Returns NULL for success, an error message for failure. */
+ Returns NULL for success, an error message for failure. */
char *
@arch@_cgen_build_insn_regex (insn)
@@ -66,7 +65,6 @@ char *
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
- int mnem_len;
char rxbuf[CGEN_MAX_RX_ELEMENTS];
char *rx = rxbuf;
const CGEN_SYNTAX_CHAR_TYPE *syn;
@@ -134,9 +132,6 @@ char *
*rx++ = c;
break;
}
-
- /* Insert syntax char into rx. */
- *rx++ = c;
}
else
{
@@ -170,7 +165,7 @@ char *
regfree ((regex_t *) CGEN_INSN_RX (insn));
free (CGEN_INSN_RX (insn));
(CGEN_INSN_RX (insn)) = NULL;
- return msg;
+ return msg;
}
}
@@ -211,14 +206,14 @@ parse_insn_normal (cd, insn, strp, fields)
GAS's input scrubber will ensure mnemonics are lowercase, but we may
not be called from GAS. */
p = CGEN_INSN_MNEMONIC (insn);
- while (*p && tolower (*p) == tolower (*str))
+ while (*p && TOLOWER (*p) == TOLOWER (*str))
++p, ++str;
if (* p)
return _("unrecognized instruction");
#ifndef CGEN_MNEMONIC_OPERANDS
- if (* str && !isspace (* str))
+ if (* str && ! ISSPACE (* str))
return _("unrecognized instruction");
#endif
@@ -247,7 +242,7 @@ parse_insn_normal (cd, insn, strp, fields)
first char after the mnemonic part is a space. */
/* FIXME: We also take inappropriate advantage of the fact that
GAS's input scrubber will remove extraneous blanks. */
- if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
{
#ifdef CGEN_MNEMONIC_OPERANDS
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
@@ -296,7 +291,7 @@ parse_insn_normal (cd, insn, strp, fields)
blanks now. IE: We needn't try again with a longer version of
the insn and it is assumed that longer versions of insns appear
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
if (* str != '\0')
@@ -345,7 +340,7 @@ const CGEN_INSN *
int recognized_mnemonic = 0;
/* Skip leading white space. */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
/* The instructions are stored in hashed lists.
diff --git a/opcodes/cgen-ibld.in b/opcodes/cgen-ibld.in
index 9103524c947..d95878596bf 100644
--- a/opcodes/cgen-ibld.in
+++ b/opcodes/cgen-ibld.in
@@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "dis-asm.h"
@@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "@prefix@-desc.h"
#include "@prefix@-opc.h"
#include "opintl.h"
+#include "safe-ctype.h"
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
diff --git a/opcodes/fr30-asm.c b/opcodes/fr30-asm.c
index 6f569d2856d..93ed1171b1c 100644
--- a/opcodes/fr30-asm.c
+++ b/opcodes/fr30-asm.c
@@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "bfd.h"
@@ -36,16 +35,17 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "xregex.h"
#include "libiberty.h"
+#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-/* -- assembler routines inserted here */
+/* -- assembler routines inserted here. */
/* -- asm.c */
/* Handle register lists for LDMx and STMx. */
@@ -345,17 +345,16 @@ fr30_cgen_init_asm (cd)
-/*
- Regex construction routine.
+/* Regex construction routine.
- This translates an opcode syntax string into a regex string,
- by replacing any non-character syntax element (such as an
- opcode) with the pattern '.*'
+ This translates an opcode syntax string into a regex string,
+ by replacing any non-character syntax element (such as an
+ opcode) with the pattern '.*'
- It then compiles the regex and stores it in the opcode, for
- later use by fr30_cgen_assemble_insn
+ It then compiles the regex and stores it in the opcode, for
+ later use by fr30_cgen_assemble_insn
- Returns NULL for success, an error message for failure. */
+ Returns NULL for success, an error message for failure. */
char *
fr30_cgen_build_insn_regex (insn)
@@ -363,7 +362,6 @@ fr30_cgen_build_insn_regex (insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
- int mnem_len;
char rxbuf[CGEN_MAX_RX_ELEMENTS];
char *rx = rxbuf;
const CGEN_SYNTAX_CHAR_TYPE *syn;
@@ -431,9 +429,6 @@ fr30_cgen_build_insn_regex (insn)
*rx++ = c;
break;
}
-
- /* Insert syntax char into rx. */
- *rx++ = c;
}
else
{
@@ -467,7 +462,7 @@ fr30_cgen_build_insn_regex (insn)
regfree ((regex_t *) CGEN_INSN_RX (insn));
free (CGEN_INSN_RX (insn));
(CGEN_INSN_RX (insn)) = NULL;
- return msg;
+ return msg;
}
}
@@ -508,14 +503,14 @@ parse_insn_normal (cd, insn, strp, fields)
GAS's input scrubber will ensure mnemonics are lowercase, but we may
not be called from GAS. */
p = CGEN_INSN_MNEMONIC (insn);
- while (*p && tolower (*p) == tolower (*str))
+ while (*p && TOLOWER (*p) == TOLOWER (*str))
++p, ++str;
if (* p)
return _("unrecognized instruction");
#ifndef CGEN_MNEMONIC_OPERANDS
- if (* str && !isspace (* str))
+ if (* str && ! ISSPACE (* str))
return _("unrecognized instruction");
#endif
@@ -544,7 +539,7 @@ parse_insn_normal (cd, insn, strp, fields)
first char after the mnemonic part is a space. */
/* FIXME: We also take inappropriate advantage of the fact that
GAS's input scrubber will remove extraneous blanks. */
- if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
{
#ifdef CGEN_MNEMONIC_OPERANDS
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
@@ -593,7 +588,7 @@ parse_insn_normal (cd, insn, strp, fields)
blanks now. IE: We needn't try again with a longer version of
the insn and it is assumed that longer versions of insns appear
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
if (* str != '\0')
@@ -642,7 +637,7 @@ fr30_cgen_assemble_insn (cd, str, fields, buf, errmsg)
int recognized_mnemonic = 0;
/* Skip leading white space. */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
/* The instructions are stored in hashed lists.
diff --git a/opcodes/fr30-desc.c b/opcodes/fr30-desc.c
index e3a1c8bb107..d9b347fe7d0 100644
--- a/opcodes/fr30-desc.c
+++ b/opcodes/fr30-desc.c
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "ansidecl.h"
diff --git a/opcodes/fr30-ibld.c b/opcodes/fr30-ibld.c
index 99bf3ac7c22..92e7ee3c39f 100644
--- a/opcodes/fr30-ibld.c
+++ b/opcodes/fr30-ibld.c
@@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "dis-asm.h"
@@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "fr30-desc.h"
#include "fr30-opc.h"
#include "opintl.h"
+#include "safe-ctype.h"
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
diff --git a/opcodes/m32r-asm.c b/opcodes/m32r-asm.c
index fa79af0747f..8b3477c2eac 100644
--- a/opcodes/m32r-asm.c
+++ b/opcodes/m32r-asm.c
@@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "bfd.h"
@@ -36,16 +35,17 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "xregex.h"
#include "libiberty.h"
+#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-/* -- assembler routines inserted here */
+/* -- assembler routines inserted here. */
/* -- asm.c */
static const char * parse_hash
@@ -347,17 +347,16 @@ m32r_cgen_init_asm (cd)
-/*
- Regex construction routine.
+/* Regex construction routine.
- This translates an opcode syntax string into a regex string,
- by replacing any non-character syntax element (such as an
- opcode) with the pattern '.*'
+ This translates an opcode syntax string into a regex string,
+ by replacing any non-character syntax element (such as an
+ opcode) with the pattern '.*'
- It then compiles the regex and stores it in the opcode, for
- later use by m32r_cgen_assemble_insn
+ It then compiles the regex and stores it in the opcode, for
+ later use by m32r_cgen_assemble_insn
- Returns NULL for success, an error message for failure. */
+ Returns NULL for success, an error message for failure. */
char *
m32r_cgen_build_insn_regex (insn)
@@ -365,7 +364,6 @@ m32r_cgen_build_insn_regex (insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
- int mnem_len;
char rxbuf[CGEN_MAX_RX_ELEMENTS];
char *rx = rxbuf;
const CGEN_SYNTAX_CHAR_TYPE *syn;
@@ -433,9 +431,6 @@ m32r_cgen_build_insn_regex (insn)
*rx++ = c;
break;
}
-
- /* Insert syntax char into rx. */
- *rx++ = c;
}
else
{
@@ -469,7 +464,7 @@ m32r_cgen_build_insn_regex (insn)
regfree ((regex_t *) CGEN_INSN_RX (insn));
free (CGEN_INSN_RX (insn));
(CGEN_INSN_RX (insn)) = NULL;
- return msg;
+ return msg;
}
}
@@ -510,14 +505,14 @@ parse_insn_normal (cd, insn, strp, fields)
GAS's input scrubber will ensure mnemonics are lowercase, but we may
not be called from GAS. */
p = CGEN_INSN_MNEMONIC (insn);
- while (*p && tolower (*p) == tolower (*str))
+ while (*p && TOLOWER (*p) == TOLOWER (*str))
++p, ++str;
if (* p)
return _("unrecognized instruction");
#ifndef CGEN_MNEMONIC_OPERANDS
- if (* str && !isspace (* str))
+ if (* str && ! ISSPACE (* str))
return _("unrecognized instruction");
#endif
@@ -546,7 +541,7 @@ parse_insn_normal (cd, insn, strp, fields)
first char after the mnemonic part is a space. */
/* FIXME: We also take inappropriate advantage of the fact that
GAS's input scrubber will remove extraneous blanks. */
- if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
{
#ifdef CGEN_MNEMONIC_OPERANDS
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
@@ -595,7 +590,7 @@ parse_insn_normal (cd, insn, strp, fields)
blanks now. IE: We needn't try again with a longer version of
the insn and it is assumed that longer versions of insns appear
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
if (* str != '\0')
@@ -644,7 +639,7 @@ m32r_cgen_assemble_insn (cd, str, fields, buf, errmsg)
int recognized_mnemonic = 0;
/* Skip leading white space. */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
/* The instructions are stored in hashed lists.
diff --git a/opcodes/m32r-desc.c b/opcodes/m32r-desc.c
index 5c63a2f956c..07ec3829f81 100644
--- a/opcodes/m32r-desc.c
+++ b/opcodes/m32r-desc.c
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "ansidecl.h"
diff --git a/opcodes/m32r-ibld.c b/opcodes/m32r-ibld.c
index 6c32b232744..4d083a18288 100644
--- a/opcodes/m32r-ibld.c
+++ b/opcodes/m32r-ibld.c
@@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "dis-asm.h"
@@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "m32r-desc.h"
#include "m32r-opc.h"
#include "opintl.h"
+#include "safe-ctype.h"
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
diff --git a/opcodes/openrisc-asm.c b/opcodes/openrisc-asm.c
index ebc463dc16e..13ba81f905a 100644
--- a/opcodes/openrisc-asm.c
+++ b/opcodes/openrisc-asm.c
@@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "bfd.h"
@@ -36,16 +35,17 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "xregex.h"
#include "libiberty.h"
+#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-/* -- assembler routines inserted here */
+/* -- assembler routines inserted here. */
/* -- asm.c */
@@ -266,17 +266,16 @@ openrisc_cgen_init_asm (cd)
-/*
- Regex construction routine.
+/* Regex construction routine.
- This translates an opcode syntax string into a regex string,
- by replacing any non-character syntax element (such as an
- opcode) with the pattern '.*'
+ This translates an opcode syntax string into a regex string,
+ by replacing any non-character syntax element (such as an
+ opcode) with the pattern '.*'
- It then compiles the regex and stores it in the opcode, for
- later use by openrisc_cgen_assemble_insn
+ It then compiles the regex and stores it in the opcode, for
+ later use by openrisc_cgen_assemble_insn
- Returns NULL for success, an error message for failure. */
+ Returns NULL for success, an error message for failure. */
char *
openrisc_cgen_build_insn_regex (insn)
@@ -284,7 +283,6 @@ openrisc_cgen_build_insn_regex (insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
- int mnem_len;
char rxbuf[CGEN_MAX_RX_ELEMENTS];
char *rx = rxbuf;
const CGEN_SYNTAX_CHAR_TYPE *syn;
@@ -352,9 +350,6 @@ openrisc_cgen_build_insn_regex (insn)
*rx++ = c;
break;
}
-
- /* Insert syntax char into rx. */
- *rx++ = c;
}
else
{
@@ -388,7 +383,7 @@ openrisc_cgen_build_insn_regex (insn)
regfree ((regex_t *) CGEN_INSN_RX (insn));
free (CGEN_INSN_RX (insn));
(CGEN_INSN_RX (insn)) = NULL;
- return msg;
+ return msg;
}
}
@@ -429,14 +424,14 @@ parse_insn_normal (cd, insn, strp, fields)
GAS's input scrubber will ensure mnemonics are lowercase, but we may
not be called from GAS. */
p = CGEN_INSN_MNEMONIC (insn);
- while (*p && tolower (*p) == tolower (*str))
+ while (*p && TOLOWER (*p) == TOLOWER (*str))
++p, ++str;
if (* p)
return _("unrecognized instruction");
#ifndef CGEN_MNEMONIC_OPERANDS
- if (* str && !isspace (* str))
+ if (* str && ! ISSPACE (* str))
return _("unrecognized instruction");
#endif
@@ -465,7 +460,7 @@ parse_insn_normal (cd, insn, strp, fields)
first char after the mnemonic part is a space. */
/* FIXME: We also take inappropriate advantage of the fact that
GAS's input scrubber will remove extraneous blanks. */
- if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
{
#ifdef CGEN_MNEMONIC_OPERANDS
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
@@ -514,7 +509,7 @@ parse_insn_normal (cd, insn, strp, fields)
blanks now. IE: We needn't try again with a longer version of
the insn and it is assumed that longer versions of insns appear
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
if (* str != '\0')
@@ -563,7 +558,7 @@ openrisc_cgen_assemble_insn (cd, str, fields, buf, errmsg)
int recognized_mnemonic = 0;
/* Skip leading white space. */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
/* The instructions are stored in hashed lists.
diff --git a/opcodes/openrisc-desc.c b/opcodes/openrisc-desc.c
index 866dbdd0bd6..f1fb3abb7ce 100644
--- a/opcodes/openrisc-desc.c
+++ b/opcodes/openrisc-desc.c
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "ansidecl.h"
diff --git a/opcodes/openrisc-ibld.c b/opcodes/openrisc-ibld.c
index cb29a266068..8a2a28a620f 100644
--- a/opcodes/openrisc-ibld.c
+++ b/opcodes/openrisc-ibld.c
@@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "dis-asm.h"
@@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "openrisc-desc.h"
#include "openrisc-opc.h"
#include "opintl.h"
+#include "safe-ctype.h"
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
diff --git a/opcodes/po/opcodes.pot b/opcodes/po/opcodes.pot
index 8baf99ed98b..fa786b3e497 100644
--- a/opcodes/po/opcodes.pot
+++ b/opcodes/po/opcodes.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-10-09 09:40+0100\n"
+"POT-Creation-Date: 2001-10-12 23:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -60,7 +60,7 @@ msgstr ""
msgid "unrecognized keyword/register name"
msgstr ""
-#: cgen-asm.c:340 fr30-ibld.c:207 m32r-ibld.c:197 openrisc-ibld.c:197
+#: cgen-asm.c:340 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr ""
@@ -86,87 +86,91 @@ msgstr ""
msgid "Address 0x%x is out of bounds.\n"
msgstr ""
-#: fr30-asm.c:312 m32r-asm.c:319 openrisc-asm.c:247
+#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr ""
+#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+msgid "missing mnemonic in syntax string"
+msgstr ""
+
#. We couldn't parse it.
-#: fr30-asm.c:474 fr30-asm.c:478 fr30-asm.c:563 fr30-asm.c:665 m32r-asm.c:481
-#: m32r-asm.c:485 m32r-asm.c:570 m32r-asm.c:672 openrisc-asm.c:409
-#: openrisc-asm.c:413 openrisc-asm.c:498 openrisc-asm.c:600
+#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
+#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
+#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
msgid "unrecognized instruction"
msgstr ""
-#: fr30-asm.c:520 m32r-asm.c:527 openrisc-asm.c:455
+#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr ""
-#: fr30-asm.c:529 m32r-asm.c:536 openrisc-asm.c:464
+#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr ""
-#: fr30-asm.c:557 m32r-asm.c:564 openrisc-asm.c:492
+#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
msgid "junk at end of line"
msgstr ""
-#: fr30-asm.c:664 m32r-asm.c:671 openrisc-asm.c:599
+#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
msgid "unrecognized form of instruction"
msgstr ""
-#: fr30-asm.c:676 m32r-asm.c:683 openrisc-asm.c:611
+#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
#, c-format
msgid "bad instruction `%.50s...'"
msgstr ""
-#: fr30-asm.c:679 m32r-asm.c:686 openrisc-asm.c:614
+#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
#, c-format
msgid "bad instruction `%.50s'"
msgstr ""
-#: fr30-dis.c:301 m32r-dis.c:246 openrisc-dis.c:134
+#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr ""
-#: fr30-ibld.c:178 m32r-ibld.c:168 openrisc-ibld.c:168
+#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr ""
-#: fr30-ibld.c:191 m32r-ibld.c:181 openrisc-ibld.c:181
+#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr ""
-#: fr30-ibld.c:739 m32r-ibld.c:656 openrisc-ibld.c:630
+#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr ""
-#: fr30-ibld.c:943 m32r-ibld.c:786 openrisc-ibld.c:731
+#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr ""
-#: fr30-ibld.c:1087 m32r-ibld.c:891 openrisc-ibld.c:806
+#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1216 m32r-ibld.c:981 openrisc-ibld.c:866
+#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr ""
-#: fr30-ibld.c:1345 m32r-ibld.c:1074 openrisc-ibld.c:930
+#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1467 m32r-ibld.c:1160 openrisc-ibld.c:987
+#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr ""