Ticket #2496: mc-4.8.6-alt-forceexec.patch

File mc-4.8.6-alt-forceexec.patch, 2.7 KB (added by asy, 11 years ago)
  • po/ru.po

    diff -Nur mc-4.8.6.old/po/ru.po mc-4.8.6/po/ru.po
    old new  
    576576msgid "Disables subshell support" 
    577577msgstr "Отключить поддержку встроенной командной оболочки" 
    578578 
     579msgid "Force subshell execution" 
     580msgstr "Принудительное выполнение во встроенной командной оболочке" 
     581 
    579582msgid "Log ftp dialog to specified file" 
    580583msgstr "Записывать диалог с FTP в заданный файл" 
    581584 
  • src/args.c

    diff -Nur mc-4.8.6.old/src/args.c mc-4.8.6/src/args.c
    old new  
    4343#include "src/args.h" 
    4444 
    4545/*** external variables **************************************************************************/ 
     46extern int force_subshell_execution; 
    4647 
    4748/*** global variables ****************************************************************************/ 
    4849 
     
    152153     N_("Disables subshell support"), 
    153154     NULL 
    154155    }, 
     156 
     157    { 
     158     "forceexec", 'r', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, 
     159     &force_subshell_execution, 
     160     N_("Force subshell execution"), 
     161     NULL 
     162    }, 
    155163#endif 
    156164 
    157165    /* debug options */ 
  • src/execute.c

    diff -Nur mc-4.8.6.old/src/execute.c mc-4.8.6/src/execute.c
    old new  
    6363/*** file scope functions ************************************************************************/ 
    6464/* --------------------------------------------------------------------------------------------- */ 
    6565 
     66int force_subshell_execution = 0; 
     67 
    6668static void 
    6769edition_post_exec (void) 
    6870{ 
     
    290292 
    291293#ifdef ENABLE_SUBSHELL 
    292294    if (mc_global.tty.use_subshell) 
    293         if (subshell_state == INACTIVE) 
     295        if (subshell_state == INACTIVE || force_subshell_execution) 
    294296            do_execute (shell, cmd ? cmd : command, flags | EXECUTE_AS_SHELL); 
    295297        else 
    296298            message (D_ERROR, MSG_ERROR, _("The shell is already running a command")); 
  • src/execute.h

    diff -Nur mc-4.8.6.old/src/execute.h mc-4.8.6/src/execute.h
    old new  
    2828 
    2929/*** declarations of public functions ************************************************************/ 
    3030 
     31/* If true message "The shell is already running a command" never */ 
     32extern int force_subshell_execution; 
     33 
    3134/* Execute functions that use the shell to execute */ 
    3235void shell_execute (const char *command, int flags); 
    3336