mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 01:54:24 +03:00
Cleanup: remove unused 'prompt_pos' variable.
(do_subshell_chdir): remove 'reset_prompt' argument because of removed 'prompt_pos'. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
5b1982a6bb
commit
74ed317f35
@ -2,7 +2,7 @@
|
||||
Panel managing.
|
||||
|
||||
Copyright (C) 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2009, 2011, 2013
|
||||
2005, 2006, 2007, 2009, 2011, 2012, 2013
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
@ -3017,7 +3017,7 @@ subshell_chdir (const vfs_path_t * vpath)
|
||||
{
|
||||
#ifdef ENABLE_SUBSHELL
|
||||
if (mc_global.tty.use_subshell && vfs_current_is_local ())
|
||||
do_subshell_chdir (vpath, FALSE, TRUE);
|
||||
do_subshell_chdir (vpath, FALSE);
|
||||
#else /* ENABLE_SUBSHELL */
|
||||
(void) vpath;
|
||||
#endif /* ENABLE_SUBSHELL */
|
||||
|
@ -174,11 +174,7 @@ static struct termios shell_mode;
|
||||
/* are delivered to the shell pty */
|
||||
static struct termios raw_mode;
|
||||
|
||||
/* This counter indicates how many characters of prompt we have read */
|
||||
/* FIXME: try to figure out why this had to become global */
|
||||
static int prompt_pos;
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** file scope functions ************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/**
|
||||
@ -935,7 +931,7 @@ invoke_subshell (const char *command, int how, vfs_path_t ** new_dir_vpath)
|
||||
|
||||
/* Make the subshell change to MC's working directory */
|
||||
if (new_dir_vpath != NULL)
|
||||
do_subshell_chdir (current_panel->cwd_vpath, TRUE, TRUE);
|
||||
do_subshell_chdir (current_panel->cwd_vpath, TRUE);
|
||||
|
||||
if (command == NULL) /* The user has done "C-o" from MC */
|
||||
{
|
||||
@ -971,8 +967,6 @@ invoke_subshell (const char *command, int how, vfs_path_t ** new_dir_vpath)
|
||||
while (!subshell_alive && quit == 0 && mc_global.tty.use_subshell)
|
||||
init_subshell ();
|
||||
|
||||
prompt_pos = 0;
|
||||
|
||||
return quit;
|
||||
}
|
||||
|
||||
@ -1157,7 +1151,7 @@ subshell_name_quote (const char *s)
|
||||
|
||||
/** If it actually changed the directory it returns true */
|
||||
void
|
||||
do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean reset_prompt)
|
||||
do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt)
|
||||
{
|
||||
char *pcwd;
|
||||
|
||||
@ -1237,8 +1231,6 @@ do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean re
|
||||
}
|
||||
}
|
||||
|
||||
if (reset_prompt)
|
||||
prompt_pos = 0;
|
||||
update_subshell_prompt = FALSE;
|
||||
|
||||
g_free (pcwd);
|
||||
|
@ -43,7 +43,7 @@ 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, gboolean reset_prompt);
|
||||
void do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt);
|
||||
void subshell_get_console_attributes (void);
|
||||
void sigchld_handler (int sig);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user