aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/utils.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-10-15 15:45:11 +0200
committerMartin Willi <martin@revosec.ch>2014-06-04 15:52:57 +0200
commit1f2b8c8c808163f9b299af5129bc4a9e56f10041 (patch)
tree4aa14cc0597ab36466f33549aa8a0b12841cb835 /src/libstrongswan/utils/utils.c
parent71bf82d4741ccd8d3e738ffc53f5de40aced6c8d (diff)
downloadstrongswan-1f2b8c8c808163f9b299af5129bc4a9e56f10041.tar.bz2
strongswan-1f2b8c8c808163f9b299af5129bc4a9e56f10041.tar.xz
printf-hook-builtin: Support Windows console colors using TTY escape codes
Diffstat (limited to 'src/libstrongswan/utils/utils.c')
-rw-r--r--src/libstrongswan/utils/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/utils.c b/src/libstrongswan/utils/utils.c
index 03c7b4f7e..7cca845f7 100644
--- a/src/libstrongswan/utils/utils.c
+++ b/src/libstrongswan/utils/utils.c
@@ -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 "";
}