static const char *
macro_bcache_str (struct macro_table *t, const char *s)
{
- return macro_bcache (t, s, strlen (s) + 1);
+ return (const char *) macro_bcache (t, s, strlen (s) + 1);
}
struct macro_source_file *file,
int line)
{
- struct macro_key *k = macro_alloc (sizeof (*k), t);
+ struct macro_key *k = (struct macro_key *) macro_alloc (sizeof (*k), t);
memset (k, 0, sizeof (*k));
k->table = t;
const char *filename)
{
/* Get space for the source file structure itself. */
- struct macro_source_file *f = macro_alloc (sizeof (*f), t);
+ struct macro_source_file *f
+ = (struct macro_source_file *) macro_alloc (sizeof (*f), t);
memset (f, 0, sizeof (*f));
f->table = t;
int argc, const char **argv,
const char *replacement)
{
- struct macro_definition *d = macro_alloc (sizeof (*d), t);
+ struct macro_definition *d
+ = (struct macro_definition *) macro_alloc (sizeof (*d), t);
memset (d, 0, sizeof (*d));
d->table = t;
int cached_argv_size = argc * sizeof (*cached_argv);
/* Bcache all the arguments. */
- cached_argv = alloca (cached_argv_size);
+ cached_argv = (const char **) alloca (cached_argv_size);
for (i = 0; i < argc; i++)
cached_argv[i] = macro_bcache_str (t, argv[i]);
/* Now bcache the array of argument pointers itself. */
- d->argv = macro_bcache (t, cached_argv, cached_argv_size);
+ d->argv = ((const char * const *)
+ macro_bcache (t, cached_argv, cached_argv_size));
}
/* We don't bcache the entire definition structure because it's got
/* First, get storage for the `struct macro_table' itself. */
if (obstack)
- t = obstack_alloc (obstack, sizeof (*t));
+ t = XOBNEW (obstack, struct macro_table);
else
- t = xmalloc (sizeof (*t));
+ t = XNEW (struct macro_table);
memset (t, 0, sizeof (*t));
t->obstack = obstack;