1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2006 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 #include <data/variable.h>
19 #include <data/value.h>
20 #include <libpspp/compiler.h>
27 compare_freq ( const void *_f1, const void *_f2, const void *_var)
29 const struct freq *f1 = _f1;
30 const struct freq *f2 = _f2;
31 const struct variable *var = _var;
33 return compare_values (f1->value, f2->value, var_get_width (var) );
37 hash_freq (const void *_f, const void *_var)
39 const struct freq *f = _f;
40 const struct variable *var = _var;
42 return hash_value (f->value, var_get_width (var));
45 /* Free function to be used on FR whose value parameter has been copied */
47 free_freq_mutable_hash (void *fr, const void *var UNUSED)
49 struct freq_mutable *freq = fr;
55 free_freq_hash (void *fr, const void *var UNUSED)