Remove uses of ctype.h

This commit is contained in:
Nick Clifton 2003-07-14 10:06:06 +00:00
parent 2808c7aac4
commit 278ed1281c
5 changed files with 33 additions and 26 deletions

View File

@ -1,3 +1,11 @@
2003-07-14 Nick Clifton <nickc@redhat.com>
* config/tc-ip2k.c: Remove inclusion of <ctype.h>
* config/tc-tic4x.c: Replace inclusion of <ctype.h> with
"safe-ctype.h" and update use of macros.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
2003-07-11 Alan Modra <amodra@bigpond.net.au>
* po/gas.pot: Regenerate.

View File

@ -1094,7 +1094,7 @@ DEPTC_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \
cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
@ -1451,11 +1451,11 @@ DEPTC_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h subsegs.h \
$(INCDIR)/obstack.h
$(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h
DEPTC_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/opcode/tic4x.h subsegs.h $(INCDIR)/obstack.h
$(INCDIR)/opcode/tic4x.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h
DEPTC_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
@ -1974,12 +1974,12 @@ DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/safe-ctype.h
DEPOBJ_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/safe-ctype.h
DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
@ -2342,10 +2342,11 @@ DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h \
$(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
$(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h
DEP_tic4x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/safe-ctype.h
DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h \
$(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h

View File

@ -820,7 +820,7 @@ DEPTC_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \
cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
@ -1248,12 +1248,12 @@ DEPTC_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h subsegs.h \
$(INCDIR)/obstack.h
$(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h
DEPTC_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/opcode/tic4x.h subsegs.h $(INCDIR)/obstack.h
$(INCDIR)/opcode/tic4x.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h
DEPTC_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
@ -1889,13 +1889,13 @@ DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/safe-ctype.h
DEPOBJ_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/safe-ctype.h
DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
@ -2373,11 +2373,12 @@ DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h \
$(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
$(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h
DEP_tic4x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
$(INCDIR)/safe-ctype.h
DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h \

View File

@ -19,8 +19,6 @@
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
#include "as.h"
#include "subsegs.h"
#include "symcat.h"

View File

@ -46,8 +46,7 @@
*/
#include <stdio.h>
#include <ctype.h>
#include "safe-ctype.h"
#include "as.h"
#include "opcode/tic4x.h"
#include "subsegs.h"
@ -737,7 +736,7 @@ tic4x_insert_reg (regname, regnum)
symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
&zero_address_frag));
for (i = 0; regname[i]; i++)
buf[i] = islower (regname[i]) ? toupper (regname[i]) : regname[i];
buf[i] = islower (regname[i]) ? TOUPPER (regname[i]) : regname[i];
buf[i] = '\0';
symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
@ -1556,7 +1555,7 @@ tic4x_indirect_parse (operand, indirect)
if (*s == '%')
s++;
#endif
while (isalnum (*s))
while (ISALNUM (*s))
*b++ = *s++;
*b++ = '\0';
if (!(symbolP = symbol_find (name)))
@ -1623,7 +1622,7 @@ tic4x_indirect_parse (operand, indirect)
break;
default:
if (tolower (*s) != *n)
if (TOLOWER (*s) != *n)
return 0;
s++;
}
@ -2869,7 +2868,7 @@ md_parse_option (c, arg)
switch (c)
{
case OPTION_CPU: /* cpu brand */
if (tolower (*arg) == 'c')
if (TOLOWER (*arg) == 'c')
arg++;
tic4x_cpu = atoi (arg);
if (!IS_CPU_TIC3X (tic4x_cpu) && !IS_CPU_TIC4X (tic4x_cpu))
@ -2959,14 +2958,14 @@ tic4x_unrecognized_line (c)
int lab;
char *s;
if (c != '$' || !isdigit (input_line_pointer[0]))
if (c != '$' || ! ISDIGIT (input_line_pointer[0]))
return 0;
s = input_line_pointer;
/* Let's allow multiple digit local labels. */
lab = 0;
while (isdigit (*s))
while (ISDIGIT (*s))
{
lab = lab * 10 + *s - '0';
s++;
@ -2991,13 +2990,13 @@ md_undefined_symbol (name)
char *name;
{
/* Look for local labels of the form $n. */
if (name[0] == '$' && isdigit (name[1]))
if (name[0] == '$' && ISDIGIT (name[1]))
{
symbolS *symbolP;
char *s = name + 1;
int lab = 0;
while (isdigit ((unsigned char) *s))
while (ISDIGIT ((unsigned char) *s))
{
lab = lab * 10 + *s - '0';
s++;