mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-23 13:09:58 +08:00
Update.
* locale/programs/locale.c (print_item): Fix one more problem with string lists. Patch by Chen Xiangyang <chenxy@opencjk.org>. * locale/categories.def: Add number of arguments to ctype-map-names and ctype-class-names entries. Mark era as stringlist.
This commit is contained in:
parent
b0b21dc10b
commit
7535b2d92d
@ -1,5 +1,11 @@
|
|||||||
2000-10-31 Ulrich Drepper <drepper@redhat.com>
|
2000-10-31 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* locale/programs/locale.c (print_item): Fix one more problem with
|
||||||
|
string lists. Patch by Chen Xiangyang <chenxy@opencjk.org>.
|
||||||
|
|
||||||
|
* locale/categories.def: Add number of arguments to ctype-map-names
|
||||||
|
and ctype-class-names entries. Mark era as stringlist.
|
||||||
|
|
||||||
* iconvdata/Makefile (modules): Add IBM856, IBM930, IBM933, IBM935,
|
* iconvdata/Makefile (modules): Add IBM856, IBM930, IBM933, IBM935,
|
||||||
IBM937, IBM939, and IBM1046.
|
IBM937, IBM939, and IBM1046.
|
||||||
(distribute): Add ibm856.c, ibm930.c, ibm933.c, ibm935.c, ibm937.c,
|
(distribute): Add ibm856.c, ibm930.c, ibm933.c, ibm935.c, ibm937.c,
|
||||||
|
@ -71,8 +71,8 @@ DEFINE_CATEGORY
|
|||||||
DEFINE_ELEMENT (_NL_CTYPE_TOUPPER, "ctype-toupper", std, wstring)
|
DEFINE_ELEMENT (_NL_CTYPE_TOUPPER, "ctype-toupper", std, wstring)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_TOLOWER, "ctype-tolower", std, wstring)
|
DEFINE_ELEMENT (_NL_CTYPE_TOLOWER, "ctype-tolower", std, wstring)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_CLASS32, "ctype-class32", std, wstring)
|
DEFINE_ELEMENT (_NL_CTYPE_CLASS32, "ctype-class32", std, wstring)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_CLASS_NAMES, "ctype-class-names", std, stringlist)
|
DEFINE_ELEMENT (_NL_CTYPE_CLASS_NAMES, "ctype-class-names", std, stringlist, 10, 32)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_MAP_NAMES, "ctype-map-names", std, stringlist)
|
DEFINE_ELEMENT (_NL_CTYPE_MAP_NAMES, "ctype-map-names", std, stringlist, 2, 32)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_WIDTH, "ctype-width", std, bytearray)
|
DEFINE_ELEMENT (_NL_CTYPE_WIDTH, "ctype-width", std, bytearray)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_MB_CUR_MAX, "ctype-mb-cur-max", std, word)
|
DEFINE_ELEMENT (_NL_CTYPE_MB_CUR_MAX, "ctype-mb-cur-max", std, word)
|
||||||
DEFINE_ELEMENT (_NL_CTYPE_CODESET_NAME, "charmap", std, string)
|
DEFINE_ELEMENT (_NL_CTYPE_CODESET_NAME, "charmap", std, string)
|
||||||
@ -211,7 +211,7 @@ DEFINE_CATEGORY
|
|||||||
DEFINE_ELEMENT (D_FMT, "d_fmt", std, string)
|
DEFINE_ELEMENT (D_FMT, "d_fmt", std, string)
|
||||||
DEFINE_ELEMENT (T_FMT, "t_fmt", std, string)
|
DEFINE_ELEMENT (T_FMT, "t_fmt", std, string)
|
||||||
DEFINE_ELEMENT (T_FMT_AMPM, "t_fmt_ampm", std, string)
|
DEFINE_ELEMENT (T_FMT_AMPM, "t_fmt_ampm", std, string)
|
||||||
DEFINE_ELEMENT (ERA, "era", opt, stringarray)
|
DEFINE_ELEMENT (ERA, "era", opt, stringlist, 0, 100)
|
||||||
DEFINE_ELEMENT (ERA_YEAR, "era_year", opt, string)
|
DEFINE_ELEMENT (ERA_YEAR, "era_year", opt, string)
|
||||||
DEFINE_ELEMENT (ERA_D_FMT, "era_d_fmt", opt, string)
|
DEFINE_ELEMENT (ERA_D_FMT, "era_d_fmt", opt, string)
|
||||||
DEFINE_ELEMENT (ALT_DIGITS, "alt_digits", opt, stringlist, 100, 100)
|
DEFINE_ELEMENT (ALT_DIGITS, "alt_digits", opt, stringlist, 100, 100)
|
||||||
|
@ -524,25 +524,6 @@ show_locale_vars (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Some of the "string" we print contain non-printable characters. We
|
|
||||||
encode them here. */
|
|
||||||
static void
|
|
||||||
print_escaped (const char *string)
|
|
||||||
{
|
|
||||||
const unsigned char *ch;
|
|
||||||
|
|
||||||
ch = string;
|
|
||||||
while ('\0' != *ch)
|
|
||||||
{
|
|
||||||
if (isprint (*ch))
|
|
||||||
putchar (*ch);
|
|
||||||
else
|
|
||||||
printf("<0x%02x>", *ch);
|
|
||||||
++ch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Show the information request for NAME. */
|
/* Show the information request for NAME. */
|
||||||
static void
|
static void
|
||||||
show_info (const char *name)
|
show_info (const char *name)
|
||||||
@ -556,7 +537,7 @@ show_info (const char *name)
|
|||||||
case string:
|
case string:
|
||||||
if (show_keyword_name)
|
if (show_keyword_name)
|
||||||
printf ("%s=\"", item->name);
|
printf ("%s=\"", item->name);
|
||||||
print_escaped (nl_langinfo (item->item_id) ? : "");
|
fputs (nl_langinfo (item->item_id) ? : "", stdout);
|
||||||
if (show_keyword_name)
|
if (show_keyword_name)
|
||||||
putchar ('"');
|
putchar ('"');
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
@ -573,13 +554,13 @@ show_info (const char *name)
|
|||||||
{
|
{
|
||||||
val = nl_langinfo (item->item_id + cnt);
|
val = nl_langinfo (item->item_id + cnt);
|
||||||
if (val != NULL)
|
if (val != NULL)
|
||||||
print_escaped (val);
|
fputs (val, stdout);
|
||||||
putchar (';');
|
putchar (';');
|
||||||
}
|
}
|
||||||
|
|
||||||
val = nl_langinfo (item->item_id + cnt);
|
val = nl_langinfo (item->item_id + cnt);
|
||||||
if (val != NULL)
|
if (val != NULL)
|
||||||
print_escaped (val);
|
fputs (val, stdout);
|
||||||
|
|
||||||
if (show_keyword_name)
|
if (show_keyword_name)
|
||||||
putchar ('"');
|
putchar ('"');
|
||||||
@ -590,11 +571,12 @@ show_info (const char *name)
|
|||||||
{
|
{
|
||||||
int first = 1;
|
int first = 1;
|
||||||
const char *val = nl_langinfo (item->item_id) ? : "";
|
const char *val = nl_langinfo (item->item_id) ? : "";
|
||||||
|
int cnt;
|
||||||
|
|
||||||
if (show_keyword_name)
|
if (show_keyword_name)
|
||||||
printf ("%s=", item->name);
|
printf ("%s=", item->name);
|
||||||
|
|
||||||
while (*val != '\0')
|
for (cnt = 0; cnt < item->max && *val != '\0'; ++cnt)
|
||||||
{
|
{
|
||||||
printf ("%s%s%s%s", first ? "" : ";",
|
printf ("%s%s%s%s", first ? "" : ";",
|
||||||
show_keyword_name ? "\"" : "", val,
|
show_keyword_name ? "\"" : "", val,
|
||||||
|
Loading…
Reference in New Issue
Block a user