X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcategory.h;h=40abebaa41f05cb9a31c495ad9f50f41fb01e628;hb=41a3a550334da96a9b4e5e089ad1768acf288092;hp=35df104beba289c7040226a88ae8286ae9701d6d;hpb=b8e2dc45abf0cf7a398cb8cef9d9faa24bee6f6c;p=pspp-builds.git diff --git a/src/data/category.h b/src/data/category.h index 35df104b..40abebaa 100644 --- a/src/data/category.h +++ b/src/data/category.h @@ -33,29 +33,26 @@ */ -#ifndef CAT_H -#define CAT_H -#define CAT_VALUE_NOT_FOUND -2 -#include +#ifndef CATEGORY_H +#define CATEGORY_H + #include -union value; +struct cat_vals; struct variable ; +union value; + +void cat_stored_values_create (const struct variable *); +void cat_stored_values_destroy (struct cat_vals *); + +size_t cat_value_find (const struct variable *, const union value *); + +const union value *cat_subscript_to_value (const size_t, + const struct variable *); + + +void cat_value_update (const struct variable *, const union value *); -/* - This structure contains the observed values of a - categorical variable. - */ -struct cat_vals -{ - union value *vals; - size_t n_categories; - size_t n_allocated_categories; /* This is used only during - initialization to keep - track of the number of - values stored. - */ -}; /* Return the number of categories of a categorical variable.