Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-09-28 16:10:32 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-09-28 16:10:32 +0400
commit587b75f7bdac34df1cef09ea70b0fbd88a27ff16 (patch)
tree6db4ad437be5bb94b5205b7905f29f20729d74bf /winsup/cygwin/wchar.h
parentd856640e1c8dc008113a6865826d9459710f9857 (diff)
* fhandler.h (class dev_console): Constify charset parameter of
str_to_con. * fhandler_console.cc (dev_console::con_to_str): Simplify. Always default to the current internal locale. (dev_console::get_console_cp): Always use codepage 437 for alternate charset. (dev_console::str_to_con): Constify charset parameter. (fhandler_console::write_normal): Always use codepage 437 for alternate charset. Otherwise always default to the current internal locale. Replace ASCII SO with ASCII CAN. * strfuncs.cc: Tweka comments according to below changes. (sys_cp_wcstombs): Constify charset parameter. Convert all wchar_t values in the Unicode private use area U+F0xx to the singlebyte counterpart. Drop special handling creating ASCII SO sequence from U+DCxx value. Rearrange for performance. Replace ASCII SO with ASCII CAN. (sys_cp_mbstowcs): Constify charset parameter. Replace ASCII SO with ASCII CAN. Drop special case for U+DCxx ASCII SO sequences. Always create a replacement from the Unicode private use area U+F0xx for invalid byte values in a multibyte sequence. Do the same for wchar_t values from the U+F0xx range to make them roundtrip safe. * wchar.h (sys_cp_wcstombs): Constify charset parameter. (sys_cp_mbstowcs): Ditto.
Diffstat (limited to 'winsup/cygwin/wchar.h')
-rw-r--r--winsup/cygwin/wchar.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/wchar.h b/winsup/cygwin/wchar.h
index f989b7d11..1398238c1 100644
--- a/winsup/cygwin/wchar.h
+++ b/winsup/cygwin/wchar.h
@@ -51,7 +51,7 @@ extern mbtowc_p __set_charset_from_codepage (unsigned int cp, char *charset);
#endif
#ifdef __INSIDE_CYGWIN__
-size_t __stdcall sys_cp_wcstombs (wctomb_p, char *, char *, size_t,
+size_t __stdcall sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
const wchar_t *, size_t = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __stdcall sys_wcstombs (char *dst, size_t len, const wchar_t * src,
@@ -61,7 +61,7 @@ size_t __stdcall sys_wcstombs_alloc (char **, int, const wchar_t *,
size_t = (size_t) -1)
__attribute__ ((regparm(3)));
-size_t __stdcall sys_cp_mbstowcs (mbtowc_p, char *, wchar_t *, size_t,
+size_t __stdcall sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
const char *, size_t = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __stdcall sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src,