+/* Stores a value in *V.
+ MV must contain an individual value (as determined by
+ mv_has_value()).
+ IDX is the zero based index of the value to get
+*/
+void
+mv_peek_value (const struct missing_values *mv, union value *v, int idx)
+{
+ assert (idx >= 0 ) ;
+ assert (idx < 3);
+
+ assert (mv_has_value (mv));
+ *v = mv->values[idx];
+}
+
+void
+mv_replace_value (struct missing_values *mv, const union value *v, int idx)
+{
+ assert (idx >= 0) ;
+ assert (idx < mv_n_values(mv));
+
+ mv->values[idx] = *v;
+}
+
+
+
+int
+mv_n_values (const struct missing_values *mv)
+{
+ assert(mv_has_value(mv));
+ return mv->type & 3;
+}
+
+