From 359acad5e49bb23a603706c47a05b9ffc1c92d33 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Thu, 10 Sep 2020 11:27:41 -0600 Subject: 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 --- intern/clog/clog.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'intern/clog') 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); -- cgit v1.2.3