/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
dict_set_documents (agr.dict, dict_get_documents (dict));
/* OUTFILE subcommand must be first. */
+ lex_match (lexer, '/');
if (!lex_force_match_id (lexer, "OUTFILE"))
goto error;
lex_match (lexer, '=');
agr.break_var_cnt = subcase_get_n_fields (&agr.sort);
for (i = 0; i < agr.break_var_cnt; i++)
- dict_clone_var_assert (agr.dict, agr.break_vars[i],
- var_get_name (agr.break_vars[i]));
+ dict_clone_var_assert (agr.dict, agr.break_vars[i]);
/* BREAK must follow the options. */
break;
size_t n_dest_prev = n_dest;
if (!parse_DATA_LIST_vars (lexer, &dest, &n_dest,
- PV_APPEND | PV_SINGLE | PV_NO_SCRATCH))
+ (PV_APPEND | PV_SINGLE | PV_NO_SCRATCH
+ | PV_NO_DUPLICATE)))
goto error;
/* Assign empty labels. */
}
if (function->alpha_type == VAL_STRING)
- destvar = dict_clone_var (agr->dict, v->src, dest[i]);
+ destvar = dict_clone_var_as (agr->dict, v->src, dest[i]);
else
{
assert (var_is_numeric (v->src)
else if (iter->function == SD)
moments1_destroy (iter->moments);
- var_destroy (iter->subject);
- var_destroy (iter->weight);
+ dict_destroy_internal_var (iter->subject);
+ dict_destroy_internal_var (iter->weight);
free (iter);
}
proto = caseproto_add_width (proto, 0);
if ( ! iter->subject)
- iter->subject = var_create_internal (0);
+ iter->subject = dict_create_internal_var (0, 0);
if ( ! iter->weight)
- iter->weight = var_create_internal (1);
+ iter->weight = dict_create_internal_var (1, 0);
subcase_init_var (&ordering, iter->subject, SC_ASCEND);
iter->writer = sort_create_writer (&ordering, proto);