mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 09:19:24 +03:00
* main.c (execute): Eliminate. Fix all dependencies.
(shell_execute): Constify string argument.
This commit is contained in:
parent
f40cf73bbd
commit
a568db4228
@ -1,3 +1,8 @@
|
|||||||
|
2003-06-22 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* main.c (execute): Eliminate. Fix all dependencies.
|
||||||
|
(shell_execute): Constify string argument.
|
||||||
|
|
||||||
2003-06-09 Pavel Roskin <proski@gnu.org>
|
2003-06-09 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* key.c (mc_bindings): Remove. Esc-">" and Esc-"<" are not
|
* key.c (mc_bindings): Remove. Esc-">" and Esc-"<" are not
|
||||||
|
@ -230,7 +230,7 @@ enter (WInput *cmdline)
|
|||||||
old_dlg = current_dlg;
|
old_dlg = current_dlg;
|
||||||
current_dlg = 0;
|
current_dlg = 0;
|
||||||
new_input (cmdline);
|
new_input (cmdline);
|
||||||
execute (command);
|
shell_execute (command, 0);
|
||||||
g_free (command);
|
g_free (command);
|
||||||
|
|
||||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||||
|
@ -575,7 +575,7 @@ do_execute (const char *shell, const char *command, int flags)
|
|||||||
|
|
||||||
/* Executes a command */
|
/* Executes a command */
|
||||||
void
|
void
|
||||||
shell_execute (char *command, int flags)
|
shell_execute (const char *command, int flags)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||||
if (use_subshell)
|
if (use_subshell)
|
||||||
@ -589,12 +589,6 @@ shell_execute (char *command, int flags)
|
|||||||
do_execute (shell, command, flags | EXECUTE_AS_SHELL);
|
do_execute (shell, command, flags | EXECUTE_AS_SHELL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
execute (char *command)
|
|
||||||
{
|
|
||||||
shell_execute (command, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
change_panel (void)
|
change_panel (void)
|
||||||
{
|
{
|
||||||
|
@ -25,8 +25,7 @@ void do_execute (const char *shell, const char *command, int internal_command);
|
|||||||
#define execute_internal(command,args) do_execute (command, args, 1)
|
#define execute_internal(command,args) do_execute (command, args, 1)
|
||||||
|
|
||||||
/* Execute functions that use the shell to execute */
|
/* Execute functions that use the shell to execute */
|
||||||
void shell_execute (char *command, int flags);
|
void shell_execute (const char *command, int flags);
|
||||||
void execute (char *command);
|
|
||||||
|
|
||||||
/* This one executes a shell */
|
/* This one executes a shell */
|
||||||
void exec_shell (void);
|
void exec_shell (void);
|
||||||
|
@ -1960,7 +1960,7 @@ do_enter_on_file_entry (file_entry *fe)
|
|||||||
(_(" The Midnight Commander "),
|
(_(" The Midnight Commander "),
|
||||||
_(" Do you really want to execute? "), 0, 2, _("&Yes"),
|
_(" Do you really want to execute? "), 0, 2, _("&Yes"),
|
||||||
_("&No")) == 0))
|
_("&No")) == 0))
|
||||||
execute (cmd);
|
shell_execute (cmd, 0);
|
||||||
g_free (cmd);
|
g_free (cmd);
|
||||||
}
|
}
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
|
@ -630,7 +630,7 @@ execute_menu_command (WEdit *edit_widget, char *commands)
|
|||||||
}
|
}
|
||||||
fclose (cmd_file);
|
fclose (cmd_file);
|
||||||
chmod (file_name, S_IRWXU);
|
chmod (file_name, S_IRWXU);
|
||||||
execute (file_name);
|
shell_execute (file_name, 0);
|
||||||
unlink (file_name);
|
unlink (file_name);
|
||||||
g_free (file_name);
|
g_free (file_name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user