/* Copy it for safe keeping. Also give an indication of
how much macro nesting is involved at this point. */
len = s - input_line_pointer;
- copy = (char *) xmalloc (len + macro_nest + 2);
+ copy = XNEWVEC (char, len + macro_nest + 2);
memset (copy, '>', macro_nest);
copy[macro_nest] = ' ';
memcpy (copy + macro_nest + 1, input_line_pointer, len);
that goes with this #APP There is one. The specs
guarantee it... */
tmp_len = buffer_limit - s;
- tmp_buf = (char *) xmalloc (tmp_len + 1);
+ tmp_buf = XNEWVEC (char, tmp_len + 1);
memcpy (tmp_buf, s, tmp_len);
do
{
else
num = buffer_limit - buffer;
- tmp_buf = (char *) xrealloc (tmp_buf, tmp_len + num);
+ tmp_buf = XRESIZEVEC (char, tmp_buf, tmp_len + num);
memcpy (tmp_buf + tmp_len, buffer, num);
tmp_len += num;
}
scrub_string_end = ends;
new_length = ends - s;
- new_buf = (char *) xmalloc (new_length);
+ new_buf = XNEWVEC (char, new_length);
new_tmp = new_buf;
for (;;)
{
break;
}
- new_buf = (char *) xrealloc (new_buf, new_length + 100);
+ new_buf = XRESIZEVEC (char, new_buf, new_length + 100);
new_tmp = new_buf + new_length;
new_length += 100;
}
char * name_end;
unsigned int C;
- start = name = xmalloc (len + 1);
+ start = name = XNEWVEC (char, len + 1);
name_end = name + SYM_NAME_CHUNK_LEN;
sofar = name - start;
len += SYM_NAME_CHUNK_LEN;
- start = xrealloc (start, len + 1);
+ start = XRESIZEVEC (char, start, len + 1);
name_end = start + len;
name = start + sofar;
}
;
len = (input_line_pointer - name) - 1;
- start = xmalloc (len + 1);
+ start = XNEWVEC (char, len + 1);
memcpy (start, name, len);
start[len] = 0;
if (line_label != NULL)
{
- alc = (char *) xmalloc (strlen (S_GET_NAME (line_label))
- + (input_line_pointer - name)
- + 1);
+ alc = XNEWVEC (char, strlen (S_GET_NAME (line_label))
+ + (input_line_pointer - name) + 1);
sprintf (alc, "%s%s", name, S_GET_NAME (line_label));
name = alc;
}
if (listing & LISTING_SYMBOLS)
{
extern struct list_info_struct *listing_tail;
- fragS *dummy_frag = (fragS *) xcalloc (1, sizeof (fragS));
+ fragS *dummy_frag = XCNEW (fragS);
dummy_frag->line = listing_tail;
dummy_frag->fr_symbol = symbolP;
symbol_set_frag (symbolP, dummy_frag);
{ "64", BFD_RELOC_64 }
};
- reloc = (struct reloc_list *) xmalloc (sizeof (*reloc));
+ reloc = XNEW (struct reloc_list);
if (flag_mri)
stop = mri_comment_field (&stopc);
{
struct broken_word *x;
- x = (struct broken_word *) xmalloc (sizeof (struct broken_word));
+ x = XNEW (struct broken_word);
x->next_broken_word = broken_words;
broken_words = x;
x->seg = now_seg;
{
int i;
- path = (char *) xmalloc ((unsigned long) len + include_dir_maxlen + 5);
+ path = XNEWVEC (char, (unsigned long) len + include_dir_maxlen + 5);
for (i = 0; i < include_dir_count; i++)
{
}
demand_empty_rest_of_line ();
- path = (char *) xmalloc ((unsigned long) i
- + include_dir_maxlen + 5 /* slop */ );
+ path = XNEWVEC (char, (unsigned long) i
+ + include_dir_maxlen + 5 /* slop */ );
for (i = 0; i < include_dir_count; i++)
{