mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 16:21:06 +00:00
Update.
long string in definition.Only enable returning wide character strings if really needed.
This commit is contained in:
parent
aec103d3b7
commit
0d54f746e2
@ -1,7 +1,8 @@
|
|||||||
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* locale/programs/ld-monetary.c (STR_ELEM_WC): Fix test for too
|
* locale/programs/ld-monetary.c (STR_ELEM_WC): Fix test for too
|
||||||
long string in definition.
|
long string in definition.Only enable returning wide character
|
||||||
|
strings if really needed.
|
||||||
* locale/programs/ld-numeric.c (STR_ELEM): Likewise.
|
* locale/programs/ld-numeric.c (STR_ELEM): Likewise.
|
||||||
|
|
||||||
* configure.in: Add check for recent enough sed version.
|
* configure.in: Add check for recent enough sed version.
|
||||||
|
@ -152,7 +152,7 @@ monetary_startup (struct linereader *lr, struct localedef_t *locale,
|
|||||||
if (lr != NULL)
|
if (lr != NULL)
|
||||||
{
|
{
|
||||||
lr->translate_strings = 1;
|
lr->translate_strings = 1;
|
||||||
lr->return_widestr = 1;
|
lr->return_widestr = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,10 +609,15 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
struct charmap_t *charmap, const char *repertoire_name,
|
struct charmap_t *charmap, const char *repertoire_name,
|
||||||
int ignore_content)
|
int ignore_content)
|
||||||
{
|
{
|
||||||
|
struct repertoire_t *repertoire = NULL;
|
||||||
struct locale_monetary_t *monetary;
|
struct locale_monetary_t *monetary;
|
||||||
struct token *now;
|
struct token *now;
|
||||||
enum token_t nowtok;
|
enum token_t nowtok;
|
||||||
|
|
||||||
|
/* Get the repertoire we have to use. */
|
||||||
|
if (repertoire_name != NULL)
|
||||||
|
repertoire = repertoire_read (repertoire_name);
|
||||||
|
|
||||||
/* The rest of the line containing `LC_MONETARY' must be free. */
|
/* The rest of the line containing `LC_MONETARY' must be free. */
|
||||||
lr_ignore_rest (ldfile, 1);
|
lr_ignore_rest (ldfile, 1);
|
||||||
|
|
||||||
@ -695,7 +700,8 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
now = lr_token (ldfile, charmap, NULL); \
|
ldfile->return_widestr = 1; \
|
||||||
|
now = lr_token (ldfile, charmap, repertoire); \
|
||||||
if (now->tok != tok_string) \
|
if (now->tok != tok_string) \
|
||||||
goto err_label; \
|
goto err_label; \
|
||||||
if (monetary->cat != NULL) \
|
if (monetary->cat != NULL) \
|
||||||
@ -720,6 +726,7 @@ monetary_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
if (now->val.str.startwc != NULL) \
|
if (now->val.str.startwc != NULL) \
|
||||||
monetary->cat##_wc = *now->val.str.startwc; \
|
monetary->cat##_wc = *now->val.str.startwc; \
|
||||||
} \
|
} \
|
||||||
|
ldfile->return_widestr = 0; \
|
||||||
break
|
break
|
||||||
|
|
||||||
STR_ELEM_WC (mon_decimal_point);
|
STR_ELEM_WC (mon_decimal_point);
|
||||||
|
@ -59,7 +59,7 @@ numeric_startup (struct linereader *lr, struct localedef_t *locale,
|
|||||||
if (lr != NULL)
|
if (lr != NULL)
|
||||||
{
|
{
|
||||||
lr->translate_strings = 1;
|
lr->translate_strings = 1;
|
||||||
lr->return_widestr = 1;
|
lr->return_widestr = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,10 +192,15 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
struct charmap_t *charmap, const char *repertoire_name,
|
struct charmap_t *charmap, const char *repertoire_name,
|
||||||
int ignore_content)
|
int ignore_content)
|
||||||
{
|
{
|
||||||
|
struct repertoire_t *repertoire = NULL;
|
||||||
struct locale_numeric_t *numeric;
|
struct locale_numeric_t *numeric;
|
||||||
struct token *now;
|
struct token *now;
|
||||||
enum token_t nowtok;
|
enum token_t nowtok;
|
||||||
|
|
||||||
|
/* Get the repertoire we have to use. */
|
||||||
|
if (repertoire_name != NULL)
|
||||||
|
repertoire = repertoire_read (repertoire_name);
|
||||||
|
|
||||||
/* The rest of the line containing `LC_NUMERIC' must be free. */
|
/* The rest of the line containing `LC_NUMERIC' must be free. */
|
||||||
lr_ignore_rest (ldfile, 1);
|
lr_ignore_rest (ldfile, 1);
|
||||||
|
|
||||||
@ -245,7 +250,8 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
now = lr_token (ldfile, charmap, NULL); \
|
ldfile->return_widestr = 1; \
|
||||||
|
now = lr_token (ldfile, charmap, repertoire); \
|
||||||
if (now->tok != tok_string) \
|
if (now->tok != tok_string) \
|
||||||
goto err_label; \
|
goto err_label; \
|
||||||
if (numeric->cat != NULL) \
|
if (numeric->cat != NULL) \
|
||||||
@ -270,6 +276,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
if (now->val.str.startwc != NULL) \
|
if (now->val.str.startwc != NULL) \
|
||||||
numeric->cat##_wc = *now->val.str.startwc; \
|
numeric->cat##_wc = *now->val.str.startwc; \
|
||||||
} \
|
} \
|
||||||
|
ldfile->return_widestr = 0; \
|
||||||
break
|
break
|
||||||
|
|
||||||
STR_ELEM (decimal_point);
|
STR_ELEM (decimal_point);
|
||||||
|
Loading…
Reference in New Issue
Block a user