diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-01-24 15:29:49 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-01-24 15:29:49 +0300 |
commit | 57c7e05ea70448bbfe5685871bc047494cb60e8a (patch) | |
tree | 7b978cf53921cd1f18f77361e9370438d6d7ac47 /winsup/cygwin/strfuncs.cc | |
parent | 88116ad22eab8c3b4987949e5f94040834ad1833 (diff) |
* nlsfuncs.cc (check_codepage): Move from syscalls.cc here.
(internal_setlocale): Ditto.
(initial_setlocale): Ditto.
(setlocale): Ditto.
* strfuncs.cc (__sjis_wctomb): Revert previous patch.
(__sjis_mbtowc): Ditto.
* syscalls.cc: Move setlocale-related functions to nlsfuncs.cc.
Diffstat (limited to 'winsup/cygwin/strfuncs.cc')
-rw-r--r-- | winsup/cygwin/strfuncs.cc | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc index 181cdb25b..6d9f4a232 100644 --- a/winsup/cygwin/strfuncs.cc +++ b/winsup/cygwin/strfuncs.cc @@ -108,23 +108,6 @@ extern "C" int __sjis_wctomb (struct _reent *r, char *s, wchar_t wchar, const char *charset, mbstate_t *state) { - if (*charset == 'S') - { - /* SJIS is not exactly CP932. Two ASCII code points are converted - differently. */ - if (wchar == L'\x00a5') /* SJIS has Yen sign in place of Backslash */ - { - if (s) - *s = '\x5c'; - return 1; - } - else if (wchar == L'\x203e') /* SJIS has Overline in place of Tilde */ - { - if (s) - *s = '\x7e'; - return 1; - } - } return __db_wctomb (r,s, wchar, 932); } @@ -252,17 +235,7 @@ extern "C" int __sjis_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, const char *charset, mbstate_t *state) { - int ret = __db_mbtowc (r, pwc, s, n, 932, state); - if (*charset == 'S' && pwc && ret == 1) - { - /* CP932 is not exactly SJIS. Two ASCII code points are converted - differently. */ - if (*s == '\x5c') /* SJIS has Yen sign in place of Backslash */ - *pwc = L'\x00a5'; - else if (*s == '\x7e') /* SJIS has Overline in place of Tilde */ - *pwc = L'\x203e'; - } - return ret; + return __db_mbtowc (r, pwc, s, n, 932, state); } extern "C" int |