Closing bug #21760
[pspp-builds.git] / src / language / stats / glm.q
index 8cfc25473b6057b93aa5ac3f6882e9b7b16db2cb..2e230c3620bce5bbb492946e739f85dabf2ca078 100644 (file)
@@ -36,7 +36,6 @@
 #include <language/dictionary/split-file.h>
 #include <language/data-io/file-handle.h>
 #include <language/lexer/lexer.h>
-#include <libpspp/alloc.h>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
 #include <math/design-matrix.h>
@@ -45,6 +44,7 @@
 #include <math/moments.h>
 #include <output/table.h>
 
+#include "xalloc.h"
 #include "gettext.h"
 
 #define GLM_LARGE_DATA 1000
@@ -81,10 +81,14 @@ static const struct variable **v_dependent;
  */
 static size_t n_dependent;
 
+#if 0
 /*
   Return value for the procedure.
  */
 static int pspp_glm_rc = CMD_SUCCESS;
+#else
+int cmd_glm (struct lexer *lexer, struct dataset *ds);
+#endif
 
 static bool run_glm (struct casereader*,
                     struct cmd_glm *,
@@ -247,7 +251,10 @@ run_glm (struct casereader *input,
   assert (model != NULL);
 
   if (!casereader_peek (input, 0, &c))
-    return true;
+    {
+      casereader_destroy (input);
+      return true;
+    }
   output_split_file_values (ds, &c);
   case_destroy (&c);