about summary refs log tree commit diff
path: root/locale/programs/ld-numeric.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-29 08:26:51 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-29 08:26:51 +0000
commit0d54f746e2bff98ede1626e83439789c72232ddc (patch)
tree160dcc846b1ccdaec4dd1afd5de3d39dad0a430d /locale/programs/ld-numeric.c
parentaec103d3b709db3103ef0cf54692350dbe2a5e2c (diff)
downloadglibc-0d54f746e2bff98ede1626e83439789c72232ddc.tar.gz
glibc-0d54f746e2bff98ede1626e83439789c72232ddc.tar.xz
glibc-0d54f746e2bff98ede1626e83439789c72232ddc.zip
Update.
	long string in definition.Only enable returning wide character
	strings if really needed.
Diffstat (limited to 'locale/programs/ld-numeric.c')
-rw-r--r--locale/programs/ld-numeric.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c
index ffd85d5623..37951c8442 100644
--- a/locale/programs/ld-numeric.c
+++ b/locale/programs/ld-numeric.c
@@ -59,7 +59,7 @@ numeric_startup (struct linereader *lr, struct localedef_t *locale,
   if (lr != NULL)
     {
       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,
 	      int ignore_content)
 {
+  struct repertoire_t *repertoire = NULL;
   struct locale_numeric_t *numeric;
   struct token *now;
   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.  */
   lr_ignore_rest (ldfile, 1);
 
@@ -245,7 +250,8 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
 	      break;							      \
 	    }								      \
 									      \
-	  now = lr_token (ldfile, charmap, NULL);			      \
+	  ldfile->return_widestr = 1;					      \
+	  now = lr_token (ldfile, charmap, repertoire);			      \
 	  if (now->tok != tok_string)					      \
 	    goto err_label;						      \
 	  if (numeric->cat != NULL)					      \
@@ -270,6 +276,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
 	      if (now->val.str.startwc != NULL)				      \
 		numeric->cat##_wc = *now->val.str.startwc;		      \
 	    }								      \
+	  ldfile->return_widestr = 0;					      \
 	  break
 
 	  STR_ELEM (decimal_point);