+ else
+ mv_clear (&v->miss);
+
+ dict_var_changed (v);
+}
+
+/* Sets variable V to have no user-missing values. */
+void
+var_clear_missing_values (struct variable *v)
+{
+ var_set_missing_values (v, NULL);
+}
+
+/* Returns true if V has any user-missing values,
+ false otherwise. */
+bool
+var_has_missing_values (const struct variable *v)
+{
+ return !mv_is_empty (&v->miss);
+}
+
+/* Returns true if VALUE is in the given CLASS of missing values
+ in V, false otherwise. */
+bool
+var_is_value_missing (const struct variable *v, const union value *value,
+ enum mv_class class)
+{
+ return mv_is_value_missing (&v->miss, value, class);
+}
+
+/* Returns true if D is in the given CLASS of missing values in
+ V, false otherwise.
+ V must be a numeric variable. */
+bool
+var_is_num_missing (const struct variable *v, double d, enum mv_class class)
+{
+ return mv_is_num_missing (&v->miss, d, class);
+}
+
+/* Returns true if S[] is a missing value for V, false otherwise.
+ S[] must contain exactly as many characters as V's width.
+ V must be a string variable. */
+bool
+var_is_str_missing (const struct variable *v, const uint8_t s[],
+ enum mv_class class)
+{
+ return mv_is_str_missing (&v->miss, s, class);
+}
+\f
+/* Returns variable V's value labels,
+ possibly a null pointer if it has none. */
+const struct val_labs *
+var_get_value_labels (const struct variable *v)
+{
+ return v->val_labs;
+}
+
+/* Returns true if variable V has at least one value label. */
+bool
+var_has_value_labels (const struct variable *v)
+{
+ return val_labs_count (v->val_labs) > 0;
+}
+
+/* Sets variable V's value labels to a copy of VLS,
+ which must have a width equal to V's width or one that can be
+ changed to V's width.
+ If VLS is null, then V's value labels, if any, are removed. */
+void
+var_set_value_labels (struct variable *v, const struct val_labs *vls)
+{
+ val_labs_destroy (v->val_labs);
+ v->val_labs = NULL;