X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Forder-stats.c;h=be9c49a3122171b6f1eee792a802e080ab2f4150;hb=81579d9e9f994fb2908f50af41c3eb033d216e58;hp=e550d2b2eb55f66fd4baea366e7a058abb849443;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp-builds.git
diff --git a/src/math/order-stats.c b/src/math/order-stats.c
index e550d2b2..be9c49a3 100644
--- a/src/math/order-stats.c
+++ b/src/math/order-stats.c
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 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
@@ -15,14 +15,18 @@
along with this program. If not, see . */
#include
-#include "order-stats.h"
-#include
-#include
-#include
-#include
-#include
+
+#include "math/order-stats.h"
+
#include
+#include "data/casereader.h"
+#include "data/val-type.h"
+#include "data/variable.h"
+#include "libpspp/assertion.h"
+
+#include "gl/xalloc.h"
+
#if 0
#include
@@ -131,8 +135,6 @@ order_stats_accumulate (struct order_stats **os, size_t nos,
if ( var_is_value_missing (var, case_data (cx, var), exclude))
continue;
- case_unref (prev_cx);
-
if ( prev_value == -DBL_MAX || prev_value == this_value)
c_i += weight;
@@ -142,6 +144,7 @@ order_stats_accumulate (struct order_stats **os, size_t nos,
c_i = weight;
}
+ case_unref (prev_cx);
cc_i += weight;
prev_value = this_value;
prev_cx = case_ref (cx);