printf-hook-builtin: Support Windows console colors using TTY escape codes

This commit is contained in:
Martin Willi
2014-06-04 15:52:57 +02:00
parent 71bf82d474
commit 1f2b8c8c80
2 changed files with 128 additions and 1 deletions
+4 -1
View File
@@ -363,6 +363,9 @@ char* tty_escape_get(int fd, tty_escape_t escape)
case TTY_BOLD:
case TTY_UNDERLINE:
case TTY_BLINKING:
#ifdef WIN32
return "";
#endif
case TTY_FG_BLACK:
case TTY_FG_RED:
case TTY_FG_GREEN:
@@ -382,7 +385,7 @@ char* tty_escape_get(int fd, tty_escape_t escape)
case TTY_BG_WHITE:
case TTY_BG_DEF:
return enum_to_name(tty_color_names, escape);
/* warn if a excape code is missing */
/* warn if a escape code is missing */
}
return "";
}