summary refs log tree commit diff
path: root/locale/programs
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-26 07:40:32 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-26 07:40:32 +0000
commitab18a27d5435b374ce89efe39d2d5203b705d869 (patch)
tree7422d448e1610ef22dc19f6fc625dcc5b7eb48b5 /locale/programs
parent6def43e690998a18fabc938b2924bc3af3231426 (diff)
downloadglibc-ab18a27d5435b374ce89efe39d2d5203b705d869.tar.gz
glibc-ab18a27d5435b374ce89efe39d2d5203b705d869.tar.xz
glibc-ab18a27d5435b374ce89efe39d2d5203b705d869.zip
Update.
2003-06-22  Petter Reinholdtsen  <pere@hungry.com>

	* locale/program/ld-monetary.c: Only check the first three
	characters in int_curr_symbol against ISO-4217, to make the
	separator character used by a locale independent of the content
	in iso-4217.def.
	* locale/iso-4217.def: Remove the space character from all
	currency values to get the new test code in ld-monetary.c working.
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-monetary.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c
index 4c36c505ba..868ab6980e 100644
--- a/locale/programs/ld-monetary.c
+++ b/locale/programs/ld-monetary.c
@@ -225,14 +225,20 @@ No definition for %s category found"), "LC_MONETARY"));
 %s: value of field `int_curr_symbol' has wrong length"),
 				    "LC_MONETARY"));
 	}
-      else if (bsearch (monetary->int_curr_symbol, valid_int_curr,
-			NR_VALID_INT_CURR, sizeof (const char *),
-			(comparison_fn_t) curr_strcmp) == NULL
+      else
+	{ /* Check the first three characters against ISO 4217 */
+	  char symbol[4];
+	  strncpy (symbol, monetary->int_curr_symbol, 3);
+	  symbol[3] = '\0';
+	  if (bsearch (symbol, valid_int_curr, NR_VALID_INT_CURR,
+		       sizeof (const char *),
+		       (comparison_fn_t) curr_strcmp) == NULL
 	       && !be_quiet)
-	WITH_CUR_LOCALE (error (0, 0, _("\
+	    WITH_CUR_LOCALE (error (0, 0, _("\
 %s: value of field `int_curr_symbol' does \
 not correspond to a valid name in ISO 4217"),
 				"LC_MONETARY"));
+	}
     }
 
   /* The decimal point must not be empty.  This is not said explicitly