This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Correct formatting of internatinal currency (third try)


[Ulrich Drepper]
> The code looks good.  If you send the changed test results and the
> extra tests (in one patch is OK) I'll apply it.

Here is an updated patch.

I noticed that this comment from you seem to be wrong:

> The international value for most fields is always defined.  The only
> exception is int_frac_digits.  And here the value -1 is used (not
> CHAR_MAX) and it has a legitimate meaning.

If I compare against -1 instead of CHAR_MAX, the C locale do not use 2
fraction digits as I expect it to.  If I change it to CHAR_MAX, it
behaves as expected.  If this is wrong, it is wrong in more then one
spot.

Anyway, here is what I believe is the complete patch to correct
strfmon(), add tests to check it, and correct the locales of the
failing tests now that the implementation is more correct.  I hope I
didn't forget anything.

I'll submit the POSIX tests later, when I know more about why some of
them fail.  I'll also submit patches to correct the international
currency formatting of the locales where it now is possible to
represent the correct configuration.

(toplevel Changelog)

2003-11-30  Petter Reinholdtsen  <pere@hungry.com>

	* stdlib/strfmon.c: Correct formatting of international currency
	values.  The international currency formatting should prefer the
	int_* values if they are set for a locale, and use the domestic
	values if the int_* values are unset.

(localedata Changelog)

2003-11-30  Petter Reinholdtsen  <pere@hungry.com>

	* tst-fmon.sh tst-fmon.data: Allow quotes around the result
	string, to make it easier to see important whitespace.

	* tst-fmon.sh tst-fmon.c: Clean up output, making sure both
	programs use the same capitalization and output order.

	* tst-fmon.data: Add test for international currency formatting.
	* tst-fmon.sh: Likewise.
	* Makefile: Likewise.
	* tst-fmon-locales/int_tstfmon_n01y12: New file.
	* tst-fmon-locales/int_tstfmon_n02n40: New file.
	* tst-fmon-locales/int_tstfmon_n10y31: New file.
	* tst-fmon-locales/int_tstfmon_n11y41: New file.
	* tst-fmon-locales/int_tstfmon_n12y11: New file.
	* tst-fmon-locales/int_tstfmon_n20n32: New file.
	* tst-fmon-locales/int_tstfmon_n30y20: New file.
	* tst-fmon-locales/int_tstfmon_n41n00: New file.
	* tst-fmon-locales/int_tstfmon_y01y10: New file.
	* tst-fmon-locales/int_tstfmon_y02n22: New file.
	* tst-fmon-locales/int_tstfmon_y22n42: New file.
	* tst-fmon-locales/int_tstfmon_y30y21: New file.
	* tst-fmon-locales/int_tstfmon_y32n31: New file.
	* tst-fmon-locales/int_tstfmon_y40y00: New file.
	* tst-fmon-locales/int_tstfmon_y42n21: New file.

	* locales/en_US: Correct spacing for international
	currency formatting, now that strfmon() works better.

	* locales/ja_JP: Correct currency position and
	spacing now that strfmon() work better.

Index: stdlib/strfmon.c
===================================================================
RCS file: /cvs/glibc/libc/stdlib/strfmon.c,v
retrieving revision 1.23
diff -u -3 -p -u -r1.23 strfmon.c
--- stdlib/strfmon.c	3 Aug 2002 06:29:57 -0000	1.23
+++ stdlib/strfmon.c	30 Nov 2003 18:17:29 -0000
@@ -128,6 +128,7 @@ __strfmon_l (char *s, size_t maxsize, __
 	__long_double_t ldbl;
       }
       fpnum;
+      int int_format;
       int print_curr_symbol;
       int left_prec;
       int left_pad;
@@ -172,6 +173,7 @@ __strfmon_l (char *s, size_t maxsize, __
 	}
 
       /* Defaults for formatting.  */
+      int_format = 0;			/* Use international curr. symbol */
       print_curr_symbol = 1;		/* Print the currency symbol.  */
       left_prec = -1;			/* No left precision specified.  */
       right_prec = -1;			/* No right precision specified.  */
@@ -233,13 +235,6 @@ __strfmon_l (char *s, size_t maxsize, __
 	  break;
 	}
 
-      /* If not specified by the format string now find the values for
-	 the format specification.  */
-      if (p_sign_posn == -1)
-	p_sign_posn = *_NL_CURRENT (LC_MONETARY, P_SIGN_POSN);
-      if (n_sign_posn == -1)
-	n_sign_posn = *_NL_CURRENT (LC_MONETARY, N_SIGN_POSN);
-
       if (isdigit (*fmt))
 	{
 	  /* Parse field width.  */
@@ -307,29 +302,25 @@ __strfmon_l (char *s, size_t maxsize, __
       /* Handle format specifier.  */
       switch (*fmt++)
 	{
-	case 'i':		/* Use international currency symbol.  */
-	  currency_symbol = _NL_CURRENT (LC_MONETARY, INT_CURR_SYMBOL);
+	case 'i': {		/* Use international currency symbol.  */
+	  const char *int_curr_symbol;
+	  static char symbol[4];
+
+	  int_curr_symbol = _NL_CURRENT (LC_MONETARY, INT_CURR_SYMBOL);
+	  strncpy(symbol, int_curr_symbol, 3);
+	  symbol[3] = '\0';
+
 	  currency_symbol_len = 3;
-	  space_char = currency_symbol[3];
-	  if (right_prec == -1)
-	    {
-	      if (*_NL_CURRENT (LC_MONETARY, INT_FRAC_DIGITS) == CHAR_MAX)
-		right_prec = 2;
-	      else
-		right_prec = *_NL_CURRENT (LC_MONETARY, INT_FRAC_DIGITS);
-	    }
+	  currency_symbol = &symbol[0];
+	  space_char = int_curr_symbol[3];
+	  int_format = 1;
 	  break;
+	}
 	case 'n':		/* Use national currency symbol.  */
 	  currency_symbol = _NL_CURRENT (LC_MONETARY, CURRENCY_SYMBOL);
 	  currency_symbol_len = strlen (currency_symbol);
 	  space_char = ' ';
-	  if (right_prec == -1)
-	    {
-	      if (*_NL_CURRENT (LC_MONETARY, FRAC_DIGITS) == CHAR_MAX)
-		right_prec = 2;
-	      else
-		right_prec = *_NL_CURRENT (LC_MONETARY, FRAC_DIGITS);
-	    }
+	  int_format = 0;
 	  break;
 	default:		/* Any unrecognized format is an error.  */
 	  __set_errno (EINVAL);
@@ -337,6 +328,24 @@ __strfmon_l (char *s, size_t maxsize, __
 	  return -1;
 	}
 
+      /* If not specified by the format string now find the values for
+	 the format specification.  */
+      if (p_sign_posn == -1)
+	p_sign_posn = *_NL_CURRENT (LC_MONETARY, int_format ? INT_P_SIGN_POSN : P_SIGN_POSN);
+      if (n_sign_posn == -1)
+	n_sign_posn = *_NL_CURRENT (LC_MONETARY, int_format ? INT_N_SIGN_POSN : N_SIGN_POSN);
+
+      if (right_prec == -1)
+	{
+	  right_prec = *_NL_CURRENT (LC_MONETARY, int_format ? INT_FRAC_DIGITS : FRAC_DIGITS);
+
+	  /* XXX Hm, is this test supposed to compare against -1?  It
+	     did not work with the C locale, the value used very high
+	     instead. */
+	  if (right_prec == CHAR_MAX)
+	    right_prec = 2;
+	}
+
       /* If we have to print the digits grouped determine how many
 	 extra characters this means.  */
       if (group && left_prec != -1)
@@ -369,27 +378,27 @@ __strfmon_l (char *s, size_t maxsize, __
 	     negative sign we use a '-'.  */
 	  if (*sign_string == '\0')
 	    sign_string = (const char *) "-";
-	  cs_precedes = *_NL_CURRENT (LC_MONETARY, N_CS_PRECEDES);
-	  sep_by_space = *_NL_CURRENT (LC_MONETARY, N_SEP_BY_SPACE);
+	  cs_precedes = *_NL_CURRENT (LC_MONETARY, int_format ? INT_N_CS_PRECEDES : N_CS_PRECEDES);
+	  sep_by_space = *_NL_CURRENT (LC_MONETARY, int_format ? INT_N_SEP_BY_SPACE : N_SEP_BY_SPACE);
 	  sign_posn = n_sign_posn;
 
 	  other_sign_string = _NL_CURRENT (LC_MONETARY, POSITIVE_SIGN);
-	  other_cs_precedes = *_NL_CURRENT (LC_MONETARY, P_CS_PRECEDES);
-	  other_sep_by_space = *_NL_CURRENT (LC_MONETARY, P_SEP_BY_SPACE);
+	  other_cs_precedes = *_NL_CURRENT (LC_MONETARY, int_format ? INT_P_CS_PRECEDES : P_CS_PRECEDES);
+	  other_sep_by_space = *_NL_CURRENT (LC_MONETARY, int_format ? INT_P_SEP_BY_SPACE : P_SEP_BY_SPACE);
 	  other_sign_posn = p_sign_posn;
 	}
       else
 	{
 	  sign_string = _NL_CURRENT (LC_MONETARY, POSITIVE_SIGN);
-	  cs_precedes = *_NL_CURRENT (LC_MONETARY, P_CS_PRECEDES);
-	  sep_by_space = *_NL_CURRENT (LC_MONETARY, P_SEP_BY_SPACE);
+	  cs_precedes = *_NL_CURRENT (LC_MONETARY, int_format ? INT_P_CS_PRECEDES : P_CS_PRECEDES);
+	  sep_by_space = *_NL_CURRENT (LC_MONETARY, int_format ? INT_P_SEP_BY_SPACE : P_SEP_BY_SPACE);
 	  sign_posn = p_sign_posn;
 
 	  other_sign_string = _NL_CURRENT (LC_MONETARY, NEGATIVE_SIGN);
 	  if (*other_sign_string == '\0')
 	    other_sign_string = (const char *) "-";
-	  other_cs_precedes = *_NL_CURRENT (LC_MONETARY, N_CS_PRECEDES);
-	  other_sep_by_space = *_NL_CURRENT (LC_MONETARY, N_SEP_BY_SPACE);
+	  other_cs_precedes = *_NL_CURRENT (LC_MONETARY, int_format ? INT_N_CS_PRECEDES : N_CS_PRECEDES);
+	  other_sep_by_space = *_NL_CURRENT (LC_MONETARY, int_format ? INT_N_SEP_BY_SPACE : N_SEP_BY_SPACE);
 	  other_sign_posn = n_sign_posn;
 	}
 
Index: localedata/Makefile
===================================================================
RCS file: /cvs/glibc/libc/localedata/Makefile,v
retrieving revision 1.100
diff -u -3 -p -u -r1.100 Makefile
--- localedata/Makefile	20 Nov 2003 23:31:38 -0000	1.100
+++ localedata/Makefile	30 Nov 2003 18:17:29 -0000
@@ -58,6 +58,7 @@ generated := $(test-input) $(test-output
 	     tst-mbswcs.out tst-leaks.mtrace mtrace-tst-leaks
 generated-dirs := $(ld-test-names) tt_TT de_DE.437			\
 		  $(addprefix tstfmon_,$(fmon-tests))			\
+		  $(addprefix int_tstfmon_,$(fmon-tests))		\
 
 distribute := CHECKSUMS README SUPPORTED ChangeLog			\
 	      $(charmaps) $(locales)					\
@@ -68,6 +69,7 @@ distribute := CHECKSUMS README SUPPORTED
 	      tst-numeric.sh tst-numeric.data				\
 	      $(wildcard tests-mbwc/*.[ch])				\
 	      $(addprefix tst-fmon-locales/tstfmon_,$(fmon-tests))	\
+	      $(addprefix tst-fmon-locales/int_tstfmon_,$(fmon-tests))	\
 	      gen-locale.sh show-ucs-data.c tst-langinfo.sh		\
 	      tst-wctype.sh tst-wctype.input gen-unicode-ctype.c	\
 	      dump-ctype.c
Index: localedata/tst-fmon.c
===================================================================
RCS file: /cvs/glibc/libc/localedata/tst-fmon.c,v
retrieving revision 1.7
diff -u -3 -p -u -r1.7 tst-fmon.c
--- localedata/tst-fmon.c	16 Jun 2003 07:24:46 -0000	1.7
+++ localedata/tst-fmon.c	30 Nov 2003 18:17:29 -0000
@@ -58,8 +58,8 @@ main (int argc, char *argv[])
   if (strcmp (s, argv[4]) != 0)
     {
       printf ("\
-locale: \"%s\", format: \"%s\", expected: \"%s\", got: \"%s\" => %s\n",
-	      argv[1], argv[2], argv[4], s,
+Locale: \"%s\" Format: \"%s\" Value: \"%s\" Recieved: \"%s\" Expected: \"%s\" => %s\n",
+	      argv[1], argv[2], argv[3], s, argv[4],
 	      strcmp (s, argv[4]) != 0 ? "false" : "correct");
       exit (EXIT_FAILURE);
     }
Index: localedata/tst-fmon.data
===================================================================
RCS file: /cvs/glibc/libc/localedata/tst-fmon.data,v
retrieving revision 1.10
diff -u -3 -p -u -r1.10 tst-fmon.data
--- localedata/tst-fmon.data	1 Mar 2002 05:20:48 -0000	1.10
+++ localedata/tst-fmon.data	30 Nov 2003 18:17:29 -0000
@@ -28,6 +28,8 @@
 # #2    format string which is fed into strfmon
 # #3    double value that is used for formatting
 # #4    the expected result (may contain trailing spaces!)
+#       This field might be enclosed with "" to make it easier to see
+#       the white space
 #
 # First the implementation without any locale-dependent data
 # - no currency symbol is printed, formatting is somewhat standard
@@ -236,3 +238,113 @@ tstfmon_y42n21		%11n	123.45		  $ +123.45
 tstfmon_y42n21		%11n	-123.45		  123.45 $-
 tstfmon_y42n21		%^=*#5n	123.45		$ +**123.45
 tstfmon_y42n21		%^=*#5n	-123.45		   **123.45 $-
+#
+# check all int_cs_precedes/int_sign_posn/int_sep_by_space
+# combinations using special test locales.  The six characters after
+# the "_" indicate these three values for positive and then negative
+# quantities.
+#
+int_tstfmon_n01y12	%i	123.45		"123.45 USC"
+int_tstfmon_n01y12	%i	-123.45		"- USC123.45"
+int_tstfmon_n01y12	%13i	123.45		"   123.45 USC"
+int_tstfmon_n01y12	%13i	-123.45		"  - USC123.45"
+int_tstfmon_n01y12	%^=*#5i	123.45		"     **123.45 USC"
+int_tstfmon_n01y12	%^=*#5i	-123.45		"- USC**123.45"
+#
+int_tstfmon_n02n40	%i	123.45		"123.45USC"
+int_tstfmon_n02n40	%i	-123.45		"123.45USC-"
+int_tstfmon_n02n40	%13i	123.45		"    123.45USC"
+int_tstfmon_n02n40	%13i	-123.45		"   123.45USC-"
+int_tstfmon_n02n40	%^=*#5i	123.45		"**123.45USC"
+int_tstfmon_n02n40	%^=*#5i	-123.45		"**123.45USC-"
+#
+int_tstfmon_n10y31	%i	123.45		"+123.45USC"
+int_tstfmon_n10y31	%i	-123.45		"-USC 123.45"
+int_tstfmon_n10y31	%13i	123.45		"   +123.45USC"
+int_tstfmon_n10y31	%13i	-123.45		"  -USC 123.45"
+int_tstfmon_n10y31	%^=*#5i	123.45		"    +**123.45USC"
+int_tstfmon_n10y31	%^=*#5i	-123.45		"-USC **123.45"
+#
+int_tstfmon_n11y41	%i	123.45		"+123.45 USC"
+int_tstfmon_n11y41	%i	-123.45		"USC- 123.45"
+int_tstfmon_n11y41	%13i	123.45		"  +123.45 USC"
+int_tstfmon_n11y41	%13i	-123.45		"  USC- 123.45"
+int_tstfmon_n11y41	%^=*#5i	123.45		"    +**123.45 USC"
+int_tstfmon_n11y41	%^=*#5i	-123.45		"USC- **123.45"
+#
+int_tstfmon_n12y11	%i	123.45		"+123.45USC"
+int_tstfmon_n12y11	%i	-123.45		"-USC 123.45"
+int_tstfmon_n12y11	%13i	123.45		"   +123.45USC"
+int_tstfmon_n12y11	%13i	-123.45		"  -USC 123.45"
+int_tstfmon_n12y11	%^=*#5i	123.45		"    +**123.45USC"
+int_tstfmon_n12y11	%^=*#5i	-123.45		"-USC **123.45"
+#
+int_tstfmon_n20n32	%i	123.45		"123.45USC+"
+int_tstfmon_n20n32	%i	-123.45		"123.45- USC"
+int_tstfmon_n20n32	%13i	123.45		"   123.45USC+"
+int_tstfmon_n20n32	%13i	-123.45		"  123.45- USC"
+int_tstfmon_n20n32	%^=*#5i	123.45		"**123.45USC+"
+int_tstfmon_n20n32	%^=*#5i	-123.45		"**123.45- USC"
+#
+int_tstfmon_n30y20	%i	123.45		"123.45+USC"
+int_tstfmon_n30y20	%i	-123.45		"USC123.45-"
+int_tstfmon_n30y20	%13i	123.45		"   123.45+USC"
+int_tstfmon_n30y20	%13i	-123.45		"   USC123.45-"
+int_tstfmon_n30y20	%^=*#5i	123.45		"   **123.45+USC"
+int_tstfmon_n30y20	%^=*#5i	-123.45		"USC**123.45-"
+#
+int_tstfmon_n41n00	%i	123.45		"123.45 USC+"
+int_tstfmon_n41n00	%i	-123.45		"(123.45USC)"
+int_tstfmon_n41n00	%13i	123.45		"  123.45 USC+"
+int_tstfmon_n41n00	%13i	-123.45		"  (123.45USC)"
+int_tstfmon_n41n00	%^=*#5i	123.45		" **123.45 USC+"
+int_tstfmon_n41n00	%^=*#5i	-123.45		"(**123.45USC)"
+#
+int_tstfmon_y01y10	%i	123.45		"USC 123.45"
+int_tstfmon_y01y10	%i	-123.45		"-USC123.45"
+int_tstfmon_y01y10	%13i	123.45		"   USC 123.45"
+int_tstfmon_y01y10	%13i	-123.45		"   -USC123.45"
+int_tstfmon_y01y10	%^=*#5i	123.45		"USC **123.45"
+int_tstfmon_y01y10	%^=*#5i	-123.45		"-USC**123.45"
+#
+int_tstfmon_y02n22	%i	123.45		"USC123.45"
+int_tstfmon_y02n22	%i	-123.45		"123.45USC O/D"
+int_tstfmon_y02n22	%12i	123.45		"   USC123.45"
+int_tstfmon_y02n22	%12i	-123.45		"123.45USC O/D"
+int_tstfmon_y02n22	%^=*#5i	123.45		"USC**123.45"
+int_tstfmon_y02n22	%^=*#5i	-123.45		"   **123.45USC O/D"
+#
+int_tstfmon_y22n42	%i	123.45		"USC123.45+"
+int_tstfmon_y22n42	%i	-123.45		"123.45USC -"
+int_tstfmon_y22n42	%13i	123.45		"   USC123.45+"
+int_tstfmon_y22n42	%13i	-123.45		"  123.45USC -"
+int_tstfmon_y22n42	%^=*#5i	123.45		"USC**123.45+"
+int_tstfmon_y22n42	%^=*#5i	-123.45		"   **123.45USC -"
+#
+int_tstfmon_y30y21	%i	123.45		"+USC123.45"
+int_tstfmon_y30y21	%i	-123.45		"USC 123.45-"
+int_tstfmon_y30y21	%13i	123.45		"   +USC123.45"
+int_tstfmon_y30y21	%13i	-123.45		"  USC 123.45-"
+int_tstfmon_y30y21	%^=*#5i	123.45		"+USC**123.45"
+int_tstfmon_y30y21	%^=*#5i	-123.45		"USC **123.45-"
+#
+int_tstfmon_y32n31	%i	123.45		"+ USC123.45"
+int_tstfmon_y32n31	%i	-123.45		"123.45 -USC"
+int_tstfmon_y32n31	%13i	123.45		"  + USC123.45"
+int_tstfmon_y32n31	%13i	-123.45		"  123.45 -USC"
+int_tstfmon_y32n31	%^=*#5i	123.45		"+ USC**123.45"
+int_tstfmon_y32n31	%^=*#5i	-123.45		"     **123.45 -USC"
+#
+int_tstfmon_y40y00	%i	123.45		"USC+123.45"
+int_tstfmon_y40y00	%i	-123.45		"(USC123.45)"
+int_tstfmon_y40y00	%13i	123.45		"   USC+123.45"
+int_tstfmon_y40y00	%13i	-123.45		"  (USC123.45)"
+int_tstfmon_y40y00	%^=*#5i	123.45		"USC+**123.45"
+int_tstfmon_y40y00	%^=*#5i	-123.45		"(USC**123.45)"
+#
+int_tstfmon_y42n21	%i	123.45		"USC +123.45"
+int_tstfmon_y42n21	%i	-123.45		"123.45 USC-"
+int_tstfmon_y42n21	%13i	123.45		"  USC +123.45"
+int_tstfmon_y42n21	%13i	-123.45		"  123.45 USC-"
+int_tstfmon_y42n21	%^=*#5i	123.45		"USC +**123.45"
+int_tstfmon_y42n21	%^=*#5i	-123.45		"     **123.45 USC-"
Index: localedata/tst-fmon.sh
===================================================================
RCS file: /cvs/glibc/libc/localedata/tst-fmon.sh,v
retrieving revision 1.14
diff -u -3 -p -u -r1.14 tst-fmon.sh
--- localedata/tst-fmon.sh	16 Jun 2003 07:25:07 -0000	1.14
+++ localedata/tst-fmon.sh	30 Nov 2003 18:17:29 -0000
@@ -29,7 +29,7 @@ here=`pwd`
 lang=`sed -e '/^#/d' -e '/^$/d' -e '/^C	/d' -e '/^tstfmon/d' -e 's/^\([^	]*\).*/\1/' $datafile | sort | uniq`
 
 # Generate data files.
-for cns in `cd ./tst-fmon-locales && ls tstfmon_*`; do
+for cns in `cd ./tst-fmon-locales && ls tstfmon_* int_tstfmon_*`; do
     cn=tst-fmon-locales/$cns
     fn=charmaps/ISO-8859-1
     I18NPATH=. GCONV_PATH=${common_objpfx}iconvdata \
@@ -44,16 +44,17 @@ errcode=0
 while IFS="	" read locale format value expect; do
     case "$locale" in '#'*) continue ;; esac
     if [ -n "$format" ]; then
+	expect=`echo "$expect" | sed 's/^\"\(.*\)\"$/\1/'`
 	if LOCPATH=${common_objpfx}localedata \
 	   GCONV_PATH=${common_objpfx}/iconvdata \
 	   ${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
 	   "$locale" "$format" "$value" "$expect" ; then
 	    echo "Locale: \"${locale}\" Format: \"${format}\"" \
-		 "Value: \"${value}\" Expect: \"${expect}\"  passed"
+		 "Value: \"${value}\" Expected: \"${expect}\"  passed"
 	else
 	    errcode=$?
 	    echo "Locale: \"${locale}\" Format: \"${format}\"" \
-		 "Value: \"${value}\" Expect: \"${expect}\"    failed"
+		 "Value: \"${value}\" Expected: \"${expect}\"    failed"
 	fi
     fi
 done < $datafile
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n01y12 localedata/tst-fmon-locales/int_tstfmon_n01y12
--- localedata/tst-fmon-locales.orig/int_tstfmon_n01y12	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n01y12	Sat Jun 21 12:49:01 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         0
+int_p_sep_by_space      1
+int_n_cs_precedes       1
+int_n_sign_posn         1
+int_n_sep_by_space      2
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n02n40 localedata/tst-fmon-locales/int_tstfmon_n02n40
--- localedata/tst-fmon-locales.orig/int_tstfmon_n02n40	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n02n40	Sat Jun 21 12:49:29 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         0
+int_p_sep_by_space      2
+int_n_cs_precedes       0
+int_n_sign_posn         4
+int_n_sep_by_space      0
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n10y31 localedata/tst-fmon-locales/int_tstfmon_n10y31
--- localedata/tst-fmon-locales.orig/int_tstfmon_n10y31	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n10y31	Sat Jun 21 12:53:43 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         1
+int_p_sep_by_space      0
+int_n_cs_precedes       1
+int_n_sign_posn         3
+int_n_sep_by_space      1
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n11y41 localedata/tst-fmon-locales/int_tstfmon_n11y41
--- localedata/tst-fmon-locales.orig/int_tstfmon_n11y41	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n11y41	Sat Jun 21 12:53:26 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         1
+int_p_sep_by_space      1
+int_n_cs_precedes       1
+int_n_sign_posn         4
+int_n_sep_by_space      1
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n12y11 localedata/tst-fmon-locales/int_tstfmon_n12y11
--- localedata/tst-fmon-locales.orig/int_tstfmon_n12y11	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n12y11	Sat Jun 21 12:53:05 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         1
+int_p_sep_by_space      2
+int_n_cs_precedes       1
+int_n_sign_posn         1
+int_n_sep_by_space      1
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n20n32 localedata/tst-fmon-locales/int_tstfmon_n20n32
--- localedata/tst-fmon-locales.orig/int_tstfmon_n20n32	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n20n32	Sat Jun 21 12:52:49 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         2
+int_p_sep_by_space      0
+int_n_cs_precedes       0
+int_n_sign_posn         3
+int_n_sep_by_space      2
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n30y20 localedata/tst-fmon-locales/int_tstfmon_n30y20
--- localedata/tst-fmon-locales.orig/int_tstfmon_n30y20	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n30y20	Sat Jun 21 12:52:33 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         3
+int_p_sep_by_space      0
+int_n_cs_precedes       1
+int_n_sign_posn         2
+int_n_sep_by_space      0
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_n41n00 localedata/tst-fmon-locales/int_tstfmon_n41n00
--- localedata/tst-fmon-locales.orig/int_tstfmon_n41n00	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_n41n00	Sat Jun 21 12:52:12 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       0
+int_p_sign_posn         4
+int_p_sep_by_space      1
+int_n_cs_precedes       0
+int_n_sign_posn         0
+int_n_sep_by_space      0
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y01y10 localedata/tst-fmon-locales/int_tstfmon_y01y10
--- localedata/tst-fmon-locales.orig/int_tstfmon_y01y10	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y01y10	Sat Jun 21 12:51:57 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         0
+int_p_sep_by_space      1
+int_n_cs_precedes       1
+int_n_sign_posn         1
+int_n_sep_by_space      0
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y02n22 localedata/tst-fmon-locales/int_tstfmon_y02n22
--- localedata/tst-fmon-locales.orig/int_tstfmon_y02n22	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y02n22	Sat Jun 21 12:51:39 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           ""
+negative_sign           "<U004F><U002F><U0044>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         0
+int_p_sep_by_space      2
+int_n_cs_precedes       0
+int_n_sign_posn         2
+int_n_sep_by_space      2
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y22n42 localedata/tst-fmon-locales/int_tstfmon_y22n42
--- localedata/tst-fmon-locales.orig/int_tstfmon_y22n42	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y22n42	Sat Jun 21 12:51:21 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         2
+int_p_sep_by_space      2
+int_n_cs_precedes       0
+int_n_sign_posn         4
+int_n_sep_by_space      2
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y30y21 localedata/tst-fmon-locales/int_tstfmon_y30y21
--- localedata/tst-fmon-locales.orig/int_tstfmon_y30y21	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y30y21	Sat Jun 21 12:51:02 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         3
+int_p_sep_by_space      0
+int_n_cs_precedes       1
+int_n_sign_posn         2
+int_n_sep_by_space      1
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y32n31 localedata/tst-fmon-locales/int_tstfmon_y32n31
--- localedata/tst-fmon-locales.orig/int_tstfmon_y32n31	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y32n31	Sat Jun 21 12:50:45 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         3
+int_p_sep_by_space      2
+int_n_cs_precedes       0
+int_n_sign_posn         3
+int_n_sep_by_space      1
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y40y00 localedata/tst-fmon-locales/int_tstfmon_y40y00
--- localedata/tst-fmon-locales.orig/int_tstfmon_y40y00	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y40y00	Sat Jun 21 12:50:25 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         4
+int_p_sep_by_space      0
+int_n_cs_precedes       1
+int_n_sign_posn         0
+int_n_sep_by_space      0
+END LC_MONETARY
diff -urN localedata/tst-fmon-locales.orig/int_tstfmon_y42n21 localedata/tst-fmon-locales/int_tstfmon_y42n21
--- localedata/tst-fmon-locales.orig/int_tstfmon_y42n21	Thu Jan  1 01:00:00 1970
+++ localedata/tst-fmon-locales/int_tstfmon_y42n21	Sat Jun 21 12:50:06 2003
@@ -0,0 +1,26 @@
+# One of a set of test locales for strfmon()
+
+# The six characters after the "_" in the locale name indicate
+# the last six LC_MONETARY values below.
+
+LC_CTYPE
+copy "POSIX"
+END LC_CTYPE
+
+LC_MONETARY
+int_curr_symbol         "<U0055><U0053><U0043><U0020>"
+currency_symbol         "<U0024>"
+mon_decimal_point       "<U002E>"
+mon_thousands_sep       "<U002C>"
+mon_grouping            3;3
+positive_sign           "<U002B>"
+negative_sign           "<U002D>"
+int_frac_digits         2
+frac_digits             2
+int_p_cs_precedes       1
+int_p_sign_posn         4
+int_p_sep_by_space      2
+int_n_cs_precedes       0
+int_n_sign_posn         2
+int_n_sep_by_space      1
+END LC_MONETARY
Index: localedata/locales/en_US
===================================================================
RCS file: /cvs/glibc/libc/localedata/locales/en_US,v
retrieving revision 1.6
diff -u -3 -p -u -r1.6 en_US
--- localedata/locales/en_US	26 Oct 2000 23:22:55 -0000	1.6
+++ localedata/locales/en_US	30 Nov 2003 18:19:34 -0000
@@ -52,8 +52,10 @@ negative_sign       "<U002D>"
 int_frac_digits     2
 frac_digits         2
 p_cs_precedes       1
+int_p_sep_by_space  1
 p_sep_by_space      0
 n_cs_precedes       1
+int_n_sep_by_space  1
 n_sep_by_space      0
 p_sign_posn         1
 n_sign_posn         1
Index: localedata/locales/ja_JP
===================================================================
RCS file: /cvs/glibc/libc/localedata/locales/ja_JP,v
retrieving revision 1.21
diff -u -3 -p -u -r1.21 ja_JP
--- localedata/locales/ja_JP	31 Oct 2000 04:29:37 -0000	1.21
+++ localedata/locales/ja_JP	30 Nov 2003 18:19:36 -0000
@@ -14894,8 +14894,10 @@ p_cs_precedes		1
 p_sep_by_space		0
 n_cs_precedes		1
 n_sep_by_space		0
-p_sign_posn		1
+p_sign_posn		4
 n_sign_posn		4
+int_p_sep_by_space	2
+int_n_sep_by_space	2
 END LC_MONETARY
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]