Update all #include directives to the currently preferred style.
[pspp-builds.git] / src / math / levene.c
index b92441b37babbf8505a931176aa00e1fd1ab7f89..13fad93e52107ebe5a16ca826fbbedb06dbf8928 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 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
 
 #include <config.h>
 
-#include "levene.h"
+#include "math/levene.h"
 
 #include <math.h>
 
-#include <libpspp/misc.h>
-
-#include <data/case.h>
-#include <data/casereader.h>
-#include <data/variable.h>
-
-
-#include <libpspp/hmap.h>
+#include "data/case.h"
+#include "data/casereader.h"
+#include "data/variable.h"
+#include "libpspp/hmap.h"
+#include "libpspp/misc.h"
 
 struct lev
 {
@@ -113,6 +110,7 @@ levene (struct casereader *rx, const struct variable *gvar,
   r = casereader_clone (rx);
   for (; (c = casereader_read (r)) != NULL; case_unref (c))
     {
+      struct lev *l = NULL;
       const union value *target = case_data (c, gvar);
       int width = var_get_width (gvar);
       const double x = case_data (c, var)->f;
@@ -121,8 +119,7 @@ levene (struct casereader *rx, const struct variable *gvar,
       if (var_is_value_missing (var, case_data (c, var), exclude))
        continue;
 
-      struct lev *l = find_group (&map, target, width);
-
+      l = find_group (&map, target, width);
       assert (l);
       
       l->z_mean += fabs (x - l->t_bar) * weight;
@@ -144,6 +141,7 @@ levene (struct casereader *rx, const struct variable *gvar,
   for (; (c = casereader_read (r)) != NULL; case_unref (c))
     {
       double z;
+      struct lev *l;
       const union value *target = case_data (c, gvar);
       int width = var_get_width (gvar);
       const double x = case_data (c, var)->f;
@@ -152,10 +150,10 @@ levene (struct casereader *rx, const struct variable *gvar,
       if (var_is_value_missing (var, case_data (c, var), exclude))
        continue;
 
-      struct lev *l = find_group (&map, target, width);
+      l = find_group (&map, target, width);
       assert (l);
-      z = fabs (x - l->t_bar);
 
+      z = fabs (x - l->t_bar);
       denominator += pow2 (z - l->z_mean) * weight;
     }
   casereader_destroy (r);
@@ -164,7 +162,7 @@ levene (struct casereader *rx, const struct variable *gvar,
 
   {
     double grand_n = 0.0;
-    struct hmap_node *next;
+    struct lev *next;
     struct lev *l;
     HMAP_FOR_EACH_SAFE (l, next, struct lev, node, &map)
       {