aboutsummaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-09-24 16:37:16 +0000
committerUlrich Drepper <drepper@redhat.com>2005-09-24 16:37:16 +0000
commitc093ea4f4c9ef460b864f3cf8ef6665ce74ecc4a (patch)
tree9d012c4f7e010dcb96cb9c30cb71454295f4dcae /locale/programs
parentd29f5cc776206fe1618b73f7afdf3eef239cf073 (diff)
downloadglibc-c093ea4f4c9ef460b864f3cf8ef6665ce74ecc4a.tar
glibc-c093ea4f4c9ef460b864f3cf8ef6665ce74ecc4a.tar.gz
glibc-c093ea4f4c9ef460b864f3cf8ef6665ce74ecc4a.tar.bz2
glibc-c093ea4f4c9ef460b864f3cf8ef6665ce74ecc4a.zip
* locale/programs/ld-address.c (address_finish): Produce better
error messages for invalid lang_ab use.
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-address.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
index 079aa0094d..5a7d821de6 100644
--- a/locale/programs/ld-address.c
+++ b/locale/programs/ld-address.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -224,17 +224,24 @@ No definition for %s category found"), "LC_ADDRESS"));
if (address->lang_ab == NULL)
{
- if (verbose && ! nothing)
+ if (iso639[cnt].ab[0] != '\0' && verbose && ! nothing)
WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"),
"LC_ADDRESS", "lang_ab"));
address->lang_ab = "";
}
else if (address->lang_ab[0] == '\0')
{
- if (verbose)
+ if (iso639[cnt].ab[0] != '\0' && verbose)
WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"),
"LC_ADDRESS", "lang_ab"));
}
+ else if (iso639[cnt].ab[0] == '\0')
+ {
+ WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be defined"),
+ "LC_ADDRESS", "lang_ab"));
+
+ address->lang_ab = "";
+ }
else
{
if (cnt == sizeof (iso639) / sizeof (iso639[0]))