- /*
- compare_var_names returns 0 if the variable
- names match.
- */
- if (!compare_var_names (v, v_variables[k], NULL))
- return 1;
-
- return 0;
-}
-
-/*
- Mark missing cases. Return the number of non-missing cases.
- */
-static size_t
-mark_missing_cases (const struct casefile *cf, struct variable *v,
- int *is_missing_case, double n_data)
-{
- struct casereader *r;
- struct ccase c;
- size_t row;
- const union value *val;
-
- for (r = casefile_get_reader (cf);
- casereader_read (r, &c); case_destroy (&c))
- {
- row = casereader_cnum (r) - 1;
-
- val = case_data (&c, v->fv);
- cat_value_update (v, val);
- if (mv_is_value_missing (&v->miss, val))
- {
- if (!is_missing_case[row])
- {
- /* Now it is missing. */
- n_data--;
- is_missing_case[row] = 1;
- }
- }
- }
- casereader_destroy (r);
-
- return n_data;