ANSI codes aren't supported on Windows terminals.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@838 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-05-11 11:03:17 +00:00
parent 6d2a9367ba
commit 18c5340fb4

View file

@ -99,7 +99,8 @@ void pa_log_levelv(pa_log_level_t level, const char *format, va_list ap) {
switch (log_target) {
case PA_LOG_STDERR: {
const char *prefix = "", *suffix = "";
#ifndef OS_IS_WIN32
/* Yes indeed. Useless, but fun! */
if (isatty(STDERR_FILENO)) {
if (level <= PA_LOG_ERROR) {
@ -110,6 +111,8 @@ void pa_log_levelv(pa_log_level_t level, const char *format, va_list ap) {
suffix = "\x1B[0m";
}
}
#endif
fprintf(stderr, "%s%s%s\n", prefix, t, suffix);
break;
}