1 /** \file execute.h
2 * \brief Header: execution routines
3 */
4
5 #ifndef MC__EXECUTE_H
6 #define MC__EXECUTE_H
7
8 #include "lib/util.h"
9 #include "lib/vfs/vfs.h"
10
11 /*** typedefs(not structures) and defined constants **********************************************/
12
13 /*** enums ***************************************************************************************/
14
15 /* If true, after executing a command, wait for a keystroke */
16 enum
17 {
18 pause_never,
19 pause_on_dumb_terminals,
20 pause_always
21 };
22
23 /*** structures declarations (and typedefs of structures)*****************************************/
24
25 /*** global variables defined in .c file *********************************************************/
26
27 extern int pause_after_run;
28
29 /*** declarations of public functions ************************************************************/
30
31 /* Execute functions that use the shell to execute */
32 void shell_execute (const char *command, int flags);
33
34 /* Handle toggling panels by Ctrl-O */
35 void toggle_subshell (void);
36
37 /* Handle toggling panels by Ctrl-Z */
38 gboolean execute_suspend (const gchar *event_group_name, const gchar *event_name,
39 gpointer init_data, gpointer data);
40
41 /* Execute command on a filename that can be on VFS */
42 void execute_with_vfs_arg (const char *command, const vfs_path_t *filename_vpath);
43 void execute_external_editor_or_viewer (const char *command, const vfs_path_t *filename_vpath,
44 long start_line);
45
46 void post_exec (void);
47 void pre_exec (void);
48
49 /*** inline functions ****************************************************************************/
50
51 #endif