mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-13 00:30:07 +00:00
* locale/programs/charmap.c (charmap_read): Add new parameter. It
tells us when not finding a charmap file is an error. * locale/programs/charmap.h: Adjust charmap_read prototype. * iconv/iconv_prog.c (main): Tell charmap_read it's no error if we cannot find a charmap. * locale/programs/localedef.c (main): Adjust charmap_read call.
This commit is contained in:
parent
96d5c5da1d
commit
8a6537b001
@ -1,3 +1,12 @@
|
|||||||
|
2006-08-19 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* locale/programs/charmap.c (charmap_read): Add new parameter. It
|
||||||
|
tells us when not finding a charmap file is an error.
|
||||||
|
* locale/programs/charmap.h: Adjust charmap_read prototype.
|
||||||
|
* iconv/iconv_prog.c (main): Tell charmap_read it's no error if we
|
||||||
|
cannot find a charmap.
|
||||||
|
* locale/programs/localedef.c (main): Adjust charmap_read call.
|
||||||
|
|
||||||
2006-08-15 Jakub Jelinek <jakub@redhat.com>
|
2006-08-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Use
|
* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Use
|
||||||
|
@ -183,12 +183,12 @@ main (int argc, char *argv[])
|
|||||||
if (strchr (from_code, '/') != NULL)
|
if (strchr (from_code, '/') != NULL)
|
||||||
/* The from-name might be a charmap file name. Try reading the
|
/* The from-name might be a charmap file name. Try reading the
|
||||||
file. */
|
file. */
|
||||||
from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0);
|
from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0, 0);
|
||||||
|
|
||||||
if (strchr (orig_to_code, '/') != NULL)
|
if (strchr (orig_to_code, '/') != NULL)
|
||||||
/* The to-name might be a charmap file name. Try reading the
|
/* The to-name might be a charmap file name. Try reading the
|
||||||
file. */
|
file. */
|
||||||
to_charmap = charmap_read (orig_to_code, /*0, 1,*/1,0, 0);
|
to_charmap = charmap_read (orig_to_code, /*0, 1,*/1, 0, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
/* Determine output file. */
|
/* Determine output file. */
|
||||||
|
@ -86,7 +86,8 @@ cmlr_open (const char *directory, const char *name, kw_hash_fct_t hf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct charmap_t *
|
struct charmap_t *
|
||||||
charmap_read (const char *filename, int verbose, int be_quiet, int use_default)
|
charmap_read (const char *filename, int verbose, int error_not_found,
|
||||||
|
int be_quiet, int use_default)
|
||||||
{
|
{
|
||||||
struct charmap_t *result = NULL;
|
struct charmap_t *result = NULL;
|
||||||
|
|
||||||
@ -132,7 +133,7 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default)
|
|||||||
if (cmfile != NULL)
|
if (cmfile != NULL)
|
||||||
result = parse_charmap (cmfile, verbose, be_quiet);
|
result = parse_charmap (cmfile, verbose, be_quiet);
|
||||||
|
|
||||||
if (result == NULL && !be_quiet)
|
if (result == NULL && error_not_found)
|
||||||
WITH_CUR_LOCALE (error (0, errno, _("\
|
WITH_CUR_LOCALE (error (0, errno, _("\
|
||||||
character map file `%s' not found"), filename));
|
character map file `%s' not found"), filename));
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1996-1999, 2001, 2003, 2005 Free Software Foundation, Inc.
|
/* Copyright (C) 1996-1999,2001,2003,2005,2006 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
|
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
|
||||||
|
|
||||||
@ -69,7 +69,8 @@ extern bool enc_not_ascii_compatible;
|
|||||||
|
|
||||||
/* Prototypes for charmap handling functions. */
|
/* Prototypes for charmap handling functions. */
|
||||||
extern struct charmap_t *charmap_read (const char *filename, int verbose,
|
extern struct charmap_t *charmap_read (const char *filename, int verbose,
|
||||||
int be_quiet, int use_default);
|
int error_not_found, int be_quiet,
|
||||||
|
int use_default);
|
||||||
|
|
||||||
/* Return the value stored under the given key in the hashing table. */
|
/* Return the value stored under the given key in the hashing table. */
|
||||||
extern struct charseq *charmap_find_value (const struct charmap_t *charmap,
|
extern struct charseq *charmap_find_value (const struct charmap_t *charmap,
|
||||||
|
@ -243,7 +243,7 @@ main (int argc, char *argv[])
|
|||||||
FATAL: system does not define `_POSIX2_LOCALEDEF'")));
|
FATAL: system does not define `_POSIX2_LOCALEDEF'")));
|
||||||
|
|
||||||
/* Process charmap file. */
|
/* Process charmap file. */
|
||||||
charmap = charmap_read (charmap_file, verbose, be_quiet, 1);
|
charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
|
||||||
|
|
||||||
/* Add the first entry in the locale list. */
|
/* Add the first entry in the locale list. */
|
||||||
memset (&global, '\0', sizeof (struct localedef_t));
|
memset (&global, '\0', sizeof (struct localedef_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user