diff --git a/direwolf.c b/direwolf.c index a29bd18..9e609eb 100644 --- a/direwolf.c +++ b/direwolf.c @@ -59,6 +59,8 @@ #endif #if __WIN32__ +#include +#include #else #include #include @@ -252,7 +254,11 @@ int main (int argc, char *argv[]) * something else such as "tee") but command line can override this. */ +#if __WIN32__ + t_opt = _isatty(_fileno(stdout)) > 0; +#else t_opt = isatty(fileno(stdout)); +#endif /* 1 = normal, 0 = no text colors. */ /* 2, 3, ... alternate escape sequences for different terminals. */