mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[dos] get System codepage under dos
This commit is contained in:
parent
3d1280fd2a
commit
064c79433d
@ -27,6 +27,9 @@
|
||||
|
||||
#include "document/options.h"
|
||||
#include "intl/charsets.h"
|
||||
#ifdef CONFIG_OS_DOS
|
||||
#include "osdep/dos/dos.h"
|
||||
#endif
|
||||
#include "util/conv.h"
|
||||
#include "util/error.h"
|
||||
#include "util/fastfind.h"
|
||||
@ -1501,7 +1504,16 @@ get_cp_index(const char *name)
|
||||
name = nl_langinfo(CODESET);
|
||||
syscp = SYSTEM_CHARSET_FLAG;
|
||||
#else
|
||||
#ifdef CONFIG_OS_DOS
|
||||
int cp = os_default_charset();
|
||||
if (cp != -1) {
|
||||
return cp | SYSTEM_CHARSET_FLAG;
|
||||
} else {
|
||||
name = "us-ascii";
|
||||
}
|
||||
#else
|
||||
name = "us-ascii";
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1582,7 +1594,16 @@ get_cp_index(const char *name)
|
||||
name = nl_langinfo(CODESET);
|
||||
syscp = SYSTEM_CHARSET_FLAG;
|
||||
#else
|
||||
#ifdef CONFIG_OS_DOS
|
||||
int cp = os_default_charset();
|
||||
if (cp != -1) {
|
||||
return cp | SYSTEM_CHARSET_FLAG;
|
||||
} else {
|
||||
name = "us-ascii";
|
||||
}
|
||||
#else
|
||||
name = "us-ascii";
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ void save_terminal(void);
|
||||
void restore_terminal(void);
|
||||
int dos_setraw(int ctl, int save);
|
||||
void os_seed_random(unsigned char **pool, int *pool_size);
|
||||
int os_default_charset(void);
|
||||
|
||||
|
||||
#ifndef DOS_OVERRIDES_SELF
|
||||
|
Loading…
x
Reference in New Issue
Block a user