Miscellaneous cleanup to categorical values, linreg and design matrix code.
[pspp-builds.git] / src / data / variable.c
index 266d0c2b7a10fab0cc82e88bb2c67fb7ab336a43..f890746ac051c12adf355b9824c53939a0c5e1e1 100644 (file)
@@ -21,7 +21,8 @@
 
 #include <stdlib.h>
 
-#include "cat-routines.h"
+
+#include "category.h"
 #include "data-out.h"
 #include "format.h"
 #include "dictionary.h"
@@ -867,9 +868,10 @@ var_get_aux (const struct variable *v)
    cleared, AUX_DTOR(V) will be called.  (var_dtor_free, below,
    may be appropriate for use as AUX_DTOR.) */
 void *
-var_attach_aux (struct variable *v,
+var_attach_aux (const struct variable *v_,
                 void *aux, void (*aux_dtor) (struct variable *)) 
 {
+  struct variable *v = (struct variable *) v_ ; /* cast away const  */
   assert (v->aux == NULL);
   assert (aux != NULL);
   v->aux = aux;
@@ -924,8 +926,9 @@ var_get_obs_vals (const struct variable *v)
 
 /* Sets V's observed categorical values to CAT_VALS. */
 void
-var_set_obs_vals (struct variable *v, struct cat_vals *cat_vals) 
+var_set_obs_vals (const struct variable *v_, struct cat_vals *cat_vals) 
 {
+  struct variable *v = (struct variable *) v_ ; /* cast away const */ 
   cat_stored_values_destroy (v->obs_vals);
   v->obs_vals = cat_vals;
 }