X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdictionary.h;h=d02877141cab080ca53e87c48979cc5d72eda187;hb=053e7ff6e0a45a25d5604b211e9c950fff50e75d;hp=f375ecc63c7827abcc2ad648e7c8972d353876e7;hpb=7dc203206d3f3172474a4ec0f4dcab5364f4ce26;p=pspp-builds.git diff --git a/src/dictionary.h b/src/dictionary.h index f375ecc6..d0287714 100644 --- a/src/dictionary.h +++ b/src/dictionary.h @@ -14,12 +14,13 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #ifndef DICTIONARY_H #define DICTIONARY_H +#include #include /* Dictionary. */ @@ -39,24 +40,30 @@ void dict_get_vars (const struct dictionary *, struct variable *dict_create_var (struct dictionary *, const char *, int width); + struct variable *dict_create_var_assert (struct dictionary *, const char *, int width); struct variable *dict_clone_var (struct dictionary *, const struct variable *, const char *); -void dict_rename_var (struct dictionary *, struct variable *, const char *); +struct variable *dict_clone_var_assert (struct dictionary *, + const struct variable *, const char *); struct variable *dict_lookup_var (const struct dictionary *, const char *); struct variable *dict_lookup_var_assert (const struct dictionary *, const char *); -int dict_contains_var (const struct dictionary *, const struct variable *); +bool dict_contains_var (const struct dictionary *, const struct variable *); void dict_delete_var (struct dictionary *, struct variable *); void dict_delete_vars (struct dictionary *, struct variable *const *, size_t count); +void dict_delete_scratch_vars (struct dictionary *); +void dict_reorder_var (struct dictionary *d, struct variable *v, + size_t new_index); void dict_reorder_vars (struct dictionary *, struct variable *const *, size_t count); -int dict_rename_vars (struct dictionary *, - struct variable **, char **new_names, - size_t count, char **err_name); +void dict_rename_var (struct dictionary *, struct variable *, const char *); +bool dict_rename_vars (struct dictionary *, + struct variable **, char **new_names, + size_t count, char **err_name); struct ccase; struct variable *dict_get_weight (const struct dictionary *); @@ -74,10 +81,14 @@ int dict_get_next_value_idx (const struct dictionary *); size_t dict_get_case_size (const struct dictionary *); void dict_compact_values (struct dictionary *); -void dict_compact_case (const struct dictionary *, - struct ccase *, const struct ccase *); size_t dict_get_compacted_value_cnt (const struct dictionary *); int *dict_get_compacted_idx_to_fv (const struct dictionary *); +bool dict_needs_compaction (const struct dictionary *); + +struct dict_compactor *dict_make_compactor (const struct dictionary *); +void dict_compactor_compact (const struct dict_compactor *, + struct ccase *, const struct ccase *); +void dict_compactor_destroy (struct dict_compactor *); struct variable *const *dict_get_split_vars (const struct dictionary *); size_t dict_get_split_cnt (const struct dictionary *); @@ -90,9 +101,9 @@ void dict_set_label (struct dictionary *, const char *); const char *dict_get_documents (const struct dictionary *); void dict_set_documents (struct dictionary *, const char *); -int dict_create_vector (struct dictionary *, - const char *name, - struct variable **, size_t cnt); +bool dict_create_vector (struct dictionary *, + const char *name, + struct variable **, size_t cnt); const struct vector *dict_get_vector (const struct dictionary *, size_t idx); size_t dict_get_vector_cnt (const struct dictionary *); @@ -100,4 +111,6 @@ const struct vector *dict_lookup_vector (const struct dictionary *, const char *name); void dict_clear_vectors (struct dictionary *); +void dict_assign_short_names (struct dictionary *); + #endif /* dictionary.h */