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

File mc-4.8.16-alt-forceexec.patch, 2.6 KB (added by asy, 8 years ago)
  • po/ru.po

    diff -Nur mc-4.8.16.old/po/ru.po mc-4.8.16/po/ru.po
    old new  
    597597msgid "Disables subshell support" 
    598598msgstr "Отключить поддержку встроенной командной оболочки" 
    599599 
     600msgid "Force subshell execution" 
     601msgstr "Принудительное выполнение во встроенной командной оболочке" 
     602 
    600603msgid "Log ftp dialog to specified file" 
    601604msgstr "Записывать диалог с FTP в заданный файл" 
    602605 
  • src/args.c

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

    diff -Nur mc-4.8.16.old/src/execute.c mc-4.8.16/src/execute.c
    old new  
    7575 
    7676/* --------------------------------------------------------------------------------------------- */ 
    7777 
     78int force_subshell_execution = 0; 
     79 
    7880static void 
    7981edition_post_exec (void) 
    8082{ 
     
    429431 
    430432#ifdef ENABLE_SUBSHELL 
    431433    if (mc_global.tty.use_subshell) 
    432         if (subshell_state == INACTIVE) 
     434        if (subshell_state == INACTIVE || force_subshell_execution) 
    433435            do_execute (mc_global.shell->path, cmd ? cmd : command, flags | EXECUTE_AS_SHELL); 
    434436        else 
    435437            message (D_ERROR, MSG_ERROR, _("The shell is already running a command")); 
  • src/execute.h

    diff -Nur mc-4.8.16.old/src/execute.h mc-4.8.16/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