1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 1997-9, 2000 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/>. */
23 #include <data/value.h>
34 struct val_labs *val_labs_create (int width);
35 struct val_labs *val_labs_copy (const struct val_labs *);
36 void val_labs_destroy (struct val_labs *);
37 void val_labs_clear (struct val_labs *);
38 size_t val_labs_count (const struct val_labs *);
40 bool val_labs_can_set_width (const struct val_labs *, int new_width);
41 void val_labs_set_width (struct val_labs *, int new_width);
43 bool val_labs_add (struct val_labs *, union value, const char *);
44 void val_labs_replace (struct val_labs *, union value, const char *);
45 bool val_labs_remove (struct val_labs *, union value);
46 char *val_labs_find (const struct val_labs *, union value);
48 struct val_labs_iterator;
50 struct val_lab *val_labs_first (const struct val_labs *,
51 struct val_labs_iterator **);
52 struct val_lab *val_labs_first_sorted (const struct val_labs *,
53 struct val_labs_iterator **);
54 struct val_lab *val_labs_next (const struct val_labs *,
55 struct val_labs_iterator **);
56 void val_labs_done (struct val_labs_iterator **);
58 #endif /* value-labels.h */