Changed russian description a little bit
[gnuplot] / src / command.h
1 /*
2  * $Id: command.h,v 1.41.2.2 2008/07/23 19:25:25 sfeam Exp $
3  */
4
5 /* GNUPLOT - command.h */
6
7 /*[
8  * Copyright 1999, 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 #ifndef GNUPLOT_COMMAND_H
38 # define GNUPLOT_COMMAND_H
39
40 #include "gp_types.h"
41 #include "stdfn.h"
42
43 extern char *gp_input_line;
44 extern size_t gp_input_line_len;
45
46 extern int inline_num;
47
48 typedef struct lexical_unit {   /* produced by scanner */
49     TBOOLEAN is_token;          /* true if token, false if a value */
50     struct value l_val;
51     int start_index;            /* index of first char in token */
52     int length;                 /* length of token in chars */
53 } lexical_unit;
54
55 extern struct lexical_unit *token;
56 extern int token_table_size;
57 extern int plot_token;
58 #define END_OF_COMMAND (c_token >= num_tokens || equals(c_token,";"))
59
60 extern char *replot_line;
61
62 /* flag to disable `replot` when some data are sent through stdin;
63  * used by mouse/hotkey capable terminals */
64 extern TBOOLEAN replot_disabled;
65
66 #ifdef USE_MOUSE
67 extern int paused_for_mouse;    /* Flag the end condition we are paused until */
68 #define PAUSE_BUTTON1   001             /* Mouse button 1 */
69 #define PAUSE_BUTTON2   002             /* Mouse button 2 */
70 #define PAUSE_BUTTON3   004             /* Mouse button 3 */
71 #define PAUSE_CLICK     007             /* Any button click */
72 #define PAUSE_KEYSTROKE 010             /* Any keystroke */
73 #define PAUSE_WINCLOSE  020             /* Window close event */
74 #define PAUSE_ANY       077             /* Terminate on any of the above */
75 #endif
76
77 #ifdef GP_MACROS
78 extern TBOOLEAN expand_macros;
79 #endif
80
81 /* output file for the print command */
82 extern FILE *print_out;
83 extern char *print_out_name;
84
85 extern struct udft_entry *dummy_func;
86
87 #ifndef STDOUT
88 # define STDOUT 1
89 #endif
90
91 #if defined(MSDOS) || defined(DOS386)
92 # ifdef DJGPP
93 extern char HelpFile[];         /* patch for do_help  - AP */
94 # endif                         /* DJGPP */
95 # ifdef __TURBOC__
96 #  ifndef _Windows
97 extern char HelpFile[];         /* patch for do_help  - DJL */
98 #  endif                        /* _Windows */
99 # endif                         /* TURBOC */
100 #endif /* MSDOS */
101
102 #ifdef _Windows
103 # define SET_CURSOR_WAIT SetCursor(LoadCursor((HINSTANCE) NULL, IDC_WAIT))
104 # define SET_CURSOR_ARROW SetCursor(LoadCursor((HINSTANCE) NULL, IDC_ARROW))
105 #else
106 # define SET_CURSOR_WAIT        /* nought, zilch */
107 # define SET_CURSOR_ARROW       /* nought, zilch */
108 #endif
109
110 /* wrapper for calling kill_pending_Pause_dialog() from win/winmain.c */
111 #ifdef _Windows
112 void call_kill_pending_Pause_dialog(void);
113 #endif
114
115 /* input data, parsing variables */
116 #ifdef AMIGA_SC_6_1
117 extern __far int num_tokens, c_token;
118 #else
119 extern int num_tokens, c_token;
120 #endif
121
122 void raise_lower_command __PROTO((int));
123 void raise_command __PROTO((void));
124 void lower_command __PROTO((void));
125 #ifdef OS2
126 extern void pm_raise_terminal_window __PROTO((void));
127 extern void pm_lower_terminal_window __PROTO((void));
128 #endif
129 #ifdef X11
130 extern void x11_raise_terminal_window __PROTO((int));
131 extern void x11_raise_terminal_group __PROTO((void));
132 extern void x11_lower_terminal_window __PROTO((int));
133 extern void x11_lower_terminal_group __PROTO((void));
134 #endif
135 #ifdef _Windows
136 extern void win_raise_terminal_window();
137 extern void win_lower_terminal_window();
138 #endif
139 #ifdef WXWIDGETS
140 extern void wxt_raise_terminal_window __PROTO((int));
141 extern void wxt_raise_terminal_group __PROTO((void));
142 extern void wxt_lower_terminal_window __PROTO((int));
143 extern void wxt_lower_terminal_group __PROTO((void));
144 #endif
145
146 #ifdef USE_MOUSE
147 void bind_command __PROTO((void));
148 void restore_prompt __PROTO((void));
149 #endif
150 void call_command __PROTO((void));
151 void changedir_command __PROTO((void));
152 void clear_command __PROTO((void));
153 void exit_command __PROTO((void));
154 void help_command __PROTO((void));
155 void history_command __PROTO((void));
156 void if_command __PROTO((void));
157 void else_command __PROTO((void));
158 void invalid_command __PROTO((void));
159 void load_command __PROTO((void));
160 void null_command __PROTO((void));
161 void pause_command __PROTO((void));
162 void plot_command __PROTO((void));
163 void print_command __PROTO((void));
164 void pwd_command __PROTO((void));
165 void replot_command __PROTO((void));
166 void reread_command __PROTO((void));
167 void save_command __PROTO((void));
168 void screendump_command __PROTO((void));
169 void splot_command __PROTO((void));
170 void system_command __PROTO((void));
171 void test_command __PROTO((void));
172 void update_command __PROTO((void));
173 void do_shell __PROTO((void));
174 void undefine_command __PROTO((void));
175
176 /* Prototypes for functions exported by command.c */
177 void extend_input_line __PROTO((void));
178 void extend_token_table __PROTO((void));
179 int com_line __PROTO((void));
180 int do_line __PROTO((void));
181 void do_string __PROTO((char* s));
182 #ifdef USE_MOUSE
183 void toggle_display_of_ipc_commands __PROTO((void));
184 int display_ipc_commands __PROTO((void));
185 void do_string_replot __PROTO((char* s));
186 #endif
187 #ifdef VMS                     /* HBB 990829: used only on VMS */
188 void done __PROTO((int status));
189 #endif
190 void define __PROTO((void));
191
192 void replotrequest __PROTO((void)); /* used in command.c & mouse.c */
193
194 void print_set_output __PROTO((char *, TBOOLEAN)); /* set print output file */
195 char *print_show_output __PROTO((void)); /* show print output file */
196
197 /* Activate/deactive effects of 'set view map' before 'splot'/'plot',
198  * respectively. Required for proper mousing during 'set view map';
199  * actually it won't be necessary if gnuplot keeps a copy of all variables for
200  * the current plot and don't share them with 'set' commands.
201  *   These routines need to be executed before each plotrequest() and
202  * plot3drequest().
203  */
204 void splot_map_activate __PROTO((void));
205 void splot_map_deactivate __PROTO((void));
206
207 int do_system_func __PROTO((const char *cmd, char **output));
208
209 #endif /* GNUPLOT_COMMAND_H */