diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /locale/programs/localedef.c | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'locale/programs/localedef.c')
-rw-r--r-- | locale/programs/localedef.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index 9c3acbebcc..28cb7b316e 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -1,19 +1,21 @@ -/* Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -243,7 +245,7 @@ main (int argc, char *argv[]) FATAL: system does not define `_POSIX2_LOCALEDEF'"))); /* Process charmap file. */ - charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); + charmap = charmap_read (charmap_file, verbose, be_quiet, 1); /* Add the first entry in the locale list. */ memset (&global, '\0', sizeof (struct localedef_t)); @@ -288,7 +290,7 @@ cannot write output files to `%s'"), output_path)); } else WITH_CUR_LOCALE (error (4, 0, _("\ -no output file produced because warnings were issued"))); +no output file produced because warning were issued"))); /* This exit status is prescribed by POSIX.2 4.35.7. */ exit (error_message_count != 0); @@ -387,7 +389,7 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2006"); +"), "2004"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } @@ -530,7 +532,7 @@ normalize_codeset (codeset, name_len) struct localedef_t * -add_to_readlist (int category, const char *name, const char *repertoire_name, +add_to_readlist (int locale, const char *name, const char *repertoire_name, int generate, struct localedef_t *copy_locale) { struct localedef_t *runp = locales; @@ -561,39 +563,39 @@ add_to_readlist (int category, const char *name, const char *repertoire_name, } if (generate - && (runp->needed & (1 << category)) != 0 - && (runp->avail & (1 << category)) == 0) + && (runp->needed & (1 << locale)) != 0 + && (runp->avail & (1 << locale)) == 0) WITH_CUR_LOCALE (error (5, 0, _("\ circular dependencies between locale definitions"))); if (copy_locale != NULL) { - if (runp->categories[category].generic != NULL) + if (runp->categories[locale].generic != NULL) WITH_CUR_LOCALE (error (5, 0, _("\ cannot add already read locale `%s' a second time"), name)); else - runp->categories[category].generic = - copy_locale->categories[category].generic; + runp->categories[locale].generic = + copy_locale->categories[locale].generic; } - runp->needed |= 1 << category; + runp->needed |= 1 << locale; return runp; } struct localedef_t * -find_locale (int category, const char *name, const char *repertoire_name, +find_locale (int locale, 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 (category, name, repertoire_name, 0, NULL); + result = add_to_readlist (locale, name, repertoire_name, 0, NULL); assert (result != NULL); - if ((result->avail & (1 << category)) == 0 + if ((result->avail & (1 << locale)) == 0 && locfile_read (result, charmap) != 0) WITH_CUR_LOCALE (error (4, errno, _("\ cannot open locale definition file `%s'"), result->name)); @@ -603,17 +605,17 @@ cannot open locale definition file `%s'"), result->name)); struct localedef_t * -load_locale (int category, const char *name, const char *repertoire_name, +load_locale (int locale, 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 (category, name, repertoire_name, 1, copy_locale); + result = add_to_readlist (locale, name, repertoire_name, 1, copy_locale); assert (result != NULL); - if ((result->avail & (1 << category)) == 0 + if ((result->avail & (1 << locale)) == 0 && locfile_read (result, charmap) != 0) WITH_CUR_LOCALE (error (4, errno, _("\ cannot open locale definition file `%s'"), result->name)); |