From a511d03d85d734b149856289237ae5e2461f6bbe Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Wed, 8 May 2013 19:36:52 +0100 Subject: [PATCH] Configure whether colour is displayed by default directly in source --- configure.ac | 1 - main.c | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b16f403b..c42425d9 100644 --- a/configure.ac +++ b/configure.ac @@ -45,4 +45,3 @@ AC_CONFIG_FILES([Makefile]) AC_OUTPUT -dnl FIXME should disable colour output on windows somehow diff --git a/main.c b/main.c index 4b0d496d..774dc61e 100644 --- a/main.c +++ b/main.c @@ -74,8 +74,10 @@ static void process(jv value, int flags) { jv_free(result); } else { int dumpopts; -#ifdef JQ_DEFAULT_ENABLE_COLOR - dumpopts = JQ_DEFAULT_ENABLE_COLOR ? JV_PRINT_COLOUR : 0; + /* Disable colour by default on Windows builds as Windows + terminals tend not to display it correctly */ +#ifdef WIN32 + dumpopts = 0; #else dumpopts = isatty(fileno(stdout)) ? JV_PRINT_COLOUR : 0; #endif