Continue reforming procedure execution. In this phase, get rid of
[pspp-builds.git] / src / language / data-io / matrix-data.c
index 47281defa3bce9be7da93db0e21ee726834e620d..ff008caa412c60532cae4b5e363d93f703bf616c 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
-#include "message.h"
+
 #include <stdlib.h>
 #include <ctype.h>
 #include <float.h>
-#include "array.h"
-#include "alloc.h"
-#include "case.h"
-#include "command.h"
-#include "compiler.h"
-#include "data-in.h"
-#include "data-reader.h"
-#include "dictionary.h"
-#include "message.h"
-#include "file-handle.h"
-#include "lexer.h"
-#include "misc.h"
-#include "pool.h"
-#include "str.h"
-#include "variable.h"
-#include "procedure.h"
+
+#include <data/case-source.h>
+#include <data/case.h>
+#include <data/data-in.h>
+#include <data/dictionary.h>
+#include <data/variable.h>
+#include <language/command.h>
+#include <language/data-io/data-reader.h>
+#include <language/data-io/file-handle.h>
+#include <language/lexer/lexer.h>
+#include <libpspp/alloc.h>
+#include <libpspp/array.h>
+#include <libpspp/compiler.h>
+#include <libpspp/message.h>
+#include <libpspp/message.h>
+#include <libpspp/misc.h>
+#include <libpspp/pool.h>
+#include <libpspp/str.h>
+#include <procedure.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include "debug-print.h"
-
 /* FIXME: /N subcommand not implemented.  It should be pretty simple,
    too. */
 
@@ -971,7 +972,8 @@ read_matrices_without_rowtype (struct matrix_data_pgm *mx)
   nr.split_values = xnmalloc (dict_get_split_cnt (default_dict),
                               sizeof *nr.split_values);
 
-  vfm_source = create_case_source (&matrix_data_without_rowtype_source_class, &nr);
+  proc_set_source (create_case_source (
+                     &matrix_data_without_rowtype_source_class, &nr));
   
   ok = procedure (NULL, NULL);
 
@@ -1123,7 +1125,6 @@ nr_read_data_lines (struct nr_aux_data *nr,
        if (mx->fmt != FREE
             && !force_eol (mx->reader, content_names[content]))
          return 0;
-       debug_printf (("\n"));
       }
 
       if (mx->section == LOWER)
@@ -1419,11 +1420,8 @@ nr_output_data (struct nr_aux_data *nr, struct ccase *c,
            size_t factor;
 
            for (factor = 0; factor < mx->n_factors; factor++)
-             {
-               case_data_rw (c, mx->factors[factor]->fv)->f
-                 = nr->factor_values[factor + cell * mx->n_factors];
-               debug_printf (("f:%s ", mx->factors[factor]->name));
-             }
+              case_data_rw (c, mx->factors[factor]->fv)->f
+                = nr->factor_values[factor + cell * mx->n_factors];
          }
          
          {
@@ -1515,8 +1513,8 @@ read_matrices_with_rowtype (struct matrix_data_pgm *mx)
   wr.current = NULL;
   mx->cells = 0;
 
-  vfm_source = create_case_source (&matrix_data_with_rowtype_source_class,
-                                   &wr);
+  proc_set_source (create_case_source (&matrix_data_with_rowtype_source_class,
+                                       &wr));
   ok = procedure (NULL, NULL);
 
   free (wr.split_values);
@@ -1973,8 +1971,6 @@ wr_read_indeps (struct wr_aux_data *wr)
     }
   c->n_rows[wr->content]++;
 
-  debug_printf ((" (c=%p,r=%d,n=%d)", c, n_rows + 1, n_cols));
-
   /* Read N_COLS items at CP. */
   {
     int j;
@@ -1997,7 +1993,6 @@ wr_read_indeps (struct wr_aux_data *wr)
     if (mx->fmt != FREE
         && !force_eol (mx->reader, content_names[wr->content]))
       return 0;
-    debug_printf (("\n"));
   }
 
   return 1;