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

Diff of /pspp/src/aggregate.c

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

revision 1.34 by jmd, Fri Apr 29 01:02:13 2005 UTC revision 1.35 by blp, Mon May 2 06:21:20 2005 UTC
# Line 213  cmd_aggregate (void) Line 213  cmd_aggregate (void)
213              goto error;              goto error;
214                        
215            for (i = 0; i < agr.break_var_cnt; i++)            for (i = 0; i < agr.break_var_cnt; i++)
216              {              dict_clone_var_assert (agr.dict, agr.break_vars[i],
217                struct variable *v = dict_clone_var (agr.dict, agr.break_vars[i],                                     agr.break_vars[i]->name);
                                                    agr.break_vars[i]->name,  
                                                    agr.break_vars[i]->longname  
                                                    );  
               assert (v != NULL);  
             }  
218    
219            /* BREAK must follow the options. */            /* BREAK must follow the options. */
220            break;            break;
# Line 455  parse_aggregate_functions (struct agr_pr Line 450  parse_aggregate_functions (struct agr_pr
450                      arg[i].f = tokval;                      arg[i].f = tokval;
451                      type = NUMERIC;                      type = NUMERIC;
452                    } else {                    } else {
453                      msg (SE, _("Missing argument %d to %s."), i + 1, function->name);                      msg (SE, _("Missing argument %d to %s."), i + 1,
454                             function->name);
455                      goto error;                      goto error;
456                    }                    }
457                            
# Line 543  parse_aggregate_functions (struct agr_pr Line 539  parse_aggregate_functions (struct agr_pr
539                    }                    }
540    
541                  if (function->alpha_type == ALPHA)                  if (function->alpha_type == ALPHA)
542                    destvar = dict_clone_var (agr->dict, v->src, 0, dest[i] );                    destvar = dict_clone_var (agr->dict, v->src, dest[i]);
543                  else if (v->src->type == NUMERIC                  else
                          || function->alpha_type == NUMERIC)  
544                    {                    {
545                        assert (v->src->type == NUMERIC
546                                || function->alpha_type == NUMERIC);
547                      destvar = dict_create_var (agr->dict, dest[i], 0);                      destvar = dict_create_var (agr->dict, dest[i], 0);
548                      if (destvar != NULL)                      if (destvar != NULL)
549                        {                        {

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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