/* ECOFF debugging support.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
#include "coff/symconst.h"
#include "aout/stab_gnu.h"
-#include <ctype.h>
+#include "safe-ctype.h"
/* Why isn't this in coff/sym.h? */
#define ST_RFDESCAPE 0xfff
{
char *perm;
- perm = xmalloc ((unsigned long) (strlen (tag) + 1));
- strcpy (perm, tag);
+ perm = xstrdup (tag);
hash_ptr = allocate_shash ();
err = hash_insert (tag_hash, perm, (char *) hash_ptr);
if (err)
free (coff_sym_name);
if (coff_tag != (char *) NULL)
free (coff_tag);
- coff_sym_name = (char *) xmalloc ((unsigned long) (strlen (name) + 1));
- strcpy (coff_sym_name, name);
+
+ coff_sym_name = xstrdup (name);
coff_type = type_info_init;
coff_storage_class = sc_Nil;
coff_symbol_typ = st_Nil;
name = input_line_pointer;
name_end = get_symbol_end ();
- coff_tag = (char *) xmalloc ((unsigned long) (strlen (name) + 1));
- strcpy (coff_tag, name);
+ coff_tag = xstrdup (name);
*input_line_pointer = name_end;
++input_line_pointer;
SKIP_WHITESPACE ();
}
- if (isdigit ((unsigned char) *input_line_pointer)
+ if (ISDIGIT (*input_line_pointer)
|| *input_line_pointer == '-')
(void) get_absolute_expression ();
/* For TC_MIPS use the version in tc-mips.c. */
void
ecoff_directive_weakext (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
listing_source_file (string);
#endif
- if (isdigit ((unsigned char) *input_line_pointer)
+ if (ISDIGIT (*input_line_pointer)
|| *input_line_pointer == '-'
|| *input_line_pointer == '+')
{
{
if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
- && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
+ && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
{
static asection scom_section;
static asymbol scom_symbol;
s = symbol_get_obj (as_sym)->ecoff_extern_size;
if (s == 0
- || s > (unsigned) bfd_get_gp_size (stdoutput))
+ || s > bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
{
if (S_GET_VALUE (as_sym) > 0
&& (S_GET_VALUE (as_sym)
- <= (unsigned) bfd_get_gp_size (stdoutput)))
+ <= bfd_get_gp_size (stdoutput)))
sc = sc_SCommon;
else
sc = sc_Common;