/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
*/
struct sort_criteria *
sort_parse_criteria (struct lexer *lexer, const struct dictionary *dict,
- struct variable ***vars, size_t *var_cnt,
+ const struct variable ***vars, size_t *var_cnt,
bool *saw_direction,
const int *terminators
)
{
struct sort_criteria *criteria;
- struct variable **local_vars = NULL;
+ const struct variable **local_vars = NULL;
size_t local_var_cnt;
assert ((vars == NULL) == (var_cnt == NULL));
enum sort_direction direction;
/* Variables. */
- if (!parse_variables (lexer, dict, vars, var_cnt,
+ if (!parse_variables_const (lexer, dict, vars, var_cnt,
PV_NO_DUPLICATE | PV_APPEND | PV_NO_SCRATCH))
goto error;
for (; prev_var_cnt < criteria->crit_cnt; prev_var_cnt++)
{
struct sort_criterion *c = &criteria->crits[prev_var_cnt];
- c->fv = (*vars)[prev_var_cnt]->fv;
+ c->fv = var_get_case_index ((*vars)[prev_var_cnt]);
c->width = var_get_width ((*vars)[prev_var_cnt]);
c->dir = direction;
}