Move documentation from function declarations to definitions

Uses a perl script to move it (scripts/movedocs.pl)
This commit is contained in:
ZyX
2014-05-10 00:53:36 +04:00
committed by Thiago de Arruda
parent 52a9a5b0b0
commit 880957ad4e
37 changed files with 1064 additions and 885 deletions

View File

@@ -14,41 +14,12 @@ typedef enum file_comparison {
kEqualFileNames = 7 ///< Both don't exist and file names are same.
} FileComparison;
/// Compare two file names.
///
/// @param s1 First file name. Environment variables in this name will be
/// expanded.
/// @param s2 Second file name.
/// @param checkname When both files don't exist, only compare their names.
/// @return Enum of type FileComparison. @see FileComparison.
FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname);
/// Get the tail of a path: the file name.
///
/// @param fname A file path.
/// @return
/// - Empty string, if fname is NULL.
/// - 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_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 separator of `fname`, if there is any.
/// - `fname` if it contains no path separator.
/// - Never NULL.
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 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);
@@ -84,23 +55,8 @@ 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);
/// Try to find a shortname by comparing the fullname with the current
/// directory.
///
/// @param full_path The full path of the file.
/// @return
/// - Pointer into `full_path` if shortened.
/// - `full_path` unchanged if no shorter name is possible.
/// - NULL if `full_path` is NULL.
char_u *path_shorten_fname_if_possible(char_u *full_path);
/// Try to find a shortname by comparing the fullname with `dir_name`.
///
/// @param full_path The full path of the file.
/// @param dir_name The directory to shorten relative to.
/// @return
/// - Pointer into `full_path` if shortened.
/// - NULL if no shorter name is possible.
char_u *path_shorten_fname(char_u *full_path, char_u *dir_name);
int expand_wildcards_eval(char_u **pat, int *num_file, char_u ***file,
@@ -110,19 +66,10 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u *
int flags);
int match_suffix(char_u *fname);
/// Get the absolute name of the given relative directory.
///
/// @param directory Directory name, relative to current directory.
/// @return `FAIL` for failure, `OK` for success.
int path_full_dir_name(char *directory, char *buffer, int len);
// Append to_append to path with a slash in between.
int append_path(char *path, const char *to_append, int max_len);
/// Check if the given file is absolute.
///
/// This just checks if the file name starts with '/' or '~'.
/// @return `TRUE` if "fname" is absolute.
int path_is_absolute_path(const char_u *fname);
#endif