2003-04-14 09:03:40 +02:00
|
|
|
/* Copyright (C) 1995-1999,2000,2001,2002,2003 Free Software Foundation, Inc.
|
1996-12-20 02:39:50 +01:00
|
|
|
This file is part of the GNU C Library.
|
1999-12-31 01:04:07 +01:00
|
|
|
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
1995-02-18 02:27:10 +01:00
|
|
|
|
1996-12-20 02:39:50 +01:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 06:58:11 +02: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-02-18 02:27:10 +01:00
|
|
|
|
1996-12-20 02:39:50 +01: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 06:58:11 +02:00
|
|
|
Lesser General Public License for more details.
|
1995-02-18 02:27:10 +01:00
|
|
|
|
2001-07-06 06:58:11 +02: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-02-18 02:27:10 +01:00
|
|
|
|
Update.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* wctype/wcfuncs.c (iswblank): New function.
* wctype/wcfuncs_l.c (__iswblank_l): New function.
* wctype/wcextra.c: Remove file.
* wctype/wcextra_l.c: Remove file.
* wctype/Makefile (distribute): Remove wcextra and wcextra_l.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (collate_output): Remove redundant
assert call.
* string/strcoll.c: Likewise.
* string/strxfrm.c: Include assert.h. Add assert calls like in
string/strcoll.c.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/categories.def (_NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
_NL_CTYPE_GAP5/6 respectively.
* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
Don't initialize __ctype_names and __ctype_width.
* wctype/cname-lookup.h: Remove file.
* wctype/Makefile (distribute): Remove cname-lookup.h.
* wctype/wchar-lookup.h: Include stdint.h.
* wctype/wctype.c (__wctype): Assume new locale format.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/iswctype.c: Don't include cname-lookup.h.
(__iswctype): Assume new locale format.
* wctype/iswctype_l.c: Don't include cname-lookup.h.
(__iswctype_l): Assume new locale format.
* wctype/wctrans.c: Don't include ctype.h.
(wctrans): Assume new locale format.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
* wctype/towctrans.c: Don't include cname-lookup.h.
(__towctrans): Assume new locale format.
* wctype/towctrans_l.c: Don't include cname-lookup.h.
(__towctrans_l): Assume new locale format.
* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
declarations.
(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
(towlower, towupper): Likewise.
* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l): Assume new locale format.
(__towlower_l, __towupper_l): Likewise.
* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
(__ctype32_b): Remove declaration.
(internal_wcwidth): Assume new locale format.
* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
to map32_b, rename width_3level to width.
(ctype_output): Always create new locale format. Don't emit
_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
(allocate_arrays): Always create new locale format.
* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
* locale/weightwc.h (findidx): Assume new locale format.
* string/strcoll.c (wcscoll): Remove local variables size, layers,
names.
* string/strxfrm.c (wcsxfrm): Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
local variable collseq to 'const char *'.
(SUFFIX): Don't use, don't undefine.
* posix/fnmatch.c: Remove SUFFIX definition.
* locale/programs/ld-collate.c (struct locale_collate_t): Remove
fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
(collate_finish): Always create new locale format. Remove local
variables min_total, act_size.
(collate_output): Always create new locale format. Remove local
variables table_size, names, tablewc. Rename tablewc_3level to
tablewc.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (obstack_int32_grow,
obstack_int32_grow_fast): New inline functions.
(output_weightwc, collate_output): Use them where possible.
2000-09-01 21:36:44 +02:00
|
|
|
#include <assert.h>
|
1999-12-26 00:41:39 +01:00
|
|
|
#include <langinfo.h>
|
2001-01-26 14:42:50 +01:00
|
|
|
#include <locale.h>
|
1995-02-18 02:27:10 +01:00
|
|
|
#include <stddef.h>
|
1999-12-26 00:41:39 +01:00
|
|
|
#include <stdint.h>
|
1995-02-18 02:27:10 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
Update.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* string/strxfrm.c (strxfrm, wcsxfrm): Include <sys/param.h>.
If nrules == 0 and srclen < n, copy only srclen + 1 characters.
* sysdeps/generic/getdomain.c (getdomainname): Include <sys/param.h>.
If the result is fits in the buffer, copy only as many bytes as needed.
* sysdeps/generic/_strerror.c (__strerror_r): Don't zero-fill the
buffer after copying numbuf into it.
* sysdeps/mach/_strerror.c (__strerror_r): Likewise.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* posix/confstr.c (confstr): When string_len > len, NUL-terminate
the result. When string_len < len, don't clear the rest of the buffer.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
Support for new LC_COLLATE format.
* locale/coll-lookup.h: New file.
* locale/weightwc.h (findidx): When size == 0, call
collidx_table_lookup.
* wcsmbs/wcscoll.c: Include coll-lookup.h.
* wcsmbs/wcsxfrm.c: Likewise.
* posix/fnmatch.c: Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): When size == 0, call
collseq_table_lookup.
* locale/programs/3level.h: New file.
* locale/programs/ld-ctype.c: (wcwidth_table, wctrans_table): Define
by including "3level.h".
* locale/programs/ld-collate.c (wchead_table, collidx_table,
collseq_table): New types, defined by including "3level.h".
(locale_collate_t): New wcheads_3level, wcseqorder_3level fields.
(encoding_mask, encoding_byte): Remove.
(utf8_encode): Use simple shifts instead.
(collate_finish): When !oldstyle_tables, set plane_size and plane_cnt
to 0, and initialize and fill wcheads_3level and wcseqorder_3level.
(collate_output): New local variable tablewc_3level. When
!oldstyle_tables, set table_size to 0 and names to NULL and fill
tablewc_3level instead of tablewc. Change format of TABLEWC and
COLLSEQWC entries written to the file.
* locale/C-collate.c (collseqwc): Change format.
(_nl_C_LC_COLLATE): Set HASH_SIZE and HASH_LAYERS to 0, change format
of COLLSEQWC.
* locale/Makefile (distribute): Add coll-lookup.h, programs/3level.h.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-ctype.c (MAX_CHARNAMES_IDX): New macro.
(locale_ctype_t): New charnames_idx field.
(ctype_startup): Initialize charnames_idx field.
(find_idx): Speed up dramatically by using charnames_idx inverse table.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* locale/C-ctype.c: Switch to new locale format.
(_nl_C_LC_CTYPE_names): Remove array.
(STRUCT_CTYPE_CLASS): New macro.
(_nl_C_LC_CTYPE_class_{upper,lower,alpha,digit,xdigit,space,print,
graph,blank,cntrl,punct,alnum}, _nl_C_LC_CTYPE_map_{toupper,tolower}):
New three-level tables.
(_nl_C_LC_CTYPE_width): Change from array to three-level table.
(_nl_C_LC_CTYPE): Fix nstrings value. Set HASH_SIZE and HASH_LAYERS
to 0. Change WIDTH format. Set CLASS_OFFSET and MAP_OFFSET. Add
12 class tables and 2 map tables at the end.
* ctype/ctype-info.c (_nl_C_LC_CTYPE_names): Remove declaration.
(_nl_C_LC_CTYPE_class_{upper,lower,alpha,digit,xdigit,space,print,
graph,blank,cntrl,punct,alnum}, _nl_C_LC_CTYPE_map_{toupper,tolower}):
New declarations.
(b): Remove trailing semicolon.
(__ctype_names, __ctype_width): Don't initialize.
(__ctype32_wctype, __ctype32_wctrans, __ctype32_width): Initialize.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* elf/dl-load.c (open_path): Add a argument telling whether *dirsp
is guaranteed to be allocated with the same malloc() and may be
passed to free().
(_dl_map_object): Update open_path calls. If rtld_search_dirs has
been set to empty by an earlier open_path call, don't pass it again.
2000-08-29 03:20:23 +02:00
|
|
|
#include <sys/param.h>
|
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 09:30:38 +01:00
|
|
|
|
1999-12-31 01:04:07 +01:00
|
|
|
#ifndef STRING_TYPE
|
|
|
|
# define STRING_TYPE char
|
|
|
|
# define USTRING_TYPE unsigned char
|
|
|
|
# ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
|
|
|
# define STRXFRM __strxfrm_l
|
|
|
|
# else
|
|
|
|
# define STRXFRM strxfrm
|
|
|
|
# endif
|
|
|
|
# define STRCMP strcmp
|
|
|
|
# define STRLEN strlen
|
|
|
|
# define STPNCPY __stpncpy
|
|
|
|
# define WEIGHT_H "../locale/weight.h"
|
|
|
|
# define SUFFIX MB
|
|
|
|
# define L(arg) arg
|
1999-08-31 09:04:41 +02:00
|
|
|
#endif
|
|
|
|
|
1999-12-31 01:04:07 +01:00
|
|
|
#define CONCAT(a,b) CONCAT1(a,b)
|
|
|
|
#define CONCAT1(a,b) a##b
|
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 09:30:38 +01:00
|
|
|
|
1999-12-31 01:04:07 +01:00
|
|
|
#include "../locale/localeinfo.h"
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef WIDE_CHAR_VERSION
|
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 09:30:38 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
/* We need UTF-8 encoding of numbers. */
|
2003-06-12 01:22:36 +02:00
|
|
|
static int
|
1999-12-26 00:41:39 +01:00
|
|
|
utf8_encode (char *buf, int val)
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
int retval;
|
|
|
|
|
|
|
|
if (val < 0x80)
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
*buf++ = (char) val;
|
|
|
|
retval = 1;
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
int step;
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
for (step = 2; step < 6; ++step)
|
Update.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/sjis.c (BODY for FROM_LOOP): Treat the case
ch >= 0x81 && ch2 < 0x40 as invalid.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/uhc.c (BODY for FROM_LOOP): Reject ch2 == 0xff as invalid.
(BODY for TO_LOOP): Accept 0x7f. Increment outptr as needed.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/johab.c (BODY for TO_LOOP): After calling
ucs4_to_ksc5601_sym, fix the conversion to JOHAB.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/t.61.c (to_ucs4): Change values of 0xa4, 0a6, 0xa8, 0xb4,
0xb8.
(from_ucs4): Change values of U+00A4, U+00BB, U+00ED.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/macintosh.c (HAS_HOLES): Set to 1.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/iso_6937.c (to_ucs4): Change values of 0x24 and 0xb4.
(from_ucs4): Change values of U+00A4 and U+00ED.
(BODY of TO_LOOP): Remove mapping from U+02DC to 0x0020.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/ansi_x3.110.c (from_ucs4): Change entry for 0xed.
(BODY for TO_LOOP): Map U+2122, U+2126, not U+2022, U+2026.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/Makefile (gen-8bit-gap-modules): Remove isiri-3342.
* iconvdata/isiri-3342.h: New file.
* iconvdata/isiri-3342.c (HAS_HOLES): Avoid gaps >= 0xe0, but don't
treat 0x80 as a gap.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* string/strxfrm.c (encoding_mask, encoding_byte): Remove.
(utf8_encode): Use simple shifts instead. Fix return value.
2000-08-01 00:47:52 +02:00
|
|
|
if ((val & (~(uint32_t)0 << (5 * step + 1))) == 0)
|
1999-12-26 00:41:39 +01:00
|
|
|
break;
|
|
|
|
retval = step;
|
|
|
|
|
Update.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/sjis.c (BODY for FROM_LOOP): Treat the case
ch >= 0x81 && ch2 < 0x40 as invalid.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/uhc.c (BODY for FROM_LOOP): Reject ch2 == 0xff as invalid.
(BODY for TO_LOOP): Accept 0x7f. Increment outptr as needed.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/johab.c (BODY for TO_LOOP): After calling
ucs4_to_ksc5601_sym, fix the conversion to JOHAB.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/t.61.c (to_ucs4): Change values of 0xa4, 0a6, 0xa8, 0xb4,
0xb8.
(from_ucs4): Change values of U+00A4, U+00BB, U+00ED.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/macintosh.c (HAS_HOLES): Set to 1.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/iso_6937.c (to_ucs4): Change values of 0x24 and 0xb4.
(from_ucs4): Change values of U+00A4 and U+00ED.
(BODY of TO_LOOP): Remove mapping from U+02DC to 0x0020.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/ansi_x3.110.c (from_ucs4): Change entry for 0xed.
(BODY for TO_LOOP): Map U+2122, U+2126, not U+2022, U+2026.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/Makefile (gen-8bit-gap-modules): Remove isiri-3342.
* iconvdata/isiri-3342.h: New file.
* iconvdata/isiri-3342.c (HAS_HOLES): Avoid gaps >= 0xe0, but don't
treat 0x80 as a gap.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* string/strxfrm.c (encoding_mask, encoding_byte): Remove.
(utf8_encode): Use simple shifts instead. Fix return value.
2000-08-01 00:47:52 +02:00
|
|
|
*buf = (unsigned char) (~0xff >> step);
|
1999-12-26 00:41:39 +01:00
|
|
|
--step;
|
|
|
|
do
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
buf[step] = 0x80 | (val & 0x3f);
|
|
|
|
val >>= 6;
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
}
|
1999-12-26 00:41:39 +01:00
|
|
|
while (--step > 0);
|
|
|
|
*buf |= val;
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
}
|
1999-12-26 00:41:39 +01:00
|
|
|
|
Update.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/sjis.c (BODY for FROM_LOOP): Treat the case
ch >= 0x81 && ch2 < 0x40 as invalid.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/uhc.c (BODY for FROM_LOOP): Reject ch2 == 0xff as invalid.
(BODY for TO_LOOP): Accept 0x7f. Increment outptr as needed.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/johab.c (BODY for TO_LOOP): After calling
ucs4_to_ksc5601_sym, fix the conversion to JOHAB.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/t.61.c (to_ucs4): Change values of 0xa4, 0a6, 0xa8, 0xb4,
0xb8.
(from_ucs4): Change values of U+00A4, U+00BB, U+00ED.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/macintosh.c (HAS_HOLES): Set to 1.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/iso_6937.c (to_ucs4): Change values of 0x24 and 0xb4.
(from_ucs4): Change values of U+00A4 and U+00ED.
(BODY of TO_LOOP): Remove mapping from U+02DC to 0x0020.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/ansi_x3.110.c (from_ucs4): Change entry for 0xed.
(BODY for TO_LOOP): Map U+2122, U+2126, not U+2022, U+2026.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* iconvdata/Makefile (gen-8bit-gap-modules): Remove isiri-3342.
* iconvdata/isiri-3342.h: New file.
* iconvdata/isiri-3342.c (HAS_HOLES): Avoid gaps >= 0xe0, but don't
treat 0x80 as a gap.
2000-07-30 Bruno Haible <haible@clisp.cons.org>
* string/strxfrm.c (encoding_mask, encoding_byte): Remove.
(utf8_encode): Use simple shifts instead. Fix return value.
2000-08-01 00:47:52 +02:00
|
|
|
return retval;
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
}
|
1999-12-31 01:04:07 +01:00
|
|
|
#endif
|
1995-02-18 02:27:10 +01:00
|
|
|
|
|
|
|
|
1997-02-15 05:31:36 +01:00
|
|
|
#ifndef USE_IN_EXTENDED_LOCALE_MODEL
|
1995-02-18 02:27:10 +01:00
|
|
|
size_t
|
1999-12-31 01:04:07 +01:00
|
|
|
STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n)
|
1997-02-15 05:31:36 +01:00
|
|
|
#else
|
|
|
|
size_t
|
1999-12-31 01:04:07 +01:00
|
|
|
STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
|
1997-02-15 05:31:36 +01:00
|
|
|
#endif
|
1995-02-18 02:27:10 +01:00
|
|
|
{
|
1997-02-15 05:31:36 +01:00
|
|
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
|
|
|
struct locale_data *current = l->__locales[LC_COLLATE];
|
2001-10-27 02:23:28 +02:00
|
|
|
uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
|
1999-12-26 00:41:39 +01:00
|
|
|
#else
|
|
|
|
uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
|
1997-02-15 05:31:36 +01:00
|
|
|
#endif
|
1999-12-26 00:41:39 +01:00
|
|
|
/* We don't assign the following values right away since it might be
|
|
|
|
unnecessary in case there are no rules. */
|
|
|
|
const unsigned char *rulesets;
|
|
|
|
const int32_t *table;
|
1999-12-31 01:04:07 +01:00
|
|
|
const USTRING_TYPE *weights;
|
|
|
|
const USTRING_TYPE *extra;
|
1999-12-26 00:41:39 +01:00
|
|
|
const int32_t *indirect;
|
|
|
|
uint_fast32_t pass;
|
|
|
|
size_t needed;
|
1999-12-31 01:04:07 +01:00
|
|
|
const USTRING_TYPE *usrc;
|
|
|
|
size_t srclen = STRLEN (src);
|
1999-12-26 00:41:39 +01:00
|
|
|
int32_t *idxarr;
|
|
|
|
unsigned char *rulearr;
|
|
|
|
size_t idxmax;
|
|
|
|
size_t idxcnt;
|
1999-12-31 01:04:07 +01:00
|
|
|
int use_malloc;
|
1999-12-26 00:41:39 +01:00
|
|
|
|
1999-12-31 01:04:07 +01:00
|
|
|
#include WEIGHT_H
|
1999-12-26 00:41:39 +01:00
|
|
|
|
|
|
|
if (nrules == 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 09:30:38 +01:00
|
|
|
{
|
|
|
|
if (n != 0)
|
Update.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* string/strxfrm.c (strxfrm, wcsxfrm): Include <sys/param.h>.
If nrules == 0 and srclen < n, copy only srclen + 1 characters.
* sysdeps/generic/getdomain.c (getdomainname): Include <sys/param.h>.
If the result is fits in the buffer, copy only as many bytes as needed.
* sysdeps/generic/_strerror.c (__strerror_r): Don't zero-fill the
buffer after copying numbuf into it.
* sysdeps/mach/_strerror.c (__strerror_r): Likewise.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* posix/confstr.c (confstr): When string_len > len, NUL-terminate
the result. When string_len < len, don't clear the rest of the buffer.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
Support for new LC_COLLATE format.
* locale/coll-lookup.h: New file.
* locale/weightwc.h (findidx): When size == 0, call
collidx_table_lookup.
* wcsmbs/wcscoll.c: Include coll-lookup.h.
* wcsmbs/wcsxfrm.c: Likewise.
* posix/fnmatch.c: Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): When size == 0, call
collseq_table_lookup.
* locale/programs/3level.h: New file.
* locale/programs/ld-ctype.c: (wcwidth_table, wctrans_table): Define
by including "3level.h".
* locale/programs/ld-collate.c (wchead_table, collidx_table,
collseq_table): New types, defined by including "3level.h".
(locale_collate_t): New wcheads_3level, wcseqorder_3level fields.
(encoding_mask, encoding_byte): Remove.
(utf8_encode): Use simple shifts instead.
(collate_finish): When !oldstyle_tables, set plane_size and plane_cnt
to 0, and initialize and fill wcheads_3level and wcseqorder_3level.
(collate_output): New local variable tablewc_3level. When
!oldstyle_tables, set table_size to 0 and names to NULL and fill
tablewc_3level instead of tablewc. Change format of TABLEWC and
COLLSEQWC entries written to the file.
* locale/C-collate.c (collseqwc): Change format.
(_nl_C_LC_COLLATE): Set HASH_SIZE and HASH_LAYERS to 0, change format
of COLLSEQWC.
* locale/Makefile (distribute): Add coll-lookup.h, programs/3level.h.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-ctype.c (MAX_CHARNAMES_IDX): New macro.
(locale_ctype_t): New charnames_idx field.
(ctype_startup): Initialize charnames_idx field.
(find_idx): Speed up dramatically by using charnames_idx inverse table.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* locale/C-ctype.c: Switch to new locale format.
(_nl_C_LC_CTYPE_names): Remove array.
(STRUCT_CTYPE_CLASS): New macro.
(_nl_C_LC_CTYPE_class_{upper,lower,alpha,digit,xdigit,space,print,
graph,blank,cntrl,punct,alnum}, _nl_C_LC_CTYPE_map_{toupper,tolower}):
New three-level tables.
(_nl_C_LC_CTYPE_width): Change from array to three-level table.
(_nl_C_LC_CTYPE): Fix nstrings value. Set HASH_SIZE and HASH_LAYERS
to 0. Change WIDTH format. Set CLASS_OFFSET and MAP_OFFSET. Add
12 class tables and 2 map tables at the end.
* ctype/ctype-info.c (_nl_C_LC_CTYPE_names): Remove declaration.
(_nl_C_LC_CTYPE_class_{upper,lower,alpha,digit,xdigit,space,print,
graph,blank,cntrl,punct,alnum}, _nl_C_LC_CTYPE_map_{toupper,tolower}):
New declarations.
(b): Remove trailing semicolon.
(__ctype_names, __ctype_width): Don't initialize.
(__ctype32_wctype, __ctype32_wctrans, __ctype32_width): Initialize.
2000-08-27 Bruno Haible <haible@clisp.cons.org>
* elf/dl-load.c (open_path): Add a argument telling whether *dirsp
is guaranteed to be allocated with the same malloc() and may be
passed to free().
(_dl_map_object): Update open_path calls. If rtld_search_dirs has
been set to empty by an earlier open_path call, don't pass it again.
2000-08-29 03:20:23 +02:00
|
|
|
STPNCPY (dest, src, MIN (srclen + 1, n));
|
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 09:30:38 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
return srclen;
|
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 09:30:38 +01:00
|
|
|
}
|
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
|
|
|
|
rulesets = (const unsigned char *)
|
|
|
|
current->values[_NL_ITEM_INDEX (_NL_COLLATE_RULESETS)].string;
|
|
|
|
table = (const int32_t *)
|
1999-12-31 01:04:07 +01:00
|
|
|
current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_TABLE,SUFFIX))].string;
|
|
|
|
weights = (const USTRING_TYPE *)
|
|
|
|
current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_WEIGHT,SUFFIX))].string;
|
|
|
|
extra = (const USTRING_TYPE *)
|
|
|
|
current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_EXTRA,SUFFIX))].string;
|
1999-12-26 00:41:39 +01:00
|
|
|
indirect = (const int32_t *)
|
1999-12-31 01:04:07 +01:00
|
|
|
current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_INDIRECT,SUFFIX))].string;
|
1999-12-26 00:41:39 +01:00
|
|
|
#else
|
|
|
|
rulesets = (const unsigned char *)
|
|
|
|
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_RULESETS);
|
|
|
|
table = (const int32_t *)
|
1999-12-31 01:04:07 +01:00
|
|
|
_NL_CURRENT (LC_COLLATE, CONCAT(_NL_COLLATE_TABLE,SUFFIX));
|
|
|
|
weights = (const USTRING_TYPE *)
|
|
|
|
_NL_CURRENT (LC_COLLATE, CONCAT(_NL_COLLATE_WEIGHT,SUFFIX));
|
|
|
|
extra = (const USTRING_TYPE *)
|
|
|
|
_NL_CURRENT (LC_COLLATE, CONCAT(_NL_COLLATE_EXTRA,SUFFIX));
|
1999-12-26 00:41:39 +01:00
|
|
|
indirect = (const int32_t *)
|
1999-12-31 01:04:07 +01:00
|
|
|
_NL_CURRENT (LC_COLLATE, CONCAT(_NL_COLLATE_INDIRECT,SUFFIX));
|
1999-12-26 00:41:39 +01:00
|
|
|
#endif
|
1999-12-31 01:04:07 +01:00
|
|
|
use_malloc = 0;
|
1999-12-26 00:41:39 +01:00
|
|
|
|
2000-09-26 21:13:37 +02:00
|
|
|
assert (((uintptr_t) table) % __alignof__ (table[0]) == 0);
|
|
|
|
assert (((uintptr_t) weights) % __alignof__ (weights[0]) == 0);
|
|
|
|
assert (((uintptr_t) extra) % __alignof__ (extra[0]) == 0);
|
|
|
|
assert (((uintptr_t) indirect) % __alignof__ (indirect[0]) == 0);
|
Update.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* wctype/wcfuncs.c (iswblank): New function.
* wctype/wcfuncs_l.c (__iswblank_l): New function.
* wctype/wcextra.c: Remove file.
* wctype/wcextra_l.c: Remove file.
* wctype/Makefile (distribute): Remove wcextra and wcextra_l.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (collate_output): Remove redundant
assert call.
* string/strcoll.c: Likewise.
* string/strxfrm.c: Include assert.h. Add assert calls like in
string/strcoll.c.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/categories.def (_NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
_NL_CTYPE_GAP5/6 respectively.
* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
Don't initialize __ctype_names and __ctype_width.
* wctype/cname-lookup.h: Remove file.
* wctype/Makefile (distribute): Remove cname-lookup.h.
* wctype/wchar-lookup.h: Include stdint.h.
* wctype/wctype.c (__wctype): Assume new locale format.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/iswctype.c: Don't include cname-lookup.h.
(__iswctype): Assume new locale format.
* wctype/iswctype_l.c: Don't include cname-lookup.h.
(__iswctype_l): Assume new locale format.
* wctype/wctrans.c: Don't include ctype.h.
(wctrans): Assume new locale format.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
* wctype/towctrans.c: Don't include cname-lookup.h.
(__towctrans): Assume new locale format.
* wctype/towctrans_l.c: Don't include cname-lookup.h.
(__towctrans_l): Assume new locale format.
* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
declarations.
(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
(towlower, towupper): Likewise.
* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l): Assume new locale format.
(__towlower_l, __towupper_l): Likewise.
* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
(__ctype32_b): Remove declaration.
(internal_wcwidth): Assume new locale format.
* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
to map32_b, rename width_3level to width.
(ctype_output): Always create new locale format. Don't emit
_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
(allocate_arrays): Always create new locale format.
* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
* locale/weightwc.h (findidx): Assume new locale format.
* string/strcoll.c (wcscoll): Remove local variables size, layers,
names.
* string/strxfrm.c (wcsxfrm): Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
local variable collseq to 'const char *'.
(SUFFIX): Don't use, don't undefine.
* posix/fnmatch.c: Remove SUFFIX definition.
* locale/programs/ld-collate.c (struct locale_collate_t): Remove
fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
(collate_finish): Always create new locale format. Remove local
variables min_total, act_size.
(collate_output): Always create new locale format. Remove local
variables table_size, names, tablewc. Rename tablewc_3level to
tablewc.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (obstack_int32_grow,
obstack_int32_grow_fast): New inline functions.
(output_weightwc, collate_output): Use them where possible.
2000-09-01 21:36:44 +02:00
|
|
|
|
1998-07-22 18:54:32 +02:00
|
|
|
/* Handle an empty string as a special case. */
|
1999-12-26 00:41:39 +01:00
|
|
|
if (srclen == 0)
|
1998-07-22 18:54:32 +02:00
|
|
|
{
|
|
|
|
if (n != 0)
|
1999-12-31 01:04:07 +01:00
|
|
|
*dest = L('\0');
|
2001-03-19 22:40:15 +01:00
|
|
|
return 0;
|
1998-07-22 18:54:32 +02:00
|
|
|
}
|
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
/* We need the elements of the string as unsigned values since they
|
|
|
|
are used as indeces. */
|
1999-12-31 01:04:07 +01:00
|
|
|
usrc = (const USTRING_TYPE *) src;
|
1999-12-26 00:41:39 +01:00
|
|
|
|
|
|
|
/* Perform the first pass over the string and while doing this find
|
|
|
|
and store the weights for each character. Since we want this to
|
|
|
|
be as fast as possible we are using `alloca' to store the temporary
|
|
|
|
values. But since there is no limit on the length of the string
|
|
|
|
we have to use `malloc' if the string is too long. We should be
|
|
|
|
very conservative here. */
|
2002-10-09 11:42:48 +02:00
|
|
|
if (! __libc_use_alloca (srclen))
|
1999-12-26 00:41:39 +01:00
|
|
|
{
|
2002-01-29 04:56:50 +01:00
|
|
|
idxarr = (int32_t *) malloc ((srclen + 1) * (sizeof (int32_t) + 1));
|
1999-12-26 00:41:39 +01:00
|
|
|
rulearr = (unsigned char *) &idxarr[srclen];
|
|
|
|
|
|
|
|
if (idxarr == NULL)
|
|
|
|
/* No memory. Well, go with the stack then.
|
|
|
|
|
|
|
|
XXX Once this implementation is stable we will handle this
|
|
|
|
differently. Instead of precomputing the indeces we will
|
|
|
|
do this in time. This means, though, that this happens for
|
|
|
|
every pass again. */
|
|
|
|
goto try_stack;
|
|
|
|
use_malloc = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
try_stack:
|
|
|
|
idxarr = (int32_t *) alloca (srclen * sizeof (int32_t));
|
2002-01-29 04:56:50 +01:00
|
|
|
rulearr = (unsigned char *) alloca (srclen + 1);
|
1999-12-26 00:41:39 +01: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 09:30:38 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
idxmax = 0;
|
|
|
|
do
|
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 09:30:38 +01:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
int32_t tmp = findidx (&usrc);
|
|
|
|
rulearr[idxmax] = tmp >> 24;
|
1999-12-26 08:29:11 +01:00
|
|
|
idxarr[idxmax] = tmp & 0xffffff;
|
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 09:30:38 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
++idxmax;
|
|
|
|
}
|
1999-12-31 01:04:07 +01:00
|
|
|
while (*usrc != L('\0'));
|
1999-12-26 00:41:39 +01:00
|
|
|
|
2003-04-14 09:03:40 +02:00
|
|
|
/* This element is only read, the value never used but to determine
|
|
|
|
another value which then is ignored. */
|
|
|
|
rulearr[idxmax] = '\0';
|
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
/* Now the passes over the weights. We now use the indeces we found
|
|
|
|
before. */
|
|
|
|
needed = 0;
|
|
|
|
for (pass = 0; pass < nrules; ++pass)
|
|
|
|
{
|
|
|
|
size_t backw_stop = ~0ul;
|
|
|
|
int rule = rulesets[rulearr[0] * nrules + pass];
|
|
|
|
/* We assume that if a rule has defined `position' in one section
|
|
|
|
this is true for all of them. */
|
|
|
|
int position = rule & sort_position;
|
|
|
|
|
|
|
|
if (position == 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 09:30:38 +01:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
for (idxcnt = 0; idxcnt < idxmax; ++idxcnt)
|
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 09:30:38 +01:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
if ((rule & sort_forward) != 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 09:30:38 +01:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
size_t len;
|
|
|
|
|
|
|
|
if (backw_stop != ~0ul)
|
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 09:30:38 +01:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
/* Handle the pushed elements now. */
|
|
|
|
size_t backw;
|
|
|
|
|
|
|
|
for (backw = idxcnt - 1; backw >= backw_stop; --backw)
|
|
|
|
{
|
|
|
|
len = weights[idxarr[backw]++];
|
|
|
|
|
|
|
|
if (needed + len < n)
|
|
|
|
while (len-- > 0)
|
|
|
|
dest[needed++] = weights[idxarr[backw]++];
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* No more characters fit into the buffer. */
|
|
|
|
needed += len;
|
|
|
|
idxarr[backw] += len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
backw_stop = ~0ul;
|
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 09:30:38 +01:00
|
|
|
}
|
1999-12-26 00:41:39 +01:00
|
|
|
|
|
|
|
/* Now handle the forward element. */
|
|
|
|
len = weights[idxarr[idxcnt]++];
|
|
|
|
if (needed + len < n)
|
|
|
|
while (len-- > 0)
|
|
|
|
dest[needed++] = weights[idxarr[idxcnt]++];
|
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 02:20:46 +01:00
|
|
|
else
|
1999-12-26 00:41:39 +01:00
|
|
|
{
|
|
|
|
/* No more characters fit into the buffer. */
|
|
|
|
needed += len;
|
|
|
|
idxarr[idxcnt] += len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Remember where the backwards series started. */
|
|
|
|
if (backw_stop == ~0ul)
|
|
|
|
backw_stop = idxcnt;
|
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 09:30:38 +01:00
|
|
|
}
|
1999-12-26 00:41:39 +01:00
|
|
|
|
|
|
|
rule = rulesets[rulearr[idxcnt + 1] * nrules + pass];
|
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 09:30:38 +01: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 02:20:46 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
if (backw_stop != ~0ul)
|
|
|
|
{
|
|
|
|
/* Handle the pushed elements now. */
|
|
|
|
size_t backw;
|
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 09:30:38 +01:00
|
|
|
|
1999-12-26 20:11:05 +01:00
|
|
|
backw = idxcnt;
|
|
|
|
while (backw > backw_stop)
|
1999-12-26 00:41:39 +01:00
|
|
|
{
|
1999-12-26 20:11:05 +01:00
|
|
|
size_t len = weights[idxarr[--backw]++];
|
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 09:30:38 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
if (needed + len < n)
|
|
|
|
while (len-- > 0)
|
|
|
|
dest[needed++] = weights[idxarr[backw]++];
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* No more characters fit into the buffer. */
|
|
|
|
needed += len;
|
|
|
|
idxarr[backw] += len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int val = 1;
|
1999-12-31 01:04:07 +01:00
|
|
|
#ifndef WIDE_CHAR_VERSION
|
1999-12-26 00:41:39 +01:00
|
|
|
char buf[7];
|
|
|
|
size_t buflen;
|
1999-12-31 01:04:07 +01:00
|
|
|
#endif
|
1999-12-26 00:41:39 +01:00
|
|
|
size_t i;
|
|
|
|
|
|
|
|
for (idxcnt = 0; idxcnt < idxmax; ++idxcnt)
|
1998-09-07 15:47:26 +02:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
if ((rule & sort_forward) != 0)
|
|
|
|
{
|
|
|
|
size_t len;
|
|
|
|
|
|
|
|
if (backw_stop != ~0ul)
|
|
|
|
{
|
|
|
|
/* Handle the pushed elements now. */
|
|
|
|
size_t backw;
|
|
|
|
|
|
|
|
for (backw = idxcnt - 1; backw >= backw_stop; --backw)
|
|
|
|
{
|
|
|
|
len = weights[idxarr[backw]++];
|
|
|
|
if (len != 0)
|
|
|
|
{
|
1999-12-31 01:04:07 +01:00
|
|
|
#ifdef WIDE_CHAR_VERSION
|
|
|
|
if (needed + 1 + len < n)
|
|
|
|
{
|
|
|
|
dest[needed] = val;
|
|
|
|
for (i = 0; i < len; ++i)
|
|
|
|
dest[needed + 1 + i] =
|
|
|
|
weights[idxarr[backw] + i];
|
|
|
|
}
|
|
|
|
needed += 1 + len;
|
|
|
|
#else
|
1999-12-26 00:41:39 +01:00
|
|
|
buflen = utf8_encode (buf, val);
|
|
|
|
if (needed + buflen + len < n)
|
|
|
|
{
|
|
|
|
for (i = 0; i < buflen; ++i)
|
|
|
|
dest[needed + i] = buf[i];
|
|
|
|
for (i = 0; i < len; ++i)
|
|
|
|
dest[needed + buflen + i] =
|
|
|
|
weights[idxarr[backw] + i];
|
|
|
|
}
|
|
|
|
needed += buflen + len;
|
1999-12-31 01:04:07 +01:00
|
|
|
#endif
|
|
|
|
idxarr[backw] += len;
|
1999-12-26 00:41:39 +01:00
|
|
|
val = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
++val;
|
|
|
|
}
|
|
|
|
|
|
|
|
backw_stop = ~0ul;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Now handle the forward element. */
|
|
|
|
len = weights[idxarr[idxcnt]++];
|
|
|
|
if (len != 0)
|
|
|
|
{
|
1999-12-31 01:04:07 +01:00
|
|
|
#ifdef WIDE_CHAR_VERSION
|
|
|
|
if (needed + 1+ len < n)
|
|
|
|
{
|
|
|
|
dest[needed] = val;
|
|
|
|
for (i = 0; i < len; ++i)
|
|
|
|
dest[needed + 1 + i] =
|
|
|
|
weights[idxarr[idxcnt] + i];
|
|
|
|
}
|
|
|
|
needed += 1 + len;
|
|
|
|
#else
|
1999-12-26 00:41:39 +01:00
|
|
|
buflen = utf8_encode (buf, val);
|
|
|
|
if (needed + buflen + len < n)
|
|
|
|
{
|
|
|
|
for (i = 0; i < buflen; ++i)
|
|
|
|
dest[needed + i] = buf[i];
|
|
|
|
for (i = 0; i < len; ++i)
|
|
|
|
dest[needed + buflen + i] =
|
|
|
|
weights[idxarr[idxcnt] + i];
|
|
|
|
}
|
|
|
|
needed += buflen + len;
|
1999-12-31 01:04:07 +01:00
|
|
|
#endif
|
|
|
|
idxarr[idxcnt] += len;
|
1999-12-26 00:41:39 +01:00
|
|
|
val = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
/* Note that we don't have to increment `idxarr[idxcnt]'
|
|
|
|
since the length is zero. */
|
|
|
|
++val;
|
|
|
|
}
|
|
|
|
else
|
1998-09-07 15:47:26 +02:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
/* Remember where the backwards series started. */
|
|
|
|
if (backw_stop == ~0ul)
|
|
|
|
backw_stop = idxcnt;
|
1998-09-07 15:47:26 +02:00
|
|
|
}
|
1999-12-26 00:41:39 +01:00
|
|
|
|
|
|
|
rule = rulesets[rulearr[idxcnt + 1] * nrules + pass];
|
1998-09-11 14:14:37 +02:00
|
|
|
}
|
1999-12-26 00:41:39 +01:00
|
|
|
|
Update.
2000-11-26 Ulrich Drepper <drepper@redhat.com>
* inet/getnameinfo.c: Adjust casts to avoid warnings.
* inet/rcmd.c: Likewise.
* inet/ruserpass.c: Likewise.
* inet/netinet/in.h (IN6_IS_ADDR_UNSPECIFIED, IN6_IS_ADDR_LOOPBACK,
IN6_IS_ADDR_MULTICAST, IN6_IS_ADDR_LINKLOCAL, IN6_IS_ADDR_SITELOCAL,
IN6_IS_ADDR_V4MAPPED, IN6_IS_ADDR_V4COMPAT, IN6_ARE_ADDR_EQUAL,
IN6_IS_ADDR_MC_NODELOCAL, IN6_IS_ADDR_MC_LINKLOCAL,
IN6_IS_ADDR_MC_SITELOCAL, IN6_IS_ADDR_MC_ORGLOCAL,
IN6_IS_ADDR_MC_GLOBAL): Preserve const in cast.
* include/aliases.h: Add prototypes for internal __getalias* functions.
* include/netdb.h: Add prototypes for __old_gethostent_r,
__old_gethostbyaddr_r, __old_gethostbyname_r, __old_gethostbyname2_r,
__old_getnetent_r, __old_getnetbyaddr_r, __old_getnetbyname_r,
__old_getservent_r, __old_getservbyname_r, __old_getservbyport_r,
__old_getprotoent_r, __old_getprotobyname_r, __old_getprotobynumber_r.
* include/rpc/netdb.h: Add prototypes for __old_getrpcbyname_r,
__old_getrpcbynumber_r, __old_getrpcent_r.
* include/rpc/netdb.h: Add __getrpcbyname_r, __getrpcbynumber_r,
__getrpcent_r prototypes.
2000-11-26 10:44:30 +01:00
|
|
|
if (backw_stop != ~0ul)
|
1998-09-11 14:14:37 +02:00
|
|
|
{
|
1999-12-26 00:41:39 +01:00
|
|
|
/* Handle the pushed elements now. */
|
|
|
|
size_t backw;
|
|
|
|
|
1999-12-26 20:11:05 +01:00
|
|
|
backw = idxmax - 1;
|
|
|
|
while (backw > backw_stop)
|
1998-09-07 15:47:26 +02:00
|
|
|
{
|
1999-12-26 20:11:05 +01:00
|
|
|
size_t len = weights[idxarr[--backw]++];
|
1999-12-26 00:41:39 +01:00
|
|
|
if (len != 0)
|
|
|
|
{
|
1999-12-31 01:04:07 +01:00
|
|
|
#ifdef WIDE_CHAR_VERSION
|
|
|
|
if (needed + 1 + len < n)
|
|
|
|
{
|
|
|
|
dest[needed] = val;
|
|
|
|
for (i = 0; i < len; ++i)
|
|
|
|
dest[needed + 1 + i] =
|
|
|
|
weights[idxarr[backw] + i];
|
|
|
|
}
|
|
|
|
needed += 1 + len;
|
|
|
|
#else
|
1999-12-26 00:41:39 +01:00
|
|
|
buflen = utf8_encode (buf, val);
|
|
|
|
if (needed + buflen + len < n)
|
|
|
|
{
|
|
|
|
for (i = 0; i < buflen; ++i)
|
|
|
|
dest[needed + i] = buf[i];
|
|
|
|
for (i = 0; i < len; ++i)
|
|
|
|
dest[needed + buflen + i] =
|
|
|
|
weights[idxarr[backw] + i];
|
|
|
|
}
|
|
|
|
needed += buflen + len;
|
1999-12-31 01:04:07 +01:00
|
|
|
#endif
|
|
|
|
idxarr[backw] += len;
|
1999-12-26 00:41:39 +01:00
|
|
|
val = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
++val;
|
1998-09-07 15:47:26 +02: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 09:30:38 +01:00
|
|
|
}
|
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
/* Finally store the byte to separate the passes or terminate
|
|
|
|
the string. */
|
|
|
|
if (needed < n)
|
1999-12-31 01:04:07 +01:00
|
|
|
dest[needed] = pass + 1 < nrules ? L('\1') : L('\0');
|
1999-12-26 00:41:39 +01:00
|
|
|
++needed;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This is a little optimization: many collation specifications have
|
|
|
|
a `position' rule at the end and if no non-ignored character
|
|
|
|
is found the last \1 byte is immediately followed by a \0 byte
|
|
|
|
signalling this. We can avoid the \1 byte(s). */
|
1999-12-31 01:04:07 +01:00
|
|
|
if (needed <= n && needed > 2 && dest[needed - 2] == L('\1'))
|
1999-12-26 00:41:39 +01:00
|
|
|
{
|
|
|
|
/* Remove the \1 byte. */
|
|
|
|
--needed;
|
1999-12-31 01:04:07 +01:00
|
|
|
dest[needed - 1] = L('\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 09:30:38 +01:00
|
|
|
}
|
1996-01-17 01:46:59 +01:00
|
|
|
|
1999-12-26 00:41:39 +01:00
|
|
|
/* Free the memory if needed. */
|
|
|
|
if (use_malloc)
|
|
|
|
free (idxarr);
|
Sun May 26 15:15:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/ldiv.c: Deansideclized.
Sun May 26 19:39:53 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_load_domain): Test correct variable
after malloc.
* string/Makefile (tester-ENV): New variable to suppress message
translation in test.
* string/tester.c: Add tests for strtok_r and strsep.
* sysdeps/i386/i486/strcat.S: Correct some more 8bit operation
<-> 32 bit operand conflicts.
* sysdeps/i386/strsep.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strsep function.
* sysdeps/i386/strtok.S: Optimized implementation of strtok
function.
* sysdeps/i386/strtok_r.S: Wrapper around <sysdeps/i386/strtok.S>
to produce strtok_r function.
* sysdeps/generic/strtok.c: Moved here from string/strtok.c.
Corrected example in comment.
* string/Makefile (routines): Add strtok_r.
* sysdeps/generic/strtok_r.c: New file. Implement reentrant version
of strtok_r.
* string/string.h: Add prototype for strtok_r.
* wcsmbs/wcstok.c: Handle illegal SAVE_PTR argument the same
as in strtok_r.
Sun May 26 13:28:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/tzset.c (__tzset): Ignore leading : in $TZ; always try tzfile
first and fall back to 1003.1 syntax only if it fails.
* time/Makefile (install-others): Also install posix/ZONE and
right/ZONE for each ZONE in $(zonenames).
(z.% rule): Generate rules for right/ZONE and posix/ZONE targets too,
the difference begin leapseconds vs /dev/null as 3rd dep. For
original ZONE targets use $(leapseconds), to be set in Makeconfig.
(target-zone-flavor): New variable.
(tzcompile): Use it to get the right -d for posix/ and right/ flavors.
* Makeconfig (leapseconds): New variable.
* mach/Machrules (%.udeps rule): Depend on Machrules.
Emit deps for .uh and .__h files.
(%.uh, %.__h rules): Don't depend on %.defs; use #include <$*.defs>
instead.
Sun May 26 01:06:47 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/Makefile (routines): Add llabs, lldiv.
* stdlib/llabs.c: New file. Implementation of return
absolute value of long long argument.
* stdlib/lldiv.c: New file. Implementation of division with remainder
of long long argument.
* stdlib/stdlib.h [__USE_GNU] (lldiv_t): New type for lldiv
function.
Define prototypes for lldiv and llabs functions.
* locale/C-collate.c: Initialize _NL_COLLATE_NRULES element.
* stdlib/strtod.c: Replace wchar_t with wint_t. The later is
really the type for a single wide character.
* string/strxfrm.c (print_val): Define separate version for
use as wcsxfrm. Here we don't need UTF8 encoding.
* wcsmbs/wchar.h: gcc-2.7.2-960517 finally introduces wint_t
in <stddef.h>. Use this value and only for older gcc version
define in place.
(uwchar_t): Remove definition.
* wcsmbs/wcscmp.c, wcsmbs/wcscoll.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsxfrm.c, wcsmbs/wmemcmp.c: : Don't use uwchar_t as unsigned
type. wint_t is intended for this.
Sat May 25 14:10:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/direntry.h: Use [1] instead of [0] for d_name to
quiet -ansi -pedantic.
* sysdeps/unix/common/direntry.h: Likewise.
* login/Makefile (headers): Add lastlog.h.
* login/lastlog.h: New file.
* login/Makefile (CFLAGS): Don't append -D_THREAD_SAFE.
* login/utmp.h [_REENTRANT || _THREAD_SAFE]: Replace this conditional
with #ifdef __USE_REENTRANT.
* features.h (__GNU_LIBRARY__): Set to 6.
[_GNU_SOURCE] (_POSIX_SOURCE, _POSIX_C_SOURCE, _BSD_SOURCE,
_SVID_SOURCE): Make sure they are all defined.
* sysdeps/unix/sysv/linux/gnu/types.h: Instead of including
<linux/posix_types.h>, define _LINUX_TYPES_DONT_EXPORT and then
include <linux/types.h>.
* resource/sys/resource.h: Remove trailing commas from enums.
* sysdeps/generic/netinet/in.h: Remove trailing commas from enums.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
1996-05-26 21:19:51 +02:00
|
|
|
|
2000-01-26 04:11:19 +01:00
|
|
|
/* Return the number of bytes/words we need, but don't count the NUL
|
|
|
|
byte/word at the end. */
|
|
|
|
return needed - 1;
|
1995-02-18 02:27:10 +01:00
|
|
|
}
|