summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/getch2-win.c40
-rw-r--r--osdep/getch2.c18
-rw-r--r--osdep/getch2.h11
3 files changed, 0 insertions, 69 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c
index f1ccea6359..de886182c9 100644
--- a/osdep/getch2-win.c
+++ b/osdep/getch2-win.c
@@ -183,43 +183,3 @@ void getch2_disable(void)
if(!getch2_status) return; // already disabled / never enabled
getch2_status=0;
}
-
-#ifdef CONFIG_ICONV
-static const struct {
- unsigned cp;
- char* alias;
-} cp_alias[] = {
- { 20127, "ASCII" },
- { 20866, "KOI8-R" },
- { 21866, "KOI8-RU" },
- { 28591, "ISO-8859-1" },
- { 28592, "ISO-8859-2" },
- { 28593, "ISO-8859-3" },
- { 28594, "ISO-8859-4" },
- { 28595, "ISO-8859-5" },
- { 28596, "ISO-8859-6" },
- { 28597, "ISO-8859-7" },
- { 28598, "ISO-8859-8" },
- { 28599, "ISO-8859-9" },
- { 28605, "ISO-8859-15" },
- { 65001, "UTF-8" },
- { 0, NULL }
-};
-
-char* get_term_charset(void)
-{
- char codepage[10];
- unsigned i, cpno = GetConsoleOutputCP();
- if (!cpno)
- cpno = GetACP();
- if (!cpno)
- return NULL;
-
- for (i = 0; cp_alias[i].cp; i++)
- if (cpno == cp_alias[i].cp)
- return strdup(cp_alias[i].alias);
-
- snprintf(codepage, sizeof(codepage), "CP%u", cpno);
- return strdup(codepage);
-}
-#endif
diff --git a/osdep/getch2.c b/osdep/getch2.c
index f0aa19a2cc..cd8a198737 100644
--- a/osdep/getch2.c
+++ b/osdep/getch2.c
@@ -50,11 +50,6 @@
#endif
#endif
-#if defined(HAVE_LANGINFO) && defined(CONFIG_ICONV)
-#include <locale.h>
-#include <langinfo.h>
-#endif
-
#include <unistd.h>
#include <fcntl.h>
@@ -325,16 +320,3 @@ void getch2_disable(void){
tcsetattr(0,TCSANOW,&tio_orig);
#endif
}
-
-#ifdef CONFIG_ICONV
-char* get_term_charset(void)
-{
- char* charset = NULL;
-#ifdef HAVE_LANGINFO
- setlocale(LC_CTYPE, "");
- charset = strdup(nl_langinfo(CODESET));
- setlocale(LC_CTYPE, "C");
-#endif
- return charset;
-}
-#endif
diff --git a/osdep/getch2.h b/osdep/getch2.h
index 4442f1181d..85899b3ce3 100644
--- a/osdep/getch2.h
+++ b/osdep/getch2.h
@@ -49,17 +49,6 @@ void getch2_disable(void);
struct mp_fifo;
bool getch2(struct mp_fifo *fifo);
-#ifdef CONFIG_ICONV
-/**
- * \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
-
#if defined(__MINGW32__)
// slave cmd function for Windows
int mp_input_slave_cmd_func(int fd,char* dest,int size);