Remove char_u: concat_fnames()

This commit is contained in:
Mark Bainter
2015-04-20 15:28:37 +00:00
parent 477b6a2c44
commit c55e488079
7 changed files with 44 additions and 36 deletions

View File

@@ -379,17 +379,20 @@ void expand_env_esc(char_u *srcp, char_u *dst, int dstlen, bool esc, bool one,
/// @param vimdir directory to test
static char *vim_version_dir(const char *vimdir)
{
char_u *p;
char *p;
if (vimdir == NULL || *vimdir == NUL)
if (vimdir == NULL || *vimdir == NUL) {
return NULL;
p = concat_fnames((char_u *)vimdir, (char_u *)VIM_VERSION_NODOT, true);
if (os_isdir(p))
return (char *)p;
}
p = concat_fnames(vimdir, VIM_VERSION_NODOT, true);
if (os_isdir((char_u *)p)) {
return p;
}
xfree(p);
p = concat_fnames((char_u *)vimdir, (char_u *)RUNTIME_DIRNAME, true);
if (os_isdir(p))
return (char *)p;
p = concat_fnames(vimdir, RUNTIME_DIRNAME, true);
if (os_isdir((char_u *)p)) {
return p;
}
xfree(p);
return NULL;
}