From cac079d033259e72f0d11e81856c0266eada3b7f Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 18 Sep 2020 17:36:56 -0400 Subject: stat: Rename bfs_stat_flag to _flags Flags enums should be plural. --- color.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'color.c') diff --git a/color.c b/color.c index 4b70e19..94f58fc 100644 --- a/color.c +++ b/color.c @@ -556,7 +556,7 @@ static bool is_link_broken(const struct BFTW *ftwbuf) { } /** Get the color for a file. */ -static const char *file_color(const struct colors *colors, const char *filename, const struct BFTW *ftwbuf, enum bfs_stat_flag flags) { +static const char *file_color(const struct colors *colors, const char *filename, const struct BFTW *ftwbuf, enum bfs_stat_flags flags) { enum bftw_type type = bftw_type(ftwbuf, flags); if (type == BFTW_ERROR) { goto error; @@ -716,7 +716,7 @@ static int print_colored(const struct colors *colors, const char *esc, const cha } /** Find the offset of the first broken path component. */ -static ssize_t first_broken_offset(const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flag flags, size_t max) { +static ssize_t first_broken_offset(const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flags flags, size_t max) { ssize_t ret = max; if (bftw_type(ftwbuf, flags) != BFTW_ERROR) { @@ -775,7 +775,7 @@ out: } /** Print the directories leading up to a file. */ -static int print_dirs_colored(CFILE *cfile, const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flag flags, size_t nameoff) { +static int print_dirs_colored(CFILE *cfile, const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flags flags, size_t nameoff) { const struct colors *colors = cfile->colors; FILE *file = cfile->file; @@ -804,7 +804,7 @@ static int print_dirs_colored(CFILE *cfile, const char *path, const struct BFTW } /** Print a path with colors. */ -static int print_path_colored(CFILE *cfile, const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flag flags) { +static int print_path_colored(CFILE *cfile, const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flags flags) { const struct colors *colors = cfile->colors; FILE *file = cfile->file; @@ -829,7 +829,7 @@ static int print_path(CFILE *cfile, const struct BFTW *ftwbuf) { return fputs(ftwbuf->path, cfile->file) == EOF ? -1 : 0; } - enum bfs_stat_flag flags = ftwbuf->stat_flags; + enum bfs_stat_flags flags = ftwbuf->stat_flags; if (colors && colors->link_as_target && ftwbuf->type == BFTW_LNK) { flags = BFS_STAT_TRYFOLLOW; } -- cgit v1.2.3