Annotation of OpenXM_contrib/gnuplot/protos.h, Revision 1.1.1.1
1.1 maekawa 1: /*
2: * $Id: protos.h,v 1.56 1998/04/14 00:16:11 drd Exp $
3: *
4: */
5:
6: /* GNUPLOT - protos.h */
7:
8: /*[
9: * Copyright 1986 - 1993, 1998 Thomas Williams, Colin Kelley
10: *
11: * Permission to use, copy, and distribute this software and its
12: * documentation for any purpose with or without fee is hereby granted,
13: * provided that the above copyright notice appear in all copies and
14: * that both that copyright notice and this permission notice appear
15: * in supporting documentation.
16: *
17: * Permission to modify the software is granted, but not the right to
18: * distribute the complete modified source code. Modifications are to
19: * be distributed as patches to the released version. Permission to
20: * distribute binaries produced by compiling modified sources is granted,
21: * provided you
22: * 1. distribute the corresponding source modifications from the
23: * released version in the form of a patch file along with the binaries,
24: * 2. add special version identification to distinguish your version
25: * in addition to the base release version number,
26: * 3. provide your name and address as the primary contact for the
27: * support of your modified version, and
28: * 4. retain our contact information in regard to use of the base
29: * software.
30: * Permission to distribute the released version of the source code along
31: * with corresponding source modifications in the form of a patch file is
32: * granted with same provisions 2 through 4 for binary distributions.
33: *
34: * This software is provided "as is" without express or implied warranty
35: * to the extent permitted by applicable law.
36: ]*/
37:
38: #include "ansichek.h"
39:
40: /* note that this before this file, some headers that define stuff like FILE,
41: time_t and GPFAR must be already be included */
42:
43: /* Prototypes from file "command.c" */
44:
45: void extend_input_line __PROTO((void));
46: void extend_token_table __PROTO((void));
47: void init_memory __PROTO((void));
48: int com_line __PROTO((void));
49: int do_line __PROTO((void));
50: void done __PROTO((int status));
51: void define __PROTO((void));
52: void bail_to_command_line __PROTO((void));
53:
54: /* Prototypes from file "contour.c" */
55: typedef double tri_diag[3]; /* Used to allocate the tri-diag matrix. */
56:
57: struct gnuplot_contours *contour __PROTO((int num_isolines, struct iso_curve *iso_lines, int ZLevels, int approx_pts, int int_kind, int order1, int levels_kind, double *levels_list));
58: int solve_tri_diag __PROTO((tri_diag m[], double r[], double x[], int n));
59:
60: /* Prototypes from file "datafile.c" */
61: int df_open __PROTO((int max_using));
62: int df_readline __PROTO((double v[], int max));
63: void df_close __PROTO((void));
64: int df_2dbinary __PROTO((struct curve_points *this_plot));
65: int df_3dmatrix __PROTO((struct surface_points *this_plot));
66:
67: /* Prototypes from file "eval.c" */
68:
69: struct udvt_entry * add_udv __PROTO((int t_num));
70: struct udft_entry * add_udf __PROTO((int t_num));
71: int standard __PROTO((int t_num));
72: void execute_at __PROTO((struct at_type *at_ptr));
73:
74:
75: /* Prototypes from file "fit.c" */
76:
77: char *get_next_word __PROTO((char **s, char *subst));
78: void init_fit __PROTO((void));
79: void setvar __PROTO((char *varname, struct value data));
80: int getivar __PROTO((char *varname));
81: void update __PROTO((char *pfile, char *npfile));
82: void do_fit __PROTO((void));
83: size_t wri_to_fil_last_fit_cmd __PROTO((FILE *fp));
84:
85:
86: /* Prototypes from file "graphics.c" */
87:
88: void graph_error __PROTO((char *text));
89: void fixup_range __PROTO((int axis, char *axis_name));
90: void timetic_format __PROTO((int axis, double amin, double amax));
91: void do_plot __PROTO((struct curve_points *plots, int pcount));
92: double time_tic_just __PROTO((int level, double ticplace));
93: double make_ltic __PROTO((int tlevel, double incr));
94: int label_width __PROTO((char *str, int *lines));
95: double set_tic __PROTO((double l10, int guide));
96: void setup_tics __PROTO((int axis, struct ticdef *def, char *format, int max));
97: /* is this valid use of __P ? */
98: typedef void (*tic_callback) __PROTO((int axis, double place, char *text, struct lp_style_type grid));
99: void gen_tics __PROTO((int axis, struct ticdef *def, int grid, int minitic, double minifreq, tic_callback callback));
100: void write_multiline __PROTO((unsigned int x, unsigned int y, char *text_will_be_mangled, enum JUSTIFY hor, int vert, int angle, char *font));
101:
102: /* Prototypes from file "graph3d.c" */
103:
104: void map3d_xy __PROTO((double x, double y, double z, unsigned int *xt, unsigned int *yt));
105: int map3d_z __PROTO((double x, double y, double z));
106: void do_3dplot __PROTO((struct surface_points *plots, int pcount));
107:
108:
109: /* Prototypes from file "help.c" */
110:
111: int help __PROTO((char *keyword, char *path, TBOOLEAN *subtopics));
112: void FreeHelp __PROTO((void));
113: void StartOutput __PROTO((void));
114: void OutLine __PROTO((char *line));
115: void EndOutput __PROTO((void));
116:
117:
118: /* Prototypes from file "hidden3d.c" */
119:
120: void clip_move __PROTO((unsigned int x, unsigned int y));
121: void clip_vector __PROTO((unsigned int x, unsigned int y));
122: /* HBB 970618: new function: */
123: void set_hidden3doptions __PROTO((void));
124: void show_hidden3doptions __PROTO((void));
125: /* HBB 971117: another new function: */
126: void save_hidden3doptions __PROTO((FILE *fp));
127: #ifndef LITE
128: void init_hidden_line_removal __PROTO((void));
129: void reset_hidden_line_removal __PROTO((void));
130: void term_hidden_line_removal __PROTO((void));
131: void plot3d_hidden __PROTO((struct surface_points *plots, int pcount));
132: void draw_line_hidden __PROTO((unsigned int, unsigned int, unsigned int, unsigned int));
133: #endif
134:
135:
136: /* Prototypes from file "internal.c" */
137:
138: #ifdef MINEXP
139: double gp_exp __PROTO((double x));
140: #else
141: #define gp_exp(x) exp(x)
142: #endif
143:
144: /* int matherr __PROTO((void)); */
145: void reset_stack __PROTO((void));
146: void check_stack __PROTO((void));
147: struct value *pop __PROTO((struct value *x));
148: void push __PROTO((struct value *x));
149:
150:
151: /* Prototypes from file "interpol.c" */
152:
153: void gen_interp __PROTO((struct curve_points *plot));
154: void sort_points __PROTO((struct curve_points *plot));
155: void cp_implode __PROTO((struct curve_points *cp));
156:
157:
158: /* Prototypes from file "misc.c" */
159:
160: struct curve_points * cp_alloc __PROTO((int num));
161: void cp_extend __PROTO((struct curve_points *cp, int num));
162: void cp_free __PROTO((struct curve_points *cp));
163: struct iso_curve * iso_alloc __PROTO((int num));
164: void iso_extend __PROTO((struct iso_curve *ip, int num));
165: void iso_free __PROTO((struct iso_curve *ip));
166: struct surface_points * sp_alloc __PROTO((int num_samp_1, int num_iso_1, int num_samp_2, int num_iso_2));
167: void sp_replace __PROTO((struct surface_points *sp, int num_samp_1, int num_iso_1, int num_samp_2, int num_iso_2));
168: void sp_free __PROTO((struct surface_points *sp));
169: void save_functions __PROTO((FILE *fp));
170: void save_variables __PROTO((FILE *fp));
171: void save_all __PROTO((FILE *fp));
172: void save_set __PROTO((FILE *fp));
173: void save_set_all __PROTO((FILE *fp));
174: void load_file __PROTO((FILE *fp, char *name, TBOOLEAN subst_args));
175: FILE *lf_top __PROTO((void));
176: void load_file_error __PROTO((void));
177: int instring __PROTO((char *str, int c));
178: void show_functions __PROTO((void));
179: void show_at __PROTO((void));
180: void disp_at __PROTO((struct at_type *curr_at, int level));
181: int find_maxl_keys __PROTO((struct curve_points *plots, int count, int *kcnt));
182: int find_maxl_keys3d __PROTO((struct surface_points *plots, int count, int *kcnt));
183: TBOOLEAN valid_format __PROTO((const char *format));
184:
185:
186: /* Prototypes from file "parse.c" */
187:
188: /* void fpe __PROTO((void)); */
189: void evaluate_at __PROTO((struct at_type *at_ptr, struct value *val_ptr));
190: struct value * const_express __PROTO((struct value *valptr));
191: struct at_type * temp_at __PROTO((void));
192: struct at_type * perm_at __PROTO((void));
193:
194:
195: /* Prototypes from file "plot.c" */
196:
197: void interrupt_setup __PROTO((void));
198:
199:
200: /* prototypes from plot2d.c */
201:
202: void plotrequest __PROTO((void));
203:
204:
205: /* prototypes from plot3d.c */
206:
207: void plot3drequest __PROTO((void));
208:
209:
210: /* Prototypes from file "readline.c" */
211:
212: #ifndef GNU_READLINE
213: char *readline __PROTO((char *prompt));
214: void add_history __PROTO((char *line));
215: #else
216: extern char *readline();
217: extern void add_history();
218: #endif /* GNU_READLINE */
219:
220: #if defined(ATARI) || defined(MTOS)
221: char tos_getch();
222: #endif
223:
224:
225: /* Prototypes from file "scanner.c" */
226:
227: int scanner __PROTO((char expression[]));
228:
229:
230: /* Prototypes from "stdfn.c" */
231:
232: char *safe_strncpy __PROTO((char *, char *, size_t));
233: #ifndef HAVE_SLEEP
234: unsigned int sleep __PROTO((unsigned int));
235: #endif
236:
237:
238: /* Prototypes from file "term.c" */
239:
240: void term_set_output __PROTO((char *));
241: void term_init __PROTO((void));
242: void term_start_plot __PROTO((void));
243: void term_end_plot __PROTO((void));
244: void term_start_multiplot __PROTO((void));
245: void term_end_multiplot __PROTO((void));
246: /* void term_suspend __PROTO((void)); */
247: void term_reset __PROTO((void));
248: void term_apply_lp_properties __PROTO((struct lp_style_type *lp));
249: void term_check_multiplot_okay __PROTO((TBOOLEAN));
250:
251: void list_terms __PROTO((void));
252: struct termentry *set_term __PROTO((int));
253: struct termentry *change_term __PROTO((char *name, int length));
254: void init_terminal __PROTO((void));
255: void test_term __PROTO((void));
256: void UP_redirect __PROTO((int called));
257: #ifdef LINUXVGA
258: void LINUX_setup __PROTO((void));
259: #endif
260: #ifdef VMS
261: void vms_reset();
262: #endif
263:
264: /* used by the drivers (?) */
265:
266: int null_text_angle __PROTO((int ang));
267: int null_justify_text __PROTO((enum JUSTIFY just));
268: int null_scale __PROTO((double x, double y));
269: int do_scale __PROTO((double x, double y));
270: void options_null __PROTO((void));
271: void UNKNOWN_null __PROTO((void));
272: void MOVE_null __PROTO((unsigned int, unsigned int));
273: void LINETYPE_null __PROTO((int));
274: void PUTTEXT_null __PROTO((unsigned int, unsigned int, char *));
275:
276:
277: /* prototypes for functions from time.c */
278:
279: char * gstrptime __PROTO((char *, char *, struct tm *)); /* string to *tm */
280: int gstrftime __PROTO((char *, int, char *, double)); /* *tm to string */
281: double gtimegm __PROTO((struct tm *)); /* *tm to seconds */
282: int ggmtime __PROTO((struct tm *, double)); /* seconds to *tm */
283:
284:
285: /* Prototypes from file "util.c" */
286:
287: int chr_in_str __PROTO((int t_num, int c));
288: int equals __PROTO((int t_num, char *str));
289: int almost_equals __PROTO((int t_num, char *str));
290: int isstring __PROTO((int t_num));
291: int isanumber __PROTO((int t_num));
292: int isletter __PROTO((int t_num));
293: int is_definition __PROTO((int t_num));
294: void copy_str __PROTO((char str[], int t_num, int max));
295: int token_len __PROTO((int t_num));
296: void quote_str __PROTO((char str[], int t_num, int max));
297: void capture __PROTO((char str[], int start, int end, int max));
298: void m_capture __PROTO((char **str, int start, int end));
299: void m_quote_capture __PROTO((char **str, int start, int end));
300: void convert __PROTO((struct value *val_ptr, int t_num));
301: void disp_value __PROTO((FILE *fp, struct value *val));
302: double real __PROTO((struct value *val));
303: double imag __PROTO((struct value *val));
304: double magnitude __PROTO((struct value *val));
305: double angle __PROTO((struct value *val));
306: struct value * Gcomplex __PROTO((struct value *a, double realpart, double imagpart));
307: struct value * Ginteger __PROTO((struct value *a, int i));
308: void os_error __PROTO((char str[], int t_num));
309: void int_error __PROTO((char str[], int t_num));
310: void int_warn __PROTO((char str[], int t_num));
311: void lower_case __PROTO((char *s));
312: void squash_spaces __PROTO((char *s));
313:
314:
315: /* Prototypes from file "util3d.c" */
316:
317: void draw_clip_line __PROTO((unsigned int, unsigned int, unsigned int, unsigned int));
318: /* HBB: these two are now in hidden3d.c : */
319: /*void clip_move __PROTO((unsigned int x, unsigned int y));*/
320: /*void clip_vector __PROTO((unsigned int x, unsigned int y));*/
321: /* HBB: this one didn't have any prototype yet: */
322: int clip_line __PROTO((int *, int *, int *, int *));
323: void edge3d_intersect __PROTO((struct coordinate GPHUGE *points, int i, double *ex, double *ey, double *ez));
324: TBOOLEAN two_edge3d_intersect __PROTO((struct coordinate GPHUGE *points, int i, double *lx, double *ly, double *lz));
325: void mat_unit __PROTO((double mat[4][4]));
326: void mat_trans __PROTO((double tx, double ty, double tz, double mat[4][4]));
327: void mat_scale __PROTO((double sx, double sy, double sz, double mat[4][4]));
328: void mat_rot_x __PROTO((double teta, double mat[4][4]));
329: void mat_rot_y __PROTO((double teta, double mat[4][4]));
330: void mat_rot_z __PROTO((double teta, double mat[4][4]));
331: void mat_mult __PROTO((double mat_res[4][4], double mat1[4][4], double mat2[4][4]));
332: int clip_point __PROTO((unsigned int x, unsigned int y));
333: void clip_put_text __PROTO((unsigned int x, unsigned int y, char *str));
334: void clip_put_text_just __PROTO((unsigned int x, unsigned int y, char *str, enum JUSTIFY just));
335:
336: #include "alloc.h"
337:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>