mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
Move mch_expandpath from os_unix.c
This commit is contained in:

committed by
Thiago de Arruda

parent
7034903591
commit
7464b07c22
@@ -2406,22 +2406,6 @@ select_eintr:
|
|||||||
return ret > 0;
|
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
|
* mch_expand_wildcards() - this code does wild-card pattern matching using
|
||||||
* the shell
|
* the shell
|
||||||
|
@@ -46,7 +46,6 @@ int mch_get_shellsize(void);
|
|||||||
void mch_set_shellsize(void);
|
void mch_set_shellsize(void);
|
||||||
void mch_new_shellsize(void);
|
void mch_new_shellsize(void);
|
||||||
int mch_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg);
|
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,
|
int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
||||||
char_u ***file,
|
char_u ***file,
|
||||||
int flags);
|
int flags);
|
||||||
|
16
src/path.c
16
src/path.c
@@ -1761,3 +1761,19 @@ int pathcmp(const char *p, const char *q, int maxlen)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
||||||
|
|
||||||
|
@@ -34,4 +34,5 @@ char_u *fix_fname(char_u *fname);
|
|||||||
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);
|
||||||
int pathcmp(const char *p, const char *q, int maxlen);
|
int pathcmp(const char *p, const char *q, int maxlen);
|
||||||
|
int mch_expandpath(garray_T *gap, char_u *path, int flags);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user