if (target)
{
- struct pivot_value *value = xzalloc (sizeof *value);
+ struct pivot_value *value = XZALLOC (struct pivot_value);
value->type = PIVOT_VALUE_TEXT;
for (size_t i = 0; i < lf->label->n_text; i++)
{
"source %s variable %s.",
sv->node_.id, sv->source, sv->source_name);
- struct spv_series *s = xzalloc (sizeof *s);
+ struct spv_series *s = XZALLOC (struct spv_series);
s->name = xstrdup (node->id);
s->xml = node;
s->label = xstrdup_if_nonnull (sv->label);
return xasprintf ("Derived variable %s has unknown value \"%s\"",
node->id, dv->value);
- struct spv_series *s = xzalloc (sizeof *s);
+ struct spv_series *s = XZALLOC (struct spv_series);
s->format = F_8_0;
s->name = xstrdup (node->id);
s->values = values;
if (error)
return error;
- struct pivot_value *v = xzalloc (sizeof *v);
+ struct pivot_value *v = XZALLOC (struct pivot_value);
if (data->width >= 0)
{
if (format && fmt_get_category (f.type) == FMT_CAT_DATE)
assert (n_cats > 0);
/* Make the categories. */
- struct pivot_dimension *d = xzalloc (sizeof *d);
+ struct pivot_dimension *d = XZALLOC (struct pivot_dimension);
table->dimensions[table->n_dimensions++] = d;
series[0]->n_index = max_cat + 1;
{
struct spv_data_value *dv = &series[0]->values[cat_rows[k]];
int dv_num = dv ? dv->d : dv->index;
- struct pivot_category *cat = xzalloc (sizeof *cat);
+ struct pivot_category *cat = XZALLOC (struct pivot_category);
char *retval = pivot_value_from_data_value (
spv_map_lookup (&series[0]->map, dv), NULL, NULL, &cat->name);
if (retval)
const struct pivot_table_look *look,
const struct spv_data *data, struct pivot_table **outp)
{
- struct pivot_table *table = pivot_table_create__ (NULL, subtype);
+ struct pivot_table *table = pivot_table_create__ (
+ pivot_value_new_user_text (v->name, SIZE_MAX), subtype);
pivot_table_set_look (table, look);
table->look = pivot_table_look_unshare (table->look);