X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Ftukey-hinges.c;h=3e9ea9374eb4198b76d83688234b23de97fc7cf9;hb=bc414e71fa3378400ef3abf2c247c7f0bbac1b66;hp=ded7a9c6fe4233baa3172899c467e38770023b07;hpb=b46b794dfb9f0758aafec83f50993d1930894099;p=pspp diff --git a/src/math/tukey-hinges.c b/src/math/tukey-hinges.c index ded7a9c6fe..3e9ea9374e 100644 --- a/src/math/tukey-hinges.c +++ b/src/math/tukey-hinges.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,13 +15,17 @@ along with this program. If not, see . */ #include -#include "tukey-hinges.h" -#include -#include -#include +#include "math/tukey-hinges.h" + #include +#include "libpspp/assertion.h" +#include "libpspp/cast.h" +#include "math/order-stats.h" + +#include "gl/xalloc.h" + void tukey_hinges_calculate (const struct tukey_hinges *th, double hinge[3]) { @@ -59,7 +63,8 @@ tukey_hinges_calculate (const struct tukey_hinges *th, double hinge[3]) static void destroy (struct statistic *s) { - struct order_stats *os = (struct order_stats *) s; + struct tukey_hinges *th = UP_CAST (s, struct tukey_hinges, parent.parent); + struct order_stats *os = &th->parent; free (os->k); free (s);