diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 2 | ||||
-rw-r--r-- | src/eval.c | 6 | ||||
-rw-r--r-- | src/misc2.c | 2 | ||||
-rw-r--r-- | src/path.c | 8 | ||||
-rw-r--r-- | src/path.h | 14 | ||||
-rw-r--r-- | src/spell.c | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/buffer.c b/src/buffer.c index b417681987..1aae173c02 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2713,7 +2713,7 @@ void maketitle(void) off += 2; #endif /* remove the file name */ - p = path_tail_with_seperator(buf + off); + p = path_tail_with_sep(buf + off); if (p == buf + off) /* must be a help buffer */ vim_strncpy(buf + off, (char_u *)_("help"), diff --git a/src/eval.c b/src/eval.c index ed519ff378..94eca72b4e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -11657,7 +11657,7 @@ static int mkdir_recurse(char_u *dir, int prot) /* Get end of directory name in "dir". * We're done when it's "/" or "c:/". */ - p = path_tail_with_seperator(dir); + p = path_tail_with_sep(dir); if (p <= get_past_head(dir)) return OK; @@ -11693,7 +11693,7 @@ static void f_mkdir(typval_T *argvars, typval_T *rettv) else { if (*path_tail(dir) == NUL) /* remove trailing slashes */ - *path_tail_with_seperator(dir) = NUL; + *path_tail_with_sep(dir) = NUL; if (argvars[1].v_type != VAR_UNKNOWN) { if (argvars[2].v_type != VAR_UNKNOWN) @@ -12544,7 +12544,7 @@ static void f_resolve(typval_T *argvars, typval_T *rettv) if (!has_trailing_pathsep) { q = p + STRLEN(p); if (after_pathsep(p, q)) - *path_tail_with_seperator(p) = NUL; + *path_tail_with_sep(p) = NUL; } rettv->vval.v_string = p; diff --git a/src/misc2.c b/src/misc2.c index c43a7e4b90..c5620e2103 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1609,7 +1609,7 @@ int vim_chdirfile(char_u *fname) char_u dir[MAXPATHL]; vim_strncpy(dir, fname, MAXPATHL - 1); - *path_tail_with_seperator(dir) = NUL; + *path_tail_with_sep(dir) = NUL; return os_chdir((char *)dir) == 0 ? OK : FAIL; } #endif diff --git a/src/path.c b/src/path.c index 93ee6dddeb..7461eaa160 100644 --- a/src/path.c +++ b/src/path.c @@ -78,7 +78,7 @@ char_u *path_tail(char_u *fname) return tail; } -char_u *path_tail_with_seperator(char_u *fname) +char_u *path_tail_with_sep(char_u *fname) { assert(fname != NULL); char_u *past_head; @@ -210,7 +210,7 @@ int dir_of_file_exists(char_u *fname) int c; int retval; - p = path_tail_with_seperator(fname); + p = path_tail_with_sep(fname); if (p == fname) return TRUE; c = *p; @@ -1644,8 +1644,8 @@ int same_directory(char_u *f1, char_u *f2) return FALSE; (void)vim_FullName(f1, ffname, MAXPATHL, FALSE); - t1 = path_tail_with_seperator(ffname); - t2 = path_tail_with_seperator(f2); + t1 = path_tail_with_sep(ffname); + t2 = path_tail_with_sep(f2); return t1 - ffname == t2 - f2 && pathcmp((char *)ffname, (char *)f2, (int)(t1 - ffname)) == 0; } diff --git a/src/path.h b/src/path.h index a558fc72b3..1455861544 100644 --- a/src/path.h +++ b/src/path.h @@ -24,27 +24,27 @@ FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname); /// @param fname A file path. /// @return /// - Empty string, if fname is NULL. -/// - The position of the last path seperator + 1. (i.e. empty string, if +/// - The position of the last path separator + 1. (i.e. empty string, if /// fname ends in a slash). /// - Never NULL. char_u *path_tail(char_u *fname); /// Get pointer to tail of "fname", including path separators. /// -/// Takes care of "c:/" and "//". That means `path_tail_with_seperator("dir///file.txt")` +/// Takes care of "c:/" and "//". That means `path_tail_with_sep("dir///file.txt")` /// will return a pointer to `"///file.txt"`. /// @param fname A file path. (Must be != NULL.) /// @return -/// - Pointer to the last path seperator of `fname`, if there is any. -/// - `fname` if it contains no path seperator. +/// - Pointer to the last path separator of `fname`, if there is any. +/// - `fname` if it contains no path separator. /// - Never NULL. -char_u *path_tail_with_seperator(char_u *fname); +char_u *path_tail_with_sep(char_u *fname); /// Get the next path component of a path name. /// /// @param fname A file path. (Must be != NULL.) -/// @return Pointer to first found path seperator + 1. -/// An empty string, if `fname` doesn't contain a path seperator, +/// @return Pointer to first found path separator + 1. +/// An empty string, if `fname` doesn't contain a path separator, char_u *path_next_component(char_u *fname); int vim_ispathsep(int c); diff --git a/src/spell.c b/src/spell.c index 1a09171491..57e2607f90 100644 --- a/src/spell.c +++ b/src/spell.c @@ -8507,7 +8507,7 @@ spell_add_word ( * file. We may need to create the "spell" directory first. We * already checked the runtime directory is writable in * init_spellfile(). */ - if (!dir_of_file_exists(fname) && (p = path_tail_with_seperator(fname)) != fname) { + if (!dir_of_file_exists(fname) && (p = path_tail_with_sep(fname)) != fname) { int c = *p; /* The directory doesn't exist. Try creating it and opening |