summaryrefslogtreecommitdiffstats
path: root/mp_msg.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-31 13:00:51 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-31 13:00:51 +0000
commit71fefd86ac7e2328ad11a8a3a49452a2e65b186b (patch)
treee0020c9481e406e4e4f0db4c9809c820ebe954a0 /mp_msg.c
parent960285ea46a70897c3baa4f0f6a33893caacbb16 (diff)
downloadmpv-71fefd86ac7e2328ad11a8a3a49452a2e65b186b.tar.bz2
mpv-71fefd86ac7e2328ad11a8a3a49452a2e65b186b.tar.xz
Use a malloced string for the get_term_charset return value.
This is necessary at least on POSIX systems since the buffer returned by nl_langinfo may change its contents with e.g. each setlocale call. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29332 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp_msg.c')
-rw-r--r--mp_msg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mp_msg.c b/mp_msg.c
index e43ca17d37..85e792408d 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -8,6 +8,13 @@
#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