subcase: Rename subcase_destroy() to subcase_uninit().
[pspp] / src / language / data-io / combine-files.c
index c51f04aaa947d422a9b504d69e66dc13ef5c0161..27e511595e04f205ce4a4abef7063260ce822d8e 100644 (file)
@@ -414,11 +414,11 @@ combine_files (enum comb_command_type command,
   for (i = 0; i < proc.n_files; i++)
     {
       struct comb_file *file = &proc.files[i];
-      size_t src_var_cnt = dict_get_var_cnt (file->dict);
+      size_t src_n_vars = dict_get_n_vars (file->dict);
       size_t j;
 
-      file->mv = xnmalloc (src_var_cnt, sizeof *file->mv);
-      for (j = 0; j < src_var_cnt; j++)
+      file->mv = xnmalloc (src_n_vars, sizeof *file->mv);
+      for (j = 0; j < src_n_vars; j++)
         {
           struct variable *src_var = dict_get_var (file->dict, j);
           struct variable *dst_var = dict_lookup_var (proc.dict,
@@ -543,7 +543,7 @@ merge_dictionary (struct dictionary *const m, struct comb_file *f)
         }
     }
 
-  for (i = 0; i < dict_get_var_cnt (d); i++)
+  for (i = 0; i < dict_get_n_vars (d); i++)
     {
       struct variable *dv = dict_get_var (d, i);
       struct variable *mv = dict_lookup_var (m, var_get_name (dv));
@@ -639,9 +639,9 @@ close_all_comb_files (struct comb_proc *proc)
   for (i = 0; i < proc->n_files; i++)
     {
       struct comb_file *file = &proc->files[i];
-      subcase_destroy (&file->by_vars);
-      subcase_destroy (&file->src);
-      subcase_destroy (&file->dst);
+      subcase_uninit (&file->by_vars);
+      subcase_uninit (&file->src);
+      subcase_uninit (&file->dst);
       free (file->mv);
       fh_unref (file->handle);
       dict_unref (file->dict);
@@ -668,7 +668,7 @@ free_comb_proc (struct comb_proc *proc)
                                 proc->prev_BY);
       free (proc->prev_BY);
     }
-  subcase_destroy (&proc->by_vars);
+  subcase_uninit (&proc->by_vars);
   case_unref (proc->buffered_case);
 }
 \f
@@ -821,7 +821,7 @@ scan_table (struct comb_file *file, union value by[])
 static struct ccase *
 create_output_case (const struct comb_proc *proc)
 {
-  size_t n_vars = dict_get_var_cnt (proc->dict);
+  size_t n_vars = dict_get_n_vars (proc->dict);
   struct ccase *output;
   size_t i;
 
@@ -873,7 +873,7 @@ apply_nonmissing_case (const struct comb_file *file, struct ccase *output)
         = case_data_idx (file->data, src_field->case_index);
       int width = src_field->width;
 
-      if (!mv_is_value_missing (file->mv[i], src_value, MV_ANY)
+      if (!mv_is_value_missing (file->mv[i], src_value)
           && !(width > 0 && value_is_spaces (src_value, width)))
         value_copy (case_data_rw_idx (output, dst_field->case_index),
                     src_value, width);