reference to obsolescent macro XMALLOC.
All uses replaced by xmalloc and free.
#define AUTHORS "Mike Parker"
-#undef NEW
-#define NEW(Type) XMALLOC (Type, 1)
-#define OLD(x) free (x)
-
/* Exit statuses. */
enum
{
static VALUE *
int_value (intmax_t i)
{
- VALUE *v;
-
- v = NEW (VALUE);
+ VALUE *v = xmalloc (sizeof *v);
v->type = integer;
v->u.i = i;
return v;
static VALUE *
str_value (char *s)
{
- VALUE *v;
-
- v = NEW (VALUE);
+ VALUE *v = xmalloc (sizeof *v);
v->type = string;
v->u.s = xstrdup (s);
return v;
{
if (v->type == string)
free (v->u.s);
- OLD (v);
+ free (v);
}
/* Print VALUE V. */
v = str_value ("");
else
{
- v = NEW (VALUE);
+ v = xmalloc (sizeof *v);
v->type = string;
v->u.s = strncpy (xmalloc (i2->u.i + 1),
l->u.s + i1->u.i - 1, i2->u.i);