311 |
PV_APPEND | PV_NO_DUPLICATE | PV_NUMERIC)) |
PV_APPEND | PV_NO_DUPLICATE | PV_NUMERIC)) |
312 |
goto error; |
goto error; |
313 |
|
|
314 |
dsc->vars = xrealloc (dsc->vars, sizeof *dsc->vars * var_cnt); |
dsc->vars = xnrealloc (dsc->vars, var_cnt, sizeof *dsc->vars); |
315 |
for (i = dsc->var_cnt; i < var_cnt; i++) |
for (i = dsc->var_cnt; i < var_cnt; i++) |
316 |
{ |
{ |
317 |
struct dsc_var *dv = &dsc->vars[i]; |
struct dsc_var *dv = &dsc->vars[i]; |
634 |
t = xmalloc (sizeof *t); |
t = xmalloc (sizeof *t); |
635 |
t->h.proc = descriptives_trns_proc; |
t->h.proc = descriptives_trns_proc; |
636 |
t->h.free = descriptives_trns_free; |
t->h.free = descriptives_trns_free; |
637 |
t->z_scores = xmalloc (cnt * sizeof *t->z_scores); |
t->z_scores = xnmalloc (cnt, sizeof *t->z_scores); |
638 |
t->z_score_cnt = cnt; |
t->z_score_cnt = cnt; |
639 |
t->missing_type = dsc->missing_type; |
t->missing_type = dsc->missing_type; |
640 |
t->include_user_missing = dsc->include_user_missing; |
t->include_user_missing = dsc->include_user_missing; |
641 |
if ( t->missing_type == DSC_LISTWISE ) |
if ( t->missing_type == DSC_LISTWISE ) |
642 |
{ |
{ |
643 |
t->var_cnt = dsc->var_cnt; |
t->var_cnt = dsc->var_cnt; |
644 |
t->vars = xmalloc(t->var_cnt * sizeof *t->vars); |
t->vars = xnmalloc (t->var_cnt, sizeof *t->vars); |
645 |
for (i = 0; i < t->var_cnt; i++) |
for (i = 0; i < t->var_cnt; i++) |
646 |
t->vars[i] = dsc->vars[i].v; |
t->vars[i] = dsc->vars[i].v; |
647 |
} |
} |