From b75ff7e44f1465252d18befcf67c2ffdc97db8da Mon Sep 17 00:00:00 2001 From: servostar Date: Wed, 5 Jun 2024 11:59:03 +0200 Subject: [PATCH] fixed: macro definitions --- src/io/files.c | 4 ++-- src/sys/col.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/io/files.c b/src/io/files.c index 090a2cb..0dac570 100644 --- a/src/io/files.c +++ b/src/io/files.c @@ -13,6 +13,8 @@ #define MAX_PATH_BYTES PATH_MAX +#define min(a, b) ((a) > (b) ? (b) : (a)) + #elif defined(_WIN32) || defined(WIN32) #include @@ -69,8 +71,6 @@ void delete_files(ModuleFileStack *stack) { // seeking the current line in print_diagnostic() #define SEEK_BUF_BYTES 256 -#define min(a, b) ((a) > (b) ? (b) : (a)) - // behaves like fgets except that it has defined behavior when n == 1 static void custom_fgets(char *buffer, size_t n, FILE *stream) { if (n == 1) { diff --git a/src/sys/col.c b/src/sys/col.c index 76260ec..afd78ba 100644 --- a/src/sys/col.c +++ b/src/sys/col.c @@ -71,8 +71,7 @@ int stdout_supports_ansi_esc() { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); if (!GetConsoleMode(hConsole, &mode)) { - ERROR("failed to get console mode"); - return ANSI_ENABLED; + return ASNI_DISABLED; } if ((mode & ENABLE_VIRTUAL_TERMINAL_INPUT) |