X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fscatterplot.c;h=5e8d27155e72606d850d979dfec12bb91c73c1a7;hb=75a514035ccbe2df4058b486a48162b301dd51d0;hp=69b53b6751a04c1ed3ed6fdec5f9916129abf7af;hpb=bc8bf17d5f839d6745eed040b7a28cea22b02ef5;p=pspp diff --git a/src/output/charts/scatterplot.c b/src/output/charts/scatterplot.c index 69b53b6751..5e8d27155e 100644 --- a/src/output/charts/scatterplot.c +++ b/src/output/charts/scatterplot.c @@ -23,7 +23,7 @@ #include "data/casereader.h" #include "data/variable.h" #include "libpspp/cast.h" -#include "output/chart-item-provider.h" +#include "output/chart-provider.h" #include "gl/minmax.h" @@ -37,10 +37,8 @@ scatterplot_create (struct casereader *reader, const char *label, double xmin, double xmax, double ymin, double ymax) { - struct scatterplot_chart *spc; - - spc = xzalloc (sizeof *spc); - chart_item_init (&spc->chart_item, &scatterplot_chart_class, label); + struct scatterplot_chart *spc = XZALLOC (struct scatterplot_chart); + chart_init (&spc->chart, &scatterplot_chart_class, label); spc->data = reader; spc->y_min = ymin; @@ -59,9 +57,9 @@ scatterplot_create (struct casereader *reader, } static void -scatterplot_chart_destroy (struct chart_item *chart_item) +scatterplot_chart_destroy (struct chart *chart) { - struct scatterplot_chart *spc = to_scatterplot_chart (chart_item); + struct scatterplot_chart *spc = to_scatterplot_chart (chart); casereader_destroy (spc->data); free (spc->xlabel); free (spc->ylabel); @@ -70,7 +68,7 @@ scatterplot_chart_destroy (struct chart_item *chart_item) free (spc); } -const struct chart_item_class scatterplot_chart_class = +const struct chart_class scatterplot_chart_class = { scatterplot_chart_destroy };