diff options
author | Ray Molenkamp <github@lazydodo.com> | 2020-09-10 20:27:41 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2020-09-10 20:27:41 +0300 |
commit | 359acad5e49bb23a603706c47a05b9ffc1c92d33 (patch) | |
tree | e18c6ec279cec6c8f00580da82f977eb2260b536 | |
parent | 4c3ad047e72f2ded33cd4aebf3402d2bbba66178 (diff) |
Cleanup: CLog fix bad use_color default
`use_color` was defaulted to 'on' and only turned off when it was
decided the terminal didn't support this. This was the wrong
way to go about things, since that test only ran for Linux/Mac other
operating systems would get color formatting regardless if they
supported it.
The new default is `off` until the platform specific code inside
`CLG_ctx_output_set` turns it on after running some sanity checks.
This fix was part of the review of D8848 but deserved its on commit
Reviewed By: campbellbarton
-rw-r--r-- | intern/clog/clog.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/intern/clog/clog.c b/intern/clog/clog.c index 84b850f5042..17c9d49ee51 100644 --- a/intern/clog/clog.c +++ b/intern/clog/clog.c @@ -1,4 +1,4 @@ -/* +/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -235,9 +235,6 @@ static void clg_color_table_init(bool use_color) clg_color_table[i] = ""; } if (use_color) { -#ifdef _WIN32 - /* TODO */ -#else clg_color_table[COLOR_DEFAULT] = "\033[1;37m"; clg_color_table[COLOR_RED] = "\033[1;31m"; clg_color_table[COLOR_GREEN] = "\033[1;32m"; @@ -626,7 +623,6 @@ static CLogContext *CLG_ctx_init(void) #ifdef WITH_CLOG_PTHREADS pthread_mutex_init(&ctx->types_lock, NULL); #endif - ctx->use_color = true; ctx->default_type.level = 1; CLG_ctx_output_set(ctx, stdout); |