X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Flevene.c;h=7bd582105f940c28ffeb26506d4c5fe941ff728d;hb=ff59ee87992b440aab8083ee041f9aecd2ce68ca;hp=12ec312f17b7b57d8c40b11ad8a8a796ec42981c;hpb=f5c108becd49d78f4898cab11352291f5689d24e;p=pspp-builds.git
diff --git a/src/math/levene.c b/src/math/levene.c
index 12ec312f..7bd58210 100644
--- a/src/math/levene.c
+++ b/src/math/levene.c
@@ -1,22 +1,18 @@
-/* This file is part of GNU PSPP
- Computes Levene test statistic.
+/* PSPP - a program for statistical analysis.
+ Copyright (C) 2004, 2009 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. */
+ along with this program. If not, see . */
#include
#include "levene.h"
@@ -29,13 +25,14 @@
#include
#include
#include
-#include
#include
#include "group.h"
#include
#include
+#include "xalloc.h"
+
/* This module calculates the Levene statistic for variables.
@@ -121,7 +118,7 @@ levene(const struct dictionary *dict,
enum mv_class exclude)
{
struct casereader *pass1, *pass2;
- struct ccase c;
+ struct ccase *c;
struct levene_info l;
l.n_dep = n_dep;
@@ -134,14 +131,14 @@ levene(const struct dictionary *dict,
casereader_split (reader, &pass1, &pass2);
levene_precalc (&l);
- for (; casereader_read (pass1, &c); case_destroy (&c))
- levene_calc (dict, &c, &l);
+ for (; (c = casereader_read (pass1)) != NULL; case_unref (c))
+ levene_calc (dict, c, &l);
casereader_destroy (pass1);
levene_postcalc (&l);
levene2_precalc(&l);
- for (; casereader_read (pass2, &c); case_destroy (&c))
- levene2_calc (dict, &c, &l);
+ for (; (c = casereader_read (pass2)) != NULL; case_unref (c))
+ levene2_calc (dict, c, &l);
casereader_destroy (pass2);
levene2_postcalc (&l);