Change how checking for missing values works.
[pspp] / src / data / csv-file-writer.c
index d8c3e000ef84031f824998be068bdf1c94e5f992..c00a2cffed4df0a5a91e87b21f05ed8780d07fbe 100644 (file)
@@ -110,7 +110,7 @@ csv_writer_open (struct file_handle *fh, const struct dictionary *dict,
 
   w->encoding = xstrdup (dict_get_encoding (dict));
 
-  w->n_csv_vars = dict_get_var_cnt (dict);
+  w->n_csv_vars = dict_get_n_vars (dict);
   w->csv_vars = xnmalloc (w->n_csv_vars, sizeof *w->csv_vars);
   for (i = 0; i < w->n_csv_vars; i++)
     {
@@ -368,7 +368,7 @@ static void
 csv_write_var (struct csv_writer *w, const struct csv_var *cv,
                const union value *value)
 {
-  if (mv_is_value_missing (&cv->missing, value, MV_USER))
+  if (mv_is_value_missing (&cv->missing, value) == MV_USER)
     {
       union value missing;