mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Update.
* locale/programs/ld-ctype.c (ctype_output): Correct computation of nelems. Correctly compute index for additional character classes. (ctype_read): Handle charclass and charconv definitions. Also recognize arbitrary strings as mapping names. * locale/programs/ld-time.c (time_finish): Correctly skip over wide character era strings. * locale/lc-time.c (_nl_get_era_entry): Correctly skip era name and format for wide characters. * time/strftime.c: Correctly determine era information for wide wcsftime. * wctrans.c: Fix after removal of second endianess table. * wctype/wctype.h (_ISwbit): Correctly handle bits > 16. Patches by Shinya Hanataka <hanataka@abyss.rim.or.jp>. * wcsmbs/wcwidth.h (internal_wcwidth): Reject non-printable characters.
This commit is contained in:
@@ -834,11 +834,15 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
if (era)
|
||||
{
|
||||
# ifdef COMPILE_WIDE
|
||||
/* The wide name is after the single byte name and
|
||||
/* The wide name is after the multi byte name and
|
||||
format. */
|
||||
wchar_t *ws;
|
||||
size_t len;
|
||||
char *tcp = strchr (era->name_fmt, '\0') + 1;
|
||||
wchar_t *ws = (wchar_t *) (strchr (tcp, '\0') + 1);
|
||||
size_t len = wcslen (ws);
|
||||
tcp = strchr (tcp, '\0') + 1;
|
||||
tcp += 3 - (((tcp - era->name_fmt) + 3) & 3);
|
||||
ws = (wchar_t *) tcp;
|
||||
len = wcslen (ws);
|
||||
cpy (len, ws);
|
||||
# else
|
||||
size_t len = strlen (era->name_fmt);
|
||||
@@ -1195,10 +1199,12 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
if (era)
|
||||
{
|
||||
# ifdef COMPILE_WIDE
|
||||
/* The wide name is after the single byte name and
|
||||
/* The wide name is after the multi byte name and
|
||||
format. */
|
||||
char *tcp = strchr (era->name_fmt, '\0') + 1;
|
||||
subfmt = (wchar_t *) (strchr (tcp, '\0') + 1);
|
||||
tcp = strchr (tcp, '\0') + 1;
|
||||
tcp += 3 - (((tcp - era->name_fmt) + 3) & 3);
|
||||
subfmt = (wchar_t *) tcp;
|
||||
subfmt = wcschr (subfmt, L'\0') + 1;
|
||||
# else
|
||||
subfmt = strchr (era->name_fmt, '\0') + 1;
|
||||
|
Reference in New Issue
Block a user