X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcat.c;h=9b8ed9661d6c0e3fb8c60c85d8cf561be47df864;hb=998c6bac5f1d781505591ac6b3e78df25e566282;hp=c4bd17a85d16d459f0da83cff9458edc3e892ba3;hpb=95a7059c5c07aab50ff820bf695fe8ee144fa025;p=pspp diff --git a/src/cat.c b/src/cat.c index c4bd17a85d..9b8ed9661d 100644 --- a/src/cat.c +++ b/src/cat.c @@ -130,3 +130,13 @@ cat_subscript_to_value (const size_t s, struct variable *v) return NULL; } } + +/* + Return the number of categories of a categorical variable. + */ +size_t +cat_get_n_categories (const struct variable *v) +{ + return v->obs_vals->n_categories; +} +