mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 09:19:24 +03:00
74ed317f35
(do_subshell_chdir): remove 'reset_prompt' argument because of removed 'prompt_pos'. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
53 lines
1.5 KiB
C
53 lines
1.5 KiB
C
/** \file subshell.h
|
|
* \brief Header: concurrent shell support
|
|
*/
|
|
|
|
#ifndef MC__SUBSHELL_H
|
|
#define MC__SUBSHELL_H
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
/* State of the subshell; see subshell.c for an explanation */
|
|
|
|
enum subshell_state_enum
|
|
{
|
|
INACTIVE,
|
|
ACTIVE,
|
|
RUNNING_COMMAND
|
|
};
|
|
|
|
/* For the 'how' argument to various functions */
|
|
enum
|
|
{
|
|
QUIETLY,
|
|
VISIBLY
|
|
};
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
extern enum subshell_state_enum subshell_state;
|
|
|
|
/* Holds the latest prompt captured from the subshell */
|
|
extern GString *subshell_prompt;
|
|
|
|
extern gboolean update_subshell_prompt;
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
void init_subshell (void);
|
|
int invoke_subshell (const char *command, int how, vfs_path_t ** new_dir);
|
|
gboolean read_subshell_prompt (void);
|
|
void do_update_prompt (void);
|
|
gboolean exit_subshell (void);
|
|
void do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt);
|
|
void subshell_get_console_attributes (void);
|
|
void sigchld_handler (int sig);
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
#endif /* MC__SUBSHELL_H */
|