moved knowledge of pspp_linreg_cache out of pspp_coeff_init
[pspp] / src / language / data-io / get.c
index eb0a5cebc8d229e015d8e9787805e4e51dbbf0fb..fc4d2c12911ef39123613286143b59f8c657581b 100644 (file)
@@ -39,7 +39,9 @@
 #include <language/command.h>
 #include <language/data-io/file-handle.h>
 #include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
 #include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
 #include <libpspp/hash.h>
 #include <libpspp/message.h>
@@ -439,6 +441,8 @@ parse_write_command (enum writer_type writer_type,
     }
   else
     aw->writer = any_writer_open (handle, dict);
+  if (aw->writer == NULL)
+    goto error;
   dict_destroy (dict);
   
   return aw;
@@ -840,7 +844,7 @@ cmd_match_files (void)
           saw_table = true;
         }
       else
-        assert (0);
+        NOT_REACHED ();
       lex_match ('=');
 
       file->by = NULL;
@@ -1139,6 +1143,7 @@ cmd_match_files (void)
 
   discard_variables ();
 
+  dict_destroy (default_dict);
   default_dict = mtf.dict;
   mtf.dict = NULL;
   proc_set_source (storage_source_create (mtf.output));
@@ -1165,7 +1170,7 @@ mtf_processing_finish (void *mtf_)
     if (iter->handle == NULL)
       {
         if (!mtf_delete_file_in_place (mtf, &iter))
-          abort ();
+          NOT_REACHED ();
         break;
       }