From 0a214c1f9ca0132a6bdc36c538a0f77964672847 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 21 Jul 2009 21:46:02 -0700 Subject: [PATCH] output: Make building without libplot possible again. This fixes the remaining known functional regression versus the situation before refactoring the charts implementation. --- configure.ac | 1 - src/language/automake.mk | 3 - src/output/automake.mk | 30 +- src/output/chart.c | 3 +- src/output/chart.h | 6 +- src/output/charts/automake.mk | 32 -- src/output/charts/cartesian.h | 4 +- src/output/charts/dummy-chart.c | 112 ------- src/output/charts/libplot-dummy.c | 232 +++++++++++++++ src/output/charts/libplot-dummy.h | 465 ++++++++++++++++++++++++++++++ src/output/charts/plot-chart.c | 1 - src/output/charts/plot-hist.c | 1 - 12 files changed, 724 insertions(+), 166 deletions(-) delete mode 100644 src/output/charts/automake.mk delete mode 100644 src/output/charts/dummy-chart.c create mode 100644 src/output/charts/libplot-dummy.c create mode 100644 src/output/charts/libplot-dummy.h diff --git a/configure.ac b/configure.ac index 1fab7d90..3405c039 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,6 @@ AC_SYS_LARGEFILE AC_SEARCH_LIBS([sin], [m]) PSPP_LIBPLOT PSPP_LC_PAPER -AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no") AC_ARG_VAR([PSPP_LDFLAGS], [linker flags to be used for linking the pspp binary only]) diff --git a/src/language/automake.mk b/src/language/automake.mk index 4210b7fc..3052b523 100644 --- a/src/language/automake.mk +++ b/src/language/automake.mk @@ -13,9 +13,6 @@ include $(top_srcdir)/src/language/expressions/automake.mk noinst_LTLIBRARIES += src/language/liblanguage.la -src_language_liblanguage_la_LIBADD = \ - src/output/charts/libcharts.la - src_language_liblanguage_la_SOURCES = \ src/language/syntax-file.c \ src/language/syntax-file.h \ diff --git a/src/output/automake.mk b/src/output/automake.mk index 7b4f5f7b..71b88bb9 100644 --- a/src/output/automake.mk +++ b/src/output/automake.mk @@ -1,33 +1,41 @@ ## Process this file with automake to produce Makefile.in -*- makefile -*- - -include $(top_srcdir)/src/output/charts/automake.mk - noinst_LTLIBRARIES += src/output/liboutput.la src_output_liboutput_la_SOURCES = \ src/output/afm.c \ src/output/afm.h \ src/output/ascii.c \ + src/output/chart.c \ + src/output/chart.h \ + src/output/charts/box-whisker.c \ + src/output/charts/box-whisker.h \ + src/output/charts/cartesian.c \ + src/output/charts/cartesian.h \ + src/output/charts/libplot-dummy.c \ + src/output/charts/libplot-dummy.h \ + src/output/charts/libplot.h \ + src/output/charts/np-plot.c \ + src/output/charts/np-plot.h \ + src/output/charts/piechart.c \ + src/output/charts/piechart.h \ + src/output/charts/plot-chart.c \ + src/output/charts/plot-chart.h \ + src/output/charts/plot-hist.c \ + src/output/charts/plot-hist.h \ src/output/html.c \ src/output/htmlP.h \ src/output/journal.c \ src/output/journal.h \ + src/output/manager.c \ + src/output/manager.h \ src/output/output.c \ src/output/output.h \ src/output/postscript.c \ - src/output/manager.c \ - src/output/manager.h \ - src/output/chart.h \ src/output/table.c \ src/output/table.h if HAVE_CAIRO src_output_liboutput_la_SOURCES += src/output/cairo.c endif -if WITHCHARTS -src_output_liboutput_la_SOURCES += src/output/chart.c -else -src_output_liboutput_la_SOURCES += src/output/dummy-chart.c -endif EXTRA_DIST += src/output/OChangeLog diff --git a/src/output/chart.c b/src/output/chart.c index b1f96ef9..2a2bc124 100644 --- a/src/output/chart.c +++ b/src/output/chart.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -125,11 +124,13 @@ chart_unref (struct chart *chart) void chart_submit (struct chart *chart) { +#ifdef HAVE_LIBPLOT struct outp_driver *d; for (d = outp_drivers (NULL); d; d = outp_drivers (d)) if (d->class->output_chart != NULL) d->class->output_chart (d, chart); +#endif chart_unref (chart); } diff --git a/src/output/chart.h b/src/output/chart.h index fea64edf..598c91eb 100644 --- a/src/output/chart.h +++ b/src/output/chart.h @@ -17,9 +17,13 @@ #ifndef OUTPUT_CHART_H #define OUTPUT_CHART_H 1 +/* requires but doesn't #include it. */ +#include + #ifdef HAVE_CHARTS -#include /* Required by . */ #include +#else +#include #endif struct chart; diff --git a/src/output/charts/automake.mk b/src/output/charts/automake.mk deleted file mode 100644 index 37901171..00000000 --- a/src/output/charts/automake.mk +++ /dev/null @@ -1,32 +0,0 @@ -## Process this file with automake to produce Makefile.in -*- makefile -*- - -noinst_LTLIBRARIES += src/output/charts/libcharts.la - -chart_sources = \ - src/output/charts/box-whisker.c \ - src/output/charts/box-whisker.h \ - src/output/charts/cartesian.c \ - src/output/charts/cartesian.h \ - src/output/charts/np-plot.c \ - src/output/charts/np-plot.h \ - src/output/charts/piechart.c \ - src/output/charts/piechart.h \ - src/output/charts/plot-chart.h \ - src/output/charts/plot-chart.c \ - src/output/charts/plot-hist.c \ - src/output/charts/plot-hist.h - -if WITHCHARTS -src_output_charts_libcharts_la_SOURCES = \ - $(chart_sources) - -EXTRA_DIST += src/output/charts/dummy-chart.c -AM_CPPFLAGS += -DHAVE_CHARTS=1 -else -src_output_charts_libcharts_la_SOURCES = \ - src/output/charts/dummy-chart.c - -EXTRA_DIST += $(chart_sources) -endif - -EXTRA_DIST += src/output/charts/OChangeLog diff --git a/src/output/charts/cartesian.h b/src/output/charts/cartesian.h index 15fb8840..22e914df 100644 --- a/src/output/charts/cartesian.h +++ b/src/output/charts/cartesian.h @@ -19,10 +19,8 @@ #ifndef CARTESIAN_H #define CARTESIAN_H -#include -#include - #include +#include enum CHART_DIM { diff --git a/src/output/charts/dummy-chart.c b/src/output/charts/dummy-chart.c deleted file mode 100644 index aab8026c..00000000 --- a/src/output/charts/dummy-chart.c +++ /dev/null @@ -1,112 +0,0 @@ -/* PSPP - a program for statistical analysis. - Copyright (C) 2005, 2009 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -/* Stubs for plotting routines. - This module is linked only when charts are not supported */ - -#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_CHARTS -#error This file should be used only when compiling without charts. -#endif - -void -chart_write_title (struct chart *chart UNUSED, const char *title UNUSED, ...) -{ -} - - -void -chart_write_xscale (struct chart *ch UNUSED, - double min UNUSED, double max UNUSED, int ticks UNUSED) -{ -} - - -void -chart_write_yscale (struct chart *ch UNUSED UNUSED, - double smin UNUSED, double smax UNUSED, int ticks UNUSED) -{ -} - - -void -chart_write_xlabel (struct chart *ch UNUSED, const char *label UNUSED) -{ -} - -void -chart_write_ylabel (struct chart *ch UNUSED, const char *label UNUSED) -{ -} - - -void -chart_line (struct chart *ch UNUSED, - double slope UNUSED, double intercept UNUSED, - double limit1 UNUSED, double limit2 UNUSED, - enum CHART_DIM lim_dim UNUSED) -{ -} - - -void -chart_datum (struct chart *ch UNUSED, int dataset UNUSED UNUSED, - double x UNUSED, double y UNUSED) -{ -} - -void -histogram_plot (const struct histogram *hist UNUSED, - const char *label UNUSED, - double n UNUSED, double mean UNUSED, double stddev UNUSED, - bool show_normal UNUSED) -{ -} - - -void -boxplot_draw_yscale (struct chart *ch UNUSED, - double y_max UNUSED, double y_min UNUSED) -{ -} - -void -boxplot_draw_boxplot (struct chart *ch UNUSED, - double box_centre UNUSED, - double box_width UNUSED, - const struct box_whisker *w UNUSED, - const char *name UNUSED) -{ -} - - - - -void -piechart_plot (const char *title UNUSED, - const struct slice *slices UNUSED, int n_slices UNUSED) -{ -} diff --git a/src/output/charts/libplot-dummy.c b/src/output/charts/libplot-dummy.c new file mode 100644 index 00000000..6fe123ab --- /dev/null +++ b/src/output/charts/libplot-dummy.c @@ -0,0 +1,232 @@ +#include + +#ifndef HAVE_LIBPLOT +#include +#include +#include + +plPlotter * pl_newpl_r (const char *type UNUSED, FILE *infile UNUSED, FILE *outfile UNUSED, FILE *errfile UNUSED, const plPlotterParams *plotter_params UNUSED) { abort (); } +int pl_deletepl_r (plPlotter *plotter UNUSED) { abort (); } + +plPlotterParams * pl_newplparams (void UNUSED) { abort (); } +int pl_deleteplparams (plPlotterParams *plotter_params UNUSED) { abort (); } +plPlotterParams * pl_copyplparams (const plPlotterParams *plotter_params UNUSED) { abort (); } + +int pl_setplparam (plPlotterParams *plotter_params UNUSED, const char *parameter UNUSED, void *value UNUSED) { abort (); } + +int pl_arc_r (plPlotter *plotter UNUSED, int xc UNUSED, int yc UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_box_r (plPlotter *plotter UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_circle_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED, int r UNUSED) { abort (); } +int pl_closepl_r (plPlotter *plotter UNUSED) { abort (); } +int pl_cont_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED) { abort (); } +int pl_erase_r (plPlotter *plotter UNUSED) { abort (); } +int pl_label_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_line_r (plPlotter *plotter UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_linemod_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_move_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED) { abort (); } +int pl_openpl_r (plPlotter *plotter UNUSED) { abort (); } +int pl_point_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED) { abort (); } +int pl_space_r (plPlotter *plotter UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } + +FILE* pl_outfile_r (plPlotter *plotter UNUSED, FILE* outfile UNUSED) { abort (); }/* OBSOLETE */ +int pl_alabel_r (plPlotter *plotter UNUSED, int x_justify UNUSED, int y_justify UNUSED, const char *s UNUSED) { abort (); } +int pl_arcrel_r (plPlotter *plotter UNUSED, int dxc UNUSED, int dyc UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_bezier2_r (plPlotter *plotter UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED, int x2 UNUSED, int y2 UNUSED) { abort (); } +int pl_bezier2rel_r (plPlotter *plotter UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED, int dx2 UNUSED, int dy2 UNUSED) { abort (); } +int pl_bezier3_r (plPlotter *plotter UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED, int x2 UNUSED, int y2 UNUSED, int x3 UNUSED, int y3 UNUSED) { abort (); } +int pl_bezier3rel_r (plPlotter *plotter UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED, int dx2 UNUSED, int dy2 UNUSED, int dx3 UNUSED, int dy3 UNUSED) { abort (); } +int pl_bgcolor_r (plPlotter *plotter UNUSED, int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_bgcolorname_r (plPlotter *plotter UNUSED, const char *name UNUSED) { abort (); } +int pl_boxrel_r (plPlotter *plotter UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_capmod_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_circlerel_r (plPlotter *plotter UNUSED, int dx UNUSED, int dy UNUSED, int r UNUSED) { abort (); } +int pl_closepath_r (plPlotter *plotter UNUSED) { abort (); } +int pl_color_r (plPlotter *plotter UNUSED, int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_colorname_r (plPlotter *plotter UNUSED, const char *name UNUSED) { abort (); } +int pl_contrel_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED) { abort (); } +int pl_ellarc_r (plPlotter *plotter UNUSED, int xc UNUSED, int yc UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_ellarcrel_r (plPlotter *plotter UNUSED, int dxc UNUSED, int dyc UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_ellipse_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED, int rx UNUSED, int ry UNUSED, int angle UNUSED) { abort (); } +int pl_ellipserel_r (plPlotter *plotter UNUSED, int dx UNUSED, int dy UNUSED, int rx UNUSED, int ry UNUSED, int angle UNUSED) { abort (); } +int pl_endpath_r (plPlotter *plotter UNUSED) { abort (); } +int pl_endsubpath_r (plPlotter *plotter UNUSED) { abort (); } +int pl_fillcolor_r (plPlotter *plotter UNUSED, int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_fillcolorname_r (plPlotter *plotter UNUSED, const char *name UNUSED) { abort (); } +int pl_fillmod_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_filltype_r (plPlotter *plotter UNUSED, int level UNUSED) { abort (); } +int pl_flushpl_r (plPlotter *plotter UNUSED) { abort (); } +int pl_fontname_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_fontsize_r (plPlotter *plotter UNUSED, int size UNUSED) { abort (); } +int pl_havecap_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_joinmod_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_labelwidth_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +int pl_linedash_r (plPlotter *plotter UNUSED, int n UNUSED, const int *dashes UNUSED, int offset UNUSED) { abort (); } +int pl_linerel_r (plPlotter *plotter UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_linewidth_r (plPlotter *plotter UNUSED, int size UNUSED) { abort (); } +int pl_marker_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED, int type UNUSED, int size UNUSED) { abort (); } +int pl_markerrel_r (plPlotter *plotter UNUSED, int dx UNUSED, int dy UNUSED, int type UNUSED, int size UNUSED) { abort (); } +int pl_moverel_r (plPlotter *plotter UNUSED, int x UNUSED, int y UNUSED) { abort (); } +int pl_orientation_r (plPlotter *plotter UNUSED, int direction UNUSED) { abort (); } +int pl_pencolor_r (plPlotter *plotter UNUSED, int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_pencolorname_r (plPlotter *plotter UNUSED, const char *name UNUSED) { abort (); } +int pl_pentype_r (plPlotter *plotter UNUSED, int level UNUSED) { abort (); } +int pl_pointrel_r (plPlotter *plotter UNUSED, int dx UNUSED, int dy UNUSED) { abort (); } +int pl_restorestate_r (plPlotter *plotter UNUSED) { abort (); } +int pl_savestate_r (plPlotter *plotter UNUSED) { abort (); } +int pl_space2_r (plPlotter *plotter UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED, int x2 UNUSED, int y2 UNUSED) { abort (); } +int pl_textangle_r (plPlotter *plotter UNUSED, int angle UNUSED) { abort (); } + +double pl_ffontname_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +double pl_ffontsize_r (plPlotter *plotter UNUSED, double size UNUSED) { abort (); } +double pl_flabelwidth_r (plPlotter *plotter UNUSED, const char *s UNUSED) { abort (); } +double pl_ftextangle_r (plPlotter *plotter UNUSED, double angle UNUSED) { abort (); } +int pl_farc_r (plPlotter *plotter UNUSED, double xc UNUSED, double yc UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_farcrel_r (plPlotter *plotter UNUSED, double dxc UNUSED, double dyc UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_fbezier2_r (plPlotter *plotter UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED, double x2 UNUSED, double y2 UNUSED) { abort (); } +int pl_fbezier2rel_r (plPlotter *plotter UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED, double dx2 UNUSED, double dy2 UNUSED) { abort (); } +int pl_fbezier3_r (plPlotter *plotter UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED, double x2 UNUSED, double y2 UNUSED, double x3 UNUSED, double y3 UNUSED) { abort (); } +int pl_fbezier3rel_r (plPlotter *plotter UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED, double dx2 UNUSED, double dy2 UNUSED, double dx3 UNUSED, double dy3 UNUSED) { abort (); } +int pl_fbox_r (plPlotter *plotter UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_fboxrel_r (plPlotter *plotter UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_fcircle_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED, double r UNUSED) { abort (); } +int pl_fcirclerel_r (plPlotter *plotter UNUSED, double dx UNUSED, double dy UNUSED, double r UNUSED) { abort (); } +int pl_fcont_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED) { abort (); } +int pl_fcontrel_r (plPlotter *plotter UNUSED, double dx UNUSED, double dy UNUSED) { abort (); } +int pl_fellarc_r (plPlotter *plotter UNUSED, double xc UNUSED, double yc UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_fellarcrel_r (plPlotter *plotter UNUSED, double dxc UNUSED, double dyc UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_fellipse_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED, double rx UNUSED, double ry UNUSED, double angle UNUSED) { abort (); } +int pl_fellipserel_r (plPlotter *plotter UNUSED, double dx UNUSED, double dy UNUSED, double rx UNUSED, double ry UNUSED, double angle UNUSED) { abort (); } +int pl_flinedash_r (plPlotter *plotter UNUSED, int n UNUSED, const double *dashes UNUSED, double offset UNUSED) { abort (); } +int pl_fline_r (plPlotter *plotter UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_flinerel_r (plPlotter *plotter UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_flinewidth_r (plPlotter *plotter UNUSED, double size UNUSED) { abort (); } +int pl_fmarker_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED, int type UNUSED, double size UNUSED) { abort (); } +int pl_fmarkerrel_r (plPlotter *plotter UNUSED, double dx UNUSED, double dy UNUSED, int type UNUSED, double size UNUSED) { abort (); } +int pl_fmove_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED) { abort (); } +int pl_fmoverel_r (plPlotter *plotter UNUSED, double dx UNUSED, double dy UNUSED) { abort (); } +int pl_fpoint_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED) { abort (); } +int pl_fpointrel_r (plPlotter *plotter UNUSED, double dx UNUSED, double dy UNUSED) { abort (); } +int pl_fspace_r (plPlotter *plotter UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_fspace2_r (plPlotter *plotter UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED, double x2 UNUSED, double y2 UNUSED) { abort (); } + +int pl_fconcat_r (plPlotter *plotter UNUSED, double m0 UNUSED, double m1 UNUSED, double m2 UNUSED, double m3 UNUSED, double m4 UNUSED, double m5 UNUSED) { abort (); } +int pl_fmiterlimit_r (plPlotter *plotter UNUSED, double limit UNUSED) { abort (); } +int pl_frotate_r (plPlotter *plotter UNUSED, double theta UNUSED) { abort (); } +int pl_fscale_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED) { abort (); } +int pl_fsetmatrix_r (plPlotter *plotter UNUSED, double m0 UNUSED, double m1 UNUSED, double m2 UNUSED, double m3 UNUSED, double m4 UNUSED, double m5 UNUSED) { abort (); } +int pl_ftranslate_r (plPlotter *plotter UNUSED, double x UNUSED, double y UNUSED) { abort (); } + +int pl_newpl (const char *type UNUSED, FILE *infile UNUSED, FILE *outfile UNUSED, FILE *errfile UNUSED) { abort (); } +int pl_selectpl (int handle UNUSED) { abort (); } +int pl_deletepl (int handle UNUSED) { abort (); } + +int pl_parampl (const char *parameter UNUSED, void *value UNUSED) { abort (); } + +int pl_arc (int xc UNUSED, int yc UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_box (int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_circle (int x UNUSED, int y UNUSED, int r UNUSED) { abort (); } +int pl_closepl (void UNUSED) { abort (); } +int pl_cont (int x UNUSED, int y UNUSED) { abort (); } +int pl_erase (void UNUSED) { abort (); } +int pl_label (const char *s UNUSED) { abort (); } +int pl_line (int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_linemod (const char *s UNUSED) { abort (); } +int pl_move (int x UNUSED, int y UNUSED) { abort (); } +int pl_openpl (void UNUSED) { abort (); } +int pl_point (int x UNUSED, int y UNUSED) { abort (); } +int pl_space (int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } + +FILE* pl_outfile (FILE* outfile UNUSED) { abort (); }/* OBSOLETE */ +int pl_alabel (int x_justify UNUSED, int y_justify UNUSED, const char *s UNUSED) { abort (); } +int pl_arcrel (int dxc UNUSED, int dyc UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_bezier2 (int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED, int x2 UNUSED, int y2 UNUSED) { abort (); } +int pl_bezier2rel (int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED, int dx2 UNUSED, int dy2 UNUSED) { abort (); } +int pl_bezier3 (int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED, int x2 UNUSED, int y2 UNUSED, int x3 UNUSED, int y3 UNUSED) { abort (); } +int pl_bezier3rel (int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED, int dx2 UNUSED, int dy2 UNUSED, int dx3 UNUSED, int dy3 UNUSED) { abort (); } +int pl_bgcolor (int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_bgcolorname (const char *name UNUSED) { abort (); } +int pl_boxrel (int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_capmod (const char *s UNUSED) { abort (); } +int pl_circlerel (int dx UNUSED, int dy UNUSED, int r UNUSED) { abort (); } +int pl_closepath (void UNUSED) { abort (); } +int pl_color (int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_colorname (const char *name UNUSED) { abort (); } +int pl_contrel (int x UNUSED, int y UNUSED) { abort (); } +int pl_ellarc (int xc UNUSED, int yc UNUSED, int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED) { abort (); } +int pl_ellarcrel (int dxc UNUSED, int dyc UNUSED, int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_ellipse (int x UNUSED, int y UNUSED, int rx UNUSED, int ry UNUSED, int angle UNUSED) { abort (); } +int pl_ellipserel (int dx UNUSED, int dy UNUSED, int rx UNUSED, int ry UNUSED, int angle UNUSED) { abort (); } +int pl_endpath (void UNUSED) { abort (); } +int pl_endsubpath (void UNUSED) { abort (); } +int pl_fillcolor (int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_fillcolorname (const char *name UNUSED) { abort (); } +int pl_fillmod (const char *s UNUSED) { abort (); } +int pl_filltype (int level UNUSED) { abort (); } +int pl_flushpl (void UNUSED) { abort (); } +int pl_fontname (const char *s UNUSED) { abort (); } +int pl_fontsize (int size UNUSED) { abort (); } +int pl_havecap (const char *s UNUSED) { abort (); } +int pl_joinmod (const char *s UNUSED) { abort (); } +int pl_labelwidth (const char *s UNUSED) { abort (); } +int pl_linedash (int n UNUSED, const int *dashes UNUSED, int offset UNUSED) { abort (); } +int pl_linerel (int dx0 UNUSED, int dy0 UNUSED, int dx1 UNUSED, int dy1 UNUSED) { abort (); } +int pl_linewidth (int size UNUSED) { abort (); } +int pl_marker (int x UNUSED, int y UNUSED, int type UNUSED, int size UNUSED) { abort (); } +int pl_markerrel (int dx UNUSED, int dy UNUSED, int type UNUSED, int size UNUSED) { abort (); } +int pl_moverel (int x UNUSED, int y UNUSED) { abort (); } +int pl_orientation (int direction UNUSED) { abort (); } +int pl_pencolor (int red UNUSED, int green UNUSED, int blue UNUSED) { abort (); } +int pl_pencolorname (const char *name UNUSED) { abort (); } +int pl_pentype (int level UNUSED) { abort (); } +int pl_pointrel (int dx UNUSED, int dy UNUSED) { abort (); } +int pl_restorestate (void UNUSED) { abort (); } +int pl_savestate (void UNUSED) { abort (); } +int pl_space2 (int x0 UNUSED, int y0 UNUSED, int x1 UNUSED, int y1 UNUSED, int x2 UNUSED, int y2 UNUSED) { abort (); } +int pl_textangle (int angle UNUSED) { abort (); } + +double pl_ffontname (const char *s UNUSED) { abort (); } +double pl_ffontsize (double size UNUSED) { abort (); } +double pl_flabelwidth (const char *s UNUSED) { abort (); } +double pl_ftextangle (double angle UNUSED) { abort (); } +int pl_farc (double xc UNUSED, double yc UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_farcrel (double dxc UNUSED, double dyc UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_fbezier2 (double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED, double x2 UNUSED, double y2 UNUSED) { abort (); } +int pl_fbezier2rel (double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED, double dx2 UNUSED, double dy2 UNUSED) { abort (); } +int pl_fbezier3 (double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED, double x2 UNUSED, double y2 UNUSED, double x3 UNUSED, double y3 UNUSED) { abort (); } +int pl_fbezier3rel (double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED, double dx2 UNUSED, double dy2 UNUSED, double dx3 UNUSED, double dy3 UNUSED) { abort (); } +int pl_fbox (double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_fboxrel (double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_fcircle (double x UNUSED, double y UNUSED, double r UNUSED) { abort (); } +int pl_fcirclerel (double dx UNUSED, double dy UNUSED, double r UNUSED) { abort (); } +int pl_fcont (double x UNUSED, double y UNUSED) { abort (); } +int pl_fcontrel (double dx UNUSED, double dy UNUSED) { abort (); } +int pl_fellarc (double xc UNUSED, double yc UNUSED, double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_fellarcrel (double dxc UNUSED, double dyc UNUSED, double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_fellipse (double x UNUSED, double y UNUSED, double rx UNUSED, double ry UNUSED, double angle UNUSED) { abort (); } +int pl_fellipserel (double dx UNUSED, double dy UNUSED, double rx UNUSED, double ry UNUSED, double angle UNUSED) { abort (); } +int pl_flinedash (int n UNUSED, const double *dashes UNUSED, double offset UNUSED) { abort (); } +int pl_fline (double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_flinerel (double dx0 UNUSED, double dy0 UNUSED, double dx1 UNUSED, double dy1 UNUSED) { abort (); } +int pl_flinewidth (double size UNUSED) { abort (); } +int pl_fmarker (double x UNUSED, double y UNUSED, int type UNUSED, double size UNUSED) { abort (); } +int pl_fmarkerrel (double dx UNUSED, double dy UNUSED, int type UNUSED, double size UNUSED) { abort (); } +int pl_fmove (double x UNUSED, double y UNUSED) { abort (); } +int pl_fmoverel (double dx UNUSED, double dy UNUSED) { abort (); } +int pl_fpoint (double x UNUSED, double y UNUSED) { abort (); } +int pl_fpointrel (double dx UNUSED, double dy UNUSED) { abort (); } +int pl_fspace (double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED) { abort (); } +int pl_fspace2 (double x0 UNUSED, double y0 UNUSED, double x1 UNUSED, double y1 UNUSED, double x2 UNUSED, double y2 UNUSED) { abort (); } + +int pl_fconcat (double m0 UNUSED, double m1 UNUSED, double m2 UNUSED, double m3 UNUSED, double m4 UNUSED, double m5 UNUSED) { abort (); } +int pl_fmiterlimit (double limit UNUSED) { abort (); } +int pl_frotate (double theta UNUSED) { abort (); } +int pl_fscale (double x UNUSED, double y UNUSED) { abort (); } +int pl_fsetmatrix (double m0 UNUSED, double m1 UNUSED, double m2 UNUSED, double m3 UNUSED, double m4 UNUSED, double m5 UNUSED) { abort (); } +int pl_ftranslate (double x UNUSED, double y UNUSED) { abort (); } + + +void *_pl_get_hershey_font_info (plPlotter *plotter UNUSED) { abort (); } +void *_pl_get_ps_font_info (plPlotter *plotter UNUSED) { abort (); } +void *_pl_get_pcl_font_info (plPlotter *plotter UNUSED) { abort (); } +void *_pl_get_stick_font_info (plPlotter *plotter UNUSED) { abort (); } +#endif /* !HAVE_LIBPLOT */ diff --git a/src/output/charts/libplot-dummy.h b/src/output/charts/libplot-dummy.h new file mode 100644 index 00000000..1278113c --- /dev/null +++ b/src/output/charts/libplot-dummy.h @@ -0,0 +1,465 @@ +/* This file is part of the GNU plotutils package. Copyright (C) 1995, + 1996, 1997, 1998, 1999, 2000, 2005, 2009, Free Software Foundation, Inc. + + This file has been modified for use with GNU PSPP. + + The GNU plotutils package is free software. You may redistribute it + and/or modify it under the terms of the GNU General Public License as + published by the Free Software foundation; either version 2, or (at your + option) any later version. + + The GNU plotutils package is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License along + with the GNU plotutils package; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* This is "plot.h", the public header file for GNU libplot, a shared + library for 2-dimensional vector graphics. It declares both the new C + binding, which is thread-safe, and the old C binding, which is not. */ + +/* stdio.h must be included before this file is included. */ + +#ifndef _PLOT_H_ +#define _PLOT_H_ 1 + +/***********************************************************************/ + +/* The functions in the C binding deal with `plPlotter' and + `plPlotterParams' objects. They are the same as the `Plotter' and + `PlotterParams' objects of the C++ binding. Internally, they are called + `plPlotterStruct' and `plPlotterParamsStruct'. In the context of this + header file, they are opaque. */ +typedef struct plPlotterStruct plPlotter; +typedef struct plPlotterParamsStruct plPlotterParams; + +/* Support C++. This file could be #included by a C++ compiler rather than + a C compiler, in which case it needs to know that libplot functions have + C linkage, not C++ linkage. This is accomplished by wrapping all + function declarations in __BEGIN_DECLS ... __END_DECLS. */ +#ifdef ___BEGIN_DECLS +#undef ___BEGIN_DECLS +#endif +#ifdef ___END_DECLS +#undef ___END_DECLS +#endif +#ifdef __cplusplus +# define ___BEGIN_DECLS extern "C" { +# define ___END_DECLS } +#else +# define ___BEGIN_DECLS /* empty */ +# define ___END_DECLS /* empty */ +#endif + +___BEGIN_DECLS + +/* THE C API */ + +/* Constructor/destructor for the plPlotter type. Parameter values are + specified at creation time via a plPlotterParams instance. There is no + copy constructor. */ +plPlotter * pl_newpl_r (const char *type, FILE *infile, FILE *outfile, FILE *errfile, const plPlotterParams *plotter_params); +int pl_deletepl_r (plPlotter *plotter); + +/* Constructor/destructor/copy constructor for the plPlotterParams type, + any instance of which stores parameters that are used when creating a + plPlotter. */ +plPlotterParams * pl_newplparams (void); +int pl_deleteplparams (plPlotterParams *plotter_params); +plPlotterParams * pl_copyplparams (const plPlotterParams *plotter_params); + +/* A function for setting a single Plotter parameter in a plPlotterParams + instance. */ +int pl_setplparam (plPlotterParams *plotter_params, const char *parameter, void *value); + +/* THE PLOTTER METHODS */ + +/* 13 functions in traditional (pre-GNU) libplot */ +int pl_arc_r (plPlotter *plotter, int xc, int yc, int x0, int y0, int x1, int y1); +int pl_box_r (plPlotter *plotter, int x0, int y0, int x1, int y1); +int pl_circle_r (plPlotter *plotter, int x, int y, int r); +int pl_closepl_r (plPlotter *plotter); +int pl_cont_r (plPlotter *plotter, int x, int y); +int pl_erase_r (plPlotter *plotter); +int pl_label_r (plPlotter *plotter, const char *s); +int pl_line_r (plPlotter *plotter, int x0, int y0, int x1, int y1); +int pl_linemod_r (plPlotter *plotter, const char *s); +int pl_move_r (plPlotter *plotter, int x, int y); +int pl_openpl_r (plPlotter *plotter); +int pl_point_r (plPlotter *plotter, int x, int y); +int pl_space_r (plPlotter *plotter, int x0, int y0, int x1, int y1); + +/* 46 additional functions in GNU libplot, plus 1 obsolete function + [pl_outfile_r]. */ +FILE* pl_outfile_r (plPlotter *plotter, FILE* outfile);/* OBSOLETE */ +int pl_alabel_r (plPlotter *plotter, int x_justify, int y_justify, const char *s); +int pl_arcrel_r (plPlotter *plotter, int dxc, int dyc, int dx0, int dy0, int dx1, int dy1); +int pl_bezier2_r (plPlotter *plotter, int x0, int y0, int x1, int y1, int x2, int y2); +int pl_bezier2rel_r (plPlotter *plotter, int dx0, int dy0, int dx1, int dy1, int dx2, int dy2); +int pl_bezier3_r (plPlotter *plotter, int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); +int pl_bezier3rel_r (plPlotter *plotter, int dx0, int dy0, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3); +int pl_bgcolor_r (plPlotter *plotter, int red, int green, int blue); +int pl_bgcolorname_r (plPlotter *plotter, const char *name); +int pl_boxrel_r (plPlotter *plotter, int dx0, int dy0, int dx1, int dy1); +int pl_capmod_r (plPlotter *plotter, const char *s); +int pl_circlerel_r (plPlotter *plotter, int dx, int dy, int r); +int pl_closepath_r (plPlotter *plotter); +int pl_color_r (plPlotter *plotter, int red, int green, int blue); +int pl_colorname_r (plPlotter *plotter, const char *name); +int pl_contrel_r (plPlotter *plotter, int x, int y); +int pl_ellarc_r (plPlotter *plotter, int xc, int yc, int x0, int y0, int x1, int y1); +int pl_ellarcrel_r (plPlotter *plotter, int dxc, int dyc, int dx0, int dy0, int dx1, int dy1); +int pl_ellipse_r (plPlotter *plotter, int x, int y, int rx, int ry, int angle); +int pl_ellipserel_r (plPlotter *plotter, int dx, int dy, int rx, int ry, int angle); +int pl_endpath_r (plPlotter *plotter); +int pl_endsubpath_r (plPlotter *plotter); +int pl_fillcolor_r (plPlotter *plotter, int red, int green, int blue); +int pl_fillcolorname_r (plPlotter *plotter, const char *name); +int pl_fillmod_r (plPlotter *plotter, const char *s); +int pl_filltype_r (plPlotter *plotter, int level); +int pl_flushpl_r (plPlotter *plotter); +int pl_fontname_r (plPlotter *plotter, const char *s); +int pl_fontsize_r (plPlotter *plotter, int size); +int pl_havecap_r (plPlotter *plotter, const char *s); +int pl_joinmod_r (plPlotter *plotter, const char *s); +int pl_labelwidth_r (plPlotter *plotter, const char *s); +int pl_linedash_r (plPlotter *plotter, int n, const int *dashes, int offset); +int pl_linerel_r (plPlotter *plotter, int dx0, int dy0, int dx1, int dy1); +int pl_linewidth_r (plPlotter *plotter, int size); +int pl_marker_r (plPlotter *plotter, int x, int y, int type, int size); +int pl_markerrel_r (plPlotter *plotter, int dx, int dy, int type, int size); +int pl_moverel_r (plPlotter *plotter, int x, int y); +int pl_orientation_r (plPlotter *plotter, int direction); +int pl_pencolor_r (plPlotter *plotter, int red, int green, int blue); +int pl_pencolorname_r (plPlotter *plotter, const char *name); +int pl_pentype_r (plPlotter *plotter, int level); +int pl_pointrel_r (plPlotter *plotter, int dx, int dy); +int pl_restorestate_r (plPlotter *plotter); +int pl_savestate_r (plPlotter *plotter); +int pl_space2_r (plPlotter *plotter, int x0, int y0, int x1, int y1, int x2, int y2); +int pl_textangle_r (plPlotter *plotter, int angle); + +/* 32 floating point counterparts to some of the above (all GNU additions) */ +double pl_ffontname_r (plPlotter *plotter, const char *s); +double pl_ffontsize_r (plPlotter *plotter, double size); +double pl_flabelwidth_r (plPlotter *plotter, const char *s); +double pl_ftextangle_r (plPlotter *plotter, double angle); +int pl_farc_r (plPlotter *plotter, double xc, double yc, double x0, double y0, double x1, double y1); +int pl_farcrel_r (plPlotter *plotter, double dxc, double dyc, double dx0, double dy0, double dx1, double dy1); +int pl_fbezier2_r (plPlotter *plotter, double x0, double y0, double x1, double y1, double x2, double y2); +int pl_fbezier2rel_r (plPlotter *plotter, double dx0, double dy0, double dx1, double dy1, double dx2, double dy2); +int pl_fbezier3_r (plPlotter *plotter, double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3); +int pl_fbezier3rel_r (plPlotter *plotter, double dx0, double dy0, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); +int pl_fbox_r (plPlotter *plotter, double x0, double y0, double x1, double y1); +int pl_fboxrel_r (plPlotter *plotter, double dx0, double dy0, double dx1, double dy1); +int pl_fcircle_r (plPlotter *plotter, double x, double y, double r); +int pl_fcirclerel_r (plPlotter *plotter, double dx, double dy, double r); +int pl_fcont_r (plPlotter *plotter, double x, double y); +int pl_fcontrel_r (plPlotter *plotter, double dx, double dy); +int pl_fellarc_r (plPlotter *plotter, double xc, double yc, double x0, double y0, double x1, double y1); +int pl_fellarcrel_r (plPlotter *plotter, double dxc, double dyc, double dx0, double dy0, double dx1, double dy1); +int pl_fellipse_r (plPlotter *plotter, double x, double y, double rx, double ry, double angle); +int pl_fellipserel_r (plPlotter *plotter, double dx, double dy, double rx, double ry, double angle); +int pl_flinedash_r (plPlotter *plotter, int n, const double *dashes, double offset); +int pl_fline_r (plPlotter *plotter, double x0, double y0, double x1, double y1); +int pl_flinerel_r (plPlotter *plotter, double dx0, double dy0, double dx1, double dy1); +int pl_flinewidth_r (plPlotter *plotter, double size); +int pl_fmarker_r (plPlotter *plotter, double x, double y, int type, double size); +int pl_fmarkerrel_r (plPlotter *plotter, double dx, double dy, int type, double size); +int pl_fmove_r (plPlotter *plotter, double x, double y); +int pl_fmoverel_r (plPlotter *plotter, double dx, double dy); +int pl_fpoint_r (plPlotter *plotter, double x, double y); +int pl_fpointrel_r (plPlotter *plotter, double dx, double dy); +int pl_fspace_r (plPlotter *plotter, double x0, double y0, double x1, double y1); +int pl_fspace2_r (plPlotter *plotter, double x0, double y0, double x1, double y1, double x2, double y2); + +/* 6 floating point operations with no integer counterpart (GNU additions) */ +int pl_fconcat_r (plPlotter *plotter, double m0, double m1, double m2, double m3, double m4, double m5); +int pl_fmiterlimit_r (plPlotter *plotter, double limit); +int pl_frotate_r (plPlotter *plotter, double theta); +int pl_fscale_r (plPlotter *plotter, double x, double y); +int pl_fsetmatrix_r (plPlotter *plotter, double m0, double m1, double m2, double m3, double m4, double m5); +int pl_ftranslate_r (plPlotter *plotter, double x, double y); + +/* THE OLD (non-thread-safe) C API */ + +/* 3 functions specific to the old C API. (For construction/destruction + and selection of Plotters, and setting of Plotter parameters. The fact + that a single Plotter is globally `selected' makes the old API + non-thread-safe.) */ +int pl_newpl (const char *type, FILE *infile, FILE *outfile, FILE *errfile); +int pl_selectpl (int handle); +int pl_deletepl (int handle); + +/* A function for setting parameters of Plotters that will subsequently be + created. This also makes the old API non-thread-safe. */ +int pl_parampl (const char *parameter, void *value); + +/* THE PLOTTER METHODS */ +/* In the old API, the Plotter to be acted on is specified by first calling + selectpl(). */ + +/* 13 functions in traditional (pre-GNU) libplot */ +int pl_arc (int xc, int yc, int x0, int y0, int x1, int y1); +int pl_box (int x0, int y0, int x1, int y1); +int pl_circle (int x, int y, int r); +int pl_closepl (void); +int pl_cont (int x, int y); +int pl_erase (void); +int pl_label (const char *s); +int pl_line (int x0, int y0, int x1, int y1); +int pl_linemod (const char *s); +int pl_move (int x, int y); +int pl_openpl (void); +int pl_point (int x, int y); +int pl_space (int x0, int y0, int x1, int y1); + +/* 46 additional functions in GNU libplot, plus 1 obsolete function + [pl_outfile]. */ +FILE* pl_outfile (FILE* outfile);/* OBSOLETE */ +int pl_alabel (int x_justify, int y_justify, const char *s); +int pl_arcrel (int dxc, int dyc, int dx0, int dy0, int dx1, int dy1); +int pl_bezier2 (int x0, int y0, int x1, int y1, int x2, int y2); +int pl_bezier2rel (int dx0, int dy0, int dx1, int dy1, int dx2, int dy2); +int pl_bezier3 (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3); +int pl_bezier3rel (int dx0, int dy0, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3); +int pl_bgcolor (int red, int green, int blue); +int pl_bgcolorname (const char *name); +int pl_boxrel (int dx0, int dy0, int dx1, int dy1); +int pl_capmod (const char *s); +int pl_circlerel (int dx, int dy, int r); +int pl_closepath (void); +int pl_color (int red, int green, int blue); +int pl_colorname (const char *name); +int pl_contrel (int x, int y); +int pl_ellarc (int xc, int yc, int x0, int y0, int x1, int y1); +int pl_ellarcrel (int dxc, int dyc, int dx0, int dy0, int dx1, int dy1); +int pl_ellipse (int x, int y, int rx, int ry, int angle); +int pl_ellipserel (int dx, int dy, int rx, int ry, int angle); +int pl_endpath (void); +int pl_endsubpath (void); +int pl_fillcolor (int red, int green, int blue); +int pl_fillcolorname (const char *name); +int pl_fillmod (const char *s); +int pl_filltype (int level); +int pl_flushpl (void); +int pl_fontname (const char *s); +int pl_fontsize (int size); +int pl_havecap (const char *s); +int pl_joinmod (const char *s); +int pl_labelwidth (const char *s); +int pl_linedash (int n, const int *dashes, int offset); +int pl_linerel (int dx0, int dy0, int dx1, int dy1); +int pl_linewidth (int size); +int pl_marker (int x, int y, int type, int size); +int pl_markerrel (int dx, int dy, int type, int size); +int pl_moverel (int x, int y); +int pl_orientation (int direction); +int pl_pencolor (int red, int green, int blue); +int pl_pencolorname (const char *name); +int pl_pentype (int level); +int pl_pointrel (int dx, int dy); +int pl_restorestate (void); +int pl_savestate (void); +int pl_space2 (int x0, int y0, int x1, int y1, int x2, int y2); +int pl_textangle (int angle); + +/* 32 floating point counterparts to some of the above (all GNU additions) */ +double pl_ffontname (const char *s); +double pl_ffontsize (double size); +double pl_flabelwidth (const char *s); +double pl_ftextangle (double angle); +int pl_farc (double xc, double yc, double x0, double y0, double x1, double y1); +int pl_farcrel (double dxc, double dyc, double dx0, double dy0, double dx1, double dy1); +int pl_fbezier2 (double x0, double y0, double x1, double y1, double x2, double y2); +int pl_fbezier2rel (double dx0, double dy0, double dx1, double dy1, double dx2, double dy2); +int pl_fbezier3 (double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3); +int pl_fbezier3rel (double dx0, double dy0, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); +int pl_fbox (double x0, double y0, double x1, double y1); +int pl_fboxrel (double dx0, double dy0, double dx1, double dy1); +int pl_fcircle (double x, double y, double r); +int pl_fcirclerel (double dx, double dy, double r); +int pl_fcont (double x, double y); +int pl_fcontrel (double dx, double dy); +int pl_fellarc (double xc, double yc, double x0, double y0, double x1, double y1); +int pl_fellarcrel (double dxc, double dyc, double dx0, double dy0, double dx1, double dy1); +int pl_fellipse (double x, double y, double rx, double ry, double angle); +int pl_fellipserel (double dx, double dy, double rx, double ry, double angle); +int pl_flinedash (int n, const double *dashes, double offset); +int pl_fline (double x0, double y0, double x1, double y1); +int pl_flinerel (double dx0, double dy0, double dx1, double dy1); +int pl_flinewidth (double size); +int pl_fmarker (double x, double y, int type, double size); +int pl_fmarkerrel (double dx, double dy, int type, double size); +int pl_fmove (double x, double y); +int pl_fmoverel (double dx, double dy); +int pl_fpoint (double x, double y); +int pl_fpointrel (double dx, double dy); +int pl_fspace (double x0, double y0, double x1, double y1); +int pl_fspace2 (double x0, double y0, double x1, double y1, double x2, double y2); + +/* 6 floating point operations with no integer counterpart (GNU additions) */ +int pl_fconcat (double m0, double m1, double m2, double m3, double m4, double m5); +int pl_fmiterlimit (double limit); +int pl_frotate (double theta); +int pl_fscale (double x, double y); +int pl_fsetmatrix (double m0, double m1, double m2, double m3, double m4, double m5); +int pl_ftranslate (double x, double y); + + +/* UNDOCUMENTED FONT API CALLS */ +/* These are used by the graphics programs in the plotutils package (e.g., + `graph') to access the font tables within libplot, so that the user can + be given lists of font names. */ + +void *_pl_get_hershey_font_info (plPlotter *plotter); +void *_pl_get_ps_font_info (plPlotter *plotter); +void *_pl_get_pcl_font_info (plPlotter *plotter); +void *_pl_get_stick_font_info (plPlotter *plotter); + +___END_DECLS + +/* THE GLOBAL VARIABLES IN GNU LIBPLOT */ +/* There are two: user-settable error handlers (not yet documented). */ +extern int (*pl_libplot_warning_handler) (const char *msg); +extern int (*pl_libplot_error_handler) (const char *msg); + +#undef const + + +/***********************************************************************/ + +/* Useful definitions, included in both plot.h and plotter.h. */ + +#ifndef _PL_LIBPLOT_USEFUL_DEFS +#define _PL_LIBPLOT_USEFUL_DEFS 1 + +/* Symbol types for the marker() function, extending over the range 0..31. + (1 through 5 are the same as in the GKS [Graphical Kernel System].) + + These are now defined as enums rather than ints. Cast them to ints if + necessary. */ +enum +{ M_NONE, M_DOT, M_PLUS, M_ASTERISK, M_CIRCLE, M_CROSS, + M_SQUARE, M_TRIANGLE, M_DIAMOND, M_STAR, M_INVERTED_TRIANGLE, + M_STARBURST, M_FANCY_PLUS, M_FANCY_CROSS, M_FANCY_SQUARE, + M_FANCY_DIAMOND, M_FILLED_CIRCLE, M_FILLED_SQUARE, M_FILLED_TRIANGLE, + M_FILLED_DIAMOND, M_FILLED_INVERTED_TRIANGLE, M_FILLED_FANCY_SQUARE, + M_FILLED_FANCY_DIAMOND, M_HALF_FILLED_CIRCLE, M_HALF_FILLED_SQUARE, + M_HALF_FILLED_TRIANGLE, M_HALF_FILLED_DIAMOND, + M_HALF_FILLED_INVERTED_TRIANGLE, M_HALF_FILLED_FANCY_SQUARE, + M_HALF_FILLED_FANCY_DIAMOND, M_OCTAGON, M_FILLED_OCTAGON +}; + +/* ONE-BYTE OPERATION CODES FOR GNU METAFILE FORMAT. These are now defined + as enums rather than ints. Cast them to ints if necessary. + + There are 85 currently recognized op codes. The first 10 date back to + Unix plot(5) format. */ + +enum +{ +/* 10 op codes for primitive graphics operations, as in Unix plot(5) format. */ + O_ARC = 'a', + O_CIRCLE = 'c', + O_CONT = 'n', + O_ERASE = 'e', + O_LABEL = 't', + O_LINEMOD = 'f', + O_LINE = 'l', + O_MOVE = 'm', + O_POINT = 'p', + O_SPACE = 's', + +/* 42 op codes that are GNU extensions */ + O_ALABEL = 'T', + O_ARCREL = 'A', + O_BEZIER2 = 'q', + O_BEZIER2REL = 'r', + O_BEZIER3 = 'y', + O_BEZIER3REL = 'z', + O_BGCOLOR = '~', + O_BOX = 'B', /* not an op code in Unix plot(5) */ + O_BOXREL = 'H', + O_CAPMOD = 'K', + O_CIRCLEREL = 'G', + O_CLOSEPATH = 'k', + O_CLOSEPL = 'x', /* not an op code in Unix plot(5) */ + O_COMMENT = '#', + O_CONTREL = 'N', + O_ELLARC = '?', + O_ELLARCREL = '/', + O_ELLIPSE = '+', + O_ELLIPSEREL = '=', + O_ENDPATH = 'E', + O_ENDSUBPATH = ']', + O_FILLTYPE = 'L', + O_FILLCOLOR = 'D', + O_FILLMOD = 'g', + O_FONTNAME = 'F', + O_FONTSIZE = 'S', + O_JOINMOD = 'J', + O_LINEDASH = 'd', + O_LINEREL = 'I', + O_LINEWIDTH = 'W', + O_MARKER = 'Y', + O_MARKERREL = 'Z', + O_MOVEREL = 'M', + O_OPENPL = 'o', /* not an op code in Unix plot(5) */ + O_ORIENTATION = 'b', + O_PENCOLOR = '-', + O_PENTYPE = 'h', + O_POINTREL = 'P', + O_RESTORESTATE= 'O', + O_SAVESTATE = 'U', + O_SPACE2 = ':', + O_TEXTANGLE = 'R', + +/* 30 floating point counterparts to many of the above. They are not even + slightly mnemonic. */ + O_FARC = '1', + O_FARCREL = '2', + O_FBEZIER2 = '`', + O_FBEZIER2REL = '\'', + O_FBEZIER3 = ',', + O_FBEZIER3REL = '.', + O_FBOX = '3', + O_FBOXREL = '4', + O_FCIRCLE = '5', + O_FCIRCLEREL = '6', + O_FCONT = ')', + O_FCONTREL = '_', + O_FELLARC = '}', + O_FELLARCREL = '|', + O_FELLIPSE = '{', + O_FELLIPSEREL = '[', + O_FFONTSIZE = '7', + O_FLINE = '8', + O_FLINEDASH = 'w', + O_FLINEREL = '9', + O_FLINEWIDTH = '0', + O_FMARKER = '!', + O_FMARKERREL = '@', + O_FMOVE = '$', + O_FMOVEREL = '%', + O_FPOINT = '^', + O_FPOINTREL = '&', + O_FSPACE = '*', + O_FSPACE2 = ';', + O_FTEXTANGLE = '(', + +/* 3 op codes for floating point operations with no integer counterpart */ + O_FCONCAT = '\\', + O_FMITERLIMIT = 'i', + O_FSETMATRIX = 'j' +}; + +#endif /* not _PL_LIBPLOT_USEFUL_DEFS */ + +/***********************************************************************/ + +#endif /* not _PLOT_H_ */ diff --git a/src/output/charts/plot-chart.c b/src/output/charts/plot-chart.c index 75f21b66..86e1c80f 100644 --- a/src/output/charts/plot-chart.c +++ b/src/output/charts/plot-chart.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/src/output/charts/plot-hist.c b/src/output/charts/plot-hist.c index ab3b988d..d647dd71 100644 --- a/src/output/charts/plot-hist.c +++ b/src/output/charts/plot-hist.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include -- 2.30.2