Initial release of Maemo 5 port of gnuplot
[gnuplot] / src / setshow.h
1 /*
2  * $Id: setshow.h,v 1.40.2.1 2008/01/14 07:27:58 sfeam Exp $
3  */
4
5 /* GNUPLOT - setshow.h */
6
7 /*[
8  * Copyright 1986 - 1993, 1998, 2004   Thomas Williams, Colin Kelley
9  *
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.
15  *
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,
20  * provided you
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
28  *    software.
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.
32  *
33  * This software is provided "as is" without express or implied warranty
34  * to the extent permitted by applicable law.
35 ]*/
36
37
38 #ifndef GNUPLOT_SETSHOW_H
39 # define GNUPLOT_SETSHOW_H
40
41 #include "stdfn.h"
42
43 #include "axis.h"
44 #include "gadgets.h"
45 #include "term_api.h"
46
47 #define PROGRAM "G N U P L O T"  /* FIXME: move to show.c! */
48
49 #define SAVE_NUM_OR_TIME(fp, x, axis)                           \
50 do{                                                             \
51     if (axis_array[axis].is_timedata) {                         \
52         char s[80];                                             \
53                                                                 \
54         putc('"', fp);                                          \
55         gstrftime(s,80,axis_array[axis].timefmt,(double)(x));   \
56         fputs(conv_text(s), fp);                                \
57         putc('"', fp);                                          \
58     } else {                                                    \
59         fprintf(fp,"%#g",x);                                    \
60     }                                                           \
61 } while(0)
62
63
64 /* The set and show commands, in setshow.c */
65 void set_command __PROTO((void));
66 void unset_command __PROTO((void));
67 void reset_command __PROTO((void));
68 void show_command __PROTO((void));
69 /* and some accessible support functions */
70 void show_version __PROTO((FILE *fp));
71 char *conv_text __PROTO((const char *s));
72 void delete_linestyle __PROTO((struct linestyle_def *, struct linestyle_def *));
73 /* void delete_arrowstyle __PROTO((struct arrowstyle_def *, struct arrowstyle_def *)); */
74 void reset_key __PROTO((void));
75 void free_marklist __PROTO((struct ticmark * list));
76 extern int enable_reset_palette;
77 void reset_palette __PROTO((void));
78
79 /* Called from set_label(), plot2d.c and plot3d.c */
80 extern void parse_label_options __PROTO((struct text_label *this_label));
81 extern struct text_label * new_text_label __PROTO((int tag));
82 extern void disp_value __PROTO((FILE *, struct value *, TBOOLEAN));
83 extern struct ticmark * prune_dataticks __PROTO((struct ticmark *list));
84
85
86 #endif /* GNUPLOT_SETSHOW_H */