fixed: macro definitions
This commit is contained in:
parent
f9a18fc107
commit
b75ff7e44f
|
@ -13,6 +13,8 @@
|
|||
|
||||
#define MAX_PATH_BYTES PATH_MAX
|
||||
|
||||
#define min(a, b) ((a) > (b) ? (b) : (a))
|
||||
|
||||
#elif defined(_WIN32) || defined(WIN32)
|
||||
|
||||
#include <Windows.h>
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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) |
|
||||
|
|
Loading…
Reference in New Issue