Fixed a whole lot more memory leaks.
[pspp-builds.git] / src / chart.h
index eec5bff5b847a1d6d3b679c28156919c1b8651bd..6915358d8a60e225823e036066bcb2ab1b31a9b6 100644 (file)
 #ifndef CHART_H
 #define CHART_H
 
+#include <config.h>
 #include <stdio.h>
-#include <plot.h>
 #include <gsl/gsl_histogram.h>
-
 #include "var.h"
 
+#ifndef NO_CHARTS
+#include <plot.h>
+#endif
+
 
 /* Array of standard colour names */
 extern const char *data_colour[];
@@ -34,8 +37,13 @@ extern const char *data_colour[];
 
 struct chart {
 
+#ifndef NO_CHARTS
   plPlotter *lp ;
   plPlotterParams *pl_params;
+#else
+  void *lp;
+#endif
+  char *filename;
 
   /* The geometry of the chart 
      See diagram at the foot of this file.
@@ -72,10 +80,8 @@ struct chart {
 };
 
 
-int  chart_initialise(struct chart *ch);
-
-void chart_finalise(struct chart *ch);
-
+struct chart * chart_create(void);
+void chart_submit(struct chart *ch);
 
 double chart_rounded_tick(double tick);