refactor/rename: path_to_absolute()

This commit is contained in:
Justin M. Keyes
2018-03-24 14:01:39 +01:00
parent 7ae4144208
commit 0ecf7e3a2d
2 changed files with 5 additions and 5 deletions

View File

@@ -2683,7 +2683,7 @@ void buflist_altfpos(win_T *win)
}
/// Check that "ffname" is not the same file as current file.
/// Fname must have a full path (expanded by path_get_absolute_path()).
/// Fname must have a full path (expanded by path_to_absolute()).
///
/// @param ffname full path name to check
bool otherfile(char_u *ffname)
@@ -2693,7 +2693,7 @@ bool otherfile(char_u *ffname)
}
/// Check that "ffname" is not the same file as the file loaded in "buf".
/// Fname must have a full path (expanded by path_get_absolute_path()).
/// Fname must have a full path (expanded by path_to_absolute()).
///
/// @param buf buffer to check
/// @param ffname full path name to check

View File

@@ -1699,7 +1699,7 @@ int vim_FullName(const char *fname, char *buf, size_t len, bool force)
return OK;
}
int rv = path_get_absolute_path((char_u *)fname, (char_u *)buf, len, force);
int rv = path_to_absolute((char_u *)fname, (char_u *)buf, len, force);
if (rv == FAIL) {
xstrlcpy(buf, fname, len); // something failed; use the filename
}
@@ -2189,8 +2189,8 @@ int append_path(char *path, const char *to_append, size_t max_len)
/// @param force also expand when "fname" is already absolute.
///
/// @return FAIL for failure, OK for success.
static int path_get_absolute_path(const char_u *fname, char_u *buf,
size_t len, int force)
static int path_to_absolute(const char_u *fname, char_u *buf, size_t len,
int force)
{
char_u *p;
*buf = NUL;