Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-01-29 01:55:18 +0300
committerMarton Balint <cus@passwd.hu>2020-02-09 22:31:44 +0300
commit2b496c90cd7048722629d002ad5fde93acea3358 (patch)
treef5c17626d8083d6f063f1520925235d21c74cecc /libavutil
parenta61bcb908358ef2d926471ae7440c470eb687d21 (diff)
avutil/log: drop support for NO_COLOR environment variable
Deprecated for more than 9 years now. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/log.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 0a7b169bc0..6d87c718a8 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -125,8 +125,7 @@ static void check_color_terminal(void)
#if defined(_WIN32) && HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
CONSOLE_SCREEN_BUFFER_INFO con_info;
con = GetStdHandle(STD_ERROR_HANDLE);
- use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &&
- !getenv("AV_LOG_FORCE_NOCOLOR");
+ use_color = (con != INVALID_HANDLE_VALUE) && !getenv("AV_LOG_FORCE_NOCOLOR");
if (use_color) {
GetConsoleScreenBufferInfo(con, &con_info);
attr_orig = con_info.wAttributes;
@@ -134,14 +133,13 @@ static void check_color_terminal(void)
}
#elif HAVE_ISATTY
char *term = getenv("TERM");
- use_color = !getenv("NO_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR") &&
+ use_color = !getenv("AV_LOG_FORCE_NOCOLOR") &&
(getenv("TERM") && isatty(2) || getenv("AV_LOG_FORCE_COLOR"));
if ( getenv("AV_LOG_FORCE_256COLOR")
|| (term && strstr(term, "256color")))
use_color *= 256;
#else
- use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("NO_COLOR") &&
- !getenv("AV_LOG_FORCE_NOCOLOR");
+ use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR");
#endif
}