1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2018 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/>. */
17 #ifndef OUTPUT_SPV_LEGACY_DATA_H
18 #define OUTPUT_SPV_LEGACY_DATA_H 1
20 /* SPSS Viewer (SPV) legacy binary data decoder.
22 Used by spv.h, not useful directly. */
28 #include "libpspp/compiler.h"
32 struct spv_data_source *sources;
36 #define SPV_DATA_INITIALIZER { NULL, 0 }
38 void spv_data_uninit (struct spv_data *);
39 void spv_data_dump (const struct spv_data *, FILE *);
41 struct spv_data_source *spv_data_find_source (const struct spv_data *,
42 const char *source_name);
43 struct spv_data_variable *spv_data_find_variable (const struct spv_data *,
44 const char *source_name,
45 const char *variable_name);
47 struct spv_data_source
50 struct spv_data_variable *vars;
51 size_t n_vars, n_values;
54 void spv_data_source_uninit (struct spv_data_source *);
55 void spv_data_source_dump (const struct spv_data_source *, FILE *);
57 struct spv_data_variable *spv_data_source_find_variable (
58 const struct spv_data_source *, const char *variable_name);
60 struct spv_data_variable
63 struct spv_data_value *values;
67 void spv_data_variable_uninit (struct spv_data_variable *);
68 void spv_data_variable_dump (const struct spv_data_variable *, FILE *);
81 void spv_data_value_uninit (struct spv_data_value *);
82 bool spv_data_value_equal (const struct spv_data_value *,
83 const struct spv_data_value *);
84 struct spv_data_value *spv_data_values_clone (const struct spv_data_value *,
87 char *spv_legacy_data_decode (const uint8_t *in, size_t size,
88 struct spv_data *out) WARN_UNUSED_RESULT;
89 void spv_data_value_dump (const struct spv_data_value *, FILE *);
91 #endif /* output/spv/spv-legacy-data.h */