(fish_file_store): type accuracy to avoid counter overflow while copiyng huge files.
[midnight-commander.git] / src / subshell.h
blob49d2dbb39768df2c9ab8ff8f6cae4439f49ad52e
1 /** \file subshell.h
2 * \brief Header: concurrent shell support
3 */
5 #ifndef MC__SUBSHELL_H
6 #define MC__SUBSHELL_H
8 /*** typedefs(not structures) and defined constants **********************************************/
10 /* Used to distinguish between a normal MC termination and */
11 /* one caused by typing `exit' or `logout' in the subshell */
12 #define SUBSHELL_EXIT 128
14 #ifdef HAVE_SUBSHELL_SUPPORT
16 /*** enums ***************************************************************************************/
18 /* State of the subshell; see subshell.c for an explanation */
20 enum subshell_state_enum
22 INACTIVE,
23 ACTIVE,
24 RUNNING_COMMAND
27 /* For the `how' argument to various functions */
28 enum
30 QUIETLY,
31 VISIBLY
34 /*** structures declarations (and typedefs of structures)*****************************************/
36 /*** global variables defined in .c file *********************************************************/
38 extern enum subshell_state_enum subshell_state;
40 /* Holds the latest prompt captured from the subshell */
41 extern char *subshell_prompt;
43 extern gboolean update_subshell_prompt;
45 /*** declarations of public functions ************************************************************/
47 void init_subshell (void);
48 int invoke_subshell (const char *command, int how, vfs_path_t ** new_dir);
49 int read_subshell_prompt (void);
50 void do_update_prompt (void);
51 int exit_subshell (void);
52 void do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean reset_prompt);
53 void subshell_get_console_attributes (void);
54 void sigchld_handler (int sig);
56 #endif /* HAVE_SUBSHELL_SUPPORT */
58 /*** inline functions ****************************************************************************/
60 #endif /* MC__SUBSHELL_H */