mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
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:
parent
6d2a9367ba
commit
18c5340fb4
1 changed files with 4 additions and 1 deletions
|
|
@ -100,6 +100,7 @@ void pa_log_levelv(pa_log_level_t level, const char *format, va_list ap) {
|
||||||
case PA_LOG_STDERR: {
|
case PA_LOG_STDERR: {
|
||||||
const char *prefix = "", *suffix = "";
|
const char *prefix = "", *suffix = "";
|
||||||
|
|
||||||
|
#ifndef OS_IS_WIN32
|
||||||
/* Yes indeed. Useless, but fun! */
|
/* Yes indeed. Useless, but fun! */
|
||||||
if (isatty(STDERR_FILENO)) {
|
if (isatty(STDERR_FILENO)) {
|
||||||
if (level <= PA_LOG_ERROR) {
|
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";
|
suffix = "\x1B[0m";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, "%s%s%s\n", prefix, t, suffix);
|
fprintf(stderr, "%s%s%s\n", prefix, t, suffix);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue