fix bug 19581
[pspp-builds.git] / src / output / charts / piechart.c
index 3fceaf20f5b016bec4d798cdcd298206e87ebd2b..a1986bd3122c532c65a03184004f534abd7f5da4 100644 (file)
@@ -1,7 +1,6 @@
 /* PSPP - draws pie charts of sample statistics
 
 Copyright (C) 2004 Free Software Foundation, Inc.
-Written by John Darrington <john@darrington.wattle.id.au>
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as
@@ -19,17 +18,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 02110-1301, USA. */
 
 
-#include "config.h"
-#include "piechart.h"
-#include "chart.h"
+#include <config.h>
+
 #include <float.h>
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
-#include "str.h"
-#include "value-labels.h"
-#include "misc.h"
-#include "plot-chart.h"
+
+
+#include <output/charts/piechart.h>
+#include <output/charts/plot-chart.h>
+
+#include <output/chart.h>
+#include <libpspp/str.h>
+#include <data/value-labels.h>
+
+#include "minmax.h"
+
 
 /* Pie charts of course need to know Pi :) */
 #ifndef M_PI
@@ -66,7 +71,7 @@ piechart_plot(const char *title, const struct slice *slices, int n_slices)
   const double centre_x = (ch->data_right + ch->data_left ) / 2.0 ;
   const double centre_y = (ch->data_top + ch->data_bottom ) / 2.0 ;
 
-  const double radius = min
+  const double radius = MIN
                            5.0 / 12.0 * (ch->data_top - ch->data_bottom),
                            1.0 / 4.0 * (ch->data_right - ch->data_left)
                            );