1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 10:29:03 +00:00

Don't use ANSI color sequences on windows.

Pointed out by Gisle Vanem. Fixed it in a way that makes it easy to disable on
other systems as well.
This commit is contained in:
henri
2013-08-10 20:19:38 +00:00
parent 822d3e1da2
commit 170a85f677

View File

@@ -7,12 +7,18 @@
#include "test-common.h"
#define RESET "\033[0m"
#define BOLDRED "\033[1m\033[31m"
#define BOLDGREEN "\033[1m\033[32m"
#ifndef WIN32
#define RESET "\033[0m"
#define BOLDRED "\033[1m\033[31m"
#define BOLDGREEN "\033[1m\033[32m"
#define TEST_FAILED "[" BOLDRED "FAILED" RESET "]"
#define TEST_OK "[" BOLDGREEN "OK" RESET "]"
#else
/* WIN32 terminal has no ANSI driver */
#define TEST_FAILED "[FAILED]"
#define TEST_OK "[OK]"
#endif
#define TEST_FAILED "[" BOLDRED "FAILED" RESET "]"
#define TEST_OK "[" BOLDGREEN "OK" RESET "]"
/* socket_strerror() comes from nbase