Move mch_expandpath from os_unix.c

This commit is contained in:
John Schmidt 2014-03-31 00:51:46 +02:00 committed by Thiago de Arruda
parent 7034903591
commit 7464b07c22
4 changed files with 17 additions and 17 deletions

View File

@ -2406,22 +2406,6 @@ select_eintr:
return ret > 0;
}
#ifndef NO_EXPANDPATH
/*
* Expand a path into all matching files and/or directories. Handles "*",
* "?", "[a-z]", "**", etc.
* "path" has backslashes before chars that are not to be expanded.
* Returns the number of matches found.
*/
int mch_expandpath(gap, path, flags)
garray_T *gap;
char_u *path;
int flags; /* EW_* flags */
{
return unix_expandpath(gap, path, 0, flags, FALSE);
}
#endif
/*
* mch_expand_wildcards() - this code does wild-card pattern matching using
* the shell

View File

@ -46,7 +46,6 @@ int mch_get_shellsize(void);
void mch_set_shellsize(void);
void mch_new_shellsize(void);
int mch_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg);
int mch_expandpath(garray_T *gap, char_u *path, int flags);
int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file,
char_u ***file,
int flags);

View File

@ -1761,3 +1761,19 @@ int pathcmp(const char *p, const char *q, int maxlen)
}
#endif
#ifndef NO_EXPANDPATH
/*
* Expand a path into all matching files and/or directories. Handles "*",
* "?", "[a-z]", "**", etc.
* "path" has backslashes before chars that are not to be expanded.
* Returns the number of matches found.
*/
int mch_expandpath(gap, path, flags)
garray_T *gap;
char_u *path;
int flags; /* EW_* flags */
{
return unix_expandpath(gap, path, 0, flags, FALSE);
}
#endif

View File

@ -34,4 +34,5 @@ char_u *fix_fname(char_u *fname);
int after_pathsep(char_u *b, char_u *p);
int same_directory(char_u *f1, char_u *f2);
int pathcmp(const char *p, const char *q, int maxlen);
int mch_expandpath(garray_T *gap, char_u *path, int flags);
#endif