1997-06-21 02:59:26 +00:00
|
|
|
/* Implementation of the locale program according to POSIX 9945-2.
|
2004-01-01 20:42:01 +00:00
|
|
|
Copyright (C) 1995-1997, 1999-2003, 2004 Free Software Foundation, Inc.
|
1996-12-20 01:39:50 +00:00
|
|
|
This file is part of the GNU C Library.
|
1999-08-31 07:04:41 +00:00
|
|
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
1996-12-20 01:39:50 +00:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
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.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
1996-12-20 01:39:50 +00:00
|
|
|
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
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
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. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
1996-04-03 16:31:49 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
#include <argp.h>
|
|
|
|
#include <argz.h>
|
1995-05-18 09:00:09 +00:00
|
|
|
#include <dirent.h>
|
1997-02-19 04:43:53 +00:00
|
|
|
#include <errno.h>
|
1996-04-03 16:31:49 +00:00
|
|
|
#include <error.h>
|
2001-02-06 09:32:00 +00:00
|
|
|
#include <fcntl.h>
|
1995-05-18 09:00:09 +00:00
|
|
|
#include <langinfo.h>
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <locale.h>
|
1997-02-19 04:43:53 +00:00
|
|
|
#include <search.h>
|
1995-05-18 09:00:09 +00:00
|
|
|
#include <stdio.h>
|
2001-07-24 07:01:51 +00:00
|
|
|
#include <stdio_ext.h>
|
1995-05-18 09:00:09 +00:00
|
|
|
#include <stdlib.h>
|
Thu Jun 13 17:25:11 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/generic/memcmp.c: Add prototype decls for internal fns.
* locale/programs/locale.c: Include string.h.
* sunrpc/xdr_stdio.c (xdrstdio_getlong), sunrpc/xdr_rec.c
(xdrrec_getlong), sunrpc/xdr_mem.c (xdrmem_getlong): Make sure
appropriate sign-extension is performed on machines with
sizeof(long) > 4.
* sunrpc/xdr.c (xdr_int, xdr_u_int): If sizeof(long)==8 and
sizeof(int)<sizeof(long), we need to go through a temporary
variable.
* locale/programs/ld-numeric.c: Include <alloca.h>
* libio/stdio.h (__libc_fatal): Add prototype.
* libio/cleanup.c: Use __P() to declare prototype when __STDC__ is
in efect.
* libio/iopopen.c (read_or_write, parent_end, child_end): Declare
volatile to avoid "might get clobbered by longjmp" warning.
* features.h (__KERNEL_STRICT_NAMES): Define __KERNEL_STRICT_NAMES
unless _LOOSE_KERNEL_NAMES is in effect (which, with high
probability is a sure loser).
* sysdeps/unix/sysv/linux/gnu/types.h (__KERNEL_STRICT_NAMES): Remove.
* sysdeps/unix/bsd/osf/alpha/start.S (errno): Removed.
* sysdeps/unix/sysv/linux/alpha/start.S: Ditto.
* misc/paths.h (_PATH_MAN): Change from /usr/share/man to /usr/man
to be Linux FSSTND compliant.
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/pipe.S: Use PSEUDO.
* sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to
__syscall_error to avoid intruding application name space.
* sysdeps/unix/sysv/linux/alpha/sysdep.h: Rename __NR_get?id
to SYS_get?id so that syscall stubs in sysdeps/unix define
these syscalls in terms of getxpid/getxuid/getxgid.
* sysdeps/unix/_exit.S, sysdeps/unix/getegid.S,
sysdeps/unix/geteuid.S, sysdeps/unix/getppid.S,
sysdeps/unix/execve.S, sysdeps/unix/fork.S,
sysdeps/unix/syscall.S: Terminate syscall with PSEUDO_END.
* sysdeps/unix/make-syscalls.sh, sysdeps/unix/sysdep.h
(PSEUDO_END): Rename END() to PSEUDO_END().
* sysdeps/unix/alpha/sysdep.h: Move error-handling code in PSEUDO
to PSEUDO_END to improve branch-prediction. Include .frame
directive to make syscalls debugabble.
(PSEUDO_END): New macro.
* sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S,
sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since
latter is illegal under DEC Unix.
* sysdeps/unix/alpha/sysdep.S: Renamed from
sysdeps/unix/sysv/linux/alpha/sysdep.S. This file works for OSF/1
as well.
* sysdeps/unix/bsd/osf/alpha/sysdep.S: Remove (note that the
EWOULDBLOCK -> EAGAIN mapping was unnecessary since
EWOULDBLOCK==EAGAIN under DEC Unix and Linux/Alpha).
* sysdeps/alpha/divrem.h: Use retaddr instead of ra as the return
address register in the .frame directive.
* sysdeps/alpha/copysign.c: Remove.
* sunrpc/rpc/types.h: Include <sys/param.h> and <netinet/in.h> to
avoid RPC definitions of INADDR_LOOPBACK and/or MAXHOSTNAMELEN.
* errno.h: Move __END_DECLS to correct place to make file
compilable under c++.
* dirent/dirent.h: Document _DIRENT_HAVE_D_OFF macro. Define
d_ino only if <direntry.h> hasn't defined d_fileno.
* configure.in (HAVE_ASM_WEAKEXT_DIRECTIVE): Reverse order of
arguments to weakext to make .weakext detection work on ECOFF systems.
* FAQ: Add Linux/Alpha to list of supported platforms. Mention
that _validuser() has been replaced by __ivaliduser().
Thu Jun 6 21:39:38 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Declare cmd
as unsigned long, not as int (to avoid incorrect int->long
promotion).
1996-06-19 06:54:12 +00:00
|
|
|
#include <string.h>
|
2001-02-06 09:32:00 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/mman.h>
|
1997-02-19 04:43:53 +00:00
|
|
|
#include <sys/stat.h>
|
1995-05-18 09:00:09 +00:00
|
|
|
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
#include "localeinfo.h"
|
2000-10-01 19:15:29 +00:00
|
|
|
#include "charmap-dir.h"
|
2002-12-14 03:26:43 +00:00
|
|
|
#include "../locarchive.h"
|
2000-10-01 19:15:29 +00:00
|
|
|
|
2001-02-06 09:32:00 +00:00
|
|
|
extern void *xmalloc (size_t __n);
|
2000-10-01 19:15:29 +00:00
|
|
|
extern char *xstrdup (const char *__str);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
2002-12-14 03:26:43 +00:00
|
|
|
#define ARCHIVE_NAME LOCALEDIR "/locale-archive"
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
/* If set print the name of the category. */
|
|
|
|
static int show_category_name;
|
|
|
|
|
|
|
|
/* If set print the name of the item. */
|
|
|
|
static int show_keyword_name;
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
/* Print names of all available locales. */
|
|
|
|
static int do_all;
|
|
|
|
|
|
|
|
/* Print names of all available character maps. */
|
|
|
|
static int do_charmaps = 0;
|
|
|
|
|
2001-02-06 09:32:00 +00:00
|
|
|
/* Nonzero if verbose output is wanted. */
|
|
|
|
static int verbose;
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
/* Name and version of program. */
|
|
|
|
static void print_version (FILE *stream, struct argp_state *state);
|
|
|
|
void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
|
|
|
|
|
|
|
|
/* Definitions of arguments for argp functions. */
|
update from main archive 970221
1997-02-22 00:17 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c: Change to use argp.
* db/makedb: Likewise.
* locale/programs/localedef.c: Likewise.
* locale/programs/locale.c: Little adjustment for better usage of
argp.
1997-02-20 20:07 Greg McGary <gkm@eng.ascend.com>
* Makeconfig: Add rules for libc with bounded pointers.
* Makerules: Likewise.
* config.make.in: Likewise.
* configure.in: Likewise.
1997-02-21 10:41 Miles Bader <miles@gnu.ai.mit.edu>
* argp.h (OPTION_NO_USAGE): New macro.
* argp-help.c (usage_long_opt, usage_argful_short_opt,
add_argless_short_opt): Implement OPTION_NO_USAGE.
1997-02-20 16:41 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/obstack.h: Fix typo.
1997-02-20 15:56 Miles Bader <miles@gnu.ai.mit.edu>
* argp-fmtstream.c (__argp_fmtstream_update): Account for case
where NEXTLINE points one past the end of the active buffer.
* argp-help.c <stddef.h>: New include.
(__argp_failure): Only exit if STATE says it's ok.
(print_header, hol_entry_help): Use UPARAMS fields rather than
constants.
(_help): Call fill_in_uparams if necessary.
(struct hol_help_state): New type.
(struct pentry_state): Add hhstate field. Remove prev_entry &
sep_groups fields.
(hol_entry_help): Add HHSTATE parameter. Remove prev_entry &
sep_groups parameters.
Suppress duplicate arguments if requested, and note the fact.
(print_header, comma): Use PEST->hhstate fields.
(hol_help): Add HHSTATE variable & pass to hol_entry_help.
Remove LAST_ENTRY & SEP_GROUPS variables.
If any suplicate arguments were suppressed, print explanatory note.
(filter_doc): Replace PEST parameter with STATE.
(struct uparams): New type.
(uparams): New variable.
(struct uparam_name): New type.
(uparam_names): New variable.
(fill_in_uparams): New function.
(__argp_failure, __argp_error, __argp_state_help): Make STATE
parameter const.
* argp.h (argp_state_help, __argp_state_help, argp_usage,
__argp_usage, argp_error, __argp_error, argp_failure,
__argp_failure): Make STATE parameter const.
(ARGP_KEY_HELP_DUP_ARGS_NOTE): New macro.
* argp.h (argp_program_bug_address): Make const.
1997-02-20 19:20 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/mman/syscalls.list: Explain msync interface.
1997-02-19 01:37 Erik Troan <ewt@redhat.com>
* shadow/sgetspent_r.c: Accept empty third, fourth and fifth fields.
1997-02-20 14:44 Andreas Jaeger <aj@arthur.pfalz.de>
* stdio-common/test-fseek.c: Remove temporary file, add
copyright.
1997-02-20 17:51 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h: Protect contents using
__BEGIN/END_DECLS. Reported by a sun <asun@zoology.washington.edu>.
* inet/net/ethernet.h: Move to sysdeps/unix/sysv/linux/net.
* inet/Makefile (headers): Remove net/ethernet.h.
* sysdeps/unix/sysv/linux/Makefile: Install net/ethernet.h.
* sysdeps/unix/sysv/linux/Dist: Distribute net/ethernet.h.
1997-02-20 15:23 Thorsten Kukuk <kukuk@weber.uni-paderborn.de>
* nss/nsswitch.c (__nss_configure_lookup): Use correct test when
searching in sorted array.
1997-02-20 01:24 Philip Blundell <pjb27@cam.ac.uk>
* inet/getnameinfo.c: Change to use reentrant getXXbyYY functions
and protect modification of global data.
1997-02-19 18:48 Miles Bader <miles@gnu.ai.mit.edu>
* argp-parse.c (argp_default_parser): Set STATE->name for OPT_PROGNAME.
(parser_init): Use the basename for PARSER->state.name.
* argp-help.c (__argp_error, __argp_failure, __argp_state_help):
Use PROGRAM_INVOCATION_SHORT_NAME instead of PROGRAM_INVOCATION_NAME.
* argp-parse.c (parser_init): Set PARSER->state.flags.
Make check whether PARSER has the prog name in argv[0] at the
proper place.
1997-02-19 23:34 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-time.c (time_finish): t_fmt_ampm is optional.
Use default value instead of printing a warning.
* nss/XXX-lookup.c: Add misssing explanation.
1997-02-19 19:14 Andreas Jaeger <aj@arthur.pfalz.de>
* inet/in6_addr.c: Add missing braces.
* inet/getnameinfo.c: Include <arpa/inet.h>.
* sysdeps/posix/getaddrinfo.c: Include <arpa/inet.h>.
1997-02-19 11:46 Ulrich Drepper <drepper@cygnus.com>
* string/strxfrm.c (STRCOLL): Correct handling of `position'
levels with no non-IGNOREd element and handling of NUL byte.
* string/strcoll.c (STRXFRM): Likewise.
* locale/weight.h: Likewise.
* shadow/sgetspent_r.c (LINE_PARSER): Add missing ')'.
1997-02-22 01:20:46 +00:00
|
|
|
static const struct argp_option options[] =
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
{
|
update from main archive 970221
1997-02-22 00:17 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c: Change to use argp.
* db/makedb: Likewise.
* locale/programs/localedef.c: Likewise.
* locale/programs/locale.c: Little adjustment for better usage of
argp.
1997-02-20 20:07 Greg McGary <gkm@eng.ascend.com>
* Makeconfig: Add rules for libc with bounded pointers.
* Makerules: Likewise.
* config.make.in: Likewise.
* configure.in: Likewise.
1997-02-21 10:41 Miles Bader <miles@gnu.ai.mit.edu>
* argp.h (OPTION_NO_USAGE): New macro.
* argp-help.c (usage_long_opt, usage_argful_short_opt,
add_argless_short_opt): Implement OPTION_NO_USAGE.
1997-02-20 16:41 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/obstack.h: Fix typo.
1997-02-20 15:56 Miles Bader <miles@gnu.ai.mit.edu>
* argp-fmtstream.c (__argp_fmtstream_update): Account for case
where NEXTLINE points one past the end of the active buffer.
* argp-help.c <stddef.h>: New include.
(__argp_failure): Only exit if STATE says it's ok.
(print_header, hol_entry_help): Use UPARAMS fields rather than
constants.
(_help): Call fill_in_uparams if necessary.
(struct hol_help_state): New type.
(struct pentry_state): Add hhstate field. Remove prev_entry &
sep_groups fields.
(hol_entry_help): Add HHSTATE parameter. Remove prev_entry &
sep_groups parameters.
Suppress duplicate arguments if requested, and note the fact.
(print_header, comma): Use PEST->hhstate fields.
(hol_help): Add HHSTATE variable & pass to hol_entry_help.
Remove LAST_ENTRY & SEP_GROUPS variables.
If any suplicate arguments were suppressed, print explanatory note.
(filter_doc): Replace PEST parameter with STATE.
(struct uparams): New type.
(uparams): New variable.
(struct uparam_name): New type.
(uparam_names): New variable.
(fill_in_uparams): New function.
(__argp_failure, __argp_error, __argp_state_help): Make STATE
parameter const.
* argp.h (argp_state_help, __argp_state_help, argp_usage,
__argp_usage, argp_error, __argp_error, argp_failure,
__argp_failure): Make STATE parameter const.
(ARGP_KEY_HELP_DUP_ARGS_NOTE): New macro.
* argp.h (argp_program_bug_address): Make const.
1997-02-20 19:20 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/mman/syscalls.list: Explain msync interface.
1997-02-19 01:37 Erik Troan <ewt@redhat.com>
* shadow/sgetspent_r.c: Accept empty third, fourth and fifth fields.
1997-02-20 14:44 Andreas Jaeger <aj@arthur.pfalz.de>
* stdio-common/test-fseek.c: Remove temporary file, add
copyright.
1997-02-20 17:51 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h: Protect contents using
__BEGIN/END_DECLS. Reported by a sun <asun@zoology.washington.edu>.
* inet/net/ethernet.h: Move to sysdeps/unix/sysv/linux/net.
* inet/Makefile (headers): Remove net/ethernet.h.
* sysdeps/unix/sysv/linux/Makefile: Install net/ethernet.h.
* sysdeps/unix/sysv/linux/Dist: Distribute net/ethernet.h.
1997-02-20 15:23 Thorsten Kukuk <kukuk@weber.uni-paderborn.de>
* nss/nsswitch.c (__nss_configure_lookup): Use correct test when
searching in sorted array.
1997-02-20 01:24 Philip Blundell <pjb27@cam.ac.uk>
* inet/getnameinfo.c: Change to use reentrant getXXbyYY functions
and protect modification of global data.
1997-02-19 18:48 Miles Bader <miles@gnu.ai.mit.edu>
* argp-parse.c (argp_default_parser): Set STATE->name for OPT_PROGNAME.
(parser_init): Use the basename for PARSER->state.name.
* argp-help.c (__argp_error, __argp_failure, __argp_state_help):
Use PROGRAM_INVOCATION_SHORT_NAME instead of PROGRAM_INVOCATION_NAME.
* argp-parse.c (parser_init): Set PARSER->state.flags.
Make check whether PARSER has the prog name in argv[0] at the
proper place.
1997-02-19 23:34 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-time.c (time_finish): t_fmt_ampm is optional.
Use default value instead of printing a warning.
* nss/XXX-lookup.c: Add misssing explanation.
1997-02-19 19:14 Andreas Jaeger <aj@arthur.pfalz.de>
* inet/in6_addr.c: Add missing braces.
* inet/getnameinfo.c: Include <arpa/inet.h>.
* sysdeps/posix/getaddrinfo.c: Include <arpa/inet.h>.
1997-02-19 11:46 Ulrich Drepper <drepper@cygnus.com>
* string/strxfrm.c (STRCOLL): Correct handling of `position'
levels with no non-IGNOREd element and handling of NUL byte.
* string/strcoll.c (STRXFRM): Likewise.
* locale/weight.h: Likewise.
* shadow/sgetspent_r.c (LINE_PARSER): Add missing ')'.
1997-02-22 01:20:46 +00:00
|
|
|
{ NULL, 0, NULL, 0, N_("System information:") },
|
|
|
|
{ "all-locales", 'a', NULL, OPTION_NO_USAGE,
|
|
|
|
N_("Write names of available locales") },
|
|
|
|
{ "charmaps", 'm', NULL, OPTION_NO_USAGE,
|
|
|
|
N_("Write names of available charmaps") },
|
|
|
|
{ NULL, 0, NULL, 0, N_("Modify output format:") },
|
|
|
|
{ "category-name", 'c', NULL, 0, N_("Write names of selected categories") },
|
|
|
|
{ "keyword-name", 'k', NULL, 0, N_("Write names of selected keywords") },
|
2001-02-06 09:32:00 +00:00
|
|
|
{ "verbose", 'v', NULL, 0, N_("Print more information") },
|
1997-02-19 04:43:53 +00:00
|
|
|
{ NULL, 0, NULL, 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Short description of program. */
|
update from main archive 970221
1997-02-22 00:17 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c: Change to use argp.
* db/makedb: Likewise.
* locale/programs/localedef.c: Likewise.
* locale/programs/locale.c: Little adjustment for better usage of
argp.
1997-02-20 20:07 Greg McGary <gkm@eng.ascend.com>
* Makeconfig: Add rules for libc with bounded pointers.
* Makerules: Likewise.
* config.make.in: Likewise.
* configure.in: Likewise.
1997-02-21 10:41 Miles Bader <miles@gnu.ai.mit.edu>
* argp.h (OPTION_NO_USAGE): New macro.
* argp-help.c (usage_long_opt, usage_argful_short_opt,
add_argless_short_opt): Implement OPTION_NO_USAGE.
1997-02-20 16:41 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/obstack.h: Fix typo.
1997-02-20 15:56 Miles Bader <miles@gnu.ai.mit.edu>
* argp-fmtstream.c (__argp_fmtstream_update): Account for case
where NEXTLINE points one past the end of the active buffer.
* argp-help.c <stddef.h>: New include.
(__argp_failure): Only exit if STATE says it's ok.
(print_header, hol_entry_help): Use UPARAMS fields rather than
constants.
(_help): Call fill_in_uparams if necessary.
(struct hol_help_state): New type.
(struct pentry_state): Add hhstate field. Remove prev_entry &
sep_groups fields.
(hol_entry_help): Add HHSTATE parameter. Remove prev_entry &
sep_groups parameters.
Suppress duplicate arguments if requested, and note the fact.
(print_header, comma): Use PEST->hhstate fields.
(hol_help): Add HHSTATE variable & pass to hol_entry_help.
Remove LAST_ENTRY & SEP_GROUPS variables.
If any suplicate arguments were suppressed, print explanatory note.
(filter_doc): Replace PEST parameter with STATE.
(struct uparams): New type.
(uparams): New variable.
(struct uparam_name): New type.
(uparam_names): New variable.
(fill_in_uparams): New function.
(__argp_failure, __argp_error, __argp_state_help): Make STATE
parameter const.
* argp.h (argp_state_help, __argp_state_help, argp_usage,
__argp_usage, argp_error, __argp_error, argp_failure,
__argp_failure): Make STATE parameter const.
(ARGP_KEY_HELP_DUP_ARGS_NOTE): New macro.
* argp.h (argp_program_bug_address): Make const.
1997-02-20 19:20 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/mman/syscalls.list: Explain msync interface.
1997-02-19 01:37 Erik Troan <ewt@redhat.com>
* shadow/sgetspent_r.c: Accept empty third, fourth and fifth fields.
1997-02-20 14:44 Andreas Jaeger <aj@arthur.pfalz.de>
* stdio-common/test-fseek.c: Remove temporary file, add
copyright.
1997-02-20 17:51 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h: Protect contents using
__BEGIN/END_DECLS. Reported by a sun <asun@zoology.washington.edu>.
* inet/net/ethernet.h: Move to sysdeps/unix/sysv/linux/net.
* inet/Makefile (headers): Remove net/ethernet.h.
* sysdeps/unix/sysv/linux/Makefile: Install net/ethernet.h.
* sysdeps/unix/sysv/linux/Dist: Distribute net/ethernet.h.
1997-02-20 15:23 Thorsten Kukuk <kukuk@weber.uni-paderborn.de>
* nss/nsswitch.c (__nss_configure_lookup): Use correct test when
searching in sorted array.
1997-02-20 01:24 Philip Blundell <pjb27@cam.ac.uk>
* inet/getnameinfo.c: Change to use reentrant getXXbyYY functions
and protect modification of global data.
1997-02-19 18:48 Miles Bader <miles@gnu.ai.mit.edu>
* argp-parse.c (argp_default_parser): Set STATE->name for OPT_PROGNAME.
(parser_init): Use the basename for PARSER->state.name.
* argp-help.c (__argp_error, __argp_failure, __argp_state_help):
Use PROGRAM_INVOCATION_SHORT_NAME instead of PROGRAM_INVOCATION_NAME.
* argp-parse.c (parser_init): Set PARSER->state.flags.
Make check whether PARSER has the prog name in argv[0] at the
proper place.
1997-02-19 23:34 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-time.c (time_finish): t_fmt_ampm is optional.
Use default value instead of printing a warning.
* nss/XXX-lookup.c: Add misssing explanation.
1997-02-19 19:14 Andreas Jaeger <aj@arthur.pfalz.de>
* inet/in6_addr.c: Add missing braces.
* inet/getnameinfo.c: Include <arpa/inet.h>.
* sysdeps/posix/getaddrinfo.c: Include <arpa/inet.h>.
1997-02-19 11:46 Ulrich Drepper <drepper@cygnus.com>
* string/strxfrm.c (STRCOLL): Correct handling of `position'
levels with no non-IGNOREd element and handling of NUL byte.
* string/strcoll.c (STRXFRM): Likewise.
* locale/weight.h: Likewise.
* shadow/sgetspent_r.c (LINE_PARSER): Add missing ')'.
1997-02-22 01:20:46 +00:00
|
|
|
static const char doc[] = N_("Get locale-specific information.");
|
1997-02-19 04:43:53 +00:00
|
|
|
|
|
|
|
/* Strings for arguments in help texts. */
|
update from main archive 970221
1997-02-22 00:17 Ulrich Drepper <drepper@cygnus.com>
* catgets/gencat.c: Change to use argp.
* db/makedb: Likewise.
* locale/programs/localedef.c: Likewise.
* locale/programs/locale.c: Little adjustment for better usage of
argp.
1997-02-20 20:07 Greg McGary <gkm@eng.ascend.com>
* Makeconfig: Add rules for libc with bounded pointers.
* Makerules: Likewise.
* config.make.in: Likewise.
* configure.in: Likewise.
1997-02-21 10:41 Miles Bader <miles@gnu.ai.mit.edu>
* argp.h (OPTION_NO_USAGE): New macro.
* argp-help.c (usage_long_opt, usage_argful_short_opt,
add_argless_short_opt): Implement OPTION_NO_USAGE.
1997-02-20 16:41 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/obstack.h: Fix typo.
1997-02-20 15:56 Miles Bader <miles@gnu.ai.mit.edu>
* argp-fmtstream.c (__argp_fmtstream_update): Account for case
where NEXTLINE points one past the end of the active buffer.
* argp-help.c <stddef.h>: New include.
(__argp_failure): Only exit if STATE says it's ok.
(print_header, hol_entry_help): Use UPARAMS fields rather than
constants.
(_help): Call fill_in_uparams if necessary.
(struct hol_help_state): New type.
(struct pentry_state): Add hhstate field. Remove prev_entry &
sep_groups fields.
(hol_entry_help): Add HHSTATE parameter. Remove prev_entry &
sep_groups parameters.
Suppress duplicate arguments if requested, and note the fact.
(print_header, comma): Use PEST->hhstate fields.
(hol_help): Add HHSTATE variable & pass to hol_entry_help.
Remove LAST_ENTRY & SEP_GROUPS variables.
If any suplicate arguments were suppressed, print explanatory note.
(filter_doc): Replace PEST parameter with STATE.
(struct uparams): New type.
(uparams): New variable.
(struct uparam_name): New type.
(uparam_names): New variable.
(fill_in_uparams): New function.
(__argp_failure, __argp_error, __argp_state_help): Make STATE
parameter const.
* argp.h (argp_state_help, __argp_state_help, argp_usage,
__argp_usage, argp_error, __argp_error, argp_failure,
__argp_failure): Make STATE parameter const.
(ARGP_KEY_HELP_DUP_ARGS_NOTE): New macro.
* argp.h (argp_program_bug_address): Make const.
1997-02-20 19:20 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/mman/syscalls.list: Explain msync interface.
1997-02-19 01:37 Erik Troan <ewt@redhat.com>
* shadow/sgetspent_r.c: Accept empty third, fourth and fifth fields.
1997-02-20 14:44 Andreas Jaeger <aj@arthur.pfalz.de>
* stdio-common/test-fseek.c: Remove temporary file, add
copyright.
1997-02-20 17:51 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h: Protect contents using
__BEGIN/END_DECLS. Reported by a sun <asun@zoology.washington.edu>.
* inet/net/ethernet.h: Move to sysdeps/unix/sysv/linux/net.
* inet/Makefile (headers): Remove net/ethernet.h.
* sysdeps/unix/sysv/linux/Makefile: Install net/ethernet.h.
* sysdeps/unix/sysv/linux/Dist: Distribute net/ethernet.h.
1997-02-20 15:23 Thorsten Kukuk <kukuk@weber.uni-paderborn.de>
* nss/nsswitch.c (__nss_configure_lookup): Use correct test when
searching in sorted array.
1997-02-20 01:24 Philip Blundell <pjb27@cam.ac.uk>
* inet/getnameinfo.c: Change to use reentrant getXXbyYY functions
and protect modification of global data.
1997-02-19 18:48 Miles Bader <miles@gnu.ai.mit.edu>
* argp-parse.c (argp_default_parser): Set STATE->name for OPT_PROGNAME.
(parser_init): Use the basename for PARSER->state.name.
* argp-help.c (__argp_error, __argp_failure, __argp_state_help):
Use PROGRAM_INVOCATION_SHORT_NAME instead of PROGRAM_INVOCATION_NAME.
* argp-parse.c (parser_init): Set PARSER->state.flags.
Make check whether PARSER has the prog name in argv[0] at the
proper place.
1997-02-19 23:34 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-time.c (time_finish): t_fmt_ampm is optional.
Use default value instead of printing a warning.
* nss/XXX-lookup.c: Add misssing explanation.
1997-02-19 19:14 Andreas Jaeger <aj@arthur.pfalz.de>
* inet/in6_addr.c: Add missing braces.
* inet/getnameinfo.c: Include <arpa/inet.h>.
* sysdeps/posix/getaddrinfo.c: Include <arpa/inet.h>.
1997-02-19 11:46 Ulrich Drepper <drepper@cygnus.com>
* string/strxfrm.c (STRCOLL): Correct handling of `position'
levels with no non-IGNOREd element and handling of NUL byte.
* string/strcoll.c (STRXFRM): Likewise.
* locale/weight.h: Likewise.
* shadow/sgetspent_r.c (LINE_PARSER): Add missing ')'.
1997-02-22 01:20:46 +00:00
|
|
|
static const char args_doc[] = N_("NAME\n[-a|-m]");
|
1997-02-19 04:43:53 +00:00
|
|
|
|
|
|
|
/* Prototype for option handler. */
|
|
|
|
static error_t parse_opt (int key, char *arg, struct argp_state *state);
|
|
|
|
|
|
|
|
/* Function to print some extra text in the help message. */
|
|
|
|
static char *more_help (int key, const char *text, void *input);
|
|
|
|
|
|
|
|
/* Data structure to communicate with argp functions. */
|
|
|
|
static struct argp argp =
|
|
|
|
{
|
|
|
|
options, parse_opt, args_doc, doc, NULL, more_help
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
};
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* We don't have these constants defined because we don't use them. Give
|
|
|
|
default values. */
|
|
|
|
#define CTYPE_MB_CUR_MIN 0
|
|
|
|
#define CTYPE_MB_CUR_MAX 0
|
|
|
|
#define CTYPE_HASH_SIZE 0
|
|
|
|
#define CTYPE_HASH_LAYERS 0
|
|
|
|
#define CTYPE_CLASS 0
|
|
|
|
#define CTYPE_TOUPPER_EB 0
|
|
|
|
#define CTYPE_TOLOWER_EB 0
|
|
|
|
#define CTYPE_TOUPPER_EL 0
|
|
|
|
#define CTYPE_TOLOWER_EL 0
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
|
1996-04-03 16:31:49 +00:00
|
|
|
/* Definition of the data structure which represents a category and its
|
|
|
|
items. */
|
|
|
|
struct category
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
{
|
1996-04-03 16:31:49 +00:00
|
|
|
int cat_id;
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
const char *name;
|
1996-04-03 16:31:49 +00:00
|
|
|
size_t number;
|
|
|
|
struct cat_item
|
|
|
|
{
|
|
|
|
int item_id;
|
|
|
|
const char *name;
|
|
|
|
enum { std, opt } status;
|
|
|
|
enum value_type value_type;
|
|
|
|
int min;
|
|
|
|
int max;
|
|
|
|
} *item_desc;
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
};
|
|
|
|
|
1996-04-03 16:31:49 +00:00
|
|
|
/* Simple helper macro. */
|
|
|
|
#define NELEMS(arr) ((sizeof (arr)) / (sizeof (arr[0])))
|
|
|
|
|
|
|
|
/* For some tricky stuff. */
|
|
|
|
#define NO_PAREN(Item, More...) Item, ## More
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
/* We have all categories defined in `categories.def'. Now construct
|
|
|
|
the description and data structure used for all categories. */
|
1996-04-03 16:31:49 +00:00
|
|
|
#define DEFINE_ELEMENT(Item, More...) { Item, ## More },
|
1999-08-31 07:04:41 +00:00
|
|
|
#define DEFINE_CATEGORY(category, name, items, postload) \
|
1995-05-18 09:00:09 +00:00
|
|
|
static struct cat_item category##_desc[] = \
|
|
|
|
{ \
|
|
|
|
NO_PAREN items \
|
|
|
|
};
|
|
|
|
|
1996-04-03 16:31:49 +00:00
|
|
|
#include "categories.def"
|
1995-05-18 09:00:09 +00:00
|
|
|
#undef DEFINE_CATEGORY
|
|
|
|
|
|
|
|
static struct category category[] =
|
|
|
|
{
|
1999-08-31 07:04:41 +00:00
|
|
|
#define DEFINE_CATEGORY(category, name, items, postload) \
|
1996-07-26 04:35:31 +00:00
|
|
|
[category] = { _NL_NUM_##category, name, NELEMS (category##_desc), \
|
|
|
|
category##_desc },
|
1996-04-03 16:31:49 +00:00
|
|
|
#include "categories.def"
|
1995-05-18 09:00:09 +00:00
|
|
|
#undef DEFINE_CATEGORY
|
|
|
|
};
|
|
|
|
#define NCATEGORIES NELEMS (category)
|
|
|
|
|
|
|
|
|
1996-07-26 04:35:31 +00:00
|
|
|
/* Automatically set variable. */
|
|
|
|
extern const char *__progname;
|
|
|
|
|
|
|
|
/* helper function for extended name handling. */
|
|
|
|
extern void locale_special (const char *name, int show_category_name,
|
|
|
|
int show_keyword_name);
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
/* Prototypes for local functions. */
|
2002-12-14 03:26:43 +00:00
|
|
|
static void print_LC_IDENTIFICATION (void *mapped, size_t size);
|
|
|
|
static void print_LC_CTYPE (void *mapped, size_t size);
|
1995-05-18 09:00:09 +00:00
|
|
|
static void write_locales (void);
|
2002-12-14 03:26:43 +00:00
|
|
|
static int nameentcmp (const void *a, const void *b);
|
|
|
|
static int write_archive_locales (void **all_datap, char *linebuf);
|
1995-05-18 09:00:09 +00:00
|
|
|
static void write_charmaps (void);
|
|
|
|
static void show_locale_vars (void);
|
|
|
|
static void show_info (const char *name);
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
update from main archive 970225
1997-02-24 23:05 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/malloc.c (malloc_get_state): New function.
Saves global malloc state to an opaque data structure which
is dynamically allocated in the heap.
* malloc/malloc.c (malloc_set_state): New function.
Restore previously obtained state.
* malloc/malloc.h: Add declaration of malloc_get_state()
and malloc_set_state().
1997-02-24 23:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrtl.c: Shift B1_EXP value to right
position.
1997-02-24 17:38 Ulrich Drepper <drepper@cygnus.com>
* misc/error.c: Make error and error_at_line weak aliases of
__error and __error_at_line respectively.
Suggested by David Mosberger-Tang <davidm@AZStarNet.COM>.
* sysdeps/unix/sysv/linux/i386/socket.S: Update copyright.
1997-02-22 11:30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/ldd.bash.in: Run the program directly, not as argument
to the dynamic linker, if it contains an interpreter segment.
* elf/ldd.sh.in: Likewise.
* elf/rtld.c (dl_main): In verify mode check whether the dynamic
object contains an interpreter segment and exit with 2 if not.
1997-02-23 01:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (distribute): Remove nsswitch.h, netgroup.h, mcheck.h
and xlocale.h. Make-dist adds them automagically.
1997-02-22 12:25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* locale/C-time.c (_nl_C_LC_TIME): Add missing entry for
time-era-num-entries.
1997-02-06 13:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* rellns-sh: No need to check for existance of first parameter.
1997-02-24 15:20 Jonathan T. Agnew <jtagnew@amherst.edu>
* glibcbug.in: Don't mention destination on MAIL_AGENT command line
to avoid duplicate mail.
1997-02-24 03:51 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add isomac.c.
(tests): Run isomac test.
* features.h (__USE_ISOC9X): New macro.
* catgets/catgets.c: Don't use global variable `optind'. Instead
use result computed by argp_parse.
* db/makedb: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* libio/stdio.h: Rewrite. Make it more readable and add comments.
* libio/clearerr.c: Remove clearerr_locked alias.
* libio/feof.c: Remove feof_locked alias.
* libio/ferror.c: Remove feof_locked alias.
* libio/fileno.c: Remove fileno_locked alias.
* libio/fputc.c: Remove fputc_locked alias.
* libio/getc.c: Remove getc_locked alias.
* libio/getchar.c: Remove getchar_locked alias.
* libio/iofflush.c: Remove fflush_locked alias.
* libio/putc.c: Remove putc_locked alias.
* libio/putc.c: Remove putchar_locked alias.
* stdio-common/printf_fp.c: When number is inifinity print INF
or inf depending on case of specifier. Same for NaN where NAN
or nan is printed. Specified in ISO C 9X.
* misc/sys/cdefs.h (__restrict): Define to empty string for now.
* stdio/stdio.h: Add __restrict to prototypes where necessary.
* libio/stdio.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* stdlib/strtod.c: Change to recognize INF, INFINITY, NAN, and
NAN(...).
* sysdeps/ieee754/huge_val.h: Define HUGE_VALF and HUGE_VALL instead
of HUGE_VALf and HUGE_VALL.
* stdlib/strtof.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALF
instead of HUGE_VALf.
* wcsmbs/wcstof.c: Likewise.
* stdlib/strtold.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALL
instead of HUGE_VALl.
* wcsmbs/wcstold.c: Likewise.
* sysdeps/posix/gai_strerror.c: Use size_t for counter variable to
avoid warning.
* wcsmbs/Makefile (routines): Add wcscasecmp and wcsncase.
* wcsmbs/wchar.h: Add prototypes for wcscasecmp and wcsncase.
* wcsmbs/wcscasecmp.c: New file.
* wcsmbs/wcsncase.c: New file.
* stdlib/strtol.c: Define wide character quad word functions as
wcstoll and wcstoull and normal versions as strtoll and strtoull.
* wcsmbs/wchar.h: Add prototypes for wcstoll and wcstoull.
* wcsmbs/wcstoq: Renamed to wcstoll.c.
* wcsmbs/wcstouq: Renamed to wcstoull.c.
* wcsmbs/wcstoll.c: Renamed from wcstoq.c. Make wcstoq a weak
alias of wcstoll.
* wcsmbs/wcstoull.c: Renamed from wcstouq.c. Make wcstouq a weak
alias of wcstoull.
* wcsmbs/Makefile (routines): Replace wcstoq and wcstouq by
wcstoll and wcstoull respectively.
* stdlib/strtoq.c: Rename to strtoll.c.
* stdlib/strtouq.c: Rename to strtoull.c.
* stdlib/strtoll.c: Renamed from strtoq.c. Make strtoq a weak
alias of strtoll.
* stdlib/strtoll.c: Renamed from strtouq.c. Make strtouq a weak
alias of strtoull.
* stdlib/Makefile (routines): Replace strtoq and strtouq by
strtoll and strtoull respectively.
* stdio-common/vfscanf.c: Don't use __strtoq_internal and
__strtouq_internal but instead __strtoll_internal and
__strtoull_internal respectively.
* stdlib/stdlib.h (strtoq): Use __internal_strtoll in inline version.
(strtouq): Similar with __internal_strtoull.
* wcsmbs/wchar.h (wcstoq): Use __internal_wcstoll in inline version.
(wcstouq): Similar with __internal_wcstoull.
1997-02-23 04:38 Ulrich Drepper <drepper@cygnus.com>
* stdlib/strtol.c (STRTOL): It is not illegal to parse a minus
sign in the strtouXX functions. The results gets simply negated.
* stdio-common/tstscanf.c: Add testcase for above case.
* stdlib/tst-strtol.c: Correct tests.
* manual/stdio-fp.c: New file. Generate output for example program
in stdio.texi.
* stdio-common/Makefile (routines): Add printf_fphex.
* stdio-common/vfprintf.c: Add handling of %a and %A specifier.
* stdio-common/printf_fphex.c: New file. Implement %a and %A
specifier.
1997-02-22 03:01 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/timebits.h (CLK_TCK): Don't defined if
__STRICT_ANSI__.
* math/math.h: Prevent definition of struct exception when using
C++.
1997-02-22 01:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/syscalls.list: Dup takes only one argument.
Reported by Greg McGary.
1997-02-21 00:22 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-20 01:28 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-19 13:56 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-18 15:39 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-17 10:58 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-15 10:23 Miles Bader <miles@gnu.ai.mit.edu>
(mutex_lock, mutex_unlock, mutex_trylock): Defined in terms of
__mutex_*.
(mutex_t): Type removed & replaced by new macro.
(tsd_key_t): Typedef to int instead of pthread_key_t.
(tsd_key_create, tsd_setspecific, tsd_getspecific): New macros.
(__pthread_initialize): New macro, work around assumption of pthreads.
* sysdeps/mach/hurd/i386/init-first.c (__libc_argv, __libc_argc):
__hurd_sigthread_stack_end, __hurd_sigthread_stack_variables,
__hurd_threadvar_max, __hurd_threadvar_stack_offset,
__hurd_threadvar_stack_mask): Variables removed.
1997-02-14 14:07 Miles Bader <miles@gnu.ai.mit.edu>
* hurd/hurd.h (_hurd_pids_changed_stamp, _hurd_pids_changed_sync):
1997-02-24 17:06 Geoffrey Keating <geoffk@discus.anu.edu.au>
* sysdeps/unix/sysv/linux/accept.S (NARGS): Describe number of
arguments taken, for sysdeps/unix/sysv/linux/powerpc/socket.S.
* sysdeps/unix/sysv/linux/bind.S: Likewise.
* sysdeps/unix/sysv/linux/connect.S: Likewise.
* sysdeps/unix/sysv/linux/getpeername.S: Likewise.
* sysdeps/unix/sysv/linux/getsockname.S: Likewise.
* sysdeps/unix/sysv/linux/getsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/listen.S: Likewise.
* sysdeps/unix/sysv/linux/recv.S: Likewise.
* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
* sysdeps/unix/sysv/linux/recvmsg.S: Likewise.
* sysdeps/unix/sysv/linux/send.S: Likewise.
* sysdeps/unix/sysv/linux/sendmsg.S: Likewise.
* sysdeps/unix/sysv/linux/sendto.S: Likewise.
* sysdeps/unix/sysv/linux/setsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/shutdown.S: Likewise.
* sysdeps/unix/sysv/linux/socketpair.S: Likewise.
1997-02-15 04:51 Ulrich Drepper <drepper@cygnus.com>
1997-02-25 05:18:05 +00:00
|
|
|
int remaining;
|
|
|
|
|
1996-06-26 15:46:01 +00:00
|
|
|
/* Set initial values for global variables. */
|
1995-05-18 09:00:09 +00:00
|
|
|
show_category_name = 0;
|
|
|
|
show_keyword_name = 0;
|
|
|
|
|
|
|
|
/* Set locale. Do not set LC_ALL because the other categories must
|
1996-12-20 01:39:50 +00:00
|
|
|
not be affected (according to POSIX.2). */
|
Update.
2003-05-21 Petter Reinholdtsen <pere@hungry.com>
* locale/programs/locale.c (main): Report an error if setlocale()
fails [PR libc/2254].
2003-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/s390/system.c: New file.
2003-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (LOADARGS_0,
LOADARGS_1, LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5,
LOADARGS_6): Don't error if syscall argument is a string literal.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (LOADARGS_0,
LOADARGS_1, LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5,
LOADARGS_6): Likewise.
2003-05-21 19:31:11 +00:00
|
|
|
if (setlocale (LC_CTYPE, "") == NULL)
|
|
|
|
error (0, errno, gettext ("Cannot set LC_CTYPE to default locale"));
|
|
|
|
if (setlocale (LC_MESSAGES, "") == NULL)
|
|
|
|
error (0, errno, gettext ("Cannot set LC_MESSAGES to default locale"));
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
/* Initialize the message catalog. */
|
|
|
|
textdomain (PACKAGE);
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
/* Parse and process arguments. */
|
update from main archive 970225
1997-02-24 23:05 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/malloc.c (malloc_get_state): New function.
Saves global malloc state to an opaque data structure which
is dynamically allocated in the heap.
* malloc/malloc.c (malloc_set_state): New function.
Restore previously obtained state.
* malloc/malloc.h: Add declaration of malloc_get_state()
and malloc_set_state().
1997-02-24 23:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrtl.c: Shift B1_EXP value to right
position.
1997-02-24 17:38 Ulrich Drepper <drepper@cygnus.com>
* misc/error.c: Make error and error_at_line weak aliases of
__error and __error_at_line respectively.
Suggested by David Mosberger-Tang <davidm@AZStarNet.COM>.
* sysdeps/unix/sysv/linux/i386/socket.S: Update copyright.
1997-02-22 11:30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/ldd.bash.in: Run the program directly, not as argument
to the dynamic linker, if it contains an interpreter segment.
* elf/ldd.sh.in: Likewise.
* elf/rtld.c (dl_main): In verify mode check whether the dynamic
object contains an interpreter segment and exit with 2 if not.
1997-02-23 01:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (distribute): Remove nsswitch.h, netgroup.h, mcheck.h
and xlocale.h. Make-dist adds them automagically.
1997-02-22 12:25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* locale/C-time.c (_nl_C_LC_TIME): Add missing entry for
time-era-num-entries.
1997-02-06 13:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* rellns-sh: No need to check for existance of first parameter.
1997-02-24 15:20 Jonathan T. Agnew <jtagnew@amherst.edu>
* glibcbug.in: Don't mention destination on MAIL_AGENT command line
to avoid duplicate mail.
1997-02-24 03:51 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add isomac.c.
(tests): Run isomac test.
* features.h (__USE_ISOC9X): New macro.
* catgets/catgets.c: Don't use global variable `optind'. Instead
use result computed by argp_parse.
* db/makedb: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* libio/stdio.h: Rewrite. Make it more readable and add comments.
* libio/clearerr.c: Remove clearerr_locked alias.
* libio/feof.c: Remove feof_locked alias.
* libio/ferror.c: Remove feof_locked alias.
* libio/fileno.c: Remove fileno_locked alias.
* libio/fputc.c: Remove fputc_locked alias.
* libio/getc.c: Remove getc_locked alias.
* libio/getchar.c: Remove getchar_locked alias.
* libio/iofflush.c: Remove fflush_locked alias.
* libio/putc.c: Remove putc_locked alias.
* libio/putc.c: Remove putchar_locked alias.
* stdio-common/printf_fp.c: When number is inifinity print INF
or inf depending on case of specifier. Same for NaN where NAN
or nan is printed. Specified in ISO C 9X.
* misc/sys/cdefs.h (__restrict): Define to empty string for now.
* stdio/stdio.h: Add __restrict to prototypes where necessary.
* libio/stdio.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* stdlib/strtod.c: Change to recognize INF, INFINITY, NAN, and
NAN(...).
* sysdeps/ieee754/huge_val.h: Define HUGE_VALF and HUGE_VALL instead
of HUGE_VALf and HUGE_VALL.
* stdlib/strtof.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALF
instead of HUGE_VALf.
* wcsmbs/wcstof.c: Likewise.
* stdlib/strtold.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALL
instead of HUGE_VALl.
* wcsmbs/wcstold.c: Likewise.
* sysdeps/posix/gai_strerror.c: Use size_t for counter variable to
avoid warning.
* wcsmbs/Makefile (routines): Add wcscasecmp and wcsncase.
* wcsmbs/wchar.h: Add prototypes for wcscasecmp and wcsncase.
* wcsmbs/wcscasecmp.c: New file.
* wcsmbs/wcsncase.c: New file.
* stdlib/strtol.c: Define wide character quad word functions as
wcstoll and wcstoull and normal versions as strtoll and strtoull.
* wcsmbs/wchar.h: Add prototypes for wcstoll and wcstoull.
* wcsmbs/wcstoq: Renamed to wcstoll.c.
* wcsmbs/wcstouq: Renamed to wcstoull.c.
* wcsmbs/wcstoll.c: Renamed from wcstoq.c. Make wcstoq a weak
alias of wcstoll.
* wcsmbs/wcstoull.c: Renamed from wcstouq.c. Make wcstouq a weak
alias of wcstoull.
* wcsmbs/Makefile (routines): Replace wcstoq and wcstouq by
wcstoll and wcstoull respectively.
* stdlib/strtoq.c: Rename to strtoll.c.
* stdlib/strtouq.c: Rename to strtoull.c.
* stdlib/strtoll.c: Renamed from strtoq.c. Make strtoq a weak
alias of strtoll.
* stdlib/strtoll.c: Renamed from strtouq.c. Make strtouq a weak
alias of strtoull.
* stdlib/Makefile (routines): Replace strtoq and strtouq by
strtoll and strtoull respectively.
* stdio-common/vfscanf.c: Don't use __strtoq_internal and
__strtouq_internal but instead __strtoll_internal and
__strtoull_internal respectively.
* stdlib/stdlib.h (strtoq): Use __internal_strtoll in inline version.
(strtouq): Similar with __internal_strtoull.
* wcsmbs/wchar.h (wcstoq): Use __internal_wcstoll in inline version.
(wcstouq): Similar with __internal_wcstoull.
1997-02-23 04:38 Ulrich Drepper <drepper@cygnus.com>
* stdlib/strtol.c (STRTOL): It is not illegal to parse a minus
sign in the strtouXX functions. The results gets simply negated.
* stdio-common/tstscanf.c: Add testcase for above case.
* stdlib/tst-strtol.c: Correct tests.
* manual/stdio-fp.c: New file. Generate output for example program
in stdio.texi.
* stdio-common/Makefile (routines): Add printf_fphex.
* stdio-common/vfprintf.c: Add handling of %a and %A specifier.
* stdio-common/printf_fphex.c: New file. Implement %a and %A
specifier.
1997-02-22 03:01 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/timebits.h (CLK_TCK): Don't defined if
__STRICT_ANSI__.
* math/math.h: Prevent definition of struct exception when using
C++.
1997-02-22 01:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/syscalls.list: Dup takes only one argument.
Reported by Greg McGary.
1997-02-21 00:22 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-20 01:28 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-19 13:56 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-18 15:39 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-17 10:58 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-15 10:23 Miles Bader <miles@gnu.ai.mit.edu>
(mutex_lock, mutex_unlock, mutex_trylock): Defined in terms of
__mutex_*.
(mutex_t): Type removed & replaced by new macro.
(tsd_key_t): Typedef to int instead of pthread_key_t.
(tsd_key_create, tsd_setspecific, tsd_getspecific): New macros.
(__pthread_initialize): New macro, work around assumption of pthreads.
* sysdeps/mach/hurd/i386/init-first.c (__libc_argv, __libc_argc):
__hurd_sigthread_stack_end, __hurd_sigthread_stack_variables,
__hurd_threadvar_max, __hurd_threadvar_stack_offset,
__hurd_threadvar_stack_mask): Variables removed.
1997-02-14 14:07 Miles Bader <miles@gnu.ai.mit.edu>
* hurd/hurd.h (_hurd_pids_changed_stamp, _hurd_pids_changed_sync):
1997-02-24 17:06 Geoffrey Keating <geoffk@discus.anu.edu.au>
* sysdeps/unix/sysv/linux/accept.S (NARGS): Describe number of
arguments taken, for sysdeps/unix/sysv/linux/powerpc/socket.S.
* sysdeps/unix/sysv/linux/bind.S: Likewise.
* sysdeps/unix/sysv/linux/connect.S: Likewise.
* sysdeps/unix/sysv/linux/getpeername.S: Likewise.
* sysdeps/unix/sysv/linux/getsockname.S: Likewise.
* sysdeps/unix/sysv/linux/getsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/listen.S: Likewise.
* sysdeps/unix/sysv/linux/recv.S: Likewise.
* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
* sysdeps/unix/sysv/linux/recvmsg.S: Likewise.
* sysdeps/unix/sysv/linux/send.S: Likewise.
* sysdeps/unix/sysv/linux/sendmsg.S: Likewise.
* sysdeps/unix/sysv/linux/sendto.S: Likewise.
* sysdeps/unix/sysv/linux/setsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/shutdown.S: Likewise.
* sysdeps/unix/sysv/linux/socketpair.S: Likewise.
1997-02-15 04:51 Ulrich Drepper <drepper@cygnus.com>
1997-02-25 05:18:05 +00:00
|
|
|
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
/* `-a' requests the names of all available locales. */
|
|
|
|
if (do_all != 0)
|
|
|
|
{
|
Update.
2003-05-21 Petter Reinholdtsen <pere@hungry.com>
* locale/programs/locale.c (main): Report an error if setlocale()
fails [PR libc/2254].
2003-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/s390/system.c: New file.
2003-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (LOADARGS_0,
LOADARGS_1, LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5,
LOADARGS_6): Don't error if syscall argument is a string literal.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (LOADARGS_0,
LOADARGS_1, LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5,
LOADARGS_6): Likewise.
2003-05-21 19:31:11 +00:00
|
|
|
if (setlocale (LC_COLLATE, "") == NULL)
|
|
|
|
error (0, errno,
|
|
|
|
gettext ("Cannot set LC_COLLATE to default locale"));
|
1995-05-18 09:00:09 +00:00
|
|
|
write_locales ();
|
|
|
|
exit (EXIT_SUCCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* `m' requests the names of all available charmaps. The names can be
|
1997-08-02 21:00:51 +00:00
|
|
|
used for the -f argument to localedef(1). */
|
1995-05-18 09:00:09 +00:00
|
|
|
if (do_charmaps != 0)
|
|
|
|
{
|
|
|
|
write_charmaps ();
|
|
|
|
exit (EXIT_SUCCESS);
|
|
|
|
}
|
|
|
|
|
Thu May 30 11:24:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* po/header.pot: Replace with exact boilerplate pinard dictates.
* sysdeps/i386/strtok.S (Lillegal_argument): Remove this code to set
errno and the check that jumped to it.
* sysdeps/mach/hurd/Makefile (errnos.d): Use $(sed-remove-objpfx).
Thu May 30 03:21:57 1996 Ulrich Drepper <drepper@cygnus.com>
* FAQ: Document need of gperf program for developers.
* elf/elf.h: Fix typos in comments.
* libio/stdio.h [!__STRICT_ANSI__ || _POSIX_SOURCE]: Add
prototypes for `ctermid' and `cuserid'.
* locale/programs/locale.c: Switch to user selected locale
before printing variables.
* math/Makefile [$(long-double-fcts)==yes]: Define long-m-routines
and long-c-routines. Only if the `long double' data type is
available we need to compile the functions.
(libm-routines): Add $(long-m-routines).
(routines): Remove isinfl, isnanl. Use new file s_isinfl and
s_isnanl instead if `long double' is available.
* math/math.h: Include <mathcalls.h> again to define `long double'
functions.
* math/math_private.h: Define data types, prototypes and access
macros for `long double'.
* stdlib/stdlib.h: Add prototypes for `strtoll' and `strtoull'.
[GCC2 && OPTIMIZE]: Define strto{,u}ll as inline function which
calls __strto{,u}q_internal.
* stdlib/strfmon.c: Replace PTR by `void *'.
* stdlib/strtoq.c: Define strtoll as weak alias.
* stdlib/strtouq.c: Define strtoull as weak alias.
* string/tester.c: Correct `strsep' test.
* sysdeps/generic/strsep.c: Make compatible with BSD version.
Trailing characters of skip set are not skipped. In this case
empty tokens are returned.
* sysdeps/i386/isinfl.c, sysdeps/i386/isnanl.c,
sysdeps/ieee754/isinf.c, sysdeps/ieee754/isinfl.c,
sysdeps/ieee754/isnan.c, sysdeps/ieee754/isnanl.c: Removed. We
now use the versions part of libm.
* sysdeps/i386/strsep.S: Removed. Generic C version is of
similar speed.
* sysdeps/i386/strtok.S: Remove support for `strsep'.
* sysdeps/libm-i387/e_acosl.S, sysdeps/libm-i387/s_ceill.S,
sysdeps/libm-i387/s_copysignl.S, sysdeps/libm-i387/s_finitel.S,
sysdeps/libm-i387/s_floorl.S, sysdeps/libm-i387/s_isinfl.c,
sysdeps/libm-i387/s_isnanl.c, sysdeps/libm-i387/s_nextafterl.c,
sysdeps/libm-i387/s_rintl.S, sysdeps/libm-i387/s_significandl.S:
New i387 specific math functions implementing `long double'
versions.
* sysdeps/libm-ieee754/s_ceill.c,
sysdeps/libm-ieee754/s_copysignl.c,
sysdeps/libm-ieee754/s_fabsl.c, sysdeps/libm-ieee754/s_finitel.c,
sysdeps/libm-ieee754/s_floorl.c, sysdeps/libm-ieee754/s_isinfl.c,
sysdeps/libm-ieee754/s_isnanl.c,
sysdeps/libm-ieee754/s_nextafterl.c,
sysdeps/libm-ieee754/s_rintl.c, sysdeps/libm-ieee754/s_scalbnl.c,
sysdeps/libm-ieee754/s_significandl.c: New generic `long double'
versions of libm functions.
* sysdeps/libm-i387/e_exp.S: Add a few comments to explain the
Intel FPU nonsense.
* sysdeps/libm-i387/s_ceil.S, sysdeps/libm-i387/s_ceilf.S,
sysdeps/libm-i387/s_floor.S, sysdeps/libm-i387/s_floorf.S: Correct
handling of local variables. The old version created a stack
frame but stored the values outside.
* sysdeps/libm-ieee754/s_isinf.c, sysdeps/libm-ieee754/s_isnan.c
[!NO_LONG_DOUBLE]: Define alias with `long double' versions name.
* login/pututline_r.c: Include sys/stat.h. Fix typos.
according to currently used locale for category LC_CTYPE by
inet_nsap_ntoa. Now in <arpa/inet.h>.
_IO_dup2 to contain complete parameter list.
1996-05-30 16:12:42 +00:00
|
|
|
/* Specific information about the current locale are requested.
|
|
|
|
Change to this locale now. */
|
2003-05-22 00:41:32 +00:00
|
|
|
if (setlocale (LC_ALL, "") == NULL)
|
Update.
2003-05-21 Petter Reinholdtsen <pere@hungry.com>
* locale/programs/locale.c (main): Report an error if setlocale()
fails [PR libc/2254].
2003-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/s390/system.c: New file.
2003-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (LOADARGS_0,
LOADARGS_1, LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5,
LOADARGS_6): Don't error if syscall argument is a string literal.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (LOADARGS_0,
LOADARGS_1, LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5,
LOADARGS_6): Likewise.
2003-05-21 19:31:11 +00:00
|
|
|
error (0, errno, gettext ("Cannot set LC_ALL to default locale"));
|
Thu May 30 11:24:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* po/header.pot: Replace with exact boilerplate pinard dictates.
* sysdeps/i386/strtok.S (Lillegal_argument): Remove this code to set
errno and the check that jumped to it.
* sysdeps/mach/hurd/Makefile (errnos.d): Use $(sed-remove-objpfx).
Thu May 30 03:21:57 1996 Ulrich Drepper <drepper@cygnus.com>
* FAQ: Document need of gperf program for developers.
* elf/elf.h: Fix typos in comments.
* libio/stdio.h [!__STRICT_ANSI__ || _POSIX_SOURCE]: Add
prototypes for `ctermid' and `cuserid'.
* locale/programs/locale.c: Switch to user selected locale
before printing variables.
* math/Makefile [$(long-double-fcts)==yes]: Define long-m-routines
and long-c-routines. Only if the `long double' data type is
available we need to compile the functions.
(libm-routines): Add $(long-m-routines).
(routines): Remove isinfl, isnanl. Use new file s_isinfl and
s_isnanl instead if `long double' is available.
* math/math.h: Include <mathcalls.h> again to define `long double'
functions.
* math/math_private.h: Define data types, prototypes and access
macros for `long double'.
* stdlib/stdlib.h: Add prototypes for `strtoll' and `strtoull'.
[GCC2 && OPTIMIZE]: Define strto{,u}ll as inline function which
calls __strto{,u}q_internal.
* stdlib/strfmon.c: Replace PTR by `void *'.
* stdlib/strtoq.c: Define strtoll as weak alias.
* stdlib/strtouq.c: Define strtoull as weak alias.
* string/tester.c: Correct `strsep' test.
* sysdeps/generic/strsep.c: Make compatible with BSD version.
Trailing characters of skip set are not skipped. In this case
empty tokens are returned.
* sysdeps/i386/isinfl.c, sysdeps/i386/isnanl.c,
sysdeps/ieee754/isinf.c, sysdeps/ieee754/isinfl.c,
sysdeps/ieee754/isnan.c, sysdeps/ieee754/isnanl.c: Removed. We
now use the versions part of libm.
* sysdeps/i386/strsep.S: Removed. Generic C version is of
similar speed.
* sysdeps/i386/strtok.S: Remove support for `strsep'.
* sysdeps/libm-i387/e_acosl.S, sysdeps/libm-i387/s_ceill.S,
sysdeps/libm-i387/s_copysignl.S, sysdeps/libm-i387/s_finitel.S,
sysdeps/libm-i387/s_floorl.S, sysdeps/libm-i387/s_isinfl.c,
sysdeps/libm-i387/s_isnanl.c, sysdeps/libm-i387/s_nextafterl.c,
sysdeps/libm-i387/s_rintl.S, sysdeps/libm-i387/s_significandl.S:
New i387 specific math functions implementing `long double'
versions.
* sysdeps/libm-ieee754/s_ceill.c,
sysdeps/libm-ieee754/s_copysignl.c,
sysdeps/libm-ieee754/s_fabsl.c, sysdeps/libm-ieee754/s_finitel.c,
sysdeps/libm-ieee754/s_floorl.c, sysdeps/libm-ieee754/s_isinfl.c,
sysdeps/libm-ieee754/s_isnanl.c,
sysdeps/libm-ieee754/s_nextafterl.c,
sysdeps/libm-ieee754/s_rintl.c, sysdeps/libm-ieee754/s_scalbnl.c,
sysdeps/libm-ieee754/s_significandl.c: New generic `long double'
versions of libm functions.
* sysdeps/libm-i387/e_exp.S: Add a few comments to explain the
Intel FPU nonsense.
* sysdeps/libm-i387/s_ceil.S, sysdeps/libm-i387/s_ceilf.S,
sysdeps/libm-i387/s_floor.S, sysdeps/libm-i387/s_floorf.S: Correct
handling of local variables. The old version created a stack
frame but stored the values outside.
* sysdeps/libm-ieee754/s_isinf.c, sysdeps/libm-ieee754/s_isnan.c
[!NO_LONG_DOUBLE]: Define alias with `long double' versions name.
* login/pututline_r.c: Include sys/stat.h. Fix typos.
according to currently used locale for category LC_CTYPE by
inet_nsap_ntoa. Now in <arpa/inet.h>.
_IO_dup2 to contain complete parameter list.
1996-05-30 16:12:42 +00:00
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
/* If no real argument is given we have to print the contents of the
|
|
|
|
current locale definition variables. These are LANG and the LC_*. */
|
update from main archive 970225
1997-02-24 23:05 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/malloc.c (malloc_get_state): New function.
Saves global malloc state to an opaque data structure which
is dynamically allocated in the heap.
* malloc/malloc.c (malloc_set_state): New function.
Restore previously obtained state.
* malloc/malloc.h: Add declaration of malloc_get_state()
and malloc_set_state().
1997-02-24 23:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrtl.c: Shift B1_EXP value to right
position.
1997-02-24 17:38 Ulrich Drepper <drepper@cygnus.com>
* misc/error.c: Make error and error_at_line weak aliases of
__error and __error_at_line respectively.
Suggested by David Mosberger-Tang <davidm@AZStarNet.COM>.
* sysdeps/unix/sysv/linux/i386/socket.S: Update copyright.
1997-02-22 11:30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/ldd.bash.in: Run the program directly, not as argument
to the dynamic linker, if it contains an interpreter segment.
* elf/ldd.sh.in: Likewise.
* elf/rtld.c (dl_main): In verify mode check whether the dynamic
object contains an interpreter segment and exit with 2 if not.
1997-02-23 01:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (distribute): Remove nsswitch.h, netgroup.h, mcheck.h
and xlocale.h. Make-dist adds them automagically.
1997-02-22 12:25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* locale/C-time.c (_nl_C_LC_TIME): Add missing entry for
time-era-num-entries.
1997-02-06 13:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* rellns-sh: No need to check for existance of first parameter.
1997-02-24 15:20 Jonathan T. Agnew <jtagnew@amherst.edu>
* glibcbug.in: Don't mention destination on MAIL_AGENT command line
to avoid duplicate mail.
1997-02-24 03:51 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add isomac.c.
(tests): Run isomac test.
* features.h (__USE_ISOC9X): New macro.
* catgets/catgets.c: Don't use global variable `optind'. Instead
use result computed by argp_parse.
* db/makedb: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* libio/stdio.h: Rewrite. Make it more readable and add comments.
* libio/clearerr.c: Remove clearerr_locked alias.
* libio/feof.c: Remove feof_locked alias.
* libio/ferror.c: Remove feof_locked alias.
* libio/fileno.c: Remove fileno_locked alias.
* libio/fputc.c: Remove fputc_locked alias.
* libio/getc.c: Remove getc_locked alias.
* libio/getchar.c: Remove getchar_locked alias.
* libio/iofflush.c: Remove fflush_locked alias.
* libio/putc.c: Remove putc_locked alias.
* libio/putc.c: Remove putchar_locked alias.
* stdio-common/printf_fp.c: When number is inifinity print INF
or inf depending on case of specifier. Same for NaN where NAN
or nan is printed. Specified in ISO C 9X.
* misc/sys/cdefs.h (__restrict): Define to empty string for now.
* stdio/stdio.h: Add __restrict to prototypes where necessary.
* libio/stdio.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* stdlib/strtod.c: Change to recognize INF, INFINITY, NAN, and
NAN(...).
* sysdeps/ieee754/huge_val.h: Define HUGE_VALF and HUGE_VALL instead
of HUGE_VALf and HUGE_VALL.
* stdlib/strtof.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALF
instead of HUGE_VALf.
* wcsmbs/wcstof.c: Likewise.
* stdlib/strtold.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALL
instead of HUGE_VALl.
* wcsmbs/wcstold.c: Likewise.
* sysdeps/posix/gai_strerror.c: Use size_t for counter variable to
avoid warning.
* wcsmbs/Makefile (routines): Add wcscasecmp and wcsncase.
* wcsmbs/wchar.h: Add prototypes for wcscasecmp and wcsncase.
* wcsmbs/wcscasecmp.c: New file.
* wcsmbs/wcsncase.c: New file.
* stdlib/strtol.c: Define wide character quad word functions as
wcstoll and wcstoull and normal versions as strtoll and strtoull.
* wcsmbs/wchar.h: Add prototypes for wcstoll and wcstoull.
* wcsmbs/wcstoq: Renamed to wcstoll.c.
* wcsmbs/wcstouq: Renamed to wcstoull.c.
* wcsmbs/wcstoll.c: Renamed from wcstoq.c. Make wcstoq a weak
alias of wcstoll.
* wcsmbs/wcstoull.c: Renamed from wcstouq.c. Make wcstouq a weak
alias of wcstoull.
* wcsmbs/Makefile (routines): Replace wcstoq and wcstouq by
wcstoll and wcstoull respectively.
* stdlib/strtoq.c: Rename to strtoll.c.
* stdlib/strtouq.c: Rename to strtoull.c.
* stdlib/strtoll.c: Renamed from strtoq.c. Make strtoq a weak
alias of strtoll.
* stdlib/strtoll.c: Renamed from strtouq.c. Make strtouq a weak
alias of strtoull.
* stdlib/Makefile (routines): Replace strtoq and strtouq by
strtoll and strtoull respectively.
* stdio-common/vfscanf.c: Don't use __strtoq_internal and
__strtouq_internal but instead __strtoll_internal and
__strtoull_internal respectively.
* stdlib/stdlib.h (strtoq): Use __internal_strtoll in inline version.
(strtouq): Similar with __internal_strtoull.
* wcsmbs/wchar.h (wcstoq): Use __internal_wcstoll in inline version.
(wcstouq): Similar with __internal_wcstoull.
1997-02-23 04:38 Ulrich Drepper <drepper@cygnus.com>
* stdlib/strtol.c (STRTOL): It is not illegal to parse a minus
sign in the strtouXX functions. The results gets simply negated.
* stdio-common/tstscanf.c: Add testcase for above case.
* stdlib/tst-strtol.c: Correct tests.
* manual/stdio-fp.c: New file. Generate output for example program
in stdio.texi.
* stdio-common/Makefile (routines): Add printf_fphex.
* stdio-common/vfprintf.c: Add handling of %a and %A specifier.
* stdio-common/printf_fphex.c: New file. Implement %a and %A
specifier.
1997-02-22 03:01 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/timebits.h (CLK_TCK): Don't defined if
__STRICT_ANSI__.
* math/math.h: Prevent definition of struct exception when using
C++.
1997-02-22 01:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/syscalls.list: Dup takes only one argument.
Reported by Greg McGary.
1997-02-21 00:22 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-20 01:28 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-19 13:56 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-18 15:39 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-17 10:58 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-15 10:23 Miles Bader <miles@gnu.ai.mit.edu>
(mutex_lock, mutex_unlock, mutex_trylock): Defined in terms of
__mutex_*.
(mutex_t): Type removed & replaced by new macro.
(tsd_key_t): Typedef to int instead of pthread_key_t.
(tsd_key_create, tsd_setspecific, tsd_getspecific): New macros.
(__pthread_initialize): New macro, work around assumption of pthreads.
* sysdeps/mach/hurd/i386/init-first.c (__libc_argv, __libc_argc):
__hurd_sigthread_stack_end, __hurd_sigthread_stack_variables,
__hurd_threadvar_max, __hurd_threadvar_stack_offset,
__hurd_threadvar_stack_mask): Variables removed.
1997-02-14 14:07 Miles Bader <miles@gnu.ai.mit.edu>
* hurd/hurd.h (_hurd_pids_changed_stamp, _hurd_pids_changed_sync):
1997-02-24 17:06 Geoffrey Keating <geoffk@discus.anu.edu.au>
* sysdeps/unix/sysv/linux/accept.S (NARGS): Describe number of
arguments taken, for sysdeps/unix/sysv/linux/powerpc/socket.S.
* sysdeps/unix/sysv/linux/bind.S: Likewise.
* sysdeps/unix/sysv/linux/connect.S: Likewise.
* sysdeps/unix/sysv/linux/getpeername.S: Likewise.
* sysdeps/unix/sysv/linux/getsockname.S: Likewise.
* sysdeps/unix/sysv/linux/getsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/listen.S: Likewise.
* sysdeps/unix/sysv/linux/recv.S: Likewise.
* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
* sysdeps/unix/sysv/linux/recvmsg.S: Likewise.
* sysdeps/unix/sysv/linux/send.S: Likewise.
* sysdeps/unix/sysv/linux/sendmsg.S: Likewise.
* sysdeps/unix/sysv/linux/sendto.S: Likewise.
* sysdeps/unix/sysv/linux/setsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/shutdown.S: Likewise.
* sysdeps/unix/sysv/linux/socketpair.S: Likewise.
1997-02-15 04:51 Ulrich Drepper <drepper@cygnus.com>
1997-02-25 05:18:05 +00:00
|
|
|
if (remaining == argc && show_keyword_name == 0 && show_category_name == 0)
|
1995-05-18 09:00:09 +00:00
|
|
|
{
|
|
|
|
show_locale_vars ();
|
|
|
|
exit (EXIT_SUCCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Process all given names. */
|
update from main archive 970225
1997-02-24 23:05 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/malloc.c (malloc_get_state): New function.
Saves global malloc state to an opaque data structure which
is dynamically allocated in the heap.
* malloc/malloc.c (malloc_set_state): New function.
Restore previously obtained state.
* malloc/malloc.h: Add declaration of malloc_get_state()
and malloc_set_state().
1997-02-24 23:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_cbrtl.c: Shift B1_EXP value to right
position.
1997-02-24 17:38 Ulrich Drepper <drepper@cygnus.com>
* misc/error.c: Make error and error_at_line weak aliases of
__error and __error_at_line respectively.
Suggested by David Mosberger-Tang <davidm@AZStarNet.COM>.
* sysdeps/unix/sysv/linux/i386/socket.S: Update copyright.
1997-02-22 11:30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/ldd.bash.in: Run the program directly, not as argument
to the dynamic linker, if it contains an interpreter segment.
* elf/ldd.sh.in: Likewise.
* elf/rtld.c (dl_main): In verify mode check whether the dynamic
object contains an interpreter segment and exit with 2 if not.
1997-02-23 01:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (distribute): Remove nsswitch.h, netgroup.h, mcheck.h
and xlocale.h. Make-dist adds them automagically.
1997-02-22 12:25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* locale/C-time.c (_nl_C_LC_TIME): Add missing entry for
time-era-num-entries.
1997-02-06 13:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* rellns-sh: No need to check for existance of first parameter.
1997-02-24 15:20 Jonathan T. Agnew <jtagnew@amherst.edu>
* glibcbug.in: Don't mention destination on MAIL_AGENT command line
to avoid duplicate mail.
1997-02-24 03:51 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add isomac.c.
(tests): Run isomac test.
* features.h (__USE_ISOC9X): New macro.
* catgets/catgets.c: Don't use global variable `optind'. Instead
use result computed by argp_parse.
* db/makedb: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* libio/stdio.h: Rewrite. Make it more readable and add comments.
* libio/clearerr.c: Remove clearerr_locked alias.
* libio/feof.c: Remove feof_locked alias.
* libio/ferror.c: Remove feof_locked alias.
* libio/fileno.c: Remove fileno_locked alias.
* libio/fputc.c: Remove fputc_locked alias.
* libio/getc.c: Remove getc_locked alias.
* libio/getchar.c: Remove getchar_locked alias.
* libio/iofflush.c: Remove fflush_locked alias.
* libio/putc.c: Remove putc_locked alias.
* libio/putc.c: Remove putchar_locked alias.
* stdio-common/printf_fp.c: When number is inifinity print INF
or inf depending on case of specifier. Same for NaN where NAN
or nan is printed. Specified in ISO C 9X.
* misc/sys/cdefs.h (__restrict): Define to empty string for now.
* stdio/stdio.h: Add __restrict to prototypes where necessary.
* libio/stdio.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* stdlib/strtod.c: Change to recognize INF, INFINITY, NAN, and
NAN(...).
* sysdeps/ieee754/huge_val.h: Define HUGE_VALF and HUGE_VALL instead
of HUGE_VALf and HUGE_VALL.
* stdlib/strtof.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALF
instead of HUGE_VALf.
* wcsmbs/wcstof.c: Likewise.
* stdlib/strtold.c (FLOAT_HUGE_VAL): Use standard name HUGE_VALL
instead of HUGE_VALl.
* wcsmbs/wcstold.c: Likewise.
* sysdeps/posix/gai_strerror.c: Use size_t for counter variable to
avoid warning.
* wcsmbs/Makefile (routines): Add wcscasecmp and wcsncase.
* wcsmbs/wchar.h: Add prototypes for wcscasecmp and wcsncase.
* wcsmbs/wcscasecmp.c: New file.
* wcsmbs/wcsncase.c: New file.
* stdlib/strtol.c: Define wide character quad word functions as
wcstoll and wcstoull and normal versions as strtoll and strtoull.
* wcsmbs/wchar.h: Add prototypes for wcstoll and wcstoull.
* wcsmbs/wcstoq: Renamed to wcstoll.c.
* wcsmbs/wcstouq: Renamed to wcstoull.c.
* wcsmbs/wcstoll.c: Renamed from wcstoq.c. Make wcstoq a weak
alias of wcstoll.
* wcsmbs/wcstoull.c: Renamed from wcstouq.c. Make wcstouq a weak
alias of wcstoull.
* wcsmbs/Makefile (routines): Replace wcstoq and wcstouq by
wcstoll and wcstoull respectively.
* stdlib/strtoq.c: Rename to strtoll.c.
* stdlib/strtouq.c: Rename to strtoull.c.
* stdlib/strtoll.c: Renamed from strtoq.c. Make strtoq a weak
alias of strtoll.
* stdlib/strtoll.c: Renamed from strtouq.c. Make strtouq a weak
alias of strtoull.
* stdlib/Makefile (routines): Replace strtoq and strtouq by
strtoll and strtoull respectively.
* stdio-common/vfscanf.c: Don't use __strtoq_internal and
__strtouq_internal but instead __strtoll_internal and
__strtoull_internal respectively.
* stdlib/stdlib.h (strtoq): Use __internal_strtoll in inline version.
(strtouq): Similar with __internal_strtoull.
* wcsmbs/wchar.h (wcstoq): Use __internal_wcstoll in inline version.
(wcstouq): Similar with __internal_wcstoull.
1997-02-23 04:38 Ulrich Drepper <drepper@cygnus.com>
* stdlib/strtol.c (STRTOL): It is not illegal to parse a minus
sign in the strtouXX functions. The results gets simply negated.
* stdio-common/tstscanf.c: Add testcase for above case.
* stdlib/tst-strtol.c: Correct tests.
* manual/stdio-fp.c: New file. Generate output for example program
in stdio.texi.
* stdio-common/Makefile (routines): Add printf_fphex.
* stdio-common/vfprintf.c: Add handling of %a and %A specifier.
* stdio-common/printf_fphex.c: New file. Implement %a and %A
specifier.
1997-02-22 03:01 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/timebits.h (CLK_TCK): Don't defined if
__STRICT_ANSI__.
* math/math.h: Prevent definition of struct exception when using
C++.
1997-02-22 01:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/syscalls.list: Dup takes only one argument.
Reported by Greg McGary.
1997-02-21 00:22 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-20 01:28 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-19 13:56 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-18 15:39 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-17 10:58 Miles Bader <miles@gnu.ai.mit.edu>
1997-02-15 10:23 Miles Bader <miles@gnu.ai.mit.edu>
(mutex_lock, mutex_unlock, mutex_trylock): Defined in terms of
__mutex_*.
(mutex_t): Type removed & replaced by new macro.
(tsd_key_t): Typedef to int instead of pthread_key_t.
(tsd_key_create, tsd_setspecific, tsd_getspecific): New macros.
(__pthread_initialize): New macro, work around assumption of pthreads.
* sysdeps/mach/hurd/i386/init-first.c (__libc_argv, __libc_argc):
__hurd_sigthread_stack_end, __hurd_sigthread_stack_variables,
__hurd_threadvar_max, __hurd_threadvar_stack_offset,
__hurd_threadvar_stack_mask): Variables removed.
1997-02-14 14:07 Miles Bader <miles@gnu.ai.mit.edu>
* hurd/hurd.h (_hurd_pids_changed_stamp, _hurd_pids_changed_sync):
1997-02-24 17:06 Geoffrey Keating <geoffk@discus.anu.edu.au>
* sysdeps/unix/sysv/linux/accept.S (NARGS): Describe number of
arguments taken, for sysdeps/unix/sysv/linux/powerpc/socket.S.
* sysdeps/unix/sysv/linux/bind.S: Likewise.
* sysdeps/unix/sysv/linux/connect.S: Likewise.
* sysdeps/unix/sysv/linux/getpeername.S: Likewise.
* sysdeps/unix/sysv/linux/getsockname.S: Likewise.
* sysdeps/unix/sysv/linux/getsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/listen.S: Likewise.
* sysdeps/unix/sysv/linux/recv.S: Likewise.
* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
* sysdeps/unix/sysv/linux/recvmsg.S: Likewise.
* sysdeps/unix/sysv/linux/send.S: Likewise.
* sysdeps/unix/sysv/linux/sendmsg.S: Likewise.
* sysdeps/unix/sysv/linux/sendto.S: Likewise.
* sysdeps/unix/sysv/linux/setsockopt.S: Likewise.
* sysdeps/unix/sysv/linux/shutdown.S: Likewise.
* sysdeps/unix/sysv/linux/socketpair.S: Likewise.
1997-02-15 04:51 Ulrich Drepper <drepper@cygnus.com>
1997-02-25 05:18:05 +00:00
|
|
|
while (remaining < argc)
|
|
|
|
show_info (argv[remaining++]);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
exit (EXIT_SUCCESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
/* Handle program arguments. */
|
|
|
|
static error_t
|
|
|
|
parse_opt (int key, char *arg, struct argp_state *state)
|
1995-05-18 09:00:09 +00:00
|
|
|
{
|
1997-02-19 04:43:53 +00:00
|
|
|
switch (key)
|
1996-09-13 03:21:39 +00:00
|
|
|
{
|
1997-02-19 04:43:53 +00:00
|
|
|
case 'a':
|
|
|
|
do_all = 1;
|
|
|
|
break;
|
|
|
|
case 'c':
|
|
|
|
show_category_name = 1;
|
|
|
|
break;
|
|
|
|
case 'm':
|
|
|
|
do_charmaps = 1;
|
|
|
|
break;
|
|
|
|
case 'k':
|
|
|
|
show_keyword_name = 1;
|
|
|
|
break;
|
2001-02-06 09:32:00 +00:00
|
|
|
case 'v':
|
|
|
|
verbose = 1;
|
|
|
|
break;
|
1997-02-19 04:43:53 +00:00
|
|
|
default:
|
|
|
|
return ARGP_ERR_UNKNOWN;
|
1996-09-13 03:21:39 +00:00
|
|
|
}
|
1997-02-19 04:43:53 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
static char *
|
|
|
|
more_help (int key, const char *text, void *input)
|
|
|
|
{
|
|
|
|
switch (key)
|
|
|
|
{
|
|
|
|
case ARGP_KEY_HELP_EXTRA:
|
|
|
|
/* We print some extra information. */
|
2000-10-01 19:15:29 +00:00
|
|
|
return xstrdup (gettext ("\
|
1997-10-15 05:34:02 +00:00
|
|
|
Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
|
1997-02-19 04:43:53 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return (char *) text;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Print the version information. */
|
|
|
|
static void
|
|
|
|
print_version (FILE *stream, struct argp_state *state)
|
|
|
|
{
|
|
|
|
fprintf (stream, "locale (GNU %s) %s\n", PACKAGE, VERSION);
|
|
|
|
fprintf (stream, gettext ("\
|
|
|
|
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\
|
2004-01-01 20:42:01 +00:00
|
|
|
"), "2004");
|
1997-02-19 04:43:53 +00:00
|
|
|
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
/* Simple action function which prints arguments as strings. */
|
|
|
|
static void
|
|
|
|
print_names (const void *nodep, VISIT value, int level)
|
|
|
|
{
|
|
|
|
if (value == postorder || value == leaf)
|
|
|
|
puts (*(char **) nodep);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-02-06 18:56:47 +00:00
|
|
|
static int
|
|
|
|
select_dirs (const struct dirent *dirent)
|
|
|
|
{
|
|
|
|
int result = 0;
|
|
|
|
|
|
|
|
if (strcmp (dirent->d_name, ".") != 0 && strcmp (dirent->d_name, "..") != 0)
|
|
|
|
{
|
|
|
|
mode_t mode = 0;
|
|
|
|
|
|
|
|
#ifdef _DIRENT_HAVE_D_TYPE
|
|
|
|
if (dirent->d_type != DT_UNKNOWN && dirent->d_type != DT_LNK)
|
|
|
|
mode = DTTOIF (dirent->d_type);
|
|
|
|
else
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
struct stat64 st;
|
|
|
|
char buf[sizeof (LOCALEDIR) + strlen (dirent->d_name) + 1];
|
|
|
|
|
|
|
|
stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), dirent->d_name);
|
|
|
|
|
|
|
|
if (stat64 (buf, &st) == 0)
|
|
|
|
mode = st.st_mode;
|
|
|
|
}
|
|
|
|
|
|
|
|
result = S_ISDIR (mode);
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-12-14 03:26:43 +00:00
|
|
|
static void
|
|
|
|
print_LC_IDENTIFICATION (void *mapped, size_t size)
|
|
|
|
{
|
|
|
|
/* Read the information from the file. */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned int magic;
|
|
|
|
unsigned int nstrings;
|
|
|
|
unsigned int strindex[0];
|
|
|
|
} *filedata = mapped;
|
|
|
|
|
|
|
|
if (filedata->magic == LIMAGIC (LC_IDENTIFICATION)
|
|
|
|
&& (sizeof *filedata
|
|
|
|
+ (filedata->nstrings
|
|
|
|
* sizeof (unsigned int))
|
|
|
|
<= size))
|
|
|
|
{
|
|
|
|
const char *str;
|
|
|
|
|
|
|
|
#define HANDLE(idx, name) \
|
|
|
|
str = ((char *) mapped \
|
|
|
|
+ filedata->strindex[_NL_ITEM_INDEX (_NL_IDENTIFICATION_##idx)]); \
|
|
|
|
if (*str != '\0') \
|
|
|
|
printf ("%9s | %s\n", name, str)
|
|
|
|
HANDLE (TITLE, "title");
|
|
|
|
HANDLE (SOURCE, "source");
|
|
|
|
HANDLE (ADDRESS, "address");
|
|
|
|
HANDLE (CONTACT, "contact");
|
|
|
|
HANDLE (EMAIL, "email");
|
|
|
|
HANDLE (TEL, "telephone");
|
|
|
|
HANDLE (FAX, "fax");
|
|
|
|
HANDLE (LANGUAGE, "language");
|
|
|
|
HANDLE (TERRITORY, "territory");
|
|
|
|
HANDLE (AUDIENCE, "audience");
|
|
|
|
HANDLE (APPLICATION, "application");
|
|
|
|
HANDLE (ABBREVIATION, "abbreviation");
|
|
|
|
HANDLE (REVISION, "revision");
|
|
|
|
HANDLE (DATE, "date");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
print_LC_CTYPE (void *mapped, size_t size)
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned int magic;
|
|
|
|
unsigned int nstrings;
|
|
|
|
unsigned int strindex[0];
|
|
|
|
} *filedata = mapped;
|
|
|
|
|
|
|
|
if (filedata->magic == LIMAGIC (LC_CTYPE)
|
|
|
|
&& (sizeof *filedata
|
|
|
|
+ (filedata->nstrings
|
|
|
|
* sizeof (unsigned int))
|
|
|
|
<= size))
|
|
|
|
{
|
|
|
|
const char *str;
|
|
|
|
|
|
|
|
str = ((char *) mapped
|
|
|
|
+ filedata->strindex[_NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME)]);
|
|
|
|
if (*str != '\0')
|
|
|
|
printf (" codeset | %s\n", str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
/* Write the names of all available locales to stdout. We have some
|
|
|
|
sources of the information: the contents of the locale directory
|
|
|
|
and the locale.alias file. To avoid duplicates and print the
|
|
|
|
result is a reasonable order we put all entries is a search tree
|
|
|
|
and print them afterwards. */
|
1995-05-18 09:00:09 +00:00
|
|
|
static void
|
|
|
|
write_locales (void)
|
|
|
|
{
|
2001-02-06 09:32:00 +00:00
|
|
|
char linebuf[80];
|
1997-02-19 04:43:53 +00:00
|
|
|
void *all_data = NULL;
|
2001-02-06 18:56:47 +00:00
|
|
|
struct dirent **dirents;
|
|
|
|
int ndirents;
|
|
|
|
int cnt;
|
1997-02-19 04:43:53 +00:00
|
|
|
char *alias_path;
|
|
|
|
size_t alias_path_len;
|
|
|
|
char *entry;
|
2001-02-06 09:32:00 +00:00
|
|
|
int first_locale = 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
2001-02-06 09:32:00 +00:00
|
|
|
#define PUT(name) tsearch (name, &all_data, \
|
1997-02-19 04:43:53 +00:00
|
|
|
(int (*) (const void *, const void *)) strcoll)
|
2002-08-26 02:20:11 +00:00
|
|
|
#define GET(name) tfind (name, &all_data, \
|
|
|
|
(int (*) (const void *, const void *)) strcoll)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
2002-08-26 02:20:11 +00:00
|
|
|
/* `POSIX' locale is always available (POSIX.2 4.34.3). */
|
|
|
|
PUT ("POSIX");
|
|
|
|
/* And so is the "C" locale. */
|
|
|
|
PUT ("C");
|
1997-02-19 04:43:53 +00:00
|
|
|
|
2001-02-06 09:32:00 +00:00
|
|
|
memset (linebuf, '-', sizeof (linebuf) - 1);
|
|
|
|
linebuf[sizeof (linebuf) - 1] = '\0';
|
|
|
|
|
2002-12-14 03:26:43 +00:00
|
|
|
/* First scan the locale archive. */
|
|
|
|
if (write_archive_locales (&all_data, linebuf))
|
|
|
|
first_locale = 0;
|
|
|
|
|
2001-02-06 09:32:00 +00:00
|
|
|
/* Now we can look for all files in the directory. */
|
2001-02-06 18:56:47 +00:00
|
|
|
ndirents = scandir (LOCALEDIR, &dirents, select_dirs, alphasort);
|
|
|
|
for (cnt = 0; cnt < ndirents; ++cnt)
|
|
|
|
{
|
|
|
|
/* Test whether at least the LC_CTYPE data is there. Some
|
|
|
|
directories only contain translations. */
|
|
|
|
char buf[sizeof (LOCALEDIR) + strlen (dirents[cnt]->d_name)
|
|
|
|
+ sizeof "/LC_IDENTIFICATION"];
|
|
|
|
char *enddir;
|
|
|
|
struct stat64 st;
|
|
|
|
|
|
|
|
stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"),
|
|
|
|
dirents[cnt]->d_name),
|
|
|
|
"/LC_IDENTIFICATION");
|
|
|
|
|
|
|
|
if (stat64 (buf, &st) == 0 && S_ISREG (st.st_mode))
|
|
|
|
{
|
2002-12-14 03:26:43 +00:00
|
|
|
if (verbose && GET (dirents[cnt]->d_name) == NULL)
|
2001-02-06 18:56:47 +00:00
|
|
|
{
|
|
|
|
/* Provide some nice output of all kinds of
|
|
|
|
information. */
|
|
|
|
int fd;
|
2001-02-06 09:32:00 +00:00
|
|
|
|
2001-02-06 18:56:47 +00:00
|
|
|
if (! first_locale)
|
|
|
|
putchar_unlocked ('\n');
|
|
|
|
first_locale = 0;
|
2001-02-06 09:32:00 +00:00
|
|
|
|
2001-02-06 18:56:47 +00:00
|
|
|
printf ("locale: %-15.15s directory: %.*s\n%s\n",
|
|
|
|
dirents[cnt]->d_name, (int) (enddir - buf), buf,
|
|
|
|
linebuf);
|
|
|
|
|
|
|
|
fd = open64 (buf, O_RDONLY);
|
|
|
|
if (fd != -1)
|
|
|
|
{
|
|
|
|
void *mapped = mmap64 (NULL, st.st_size, PROT_READ,
|
|
|
|
MAP_SHARED, fd, 0);
|
|
|
|
if (mapped != MAP_FAILED)
|
|
|
|
{
|
2002-12-14 03:26:43 +00:00
|
|
|
print_LC_IDENTIFICATION (mapped, st.st_size);
|
2001-02-06 18:56:47 +00:00
|
|
|
|
|
|
|
munmap (mapped, st.st_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
close (fd);
|
|
|
|
|
|
|
|
/* Now try to get the charset information. */
|
|
|
|
strcpy (enddir, "/LC_CTYPE");
|
|
|
|
fd = open64 (buf, O_RDONLY);
|
|
|
|
if (fd != -1 && fstat64 (fd, &st) >= 0
|
|
|
|
&& ((mapped = mmap64 (NULL, st.st_size, PROT_READ,
|
|
|
|
MAP_SHARED, fd, 0))
|
|
|
|
!= MAP_FAILED))
|
|
|
|
{
|
2002-12-14 03:26:43 +00:00
|
|
|
print_LC_CTYPE (mapped, st.st_size);
|
2001-02-06 18:56:47 +00:00
|
|
|
|
|
|
|
munmap (mapped, st.st_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fd != -1)
|
|
|
|
close (fd);
|
|
|
|
}
|
|
|
|
}
|
2002-12-14 03:26:43 +00:00
|
|
|
|
|
|
|
/* If the verbose format is not selected we simply
|
|
|
|
collect the names. */
|
|
|
|
PUT (xstrdup (dirents[cnt]->d_name));
|
2001-02-06 18:56:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ndirents > 0)
|
|
|
|
free (dirents);
|
2001-02-06 09:32:00 +00:00
|
|
|
|
2002-08-26 02:20:11 +00:00
|
|
|
/* Now read the locale.alias files. */
|
|
|
|
if (argz_create_sep (LOCALE_ALIAS_PATH, ':', &alias_path, &alias_path_len))
|
|
|
|
error (1, errno, gettext ("while preparing output"));
|
|
|
|
|
|
|
|
entry = NULL;
|
|
|
|
while ((entry = argz_next (alias_path, alias_path_len, entry)))
|
2001-02-06 09:32:00 +00:00
|
|
|
{
|
2002-08-26 02:20:11 +00:00
|
|
|
static const char aliasfile[] = "/locale.alias";
|
|
|
|
FILE *fp;
|
|
|
|
char full_name[strlen (entry) + sizeof aliasfile];
|
|
|
|
|
|
|
|
stpcpy (stpcpy (full_name, entry), aliasfile);
|
2002-10-17 18:04:06 +00:00
|
|
|
fp = fopen (full_name, "rm");
|
2002-08-26 02:20:11 +00:00
|
|
|
if (fp == NULL)
|
|
|
|
/* Ignore non-existing files. */
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* No threads present. */
|
|
|
|
__fsetlocking (fp, FSETLOCKING_BYCALLER);
|
2001-02-06 09:32:00 +00:00
|
|
|
|
2002-08-26 02:20:11 +00:00
|
|
|
while (! feof_unlocked (fp))
|
|
|
|
{
|
|
|
|
/* It is a reasonable approach to use a fix buffer here
|
|
|
|
because
|
|
|
|
a) we are only interested in the first two fields
|
|
|
|
b) these fields must be usable as file names and so must
|
|
|
|
not be that long */
|
|
|
|
char buf[BUFSIZ];
|
|
|
|
char *alias;
|
|
|
|
char *value;
|
|
|
|
char *cp;
|
|
|
|
|
|
|
|
if (fgets_unlocked (buf, BUFSIZ, fp) == NULL)
|
|
|
|
/* EOF reached. */
|
|
|
|
break;
|
|
|
|
|
|
|
|
cp = buf;
|
|
|
|
/* Ignore leading white space. */
|
|
|
|
while (isspace (cp[0]) && cp[0] != '\n')
|
|
|
|
++cp;
|
|
|
|
|
|
|
|
/* A leading '#' signals a comment line. */
|
|
|
|
if (cp[0] != '\0' && cp[0] != '#' && cp[0] != '\n')
|
|
|
|
{
|
|
|
|
alias = cp++;
|
|
|
|
while (cp[0] != '\0' && !isspace (cp[0]))
|
|
|
|
++cp;
|
|
|
|
/* Terminate alias name. */
|
|
|
|
if (cp[0] != '\0')
|
|
|
|
*cp++ = '\0';
|
|
|
|
|
|
|
|
/* Now look for the beginning of the value. */
|
|
|
|
while (isspace (cp[0]))
|
|
|
|
++cp;
|
|
|
|
|
|
|
|
if (cp[0] != '\0')
|
|
|
|
{
|
|
|
|
value = cp++;
|
|
|
|
while (cp[0] != '\0' && !isspace (cp[0]))
|
|
|
|
++cp;
|
|
|
|
/* Terminate value. */
|
|
|
|
if (cp[0] == '\n')
|
|
|
|
{
|
|
|
|
/* This has to be done to make the following
|
|
|
|
test for the end of line possible. We are
|
|
|
|
looking for the terminating '\n' which do not
|
|
|
|
overwrite here. */
|
|
|
|
*cp++ = '\0';
|
|
|
|
*cp = '\n';
|
|
|
|
}
|
|
|
|
else if (cp[0] != '\0')
|
|
|
|
*cp++ = '\0';
|
|
|
|
|
|
|
|
/* Add the alias. */
|
|
|
|
if (! verbose && GET (value) != NULL)
|
|
|
|
PUT (xstrdup (alias));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Possibly not the whole line fits into the buffer.
|
|
|
|
Ignore the rest of the line. */
|
|
|
|
while (strchr (cp, '\n') == NULL)
|
|
|
|
{
|
|
|
|
cp = buf;
|
|
|
|
if (fgets_unlocked (buf, BUFSIZ, fp) == NULL)
|
|
|
|
/* Make sure the inner loop will be left. The outer
|
|
|
|
loop will exit at the `feof' test. */
|
|
|
|
*cp = '\n';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fclose (fp);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! verbose)
|
|
|
|
{
|
2001-02-06 09:32:00 +00:00
|
|
|
twalk (all_data, print_names);
|
|
|
|
}
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-12-14 03:26:43 +00:00
|
|
|
struct nameent
|
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
uint32_t locrec_offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
nameentcmp (const void *a, const void *b)
|
|
|
|
{
|
|
|
|
return strcoll (((const struct nameent *) a)->name,
|
|
|
|
((const struct nameent *) b)->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
write_archive_locales (void **all_datap, char *linebuf)
|
|
|
|
{
|
|
|
|
struct stat64 st;
|
|
|
|
void *all_data = *all_datap;
|
|
|
|
size_t len = 0;
|
|
|
|
struct locarhead *head;
|
|
|
|
struct namehashent *namehashtab;
|
|
|
|
char *addr = MAP_FAILED;
|
|
|
|
int fd, ret = 0;
|
|
|
|
uint32_t cnt;
|
|
|
|
|
|
|
|
fd = open64 (ARCHIVE_NAME, O_RDONLY);
|
|
|
|
if (fd < 0)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (fstat64 (fd, &st) < 0 || st.st_size < sizeof (*head))
|
|
|
|
goto error_out;
|
|
|
|
|
|
|
|
len = st.st_size;
|
|
|
|
addr = mmap64 (NULL, len, PROT_READ, MAP_SHARED, fd, 0);
|
|
|
|
if (addr == MAP_FAILED)
|
|
|
|
goto error_out;
|
|
|
|
|
|
|
|
head = (struct locarhead *) addr;
|
|
|
|
if (head->namehash_offset + head->namehash_size > len
|
|
|
|
|| head->string_offset + head->string_size > len
|
|
|
|
|| head->locrectab_offset + head->locrectab_size > len
|
|
|
|
|| head->sumhash_offset + head->sumhash_size > len)
|
|
|
|
goto error_out;
|
|
|
|
|
|
|
|
namehashtab = (struct namehashent *) (addr + head->namehash_offset);
|
|
|
|
if (! verbose)
|
|
|
|
{
|
|
|
|
for (cnt = 0; cnt < head->namehash_size; ++cnt)
|
|
|
|
if (namehashtab[cnt].locrec_offset != 0)
|
|
|
|
{
|
|
|
|
PUT (xstrdup (addr + namehashtab[cnt].name_offset));
|
|
|
|
++ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
struct nameent *names;
|
|
|
|
uint32_t used;
|
|
|
|
|
|
|
|
names = (struct nameent *) xmalloc (head->namehash_used
|
|
|
|
* sizeof (struct nameent));
|
|
|
|
for (cnt = used = 0; cnt < head->namehash_size; ++cnt)
|
|
|
|
if (namehashtab[cnt].locrec_offset != 0)
|
|
|
|
{
|
|
|
|
names[used].name = addr + namehashtab[cnt].name_offset;
|
|
|
|
names[used++].locrec_offset = namehashtab[cnt].locrec_offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Sort the names. */
|
|
|
|
qsort (names, used, sizeof (struct nameent), nameentcmp);
|
|
|
|
|
|
|
|
for (cnt = 0; cnt < used; ++cnt)
|
|
|
|
{
|
|
|
|
struct locrecent *locrec;
|
|
|
|
|
|
|
|
PUT (xstrdup (names[cnt].name));
|
|
|
|
|
|
|
|
if (cnt)
|
|
|
|
putchar_unlocked ('\n');
|
|
|
|
|
|
|
|
printf ("locale: %-15.15s archive: " ARCHIVE_NAME "\n%s\n",
|
|
|
|
names[cnt].name, linebuf);
|
|
|
|
|
|
|
|
locrec = (struct locrecent *) (addr + names[cnt].locrec_offset);
|
|
|
|
|
|
|
|
print_LC_IDENTIFICATION (addr
|
|
|
|
+ locrec->record[LC_IDENTIFICATION].offset,
|
|
|
|
locrec->record[LC_IDENTIFICATION].len);
|
|
|
|
|
|
|
|
print_LC_CTYPE (addr + locrec->record[LC_CTYPE].offset,
|
|
|
|
locrec->record[LC_CTYPE].len);
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = used;
|
|
|
|
}
|
|
|
|
|
|
|
|
error_out:
|
|
|
|
if (addr != MAP_FAILED)
|
|
|
|
munmap (addr, len);
|
|
|
|
close (fd);
|
|
|
|
*all_datap = all_data;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
/* Write the names of all available character maps to stdout. */
|
|
|
|
static void
|
|
|
|
write_charmaps (void)
|
|
|
|
{
|
1997-02-19 04:43:53 +00:00
|
|
|
void *all_data = NULL;
|
2000-10-01 19:15:29 +00:00
|
|
|
CHARMAP_DIR *dir;
|
|
|
|
const char *dirent;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
2000-10-01 19:15:29 +00:00
|
|
|
/* Look for all files in the charmap directory. */
|
|
|
|
dir = charmap_opendir (CHARMAP_PATH);
|
1995-05-18 09:00:09 +00:00
|
|
|
if (dir == NULL)
|
2000-10-01 19:15:29 +00:00
|
|
|
return;
|
1997-05-07 15:31:21 +00:00
|
|
|
|
2000-10-01 19:15:29 +00:00
|
|
|
while ((dirent = charmap_readdir (dir)) != NULL)
|
|
|
|
{
|
|
|
|
char **aliases;
|
|
|
|
char **p;
|
|
|
|
|
|
|
|
PUT (xstrdup (dirent));
|
|
|
|
|
|
|
|
aliases = charmap_aliases (CHARMAP_PATH, dirent);
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* Add the code_set_name and the aliases. */
|
|
|
|
for (p = aliases; *p; p++)
|
|
|
|
PUT (xstrdup (*p));
|
|
|
|
#else
|
|
|
|
/* Add the code_set_name only. Most aliases are obsolete. */
|
|
|
|
p = aliases;
|
|
|
|
if (*p)
|
|
|
|
PUT (xstrdup (*p));
|
1997-02-19 04:43:53 +00:00
|
|
|
#endif
|
|
|
|
|
2000-10-01 19:15:29 +00:00
|
|
|
charmap_free_aliases (aliases);
|
|
|
|
}
|
1995-05-18 09:00:09 +00:00
|
|
|
|
2000-10-01 19:15:29 +00:00
|
|
|
charmap_closedir (dir);
|
1997-02-19 04:43:53 +00:00
|
|
|
|
|
|
|
twalk (all_data, print_names);
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* We have to show the contents of the environments determining the
|
|
|
|
locale. */
|
|
|
|
static void
|
|
|
|
show_locale_vars (void)
|
|
|
|
{
|
|
|
|
size_t cat_no;
|
|
|
|
const char *lcall = getenv ("LC_ALL");
|
|
|
|
const char *lang = getenv ("LANG") ? : "POSIX";
|
|
|
|
|
2000-12-27 20:18:52 +00:00
|
|
|
auto void get_source (const char *name);
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
void get_source (const char *name)
|
|
|
|
{
|
|
|
|
char *val = getenv (name);
|
|
|
|
|
1997-05-07 15:31:21 +00:00
|
|
|
if ((lcall ?: "")[0] != '\0' || val == NULL)
|
|
|
|
printf ("%s=\"%s\"\n", name, (lcall ?: "")[0] ? lcall : lang);
|
1995-05-18 09:00:09 +00:00
|
|
|
else
|
|
|
|
printf ("%s=%s\n", name, val);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* LANG has to be the first value. */
|
|
|
|
printf ("LANG=%s\n", lang);
|
|
|
|
|
|
|
|
/* Now all categories in an unspecified order. */
|
|
|
|
for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
|
1999-11-18 16:25:42 +00:00
|
|
|
if (cat_no != LC_ALL)
|
|
|
|
get_source (category[cat_no].name);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
/* The last is the LC_ALL value. */
|
|
|
|
printf ("LC_ALL=%s\n", lcall ? : "");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Show the information request for NAME. */
|
|
|
|
static void
|
|
|
|
show_info (const char *name)
|
|
|
|
{
|
|
|
|
size_t cat_no;
|
|
|
|
|
2000-12-27 20:18:52 +00:00
|
|
|
auto void print_item (struct cat_item *item);
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
void print_item (struct cat_item *item)
|
|
|
|
{
|
|
|
|
switch (item->value_type)
|
|
|
|
{
|
|
|
|
case string:
|
1997-08-02 21:00:51 +00:00
|
|
|
if (show_keyword_name)
|
2000-10-31 06:06:35 +00:00
|
|
|
printf ("%s=\"", item->name);
|
2000-10-31 17:44:49 +00:00
|
|
|
fputs (nl_langinfo (item->item_id) ? : "", stdout);
|
1997-08-02 21:00:51 +00:00
|
|
|
if (show_keyword_name)
|
|
|
|
putchar ('"');
|
2000-10-31 06:06:35 +00:00
|
|
|
putchar ('\n');
|
1995-05-18 09:00:09 +00:00
|
|
|
break;
|
|
|
|
case stringarray:
|
|
|
|
{
|
|
|
|
int cnt;
|
|
|
|
const char *val;
|
|
|
|
|
|
|
|
if (show_keyword_name)
|
2000-10-31 06:06:35 +00:00
|
|
|
printf ("%s=\"", item->name);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
for (cnt = 0; cnt < item->max - 1; ++cnt)
|
|
|
|
{
|
|
|
|
val = nl_langinfo (item->item_id + cnt);
|
1997-08-02 21:00:51 +00:00
|
|
|
if (val != NULL)
|
2000-10-31 17:44:49 +00:00
|
|
|
fputs (val, stdout);
|
1997-08-02 21:00:51 +00:00
|
|
|
putchar (';');
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
val = nl_langinfo (item->item_id + cnt);
|
1997-08-02 21:00:51 +00:00
|
|
|
if (val != NULL)
|
2000-10-31 17:44:49 +00:00
|
|
|
fputs (val, stdout);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
if (show_keyword_name)
|
|
|
|
putchar ('"');
|
2000-10-31 06:06:35 +00:00
|
|
|
putchar ('\n');
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
break;
|
1997-05-07 15:31:21 +00:00
|
|
|
case stringlist:
|
|
|
|
{
|
|
|
|
int first = 1;
|
|
|
|
const char *val = nl_langinfo (item->item_id) ? : "";
|
2000-10-31 17:44:49 +00:00
|
|
|
int cnt;
|
1997-05-07 15:31:21 +00:00
|
|
|
|
2000-10-31 06:06:35 +00:00
|
|
|
if (show_keyword_name)
|
|
|
|
printf ("%s=", item->name);
|
|
|
|
|
2000-10-31 17:44:49 +00:00
|
|
|
for (cnt = 0; cnt < item->max && *val != '\0'; ++cnt)
|
1997-05-07 15:31:21 +00:00
|
|
|
{
|
|
|
|
printf ("%s%s%s%s", first ? "" : ";",
|
|
|
|
show_keyword_name ? "\"" : "", val,
|
|
|
|
show_keyword_name ? "\"" : "");
|
|
|
|
val = strchr (val, '\0') + 1;
|
|
|
|
first = 0;
|
|
|
|
}
|
2000-10-31 06:06:35 +00:00
|
|
|
putchar ('\n');
|
1997-05-07 15:31:21 +00:00
|
|
|
}
|
|
|
|
break;
|
1995-05-18 09:00:09 +00:00
|
|
|
case byte:
|
|
|
|
{
|
|
|
|
const char *val = nl_langinfo (item->item_id);
|
|
|
|
|
2000-10-31 06:06:35 +00:00
|
|
|
if (show_keyword_name)
|
|
|
|
printf ("%s=", item->name);
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
if (val != NULL)
|
2003-04-27 09:02:51 +00:00
|
|
|
printf ("%d", *val == '\177' ? -1 : *val);
|
2000-10-31 06:06:35 +00:00
|
|
|
putchar ('\n');
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case bytearray:
|
|
|
|
{
|
|
|
|
const char *val = nl_langinfo (item->item_id);
|
|
|
|
int cnt = val ? strlen (val) : 0;
|
|
|
|
|
2000-10-31 06:06:35 +00:00
|
|
|
if (show_keyword_name)
|
|
|
|
printf ("%s=", item->name);
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
while (cnt > 1)
|
|
|
|
{
|
2003-04-27 09:02:51 +00:00
|
|
|
printf ("%d;", *val == '\177' ? -1 : *val);
|
1995-05-18 09:00:09 +00:00
|
|
|
--cnt;
|
|
|
|
++val;
|
|
|
|
}
|
|
|
|
|
2003-04-27 09:02:51 +00:00
|
|
|
printf ("%d\n", cnt == 0 || *val == '\177' ? -1 : *val);
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
break;
|
1996-04-03 16:31:49 +00:00
|
|
|
case word:
|
|
|
|
{
|
2003-10-24 03:26:33 +00:00
|
|
|
union { unsigned int word; char *string; } val;
|
|
|
|
val.string = nl_langinfo (item->item_id);
|
2000-10-31 06:06:35 +00:00
|
|
|
if (show_keyword_name)
|
|
|
|
printf ("%s=", item->name);
|
|
|
|
|
2003-10-24 03:26:33 +00:00
|
|
|
printf ("%d\n", val.word);
|
1996-04-03 16:31:49 +00:00
|
|
|
}
|
|
|
|
break;
|
2000-10-31 06:06:35 +00:00
|
|
|
case wstring:
|
|
|
|
case wstringarray:
|
|
|
|
case wstringlist:
|
|
|
|
/* We don't print wide character information since the same
|
|
|
|
information is available in a multibyte string. */
|
1995-05-18 09:00:09 +00:00
|
|
|
default:
|
2000-12-17 17:06:32 +00:00
|
|
|
break;
|
2000-12-27 20:18:52 +00:00
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
|
2000-04-12 21:39:32 +00:00
|
|
|
if (cat_no != LC_ALL)
|
|
|
|
{
|
|
|
|
size_t item_no;
|
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.
Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
change value to $(datadir)/i18n. `nls' is not an appropriate
name.
* Makefile (subdirs): Add new subdir wctype.
* ctype/ctype-info.c: Add new global variable __ctype_names
and initialize from _nl_C_LC_CTYPE.
* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
class. Use bit 11.
[_ISbit]: Protect definition of bitmasks because they are also
used in wctype.h.
* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
after successfully pushing back a character.
Fundamental changes in locale implementation. Almost nothing
from the old code is used anymore.
* locale/charmap.c, locale/collate.c, locale/config.h,
locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
locale/locale.c locale/localeconv.c, locale/localedef.c,
locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
locale/numeric.c, locale/setlocale.c, locale/token.h,
locale/xmalloc.c: Removed.
* locale/Makefile: Update for new locale implementation with
program source code distributed in subdir.
* locale/categories.def, locale/iso-4217.def: Updated file
for new locale implementation.
* locale/langinfo.h: Updated for new locale implementation.
(ERA_D_T_FMT, ERA_T_FMT): New official values according to
P1003.2b/D11.
(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
extended LC_CTYPE and LC_COLLATE implementation.
* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
locale/xstrdup.c: Helper functions for locale related programs.
* locale/C-collate.c, locale/C-ctype.c,
locale/C-messages.c, locale/C-monetary.c,
locale/C-numeric.c, locale/C-time.c,
locale/lc-collate.c, locale/lc-ctype.c,
locale/lc-messages.c, locale/lc-monetary.c,
locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
functions, and new generated "C" locale data.
* locale/loadlocale.c: Now handles word fields in locale binary
automatically by changing the endianess if necessary.
* locale/localeinfo.h (LIMAGIC): Changed magic number because
of incompatible changes.
(locale_data): Changed definition to allow word as a value type.
(coll_sort_rule): Values for collation sorting mode.
(_NL_CURRENT_WORD): New macro to access word value of locale entry.
(__collate_table, __collate_extra): Declare new global variables
for collation tables.
* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
* locale/weight.h: Functions to access collation tables.
* posix/unistd.h: Define _POSIX2_LOCALEDEF.
* stdio-common/printf_fp.c: Fix bug with printing certain numbers
< 10^-1. Reported by Bill Metzenthen.
* stdio-common/tfformat.c: Add new test for above bug.
* string/strcoll.c, string/strxfrm.c: Real implementation of
string collation according to ISO C.
* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
|
|
|
|
2000-04-12 21:39:32 +00:00
|
|
|
if (strcmp (name, category[cat_no].name) == 0)
|
|
|
|
/* Print the whole category. */
|
1995-05-18 09:00:09 +00:00
|
|
|
{
|
|
|
|
if (show_category_name != 0)
|
|
|
|
puts (category[cat_no].name);
|
|
|
|
|
2000-04-12 21:39:32 +00:00
|
|
|
for (item_no = 0; item_no < category[cat_no].number; ++item_no)
|
|
|
|
print_item (&category[cat_no].item_desc[item_no]);
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
return;
|
|
|
|
}
|
2000-04-12 21:39:32 +00:00
|
|
|
|
|
|
|
for (item_no = 0; item_no < category[cat_no].number; ++item_no)
|
|
|
|
if (strcmp (name, category[cat_no].item_desc[item_no].name) == 0)
|
|
|
|
{
|
|
|
|
if (show_category_name != 0)
|
|
|
|
puts (category[cat_no].name);
|
|
|
|
|
|
|
|
print_item (&category[cat_no].item_desc[item_no]);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
1996-07-26 04:35:31 +00:00
|
|
|
|
1996-12-20 01:39:50 +00:00
|
|
|
/* The name is not a standard one.
|
|
|
|
For testing and perhaps advanced use allow some more symbols. */
|
1996-07-26 04:35:31 +00:00
|
|
|
locale_special (name, show_category_name, show_keyword_name);
|
1995-05-18 09:00:09 +00:00
|
|
|
}
|