aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--color.c8
-rw-r--r--color.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/color.c b/color.c
index 3348ead534..07ac8c9d40 100644
--- a/color.c
+++ b/color.c
@@ -391,7 +391,7 @@ enum git_colorbool git_config_colorbool(const char *var, const char *value)
return GIT_COLOR_AUTO;
}
-static int check_auto_color(int fd)
+static bool check_auto_color(int fd)
{
static int color_stderr_is_tty = -1;
int *is_tty_p = fd == 1 ? &color_stdout_is_tty : &color_stderr_is_tty;
@@ -399,12 +399,12 @@ static int check_auto_color(int fd)
*is_tty_p = isatty(fd);
if (*is_tty_p || (fd == 1 && pager_in_use() && pager_use_color)) {
if (!is_terminal_dumb())
- return 1;
+ return true;
}
- return 0;
+ return false;
}
-int want_color_fd(int fd, enum git_colorbool var)
+bool want_color_fd(int fd, enum git_colorbool var)
{
/*
* NEEDSWORK: This function is sometimes used from multiple threads, and
diff --git a/color.h b/color.h
index fcb38c5562..43e6c9ad09 100644
--- a/color.h
+++ b/color.h
@@ -106,7 +106,7 @@ enum git_colorbool git_config_colorbool(const char *var, const char *value);
* Return a boolean whether to use color, where the argument 'var' is
* one of GIT_COLOR_UNKNOWN, GIT_COLOR_NEVER, GIT_COLOR_ALWAYS, GIT_COLOR_AUTO.
*/
-int want_color_fd(int fd, enum git_colorbool var);
+bool want_color_fd(int fd, enum git_colorbool var);
#define want_color(colorbool) want_color_fd(1, (colorbool))
#define want_color_stderr(colorbool) want_color_fd(2, (colorbool))