2 * $Id: tables.h,v 1.57.2.3 2008/06/01 06:13:48 sfeam Exp $
5 /* GNUPLOT - tables.h */
8 * Copyright 1999, 2004 Lars Hecking
10 * Permission to use, copy, and distribute this software and its
11 * documentation for any purpose with or without fee is hereby granted,
12 * provided that the above copyright notice appear in all copies and
13 * that both that copyright notice and this permission notice appear
14 * in supporting documentation.
16 * Permission to modify the software is granted, but not the right to
17 * distribute the complete modified source code. Modifications are to
18 * be distributed as patches to the released version. Permission to
19 * distribute binaries produced by compiling modified sources is granted,
21 * 1. distribute the corresponding source modifications from the
22 * released version in the form of a patch file along with the binaries,
23 * 2. add special version identification to distinguish your version
24 * in addition to the base release version number,
25 * 3. provide your name and address as the primary contact for the
26 * support of your modified version, and
27 * 4. retain our contact information in regard to use of the base
29 * Permission to distribute the released version of the source code along
30 * with corresponding source modifications in the form of a patch file is
31 * granted with same provisions 2 through 4 for binary distributions.
33 * This software is provided "as is" without express or implied warranty
34 * to the extent permitted by applicable law.
37 #ifndef GNUPLOT_TABLES_H
38 #define GNUPLOT_TABLES_H
43 typedef void (*parsefuncp_t) __PROTO((void));
50 /* The basic structure */
56 /* options for plot/splot */
59 P_AXES, P_BINARY, P_EVERY, P_INDEX, P_MATRIX, P_SMOOTH, P_THRU,
60 P_TITLE, P_NOTITLE, P_USING, P_WITH
63 /* options for plot ax[ei]s */
65 AXES_X1Y1, AXES_X2Y2, AXES_X1Y2, AXES_X2Y1, AXES_NONE
68 /* plot smooth parameters in plot.h */
70 /* options for 'save' command */
71 enum save_id { SAVE_INVALID, SAVE_FUNCS, SAVE_TERMINAL, SAVE_SET, SAVE_VARS };
73 /* options for 'show' and 'set' commands
74 * this is rather big, we might be better off with a hash table */
77 S_ACTIONTABLE, S_ALL, S_ANGLES, S_ARROW, S_AUTOSCALE, S_BARS, S_BORDER,
78 S_BOXWIDTH, S_CLABEL, S_CLIP, S_CNTRPARAM, S_CONTOUR, S_DATA, S_DATAFILE,
79 S_FUNCTIONS, S_DGRID3D, S_DUMMY, S_ENCODING, S_DECIMALSIGN, S_FIT,
81 S_GRID, S_HIDDEN3D, S_HISTORYSIZE, S_ISOSAMPLES, S_KEY,
83 S_LINESTYLE, S_LOADPATH, S_LOCALE, S_LOGSCALE, S_MACROS,
84 S_MAPPING, S_MARGIN, S_LMARGIN, S_RMARGIN, S_TMARGIN, S_BMARGIN, S_MISSING,
88 S_MULTIPLOT, S_MX2TICS, S_NOMX2TICS, S_MXTICS, S_NOMXTICS,
89 S_MY2TICS, S_NOMY2TICS, S_MYTICS, S_NOMYTICS,
91 S_OFFSETS, S_ORIGIN, SET_OUTPUT, S_PARAMETRIC,
92 S_PALETTE, S_PM3D, S_COLORBOX, S_COLORNAMES,
93 S_CBLABEL, S_CBRANGE, S_CBTICS, S_NOCBTICS, S_MCBTICS, S_NOMCBTICS,
94 S_CBDATA, S_CBDTICS, S_NOCBDTICS, S_CBMTICS, S_NOCBMTICS,
95 S_OBJECT, S_PLOT, S_POINTSIZE, S_POLAR, S_PRINT,
96 S_RRANGE, S_SAMPLES, S_SIZE, S_SURFACE, S_STYLE,
97 S_TABLE, S_TERMINAL, S_TERMOPTIONS,
98 S_TICS, S_TICSCALE, S_TICSLEVEL, S_TIMEFMT, S_TIMESTAMP, S_TITLE,
99 S_TRANGE, S_URANGE, S_VARIABLES, S_VERSION, S_VIEW, S_VRANGE,
101 S_X2DATA, S_X2DTICS, S_NOX2DTICS, S_X2LABEL, S_X2MTICS, S_NOX2MTICS,
102 S_X2RANGE, S_X2TICS, S_NOX2TICS,
103 S_XDATA, S_XDTICS, S_NOXDTICS, S_XLABEL, S_XMTICS, S_NOXMTICS, S_XRANGE,
106 S_Y2DATA, S_Y2DTICS, S_NOY2DTICS, S_Y2LABEL, S_Y2MTICS, S_NOY2MTICS,
107 S_Y2RANGE, S_Y2TICS, S_NOY2TICS,
108 S_YDATA, S_YDTICS, S_NOYDTICS, S_YLABEL, S_YMTICS, S_NOYMTICS, S_YRANGE,
111 S_ZDATA, S_ZDTICS, S_NOZDTICS, S_ZLABEL, S_ZMTICS, S_NOZMTICS, S_ZRANGE,
114 S_ZERO, S_ZEROAXIS, S_XZEROAXIS, S_X2ZEROAXIS, S_YZEROAXIS, S_Y2ZEROAXIS,
118 enum set_hidden3d_id {
120 S_HI_DEFAULTS, S_HI_OFFSET, S_HI_NOOFFSET, S_HI_TRIANGLEPATTERN,
121 S_HI_UNDEFINED, S_HI_NOUNDEFINED, S_HI_ALTDIAGONAL, S_HI_NOALTDIAGONAL,
122 S_HI_BENTOVER, S_HI_NOBENTOVER
127 S_KEY_TOP, S_KEY_BOTTOM, S_KEY_LEFT, S_KEY_RIGHT, S_KEY_CENTER,
128 S_KEY_VERTICAL, S_KEY_HORIZONTAL, S_KEY_OVER, S_KEY_UNDER, S_KEY_MANUAL,
129 S_KEY_INSIDE, S_KEY_OUTSIDE, S_KEY_ABOVE, S_KEY_BELOW,
130 S_KEY_TMARGIN, S_KEY_BMARGIN, S_KEY_LMARGIN, S_KEY_RMARGIN,
131 S_KEY_LLEFT, S_KEY_RRIGHT, S_KEY_REVERSE, S_KEY_NOREVERSE,
132 S_KEY_INVERT, S_KEY_NOINVERT,
133 S_KEY_ENHANCED, S_KEY_NOENHANCED,
134 S_KEY_BOX, S_KEY_NOBOX, S_KEY_SAMPLEN, S_KEY_SPACING, S_KEY_WIDTH,
135 S_KEY_HEIGHT, S_KEY_TITLE,
136 S_KEY_AUTOTITLES, S_KEY_NOAUTOTITLES,
137 S_KEY_DEFAULT, S_KEY_ON, S_KEY_OFF
140 enum set_colorbox_id {
142 S_COLORBOX_VERTICAL, S_COLORBOX_HORIZONTAL,
143 S_COLORBOX_DEFAULT, S_COLORBOX_USER,
144 S_COLORBOX_BORDER, S_COLORBOX_BDEFAULT, S_COLORBOX_NOBORDER,
145 S_COLORBOX_ORIGIN, S_COLORBOX_SIZE,
146 S_COLORBOX_FRONT, S_COLORBOX_BACK
149 enum set_palette_id {
151 S_PALETTE_POSITIVE, S_PALETTE_NEGATIVE,
152 S_PALETTE_GRAY, S_PALETTE_COLOR, S_PALETTE_RGBFORMULAE,
153 S_PALETTE_NOPS_ALLCF, S_PALETTE_PS_ALLCF, S_PALETTE_MAXCOLORS,
154 S_PALETTE_DEFINED, S_PALETTE_FILE, S_PALETTE_FUNCTIONS,
155 S_PALETTE_MODEL, S_PALETTE_GAMMA
162 S_PM3D_SCANSFORWARD, S_PM3D_SCANSBACKWARD, S_PM3D_SCANS_AUTOMATIC,
164 S_PM3D_FLUSH, S_PM3D_FTRIANGLES, S_PM3D_NOFTRIANGLES,
165 S_PM3D_CLIP_1IN, S_PM3D_CLIP_4IN,
166 S_PM3D_MAP, S_PM3D_HIDDEN, S_PM3D_NOHIDDEN,
167 S_PM3D_SOLID, S_PM3D_NOTRANSPARENT, S_PM3D_NOSOLID, S_PM3D_TRANSPARENT,
168 S_PM3D_IMPLICIT, S_PM3D_NOEXPLICIT, S_PM3D_NOIMPLICIT, S_PM3D_EXPLICIT,
181 SHOW_STYLE_DATA, SHOW_STYLE_FUNCTION, SHOW_STYLE_LINE,
182 SHOW_STYLE_FILLING, SHOW_STYLE_ARROW, SHOW_STYLE_RECTANGLE,
184 #ifdef EAM_HISTOGRAMS
185 , SHOW_STYLE_HISTOGRAM
189 enum filledcurves_opts_id {
191 FILLEDCURVES_X1, FILLEDCURVES_Y1, FILLEDCURVES_X2, FILLEDCURVES_Y2,
192 /* requirement: FILLEDCURVES_ATX1 = FILLEDCURVES_X1+4 */
193 FILLEDCURVES_ATX1, FILLEDCURVES_ATY1, FILLEDCURVES_ATX2, FILLEDCURVES_ATY2,
195 FILLEDCURVES_ABOVE, FILLEDCURVES_BELOW,
199 extern const struct gen_table command_tbl[];
200 /* pm 011129: unused for 2 yers, therefore #if 0 .. #endif; in future should
201 * be split into datafile_tbl and plot_tbl: */
203 extern const struct gen_table plot_tbl[];
205 extern const struct gen_table plot_axes_tbl[];
206 extern const struct gen_table plot_smooth_tbl[];
207 extern const struct gen_table save_tbl[];
208 extern const struct gen_table set_tbl[];
209 extern const struct gen_table test_tbl[];
210 extern const struct gen_table set_key_tbl[];
211 extern const struct gen_table set_colorbox_tbl[];
212 extern const struct gen_table set_palette_tbl[];
213 extern const struct gen_table set_pm3d_tbl[];
214 extern const struct gen_table color_model_tbl[];
215 extern const struct gen_table pm3d_color_names_tbl[];
216 extern const struct gen_table set_hidden3d_tbl[];
217 extern const struct gen_table show_style_tbl[];
218 extern const struct gen_table plotstyle_tbl[];
220 extern const struct gen_ftable command_ftbl[];
222 extern const struct gen_table filledcurves_opts_tbl[];
224 /* Function prototypes */
225 int lookup_table __PROTO((const struct gen_table *, int));
226 parsefuncp_t lookup_ftable __PROTO((const struct gen_ftable *, int));
227 int lookup_table_entry __PROTO((const struct gen_table *tbl, const char *search_str));
228 int lookup_table_nth __PROTO((const struct gen_table *tbl, const char *search_str));
229 int lookup_table_nth_reverse __PROTO((const struct gen_table *tbl, int table_len, const char *search_str));
230 const char * reverse_table_lookup __PROTO((const struct gen_table *tbl, int entry));
233 #endif /* GNUPLT_TABLES_H */