magic-elimination.patch from patch #6230.
[pspp-builds.git] / src / language / stats / examine.q
index e15d294975eb2ba26960db79b225d3ff8939635e..acf14e394dddbdf2968ebf065d6302001b04ec3c 100644 (file)
@@ -1,21 +1,18 @@
-/* PSPP - EXAMINE data for normality . -*-c-*-
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004 Free Software Foundation, Inc.
 
-Copyright (C) 2004 Free Software Foundation, Inc.
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA. */
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 
@@ -38,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 #include <libpspp/alloc.h>
 #include <libpspp/compiler.h>
 #include <libpspp/hash.h>
-#include <libpspp/magic.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
@@ -226,7 +222,7 @@ cmd_examine (struct lexer *lexer, struct dataset *ds)
     }
 
   grouper = casegrouper_create_splits (proc_open (ds), dataset_dict (ds));
-  while (casegrouper_get_next_group (grouper, &group)) 
+  while (casegrouper_get_next_group (grouper, &group))
     run_examine (&cmd, group, ds);
   ok = casegrouper_destroy (grouper);
   ok = proc_commit (ds) && ok;
@@ -723,7 +719,10 @@ run_examine (struct cmd_examine *cmd, struct casereader *input,
   struct factor *fctr;
 
   if (!casereader_peek (input, 0, &c))
-    return;
+    {
+      casereader_destroy (input);
+      return;
+    }
   output_split_file_values (ds, &c);
   case_destroy (&c);
 
@@ -2257,3 +2256,9 @@ factor_to_string_concise (const struct factor *fctr,
 
   return buf;
 }
+
+/*
+  Local Variables:
+  mode: c
+  End:
+*/