/[pspp]/pspp/src/descript.c
ViewVC logotype

Diff of /pspp/src/descript.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by blp, Mon Oct 24 02:51:32 2005 UTC revision 1.17 by blp, Wed Oct 26 05:06:14 2005 UTC
# Line 311  cmd_descriptives (void) Line 311  cmd_descriptives (void)
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];
# Line 634  setup_z_trns (struct dsc_proc *dsc) Line 634  setup_z_trns (struct dsc_proc *dsc)
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      }      }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26