*** empty log message ***
[pspp-builds.git] / src / matrix-data.c
index 277cde38232dbf4e7a118fb50683cd04fcfc7e20..6f3d58ade7a6d1c06988c848cb9263b890ccb1bd 100644 (file)
@@ -18,7 +18,7 @@
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "error.h"
 #include <stdlib.h>
 #include <ctype.h>
 #include <float.h>
@@ -153,9 +153,6 @@ cmd_matrix_data (void)
   
   unsigned seen = 0;
   
-  lex_match_id ("MATRIX");
-  lex_match_id ("DATA");
-
   discard_variables ();
 
   pool = pool_create ();
@@ -600,6 +597,9 @@ cmd_matrix_data (void)
   debug_print ();
 #endif
 
+  if (!dfm_open_for_reading (mx->data_file))
+    goto lossage;
+
   if (mx->explicit_rowtype)
     read_matrices_with_rowtype (mx);
   else
@@ -1152,6 +1152,7 @@ nr_read_data_lines (struct nr_aux_data *nr,
              break;
            default:
              assert (0);
+              abort ();
            }
          break;
        case 2:
@@ -1159,6 +1160,7 @@ nr_read_data_lines (struct nr_aux_data *nr,
          break;
        default:
          assert (0);
+          abort ();
        }
 
       {
@@ -2006,10 +2008,12 @@ wr_read_indeps (struct wr_aux_data *wr)
          break;
        default:
          assert (0);
+          abort ();
        }
       break;
     default:
       assert (0);
+      abort ();
     }
   c->n_rows[wr->content]++;