Update call_shell signature to use ShellOpts

This commit is contained in:
Thiago de Arruda 2014-03-29 22:12:33 -03:00
parent 0d61b1c470
commit 206a38871f
2 changed files with 5 additions and 4 deletions

View File

@ -1531,7 +1531,7 @@ int default_fileformat(void)
/* /*
* Call shell. Calls mch_call_shell, with 'shellxquote' added. * Call shell. Calls mch_call_shell, with 'shellxquote' added.
*/ */
int call_shell(char_u *cmd, int opt, char_u *extra_shell_arg) int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg)
{ {
char_u *ncmd; char_u *ncmd;
int retval; int retval;
@ -1557,7 +1557,7 @@ int call_shell(char_u *cmd, int opt, char_u *extra_shell_arg)
tag_freematch(); tag_freematch();
if (cmd == NULL || *p_sxq == NUL) if (cmd == NULL || *p_sxq == NUL)
retval = mch_call_shell(cmd, opt, extra_shell_arg); retval = mch_call_shell(cmd, opts, extra_shell_arg);
else { else {
char_u *ecmd = cmd; char_u *ecmd = cmd;
@ -1575,7 +1575,7 @@ int call_shell(char_u *cmd, int opt, char_u *extra_shell_arg)
STRCAT(ncmd, STRCMP(p_sxq, "(") == 0 ? (char_u *)")" STRCAT(ncmd, STRCMP(p_sxq, "(") == 0 ? (char_u *)")"
: STRCMP(p_sxq, "\"(") == 0 ? (char_u *)")\"" : STRCMP(p_sxq, "\"(") == 0 ? (char_u *)")\""
: p_sxq); : p_sxq);
retval = mch_call_shell(ncmd, opt, extra_shell_arg); retval = mch_call_shell(ncmd, opts, extra_shell_arg);
vim_free(ncmd); vim_free(ncmd);
} else } else
retval = -1; retval = -1;

View File

@ -2,6 +2,7 @@
#define NEOVIM_MISC2_H #define NEOVIM_MISC2_H
#include "func_attr.h" #include "func_attr.h"
#include "os/shell.h"
/* misc2.c */ /* misc2.c */
int virtual_active(void); int virtual_active(void);
@ -64,7 +65,7 @@ int get_fileformat(buf_T *buf);
int get_fileformat_force(buf_T *buf, exarg_T *eap); int get_fileformat_force(buf_T *buf, exarg_T *eap);
void set_fileformat(int t, int opt_flags); void set_fileformat(int t, int opt_flags);
int default_fileformat(void); int default_fileformat(void);
int call_shell(char_u *cmd, int opt, char_u *extra_shell_arg); int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg);
int get_real_state(void); int get_real_state(void);
int after_pathsep(char_u *b, char_u *p); int after_pathsep(char_u *b, char_u *p);
int same_directory(char_u *f1, char_u *f2); int same_directory(char_u *f1, char_u *f2);