for (idx = 0; md_pseudo_table[idx].poc_name; idx++)
{
opcode_entry_type *fake_opcode;
- fake_opcode = (opcode_entry_type *) malloc (sizeof (opcode_entry_type));
+ fake_opcode = XNEW (opcode_entry_type);
fake_opcode->name = md_pseudo_table[idx].poc_name;
fake_opcode->func = (void *) (md_pseudo_table + idx);
fake_opcode->opcode = 250;
/* Make sure the mode supplied is the size of a word. */
static void
-regword (int mode, char *string)
+regword (int mode, const char *string)
{
int ok;
/* Make sure the mode supplied is the size of an address. */
static void
-regaddr (int mode, char *string)
+regaddr (int mode, const char *string)
{
int ok;
struct ctrl_names {
int value;
- char *name;
+ const char *name;
};
static struct ctrl_names ctrl_table[] = {
struct flag_names {
int value;
- char *name;
+ const char *name;
};
static struct flag_names flag_table[] = {
struct interrupt_names {
int value;
- char *name;
+ const char *name;
};
static struct interrupt_names intr_table[] = {
struct cc_names {
int value;
- char *name;
+ const char *name;
};
static struct cc_names table[] = {
/* Various routines to kill one day. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
{
arelent *reloc;
- reloc = xmalloc (sizeof (*reloc));
- reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ reloc = XNEW (arelent);
+ reloc->sym_ptr_ptr = XNEW (asymbol *);
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
reloc->addend = fixp->fx_offset;