diff options
author | Brad King <brad.king@kitware.com> | 2018-07-12 12:47:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-12 12:47:15 (GMT) |
commit | c5a1491e900a60046a4f12c4be6ba892d675c3d2 (patch) | |
tree | 0e9e7201902973a6014b929ea0aba3f33285b816 /Source/kwsys | |
parent | 05cd8311ab52cf1e1ca40701c092602fe51cfbe4 (diff) | |
parent | c454a1435ab8d1c167908abb918a756d2f0da058 (diff) | |
download | CMake-c5a1491e900a60046a4f12c4be6ba892d675c3d2.zip CMake-c5a1491e900a60046a4f12c4be6ba892d675c3d2.tar.gz CMake-c5a1491e900a60046a4f12c4be6ba892d675c3d2.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2018-07-12 (86ce4f37)
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/Terminal.c | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c index f0d9c64..1bcfd0c 100644 --- a/Source/kwsys/Terminal.c +++ b/Source/kwsys/Terminal.c @@ -209,27 +209,34 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, } /* VT100 escape sequence strings. */ -#define KWSYS_TERMINAL_VT100_NORMAL "\33[0m" -#define KWSYS_TERMINAL_VT100_BOLD "\33[1m" -#define KWSYS_TERMINAL_VT100_UNDERLINE "\33[4m" -#define KWSYS_TERMINAL_VT100_BLINK "\33[5m" -#define KWSYS_TERMINAL_VT100_INVERSE "\33[7m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_BLACK "\33[30m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_RED "\33[31m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_GREEN "\33[32m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_YELLOW "\33[33m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_BLUE "\33[34m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_MAGENTA "\33[35m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_CYAN "\33[36m" -#define KWSYS_TERMINAL_VT100_FOREGROUND_WHITE "\33[37m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_BLACK "\33[40m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_RED "\33[41m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_GREEN "\33[42m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_YELLOW "\33[43m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_BLUE "\33[44m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_MAGENTA "\33[45m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_CYAN "\33[46m" -#define KWSYS_TERMINAL_VT100_BACKGROUND_WHITE "\33[47m" +#if defined(__MVS__) +/* if building on z/OS (aka MVS), assume we are using EBCDIC */ +# define ESCAPE_CHAR "\47" +#else +# define ESCAPE_CHAR "\33" +#endif + +#define KWSYS_TERMINAL_VT100_NORMAL ESCAPE_CHAR "[0m" +#define KWSYS_TERMINAL_VT100_BOLD ESCAPE_CHAR "[1m" +#define KWSYS_TERMINAL_VT100_UNDERLINE ESCAPE_CHAR "[4m" +#define KWSYS_TERMINAL_VT100_BLINK ESCAPE_CHAR "[5m" +#define KWSYS_TERMINAL_VT100_INVERSE ESCAPE_CHAR "[7m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_BLACK ESCAPE_CHAR "[30m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_RED ESCAPE_CHAR "[31m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_GREEN ESCAPE_CHAR "[32m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_YELLOW ESCAPE_CHAR "[33m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_BLUE ESCAPE_CHAR "[34m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_MAGENTA ESCAPE_CHAR "[35m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_CYAN ESCAPE_CHAR "[36m" +#define KWSYS_TERMINAL_VT100_FOREGROUND_WHITE ESCAPE_CHAR "[37m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_BLACK ESCAPE_CHAR "[40m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_RED ESCAPE_CHAR "[41m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_GREEN ESCAPE_CHAR "[42m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_YELLOW ESCAPE_CHAR "[43m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_BLUE ESCAPE_CHAR "[44m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_MAGENTA ESCAPE_CHAR "[45m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_CYAN ESCAPE_CHAR "[46m" +#define KWSYS_TERMINAL_VT100_BACKGROUND_WHITE ESCAPE_CHAR "[47m" /* Write VT100 escape sequences to the stream for the given color. */ static void kwsysTerminalSetVT100Color(FILE* stream, int color) |