From 988dd13d61633496b7de9f2c72ee20ea116ebb6a Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sat, 6 May 2023 15:36:41 +0300 Subject: [PATCH] make GLM_TESTS_NO_COLORFUL_OUTPUT work on non-test print colors too --- include/cglm/io.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/include/cglm/io.h b/include/cglm/io.h index 6f6a8e4..29fb801 100644 --- a/include/cglm/io.h +++ b/include/cglm/io.h @@ -52,12 +52,20 @@ # define CGLM_PRINT_MAX_TO_SHORT 1e5f #endif -#ifndef CGLM_PRINT_COLOR -# define CGLM_PRINT_COLOR "\033[36m" -#endif - -#ifndef CGLM_PRINT_COLOR_RESET -# define CGLM_PRINT_COLOR_RESET "\033[0m" +#ifndef GLM_TESTS_NO_COLORFUL_OUTPUT +# ifndef CGLM_PRINT_COLOR +# define CGLM_PRINT_COLOR "\033[36m" +# endif +# ifndef CGLM_PRINT_COLOR_RESET +# define CGLM_PRINT_COLOR_RESET "\033[0m" +# endif +#else +# ifndef CGLM_PRINT_COLOR +# define CGLM_PRINT_COLOR +# endif +# ifndef CGLM_PRINT_COLOR_RESET +# define CGLM_PRINT_COLOR_RESET +# endif #endif /*!