summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-07-31 07:17:01 +0000
committerRoland McGrath <roland@gnu.org>2006-07-31 07:17:01 +0000
commit518b2177f6c4f79e148414edf507a1aabab0e07b (patch)
tree8208ec657ac9776ade468a04bc9a8d60e8ab9e2a /locale
parentab5823b4b6e760345d347b98830ccc75aa81bff6 (diff)
Updated to fedora-glibc-20060731T0706
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/charmap.c10
-rw-r--r--locale/programs/localedef.c26
2 files changed, 17 insertions, 19 deletions
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index 6ac898d161..e56b0be81c 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1998-2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998-2004,2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
@@ -130,13 +130,11 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default)
}
if (cmfile != NULL)
- {
- result = parse_charmap (cmfile, verbose, be_quiet);
+ result = parse_charmap (cmfile, verbose, be_quiet);
- if (result == NULL && !be_quiet)
- WITH_CUR_LOCALE (error (0, errno, _("\
+ if (result == NULL && !be_quiet)
+ WITH_CUR_LOCALE (error (0, errno, _("\
character map file `%s' not found"), filename));
- }
}
if (result == NULL && filename != NULL && strchr (filename, '/') == NULL)
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 645a803c06..f705f34a75 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -530,7 +530,7 @@ normalize_codeset (codeset, name_len)
struct localedef_t *
-add_to_readlist (int locale, const char *name, const char *repertoire_name,
+add_to_readlist (int category, const char *name, const char *repertoire_name,
int generate, struct localedef_t *copy_locale)
{
struct localedef_t *runp = locales;
@@ -561,39 +561,39 @@ add_to_readlist (int locale, const char *name, const char *repertoire_name,
}
if (generate
- && (runp->needed & (1 << locale)) != 0
- && (runp->avail & (1 << locale)) == 0)
+ && (runp->needed & (1 << category)) != 0
+ && (runp->avail & (1 << category)) == 0)
WITH_CUR_LOCALE (error (5, 0, _("\
circular dependencies between locale definitions")));
if (copy_locale != NULL)
{
- if (runp->categories[locale].generic != NULL)
+ if (runp->categories[category].generic != NULL)
WITH_CUR_LOCALE (error (5, 0, _("\
cannot add already read locale `%s' a second time"), name));
else
- runp->categories[locale].generic =
- copy_locale->categories[locale].generic;
+ runp->categories[category].generic =
+ copy_locale->categories[category].generic;
}
- runp->needed |= 1 << locale;
+ runp->needed |= 1 << category;
return runp;
}
struct localedef_t *
-find_locale (int locale, const char *name, const char *repertoire_name,
+find_locale (int category, const char *name, const char *repertoire_name,
const struct charmap_t *charmap)
{
struct localedef_t *result;
/* Find the locale, but do not generate it since this would be a bug. */
- result = add_to_readlist (locale, name, repertoire_name, 0, NULL);
+ result = add_to_readlist (category, name, repertoire_name, 0, NULL);
assert (result != NULL);
- if ((result->avail & (1 << locale)) == 0
+ if ((result->avail & (1 << category)) == 0
&& locfile_read (result, charmap) != 0)
WITH_CUR_LOCALE (error (4, errno, _("\
cannot open locale definition file `%s'"), result->name));
@@ -603,17 +603,17 @@ cannot open locale definition file `%s'"), result->name));
struct localedef_t *
-load_locale (int locale, const char *name, const char *repertoire_name,
+load_locale (int category, const char *name, const char *repertoire_name,
const struct charmap_t *charmap, struct localedef_t *copy_locale)
{
struct localedef_t *result;
/* Generate the locale if it does not exist. */
- result = add_to_readlist (locale, name, repertoire_name, 1, copy_locale);
+ result = add_to_readlist (category, name, repertoire_name, 1, copy_locale);
assert (result != NULL);
- if ((result->avail & (1 << locale)) == 0
+ if ((result->avail & (1 << category)) == 0
&& locfile_read (result, charmap) != 0)
WITH_CUR_LOCALE (error (4, errno, _("\
cannot open locale definition file `%s'"), result->name));