summaryrefslogtreecommitdiffstats
path: root/mp_msg.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 01:25:15 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 01:25:15 +0200
commitacdce0176ae3722ad38a23aae0cf0bf03a82f9c4 (patch)
tree57a30f1d44ea193586d5723faac7ffb96a3a73aa /mp_msg.c
parentef3ef5e218588b5f68b427729a3c2c1a8083e499 (diff)
parent5a2289137f43501281dba83fe98b5f67be63f9ef (diff)
downloadmpv-acdce0176ae3722ad38a23aae0cf0bf03a82f9c4.tar.bz2
mpv-acdce0176ae3722ad38a23aae0cf0bf03a82f9c4.tar.xz
Merge svn changes up to r30732
Diffstat (limited to 'mp_msg.c')
-rw-r--r--mp_msg.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/mp_msg.c b/mp_msg.c
index 3fed697331..ab7b969c84 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -22,6 +22,7 @@
#include <string.h>
#include "config.h"
+#include "osdep/getch2.h"
#ifdef CONFIG_TRANSLATION
#include <locale.h>
@@ -31,14 +32,6 @@
#ifdef CONFIG_ICONV
#include <iconv.h>
#include <errno.h>
-/**
- * \brief gets the name of the system's terminal character set
- * \return a malloced string indicating the system charset
- *
- * Be warned that this function on many systems is in no way thread-safe
- * since it modifies global data
- */
-char* get_term_charset(void);
#endif
#include "mp_msg.h"
@@ -244,6 +237,8 @@ void mp_msg_va(int mod, int lev, const char *format, va_list va)
header = tmp[strlen(tmp)-1] == '\n' || tmp[strlen(tmp)-1] == '\r';
fprintf(stream, "%s", tmp);
+ if (mp_msg_color)
+ fprintf(stream, "\033[0m");
fflush(stream);
}