mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
2003-06-13 Ulrich Drepper <drepper@redhat.com> Fixing gcc 3.3 warnings, part II. * argp/argp-help.c (hol_entry_long_iterate): Always inline. * elf/dl-load.c (cache_rpath): Don't inline. * iconvdata/cns11642l2.h: Always inline all functions. * iconvdata/iso-ir-165.h: Likewise. * locale/Makefile (aux): Add coll-lookup. * locale/coll-lookup.c: New file. * locale/coll-lookup.h (collidx_table_lookup): Do not define here. (collseq_table_lookup): Likewise. * locale/weightwc.h: Adjust collidx_table_lookup calls for name change. * posix/fnmatch_loop.c: Adjust collseq_table_lookup calls for name change. * posix/regcomp.c: Likewise. * posix/regexec.c: Likewise. * locale/programs/3level.h (*_get): Always inline. * locale/programs/locfile.h: Move definition of handle_copy to... * locale/programs/locfile.c: ...here. * locale/programs/ld-collate.c (obstack_int32_grow): Always inline. (obstack_int32_grow_fast): Likewise. (utf8_encode): Likewise. (find_element): Avoid aliasing problems. (insert_value): Likewise. (collate_read): Likewise. * nss/getent.c (print_hosts): Don't inline (print_networks): Likewise. (print_shadow): Likewise. (build_doc): Likewise. * nss/nss_files/files-parse.c [ENTDATA] (parser_stclass): Don't inline. * posix/regcomp.c (re_set_fastmap): Always inline. (seek_collating_symbol_entry): Likewise. (lookup_collation_sequence_value): Likewise. (build_range_exp): Likewise. (build_collating_symbol): Likewise. * posix/regexec.c (acquire_init_state_context): Don't inline. (clean_state_log_if_need): Likewise. * resolv/res_send.c (eConsIovec): Rewrite to not return struct and adjust all callers. (evConsTime): Likewise. (evAddTime): Likewise. (evSubTime): Likewise. (evNowTime): Likewise. (evTimeSpec): Removed. (__libc_res_nsend): Avoid aliasing problem. * sysdeps/unix/sysv/linux/ifreq.h: Move old_siocgifconf definition to.. * sysdeps/unix/sysv/linux/ifreq.c: ...here. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_string_hwcap): Always inline. (_dl_string_platform): Likewise. * wctype/wchar-lookup.h (wctype_table_lookup): Always inline. (wcwidth_table_lookup): Likewise. (wctrans_table_lookup): Likewise. * sysdeps/unix/sysv/linux/sys/epoll.h: Include <stdint.h>.
This commit is contained in:
57
ChangeLog
57
ChangeLog
@ -1,3 +1,60 @@
|
|||||||
|
2003-06-13 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
Fixing gcc 3.3 warnings, part II.
|
||||||
|
* argp/argp-help.c (hol_entry_long_iterate): Always inline.
|
||||||
|
* elf/dl-load.c (cache_rpath): Don't inline.
|
||||||
|
* iconvdata/cns11642l2.h: Always inline all functions.
|
||||||
|
* iconvdata/iso-ir-165.h: Likewise.
|
||||||
|
* locale/Makefile (aux): Add coll-lookup.
|
||||||
|
* locale/coll-lookup.c: New file.
|
||||||
|
* locale/coll-lookup.h (collidx_table_lookup): Do not define here.
|
||||||
|
(collseq_table_lookup): Likewise.
|
||||||
|
* locale/weightwc.h: Adjust collidx_table_lookup calls for name change.
|
||||||
|
* posix/fnmatch_loop.c: Adjust collseq_table_lookup calls for name
|
||||||
|
change.
|
||||||
|
* posix/regcomp.c: Likewise.
|
||||||
|
* posix/regexec.c: Likewise.
|
||||||
|
* locale/programs/3level.h (*_get): Always inline.
|
||||||
|
* locale/programs/locfile.h: Move definition of handle_copy to...
|
||||||
|
* locale/programs/locfile.c: ...here.
|
||||||
|
* locale/programs/ld-collate.c (obstack_int32_grow): Always inline.
|
||||||
|
(obstack_int32_grow_fast): Likewise.
|
||||||
|
(utf8_encode): Likewise.
|
||||||
|
(find_element): Avoid aliasing problems.
|
||||||
|
(insert_value): Likewise.
|
||||||
|
(collate_read): Likewise.
|
||||||
|
* nss/getent.c (print_hosts): Don't inline
|
||||||
|
(print_networks): Likewise.
|
||||||
|
(print_shadow): Likewise.
|
||||||
|
(build_doc): Likewise.
|
||||||
|
* nss/nss_files/files-parse.c [ENTDATA] (parser_stclass): Don't
|
||||||
|
inline.
|
||||||
|
* posix/regcomp.c (re_set_fastmap): Always inline.
|
||||||
|
(seek_collating_symbol_entry): Likewise.
|
||||||
|
(lookup_collation_sequence_value): Likewise.
|
||||||
|
(build_range_exp): Likewise.
|
||||||
|
(build_collating_symbol): Likewise.
|
||||||
|
* posix/regexec.c (acquire_init_state_context): Don't inline.
|
||||||
|
(clean_state_log_if_need): Likewise.
|
||||||
|
* resolv/res_send.c (eConsIovec): Rewrite to not return struct and
|
||||||
|
adjust all callers.
|
||||||
|
(evConsTime): Likewise.
|
||||||
|
(evAddTime): Likewise.
|
||||||
|
(evSubTime): Likewise.
|
||||||
|
(evNowTime): Likewise.
|
||||||
|
(evTimeSpec): Removed.
|
||||||
|
(__libc_res_nsend): Avoid aliasing problem.
|
||||||
|
* sysdeps/unix/sysv/linux/ifreq.h: Move old_siocgifconf definition to..
|
||||||
|
* sysdeps/unix/sysv/linux/ifreq.c: ...here.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_string_hwcap):
|
||||||
|
Always inline.
|
||||||
|
(_dl_string_platform): Likewise.
|
||||||
|
* wctype/wchar-lookup.h (wctype_table_lookup): Always inline.
|
||||||
|
(wcwidth_table_lookup): Likewise.
|
||||||
|
(wctrans_table_lookup): Likewise.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sys/epoll.h: Include <stdint.h>.
|
||||||
|
|
||||||
2003-06-12 Ulrich Drepper <drepper@redhat.com>
|
2003-06-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* wcsmbs/wchar.h: Define wint_t in std namespace, too [PR libc/5034].
|
* wcsmbs/wchar.h: Define wint_t in std namespace, too [PR libc/5034].
|
||||||
|
@ -547,6 +547,7 @@ hol_entry_short_iterate (const struct hol_entry *entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
hol_entry_long_iterate (const struct hol_entry *entry,
|
hol_entry_long_iterate (const struct hol_entry *entry,
|
||||||
int (*func)(const struct argp_option *opt,
|
int (*func)(const struct argp_option *opt,
|
||||||
const struct argp_option *real,
|
const struct argp_option *real,
|
||||||
|
@ -578,7 +578,7 @@ decompose_rpath (struct r_search_path_struct *sps,
|
|||||||
|
|
||||||
/* Make sure cached path information is stored in *SP
|
/* Make sure cached path information is stored in *SP
|
||||||
and return true if there are any paths to search there. */
|
and return true if there are any paths to search there. */
|
||||||
static inline bool
|
static bool
|
||||||
cache_rpath (struct link_map *l,
|
cache_rpath (struct link_map *l,
|
||||||
struct r_search_path_struct *sp,
|
struct r_search_path_struct *sp,
|
||||||
int tag,
|
int tag,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Access functions for CNS 11643, plane 2 handling.
|
/* Access functions for CNS 11643, plane 2 handling.
|
||||||
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
@ -26,6 +26,7 @@ extern const uint16_t __cns11643l2_to_ucs4_tab[];
|
|||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
cns11643l2_to_ucs4 (const unsigned char **s, size_t avail,
|
cns11643l2_to_ucs4 (const unsigned char **s, size_t avail,
|
||||||
unsigned char offset)
|
unsigned char offset)
|
||||||
{
|
{
|
||||||
@ -58,6 +59,7 @@ extern const char __cns11643_from_ucs4p0_tab[][3];
|
|||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_cns11643l2 (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_cns11643l2 (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned int ch = (unsigned int) wch;
|
unsigned int ch = (unsigned int) wch;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Tables for conversion to and from ISO-IR-165.
|
/* Tables for conversion to and from ISO-IR-165.
|
||||||
converting from UCS using gaps.
|
converting from UCS using gaps.
|
||||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
||||||
|
|
||||||
@ -40,6 +40,7 @@ extern const uint16_t __isoir165_to_tab[ISOIR165_FROMSIZE];
|
|||||||
/* XXX If we at some point need an offset value to decode the byte
|
/* XXX If we at some point need an offset value to decode the byte
|
||||||
sequences another parameter can be added. */
|
sequences another parameter can be added. */
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
isoir165_to_ucs4 (const unsigned char **s, size_t avail)
|
isoir165_to_ucs4 (const unsigned char **s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned char ch = *(*s);
|
unsigned char ch = *(*s);
|
||||||
@ -70,6 +71,7 @@ extern const struct gap __isoir165_from_idx[];
|
|||||||
extern const char __isoir165_from_tab[];
|
extern const char __isoir165_from_tab[];
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_isoir165 (uint32_t wch, char *s, size_t avail)
|
ucs4_to_isoir165 (uint32_t wch, char *s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned int ch = (unsigned int) wch;
|
unsigned int ch = (unsigned int) wch;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 1991,92,1995-1999,2000,2001,2002 Free Software Foundation, Inc.
|
# Copyright (C) 1991,1992,1995-2002,2003 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
# The GNU C Library is free software; you can redistribute it and/or
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -42,7 +42,7 @@ tests = tst-C-locale
|
|||||||
categories = ctype messages monetary numeric time paper name \
|
categories = ctype messages monetary numeric time paper name \
|
||||||
address telephone measurement identification collate
|
address telephone measurement identification collate
|
||||||
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
|
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
|
||||||
xlocale localename global-locale
|
xlocale localename global-locale coll-lookup
|
||||||
others = localedef locale
|
others = localedef locale
|
||||||
#others-static = localedef locale
|
#others-static = localedef locale
|
||||||
install-bin = localedef locale
|
install-bin = localedef locale
|
||||||
|
81
locale/coll-lookup.c
Normal file
81
locale/coll-lookup.c
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
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
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Lookup in a table of int32_t, with default value 0. */
|
||||||
|
int32_t
|
||||||
|
internal_function
|
||||||
|
__collidx_table_lookup (const char *table, uint32_t wc)
|
||||||
|
{
|
||||||
|
uint32_t shift1 = ((const uint32_t *) table)[0];
|
||||||
|
uint32_t index1 = wc >> shift1;
|
||||||
|
uint32_t bound = ((const uint32_t *) table)[1];
|
||||||
|
if (index1 < bound)
|
||||||
|
{
|
||||||
|
uint32_t lookup1 = ((const uint32_t *) table)[5 + index1];
|
||||||
|
if (lookup1 != 0)
|
||||||
|
{
|
||||||
|
uint32_t shift2 = ((const uint32_t *) table)[2];
|
||||||
|
uint32_t mask2 = ((const uint32_t *) table)[3];
|
||||||
|
uint32_t index2 = (wc >> shift2) & mask2;
|
||||||
|
uint32_t lookup2 = ((const uint32_t *)(table + lookup1))[index2];
|
||||||
|
if (lookup2 != 0)
|
||||||
|
{
|
||||||
|
uint32_t mask3 = ((const uint32_t *) table)[4];
|
||||||
|
uint32_t index3 = wc & mask3;
|
||||||
|
int32_t lookup3 = ((const int32_t *)(table + lookup2))[index3];
|
||||||
|
|
||||||
|
return lookup3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Lookup in a table of uint32_t, with default value 0xffffffff. */
|
||||||
|
uint32_t
|
||||||
|
internal_function
|
||||||
|
__collseq_table_lookup (const char *table, uint32_t wc)
|
||||||
|
{
|
||||||
|
uint32_t shift1 = ((const uint32_t *) table)[0];
|
||||||
|
uint32_t index1 = wc >> shift1;
|
||||||
|
uint32_t bound = ((const uint32_t *) table)[1];
|
||||||
|
if (index1 < bound)
|
||||||
|
{
|
||||||
|
uint32_t lookup1 = ((const uint32_t *) table)[5 + index1];
|
||||||
|
if (lookup1 != 0)
|
||||||
|
{
|
||||||
|
uint32_t shift2 = ((const uint32_t *) table)[2];
|
||||||
|
uint32_t mask2 = ((const uint32_t *) table)[3];
|
||||||
|
uint32_t index2 = (wc >> shift2) & mask2;
|
||||||
|
uint32_t lookup2 = ((const uint32_t *)(table + lookup1))[index2];
|
||||||
|
if (lookup2 != 0)
|
||||||
|
{
|
||||||
|
uint32_t mask3 = ((const uint32_t *) table)[4];
|
||||||
|
uint32_t index3 = wc & mask3;
|
||||||
|
uint32_t lookup3 = ((const uint32_t *)(table + lookup2))[index3];
|
||||||
|
|
||||||
|
return lookup3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ~((uint32_t) 0);
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
||||||
|
|
||||||
@ -17,85 +17,12 @@
|
|||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
/* Word tables are accessed by cutting wc in three blocks of bits:
|
|
||||||
- the high 32-q-p bits,
|
|
||||||
- the next q bits,
|
|
||||||
- the next p bits.
|
|
||||||
|
|
||||||
+------------------+-----+-----+
|
|
||||||
wc = + 32-q-p | q | p |
|
|
||||||
+------------------+-----+-----+
|
|
||||||
|
|
||||||
p and q are variable. For 16-bit Unicode it is sufficient to
|
|
||||||
choose p and q such that q+p <= 16.
|
|
||||||
|
|
||||||
The table contains the following uint32_t words:
|
|
||||||
- q+p,
|
|
||||||
- s = upper exclusive bound for wc >> (q+p),
|
|
||||||
- p,
|
|
||||||
- 2^q-1,
|
|
||||||
- 2^p-1,
|
|
||||||
- 1st-level table: s offsets, pointing into the 2nd-level table,
|
|
||||||
- 2nd-level table: k*2^q offsets, pointing into the 3rd-level table,
|
|
||||||
- 3rd-level table: j*2^p words, each containing 32 bits of data.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/* Lookup in a table of int32_t, with default value 0. */
|
/* Lookup in a table of int32_t, with default value 0. */
|
||||||
static inline int32_t
|
extern int32_t __collidx_table_lookup (const char *table, uint32_t wc)
|
||||||
collidx_table_lookup (const char *table, uint32_t wc)
|
internal_function;
|
||||||
{
|
|
||||||
uint32_t shift1 = ((const uint32_t *) table)[0];
|
|
||||||
uint32_t index1 = wc >> shift1;
|
|
||||||
uint32_t bound = ((const uint32_t *) table)[1];
|
|
||||||
if (index1 < bound)
|
|
||||||
{
|
|
||||||
uint32_t lookup1 = ((const uint32_t *) table)[5 + index1];
|
|
||||||
if (lookup1 != 0)
|
|
||||||
{
|
|
||||||
uint32_t shift2 = ((const uint32_t *) table)[2];
|
|
||||||
uint32_t mask2 = ((const uint32_t *) table)[3];
|
|
||||||
uint32_t index2 = (wc >> shift2) & mask2;
|
|
||||||
uint32_t lookup2 = ((const uint32_t *)(table + lookup1))[index2];
|
|
||||||
if (lookup2 != 0)
|
|
||||||
{
|
|
||||||
uint32_t mask3 = ((const uint32_t *) table)[4];
|
|
||||||
uint32_t index3 = wc & mask3;
|
|
||||||
int32_t lookup3 = ((const int32_t *)(table + lookup2))[index3];
|
|
||||||
|
|
||||||
return lookup3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Lookup in a table of uint32_t, with default value 0xffffffff. */
|
/* Lookup in a table of uint32_t, with default value 0xffffffff. */
|
||||||
static inline uint32_t
|
extern uint32_t __collseq_table_lookup (const char *table, uint32_t wc)
|
||||||
collseq_table_lookup (const char *table, uint32_t wc)
|
internal_function;
|
||||||
{
|
|
||||||
uint32_t shift1 = ((const uint32_t *) table)[0];
|
|
||||||
uint32_t index1 = wc >> shift1;
|
|
||||||
uint32_t bound = ((const uint32_t *) table)[1];
|
|
||||||
if (index1 < bound)
|
|
||||||
{
|
|
||||||
uint32_t lookup1 = ((const uint32_t *) table)[5 + index1];
|
|
||||||
if (lookup1 != 0)
|
|
||||||
{
|
|
||||||
uint32_t shift2 = ((const uint32_t *) table)[2];
|
|
||||||
uint32_t mask2 = ((const uint32_t *) table)[3];
|
|
||||||
uint32_t index2 = (wc >> shift2) & mask2;
|
|
||||||
uint32_t lookup2 = ((const uint32_t *)(table + lookup1))[index2];
|
|
||||||
if (lookup2 != 0)
|
|
||||||
{
|
|
||||||
uint32_t mask3 = ((const uint32_t *) table)[4];
|
|
||||||
uint32_t index3 = wc & mask3;
|
|
||||||
uint32_t lookup3 = ((const uint32_t *)(table + lookup2))[index3];
|
|
||||||
|
|
||||||
return lookup3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ~((uint32_t) 0);
|
|
||||||
}
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
/* Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
||||||
|
|
||||||
@ -80,6 +80,7 @@ CONCAT(TABLE,_init) (struct TABLE *t)
|
|||||||
|
|
||||||
/* Retrieve an entry. */
|
/* Retrieve an entry. */
|
||||||
static inline ELEMENT
|
static inline ELEMENT
|
||||||
|
__attribute ((always_inline))
|
||||||
CONCAT(TABLE,_get) (struct TABLE *t, uint32_t wc)
|
CONCAT(TABLE,_get) (struct TABLE *t, uint32_t wc)
|
||||||
{
|
{
|
||||||
uint32_t index1 = wc >> (t->q + t->p);
|
uint32_t index1 = wc >> (t->q + t->p);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
|
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
|
||||||
|
|
||||||
@ -42,6 +42,7 @@
|
|||||||
#define obstack_chunk_free free
|
#define obstack_chunk_free free
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
__attribute ((always_inline))
|
||||||
obstack_int32_grow (struct obstack *obstack, int32_t data)
|
obstack_int32_grow (struct obstack *obstack, int32_t data)
|
||||||
{
|
{
|
||||||
if (sizeof (int32_t) == sizeof (int))
|
if (sizeof (int32_t) == sizeof (int))
|
||||||
@ -51,6 +52,7 @@ obstack_int32_grow (struct obstack *obstack, int32_t data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
__attribute ((always_inline))
|
||||||
obstack_int32_grow_fast (struct obstack *obstack, int32_t data)
|
obstack_int32_grow_fast (struct obstack *obstack, int32_t data)
|
||||||
{
|
{
|
||||||
if (sizeof (int32_t) == sizeof (int))
|
if (sizeof (int32_t) == sizeof (int))
|
||||||
@ -249,6 +251,7 @@ static uint32_t nrules;
|
|||||||
|
|
||||||
/* We need UTF-8 encoding of numbers. */
|
/* We need UTF-8 encoding of numbers. */
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
utf8_encode (char *buf, int val)
|
utf8_encode (char *buf, int val)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
@ -606,10 +609,10 @@ static struct element_t *
|
|||||||
find_element (struct linereader *ldfile, struct locale_collate_t *collate,
|
find_element (struct linereader *ldfile, struct locale_collate_t *collate,
|
||||||
const char *str, size_t len)
|
const char *str, size_t len)
|
||||||
{
|
{
|
||||||
struct element_t *result = NULL;
|
void *result = NULL;
|
||||||
|
|
||||||
/* Search for the entries among the collation sequences already define. */
|
/* Search for the entries among the collation sequences already define. */
|
||||||
if (find_entry (&collate->seq_table, str, len, (void **) &result) != 0)
|
if (find_entry (&collate->seq_table, str, len, &result) != 0)
|
||||||
{
|
{
|
||||||
/* Nope, not define yet. So we see whether it is a
|
/* Nope, not define yet. So we see whether it is a
|
||||||
collation symbol. */
|
collation symbol. */
|
||||||
@ -625,8 +628,7 @@ find_element (struct linereader *ldfile, struct locale_collate_t *collate,
|
|||||||
result = sym->order = new_element (collate, NULL, 0, NULL,
|
result = sym->order = new_element (collate, NULL, 0, NULL,
|
||||||
NULL, 0, 0);
|
NULL, 0, 0);
|
||||||
}
|
}
|
||||||
else if (find_entry (&collate->elem_table, str, len,
|
else if (find_entry (&collate->elem_table, str, len, &result) != 0)
|
||||||
(void **) &result) != 0)
|
|
||||||
{
|
{
|
||||||
/* It's also no collation element. So it is a character
|
/* It's also no collation element. So it is a character
|
||||||
element defined later. */
|
element defined later. */
|
||||||
@ -636,7 +638,7 @@ find_element (struct linereader *ldfile, struct locale_collate_t *collate,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return (struct element_t *) result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -944,8 +946,8 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen,
|
|||||||
{
|
{
|
||||||
/* It's no character, so look through the collation elements and
|
/* It's no character, so look through the collation elements and
|
||||||
symbol list. */
|
symbol list. */
|
||||||
if (find_entry (&collate->elem_table, symstr, symlen,
|
void *ptr = elem;
|
||||||
(void **) &elem) != 0)
|
if (find_entry (&collate->elem_table, symstr, symlen, &ptr) != 0)
|
||||||
{
|
{
|
||||||
void *result;
|
void *result;
|
||||||
struct symbol_t *sym = NULL;
|
struct symbol_t *sym = NULL;
|
||||||
@ -976,12 +978,15 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen,
|
|||||||
insert_entry (&collate->seq_table, symstr, symlen, elem);
|
insert_entry (&collate->seq_table, symstr, symlen, elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
/* Copy the result back. */
|
||||||
|
elem = ptr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Otherwise the symbols stands for a character. */
|
/* Otherwise the symbols stands for a character. */
|
||||||
if (find_entry (&collate->seq_table, symstr, symlen,
|
void *ptr = elem;
|
||||||
(void **) &elem) != 0)
|
if (find_entry (&collate->seq_table, symstr, symlen, &ptr) != 0)
|
||||||
{
|
{
|
||||||
uint32_t wcs[2] = { wc, 0 };
|
uint32_t wcs[2] = { wc, 0 };
|
||||||
|
|
||||||
@ -998,6 +1003,9 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Copy the result back. */
|
||||||
|
elem = ptr;
|
||||||
|
|
||||||
/* Maybe the character was used before the definition. In this case
|
/* Maybe the character was used before the definition. In this case
|
||||||
we have to insert the byte sequences now. */
|
we have to insert the byte sequences now. */
|
||||||
if (elem->mbs == NULL && seq != NULL)
|
if (elem->mbs == NULL && seq != NULL)
|
||||||
@ -1169,8 +1177,9 @@ sequence is not lower than that of the last character"), "LC_COLLATE");
|
|||||||
/* Now we are ready to insert the new value in the
|
/* Now we are ready to insert the new value in the
|
||||||
sequence. Find out whether the element is
|
sequence. Find out whether the element is
|
||||||
already known. */
|
already known. */
|
||||||
|
void *ptr;
|
||||||
if (find_entry (&collate->seq_table, seq->name, namelen,
|
if (find_entry (&collate->seq_table, seq->name, namelen,
|
||||||
(void **) &elem) != 0)
|
&ptr) != 0)
|
||||||
{
|
{
|
||||||
uint32_t wcs[2] = { seq->ucs4, 0 };
|
uint32_t wcs[2] = { seq->ucs4, 0 };
|
||||||
|
|
||||||
@ -1186,6 +1195,9 @@ sequence is not lower than that of the last character"), "LC_COLLATE");
|
|||||||
/* This cannot happen. */
|
/* This cannot happen. */
|
||||||
assert (! "Internal error");
|
assert (! "Internal error");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
/* Copy the result. */
|
||||||
|
elem = ptr;
|
||||||
|
|
||||||
/* Test whether this element is not already in the list. */
|
/* Test whether this element is not already in the list. */
|
||||||
if (elem->next != NULL || (collate->cursor != NULL
|
if (elem->next != NULL || (collate->cursor != NULL
|
||||||
@ -1324,9 +1336,12 @@ order for `%.*s' already defined at %s:%Zu"),
|
|||||||
sprintf (buf + preflen, base == 10 ? "%ld" : "%lX", from);
|
sprintf (buf + preflen, base == 10 ? "%ld" : "%lX", from);
|
||||||
|
|
||||||
/* Look whether this name is already defined. */
|
/* Look whether this name is already defined. */
|
||||||
if (find_entry (&collate->seq_table, buf, symlen,
|
void *ptr;
|
||||||
(void **) &elem) == 0)
|
if (find_entry (&collate->seq_table, buf, symlen, &ptr) == 0)
|
||||||
{
|
{
|
||||||
|
/* Copy back the result. */
|
||||||
|
elem = ptr;
|
||||||
|
|
||||||
if (elem->next != NULL || (collate->cursor != NULL
|
if (elem->next != NULL || (collate->cursor != NULL
|
||||||
&& elem->next == collate->cursor))
|
&& elem->next == collate->cursor))
|
||||||
{
|
{
|
||||||
@ -3009,7 +3024,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
size_t newname_len = arg->val.str.lenmb;
|
size_t newname_len = arg->val.str.lenmb;
|
||||||
const char *symname;
|
const char *symname;
|
||||||
size_t symname_len;
|
size_t symname_len;
|
||||||
struct symbol_t *symval;
|
void *symval; /* Actually struct symbol_t* */
|
||||||
|
|
||||||
arg = lr_token (ldfile, charmap, result, repertoire, verbose);
|
arg = lr_token (ldfile, charmap, result, repertoire, verbose);
|
||||||
if (arg->tok != tok_bsymbol)
|
if (arg->tok != tok_bsymbol)
|
||||||
@ -3045,7 +3060,7 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
|
|
||||||
/* See whether the symbol name is already defined. */
|
/* See whether the symbol name is already defined. */
|
||||||
if (find_entry (&collate->sym_table, symname, symname_len,
|
if (find_entry (&collate->sym_table, symname, symname_len,
|
||||||
(void **) &symval) != 0)
|
&symval) != 0)
|
||||||
{
|
{
|
||||||
lr_error (ldfile, _("\
|
lr_error (ldfile, _("\
|
||||||
%s: unknown symbol `%s' in equivalent definition"),
|
%s: unknown symbol `%s' in equivalent definition"),
|
||||||
@ -3294,6 +3309,7 @@ error while adding equivalent collating symbol"));
|
|||||||
size_t lenmb;
|
size_t lenmb;
|
||||||
struct element_t *insp;
|
struct element_t *insp;
|
||||||
int no_error = 1;
|
int no_error = 1;
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
if (arg->tok == tok_bsymbol)
|
if (arg->tok == tok_bsymbol)
|
||||||
{
|
{
|
||||||
@ -3307,18 +3323,20 @@ error while adding equivalent collating symbol"));
|
|||||||
lenmb = 9;
|
lenmb = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (find_entry (&collate->seq_table, startmb, lenmb,
|
if (find_entry (&collate->seq_table, startmb, lenmb, &ptr) == 0)
|
||||||
(void **) &insp) == 0)
|
|
||||||
/* Yes, the symbol exists. Simply point the cursor
|
/* Yes, the symbol exists. Simply point the cursor
|
||||||
to it. */
|
to it. */
|
||||||
collate->cursor = insp;
|
collate->cursor = (struct element_t *) ptr;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct symbol_t *symbp;
|
struct symbol_t *symbp;
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
if (find_entry (&collate->sym_table, startmb, lenmb,
|
if (find_entry (&collate->sym_table, startmb, lenmb,
|
||||||
(void **) &symbp) == 0)
|
&ptr) == 0)
|
||||||
{
|
{
|
||||||
|
symbp = ptr;
|
||||||
|
|
||||||
if (symbp->order->last != NULL
|
if (symbp->order->last != NULL
|
||||||
|| symbp->order->next != NULL)
|
|| symbp->order->next != NULL)
|
||||||
collate->cursor = symbp->order;
|
collate->cursor = symbp->order;
|
||||||
@ -3334,8 +3352,10 @@ error while adding equivalent collating symbol"));
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (find_entry (&collate->elem_table, startmb, lenmb,
|
else if (find_entry (&collate->elem_table, startmb, lenmb,
|
||||||
(void **) &insp) == 0)
|
&ptr) == 0)
|
||||||
{
|
{
|
||||||
|
insp = (struct element_t *) ptr;
|
||||||
|
|
||||||
if (insp->last != NULL || insp->next != NULL)
|
if (insp->last != NULL || insp->next != NULL)
|
||||||
collate->cursor = insp;
|
collate->cursor = insp;
|
||||||
else
|
else
|
||||||
@ -3517,10 +3537,12 @@ error while adding equivalent collating symbol"));
|
|||||||
collation symbols since these are purely abstract
|
collation symbols since these are purely abstract
|
||||||
values and don't need directions associated. */
|
values and don't need directions associated. */
|
||||||
struct element_t *seqp;
|
struct element_t *seqp;
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
if (find_entry (&collate->seq_table, symstr, symlen,
|
if (find_entry (&collate->seq_table, symstr, symlen, &ptr) == 0)
|
||||||
(void **) &seqp) == 0)
|
|
||||||
{
|
{
|
||||||
|
seqp = ptr;
|
||||||
|
|
||||||
/* It's already defined. First check whether this
|
/* It's already defined. First check whether this
|
||||||
is really a collating symbol. */
|
is really a collating symbol. */
|
||||||
if (seqp->is_character)
|
if (seqp->is_character)
|
||||||
@ -3561,8 +3583,9 @@ error while adding equivalent collating symbol"));
|
|||||||
{
|
{
|
||||||
/* It is possible that we already have this collation sequence.
|
/* It is possible that we already have this collation sequence.
|
||||||
In this case we move the entry. */
|
In this case we move the entry. */
|
||||||
struct element_t *seqp;
|
struct element_t *seqp = NULL;
|
||||||
void *sym;
|
void *sym;
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
/* If the symbol after which we have to insert was not found
|
/* If the symbol after which we have to insert was not found
|
||||||
ignore all entries. */
|
ignore all entries. */
|
||||||
@ -3572,17 +3595,19 @@ error while adding equivalent collating symbol"));
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (find_entry (&collate->seq_table, symstr, symlen,
|
if (find_entry (&collate->seq_table, symstr, symlen, &ptr) == 0)
|
||||||
(void **) &seqp) == 0)
|
{
|
||||||
|
seqp = (struct element_t *) ptr;
|
||||||
goto move_entry;
|
goto move_entry;
|
||||||
|
}
|
||||||
|
|
||||||
if (find_entry (&collate->sym_table, symstr, symlen, &sym) == 0
|
if (find_entry (&collate->sym_table, symstr, symlen, &sym) == 0
|
||||||
&& (seqp = ((struct symbol_t *) sym)->order) != NULL)
|
&& (seqp = ((struct symbol_t *) sym)->order) != NULL)
|
||||||
goto move_entry;
|
goto move_entry;
|
||||||
|
|
||||||
if (find_entry (&collate->elem_table, symstr, symlen,
|
if (find_entry (&collate->elem_table, symstr, symlen, &ptr) == 0
|
||||||
(void **) &seqp) == 0
|
&& (seqp = (struct element_t *) ptr,
|
||||||
&& (seqp->last != NULL || seqp->next != NULL
|
seqp->last != NULL || seqp->next != NULL
|
||||||
|| (collate->start != NULL && seqp == collate->start)))
|
|| (collate->start != NULL && seqp == collate->start)))
|
||||||
{
|
{
|
||||||
move_entry:
|
move_entry:
|
||||||
|
@ -764,3 +764,63 @@ cannot create output file `%s' for category `%s'"), fname, category));
|
|||||||
|
|
||||||
free (fname);
|
free (fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* General handling of `copy'. */
|
||||||
|
void
|
||||||
|
handle_copy (struct linereader *ldfile, const struct charmap_t *charmap,
|
||||||
|
const char *repertoire_name, struct localedef_t *result,
|
||||||
|
enum token_t token, int locale, const char *locale_name,
|
||||||
|
int ignore_content)
|
||||||
|
{
|
||||||
|
struct token *now;
|
||||||
|
int warned = 0;
|
||||||
|
|
||||||
|
now = lr_token (ldfile, charmap, result, NULL, verbose);
|
||||||
|
if (now->tok != tok_string)
|
||||||
|
lr_error (ldfile, _("expect string argument for `copy'"));
|
||||||
|
else if (!ignore_content)
|
||||||
|
{
|
||||||
|
if (now->val.str.startmb == NULL)
|
||||||
|
lr_error (ldfile, _("\
|
||||||
|
locale name should consist only of portable characters"));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(void) add_to_readlist (locale, now->val.str.startmb,
|
||||||
|
repertoire_name, 1, NULL);
|
||||||
|
result->copy_name[locale] = now->val.str.startmb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lr_ignore_rest (ldfile, now->tok == tok_string);
|
||||||
|
|
||||||
|
/* The rest of the line must be empty and the next keyword must be
|
||||||
|
`END xxx'. */
|
||||||
|
while ((now = lr_token (ldfile, charmap, result, NULL, verbose))->tok
|
||||||
|
!= tok_end && now->tok != tok_eof)
|
||||||
|
{
|
||||||
|
if (warned == 0)
|
||||||
|
{
|
||||||
|
lr_error (ldfile, _("\
|
||||||
|
no other keyword shall be specified when `copy' is used"));
|
||||||
|
warned = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
lr_ignore_rest (ldfile, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (now->tok != tok_eof)
|
||||||
|
{
|
||||||
|
/* Handle `END xxx'. */
|
||||||
|
now = lr_token (ldfile, charmap, result, NULL, verbose);
|
||||||
|
|
||||||
|
if (now->tok != token)
|
||||||
|
lr_error (ldfile, _("\
|
||||||
|
`%1$s' definition does not end with `END %1$s'"), locale_name);
|
||||||
|
|
||||||
|
lr_ignore_rest (ldfile, now->tok == token);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
/* When we come here we reached the end of the file. */
|
||||||
|
lr_error (ldfile, _("%s: premature end of file"), locale_name);
|
||||||
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
|
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
|
||||||
|
|
||||||
@ -45,64 +45,12 @@ struct locale_file
|
|||||||
|
|
||||||
|
|
||||||
/* General handling of `copy'. */
|
/* General handling of `copy'. */
|
||||||
static inline void
|
extern void handle_copy (struct linereader *ldfile,
|
||||||
handle_copy (struct linereader *ldfile, const struct charmap_t *charmap,
|
const struct charmap_t *charmap,
|
||||||
const char *repertoire_name, struct localedef_t *result,
|
const char *repertoire_name,
|
||||||
enum token_t token, int locale, const char *locale_name,
|
struct localedef_t *result, enum token_t token,
|
||||||
int ignore_content)
|
int locale, const char *locale_name,
|
||||||
{
|
int ignore_content);
|
||||||
struct token *now;
|
|
||||||
int warned = 0;
|
|
||||||
|
|
||||||
now = lr_token (ldfile, charmap, result, NULL, verbose);
|
|
||||||
if (now->tok != tok_string)
|
|
||||||
lr_error (ldfile, _("expect string argument for `copy'"));
|
|
||||||
else if (!ignore_content)
|
|
||||||
{
|
|
||||||
if (now->val.str.startmb == NULL)
|
|
||||||
lr_error (ldfile, _("\
|
|
||||||
locale name should consist only of portable characters"));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void) add_to_readlist (locale, now->val.str.startmb,
|
|
||||||
repertoire_name, 1, NULL);
|
|
||||||
result->copy_name[locale] = now->val.str.startmb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lr_ignore_rest (ldfile, now->tok == tok_string);
|
|
||||||
|
|
||||||
/* The rest of the line must be empty and the next keyword must be
|
|
||||||
`END xxx'. */
|
|
||||||
while ((now = lr_token (ldfile, charmap, result, NULL, verbose))->tok
|
|
||||||
!= tok_end && now->tok != tok_eof)
|
|
||||||
{
|
|
||||||
if (warned == 0)
|
|
||||||
{
|
|
||||||
lr_error (ldfile, _("\
|
|
||||||
no other keyword shall be specified when `copy' is used"));
|
|
||||||
warned = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
lr_ignore_rest (ldfile, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (now->tok != tok_eof)
|
|
||||||
{
|
|
||||||
/* Handle `END xxx'. */
|
|
||||||
now = lr_token (ldfile, charmap, result, NULL, verbose);
|
|
||||||
|
|
||||||
if (now->tok != token)
|
|
||||||
lr_error (ldfile, _("\
|
|
||||||
`%1$s' definition does not end with `END %1$s'"), locale_name);
|
|
||||||
|
|
||||||
lr_ignore_rest (ldfile, now->tok == token);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
/* When we come here we reached the end of the file. */
|
|
||||||
lr_error (ldfile, _("%s: premature end of file"), locale_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Found in locfile.c. */
|
/* Found in locfile.c. */
|
||||||
extern int locfile_read (struct localedef_t *result,
|
extern int locfile_read (struct localedef_t *result,
|
||||||
|
@ -27,7 +27,7 @@ findidx (const wint_t **cpp)
|
|||||||
wint_t ch;
|
wint_t ch;
|
||||||
|
|
||||||
ch = *(*cpp)++;
|
ch = *(*cpp)++;
|
||||||
i = collidx_table_lookup ((const char *) table, ch);
|
i = __collidx_table_lookup ((const char *) table, ch);
|
||||||
|
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
/* This is an index into the weight table. Cool. */
|
/* This is an index into the weight table. Cool. */
|
||||||
|
@ -229,7 +229,7 @@ group_keys (int number, char *key[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is for hosts */
|
/* This is for hosts */
|
||||||
static inline void
|
static void
|
||||||
print_hosts (struct hostent *host)
|
print_hosts (struct hostent *host)
|
||||||
{
|
{
|
||||||
unsigned int cnt;
|
unsigned int cnt;
|
||||||
@ -396,7 +396,7 @@ netgroup_keys (int number, char *key[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is for networks */
|
/* This is for networks */
|
||||||
static inline void
|
static void
|
||||||
print_networks (struct netent *net)
|
print_networks (struct netent *net)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
@ -691,7 +691,7 @@ services_keys (int number, char *key[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is for shadow */
|
/* This is for shadow */
|
||||||
static inline void
|
static void
|
||||||
print_shadow (struct spwd *sp)
|
print_shadow (struct spwd *sp)
|
||||||
{
|
{
|
||||||
printf ("%s:%s:",
|
printf ("%s:%s:",
|
||||||
@ -791,7 +791,7 @@ parse_option (int key, char *arg, struct argp_state *state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* build doc */
|
/* build doc */
|
||||||
static inline void
|
static void
|
||||||
build_doc (void)
|
build_doc (void)
|
||||||
{
|
{
|
||||||
int i, j, len;
|
int i, j, len;
|
||||||
|
@ -67,7 +67,7 @@ struct parser_data
|
|||||||
#ifdef ENTDATA
|
#ifdef ENTDATA
|
||||||
/* The function can't be exported, because the entdata structure
|
/* The function can't be exported, because the entdata structure
|
||||||
is defined only in files-foo.c. */
|
is defined only in files-foo.c. */
|
||||||
# define parser_stclass static inline
|
# define parser_stclass static
|
||||||
# define nss_files_parse_hidden_def(name)
|
# define nss_files_parse_hidden_def(name)
|
||||||
#else
|
#else
|
||||||
/* Export the line parser function so it can be used in nss_db. */
|
/* Export the line parser function so it can be used in nss_db. */
|
||||||
|
@ -622,7 +622,7 @@ FCT (pattern, string, string_end, no_leading_period, flags)
|
|||||||
|
|
||||||
# ifdef WIDE_CHAR_VERSION
|
# ifdef WIDE_CHAR_VERSION
|
||||||
/* Search in the `names' array for the characters. */
|
/* Search in the `names' array for the characters. */
|
||||||
fcollseq = collseq_table_lookup (collseq, fn);
|
fcollseq = __collseq_table_lookup (collseq, fn);
|
||||||
if (fcollseq == ~((uint32_t) 0))
|
if (fcollseq == ~((uint32_t) 0))
|
||||||
/* XXX We don't know anything about the character
|
/* XXX We don't know anything about the character
|
||||||
we are supposed to match. This means we are
|
we are supposed to match. This means we are
|
||||||
@ -632,7 +632,7 @@ FCT (pattern, string, string_end, no_leading_period, flags)
|
|||||||
if (is_seqval)
|
if (is_seqval)
|
||||||
lcollseq = cold;
|
lcollseq = cold;
|
||||||
else
|
else
|
||||||
lcollseq = collseq_table_lookup (collseq, cold);
|
lcollseq = __collseq_table_lookup (collseq, cold);
|
||||||
# else
|
# else
|
||||||
fcollseq = collseq[fn];
|
fcollseq = collseq[fn];
|
||||||
lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
|
lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
|
||||||
@ -794,7 +794,7 @@ FCT (pattern, string, string_end, no_leading_period, flags)
|
|||||||
{
|
{
|
||||||
# ifdef WIDE_CHAR_VERSION
|
# ifdef WIDE_CHAR_VERSION
|
||||||
hcollseq =
|
hcollseq =
|
||||||
collseq_table_lookup (collseq, cend);
|
__collseq_table_lookup (collseq, cend);
|
||||||
if (hcollseq == ~((uint32_t) 0))
|
if (hcollseq == ~((uint32_t) 0))
|
||||||
{
|
{
|
||||||
/* Hum, no information about the upper
|
/* Hum, no information about the upper
|
||||||
|
@ -291,6 +291,7 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
__attribute ((always_inline))
|
||||||
re_set_fastmap (char *fastmap, int icase, int ch)
|
re_set_fastmap (char *fastmap, int icase, int ch)
|
||||||
{
|
{
|
||||||
fastmap[ch] = 1;
|
fastmap[ch] = 1;
|
||||||
@ -2515,6 +2516,7 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
|||||||
Return the index of the symbol in the SYMB_TABLE. */
|
Return the index of the symbol in the SYMB_TABLE. */
|
||||||
|
|
||||||
static inline int32_t
|
static inline int32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
seek_collating_symbol_entry (name, name_len)
|
seek_collating_symbol_entry (name, name_len)
|
||||||
const unsigned char *name;
|
const unsigned char *name;
|
||||||
size_t name_len;
|
size_t name_len;
|
||||||
@ -2547,6 +2549,7 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
|||||||
Return the value if succeeded, UINT_MAX otherwise. */
|
Return the value if succeeded, UINT_MAX otherwise. */
|
||||||
|
|
||||||
static inline unsigned int
|
static inline unsigned int
|
||||||
|
__attribute ((always_inline))
|
||||||
lookup_collation_sequence_value (br_elem)
|
lookup_collation_sequence_value (br_elem)
|
||||||
bracket_elem_t *br_elem;
|
bracket_elem_t *br_elem;
|
||||||
{
|
{
|
||||||
@ -2560,12 +2563,12 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
wint_t wc = __btowc (br_elem->opr.ch);
|
wint_t wc = __btowc (br_elem->opr.ch);
|
||||||
return collseq_table_lookup (collseqwc, wc);
|
return __collseq_table_lookup (collseqwc, wc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (br_elem->type == MB_CHAR)
|
else if (br_elem->type == MB_CHAR)
|
||||||
{
|
{
|
||||||
return collseq_table_lookup (collseqwc, br_elem->opr.wch);
|
return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
|
||||||
}
|
}
|
||||||
else if (br_elem->type == COLL_SYM)
|
else if (br_elem->type == COLL_SYM)
|
||||||
{
|
{
|
||||||
@ -2614,6 +2617,7 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
|||||||
update it. */
|
update it. */
|
||||||
|
|
||||||
static inline reg_errcode_t
|
static inline reg_errcode_t
|
||||||
|
__attribute ((always_inline))
|
||||||
# ifdef RE_ENABLE_I18N
|
# ifdef RE_ENABLE_I18N
|
||||||
build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
|
build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
|
||||||
re_charset_t *mbcset;
|
re_charset_t *mbcset;
|
||||||
@ -2686,7 +2690,7 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
|||||||
if (nrules == 0)
|
if (nrules == 0)
|
||||||
ch_collseq = collseqmb[ch];
|
ch_collseq = collseqmb[ch];
|
||||||
else
|
else
|
||||||
ch_collseq = collseq_table_lookup (collseqwc, __btowc (ch));
|
ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
|
||||||
if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
|
if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
|
||||||
bitset_set (sbcset, ch);
|
bitset_set (sbcset, ch);
|
||||||
}
|
}
|
||||||
@ -2700,6 +2704,7 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
|||||||
pointer argument sinse we may update it. */
|
pointer argument sinse we may update it. */
|
||||||
|
|
||||||
static inline reg_errcode_t
|
static inline reg_errcode_t
|
||||||
|
__attribute ((always_inline))
|
||||||
# ifdef RE_ENABLE_I18N
|
# ifdef RE_ENABLE_I18N
|
||||||
build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
|
build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
|
||||||
re_charset_t *mbcset;
|
re_charset_t *mbcset;
|
||||||
|
@ -50,7 +50,7 @@ static int re_search_stub (struct re_pattern_buffer *bufp,
|
|||||||
int ret_len);
|
int ret_len);
|
||||||
static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
|
static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
|
||||||
int nregs, int regs_allocated);
|
int nregs, int regs_allocated);
|
||||||
static inline re_dfastate_t *acquire_init_state_context (reg_errcode_t *err,
|
static re_dfastate_t *acquire_init_state_context (reg_errcode_t *err,
|
||||||
const regex_t *preg,
|
const regex_t *preg,
|
||||||
const re_match_context_t *mctx,
|
const re_match_context_t *mctx,
|
||||||
int idx);
|
int idx);
|
||||||
@ -906,7 +906,7 @@ prune_impossible_nodes (preg, mctx)
|
|||||||
We must select appropriate initial state depending on the context,
|
We must select appropriate initial state depending on the context,
|
||||||
since initial states may have constraints like "\<", "^", etc.. */
|
since initial states may have constraints like "\<", "^", etc.. */
|
||||||
|
|
||||||
static inline re_dfastate_t *
|
static re_dfastate_t *
|
||||||
acquire_init_state_context (err, preg, mctx, idx)
|
acquire_init_state_context (err, preg, mctx, idx)
|
||||||
reg_errcode_t *err;
|
reg_errcode_t *err;
|
||||||
const regex_t *preg;
|
const regex_t *preg;
|
||||||
@ -1507,7 +1507,7 @@ sift_states_backward (preg, mctx, sctx)
|
|||||||
|
|
||||||
/* Helper functions. */
|
/* Helper functions. */
|
||||||
|
|
||||||
static inline reg_errcode_t
|
static reg_errcode_t
|
||||||
clean_state_log_if_need (mctx, next_state_log_idx)
|
clean_state_log_if_need (mctx, next_state_log_idx)
|
||||||
re_match_context_t *mctx;
|
re_match_context_t *mctx;
|
||||||
int next_state_log_idx;
|
int next_state_log_idx;
|
||||||
@ -3528,7 +3528,7 @@ check_node_accept_bytes (preg, node_idx, input, str_idx)
|
|||||||
if (elem_len <= char_len)
|
if (elem_len <= char_len)
|
||||||
{
|
{
|
||||||
collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
|
collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
|
||||||
in_collseq = collseq_table_lookup (collseqwc, wc);
|
in_collseq = __collseq_table_lookup (collseqwc, wc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
in_collseq = find_collation_sequence_value (pin, elem_len);
|
in_collseq = find_collation_sequence_value (pin, elem_len);
|
||||||
|
@ -108,63 +108,46 @@ static const char rcsid[] = "$BINDId: res_send.c,v 8.38 2000/03/30 20:16:51 vixi
|
|||||||
|
|
||||||
/* From ev_streams.c. */
|
/* From ev_streams.c. */
|
||||||
|
|
||||||
static inline struct iovec
|
static inline void
|
||||||
evConsIovec(void *buf, size_t cnt) {
|
__attribute ((always_inline))
|
||||||
struct iovec ret;
|
evConsIovec(void *buf, size_t cnt, struct iovec *vec) {
|
||||||
|
memset(vec, 0xf5, sizeof (*vec));
|
||||||
memset(&ret, 0xf5, sizeof ret);
|
vec->iov_base = buf;
|
||||||
ret.iov_base = buf;
|
vec->iov_len = cnt;
|
||||||
ret.iov_len = cnt;
|
|
||||||
return (ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* From ev_timers.c. */
|
/* From ev_timers.c. */
|
||||||
|
|
||||||
#define BILLION 1000000000
|
#define BILLION 1000000000
|
||||||
|
|
||||||
static inline struct timespec
|
static inline void
|
||||||
evTimeSpec(struct timeval tv) {
|
evConsTime(struct timespec *res, time_t sec, long nsec) {
|
||||||
struct timespec ts;
|
res->tv_sec = sec;
|
||||||
|
res->tv_nsec = nsec;
|
||||||
ts.tv_sec = tv.tv_sec;
|
|
||||||
ts.tv_nsec = tv.tv_usec * 1000;
|
|
||||||
return (ts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct timespec
|
static inline void
|
||||||
evConsTime(time_t sec, long nsec) {
|
evAddTime(struct timespec *res, const struct timespec *addend1,
|
||||||
struct timespec x;
|
const struct timespec *addend2) {
|
||||||
|
res->tv_sec = addend1->tv_sec + addend2->tv_sec;
|
||||||
x.tv_sec = sec;
|
res->tv_nsec = addend1->tv_nsec + addend2->tv_nsec;
|
||||||
x.tv_nsec = nsec;
|
if (res->tv_nsec >= BILLION) {
|
||||||
return (x);
|
res->tv_sec++;
|
||||||
}
|
res->tv_nsec -= BILLION;
|
||||||
|
|
||||||
static inline struct timespec
|
|
||||||
evAddTime(struct timespec addend1, struct timespec addend2) {
|
|
||||||
struct timespec x;
|
|
||||||
|
|
||||||
x.tv_sec = addend1.tv_sec + addend2.tv_sec;
|
|
||||||
x.tv_nsec = addend1.tv_nsec + addend2.tv_nsec;
|
|
||||||
if (x.tv_nsec >= BILLION) {
|
|
||||||
x.tv_sec++;
|
|
||||||
x.tv_nsec -= BILLION;
|
|
||||||
}
|
}
|
||||||
return (x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct timespec
|
static inline void
|
||||||
evSubTime(struct timespec minuend, struct timespec subtrahend) {
|
evSubTime(struct timespec *res, const struct timespec *minuend,
|
||||||
struct timespec x;
|
const struct timespec *subtrahend) {
|
||||||
|
res->tv_sec = minuend->tv_sec - subtrahend->tv_sec;
|
||||||
x.tv_sec = minuend.tv_sec - subtrahend.tv_sec;
|
if (minuend->tv_nsec >= subtrahend->tv_nsec)
|
||||||
if (minuend.tv_nsec >= subtrahend.tv_nsec)
|
res->tv_nsec = minuend->tv_nsec - subtrahend->tv_nsec;
|
||||||
x.tv_nsec = minuend.tv_nsec - subtrahend.tv_nsec;
|
|
||||||
else {
|
else {
|
||||||
x.tv_nsec = BILLION - subtrahend.tv_nsec + minuend.tv_nsec;
|
res->tv_nsec = (BILLION
|
||||||
x.tv_sec--;
|
- subtrahend->tv_nsec + minuend->tv_nsec);
|
||||||
|
res->tv_sec--;
|
||||||
}
|
}
|
||||||
return (x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@ -176,13 +159,14 @@ evCmpTime(struct timespec a, struct timespec b) {
|
|||||||
return (x < 0L ? (-1) : x > 0L ? (1) : (0));
|
return (x < 0L ? (-1) : x > 0L ? (1) : (0));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct timespec
|
static inline void
|
||||||
evNowTime() {
|
evNowTime(struct timespec *res) {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
if (gettimeofday(&now, NULL) < 0)
|
if (gettimeofday(&now, NULL) < 0)
|
||||||
return (evConsTime(0, 0));
|
evConsTime(res, 0, 0);
|
||||||
return (evTimeSpec(now));
|
else
|
||||||
|
TIMEVAL_TO_TIMESPEC (&now, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -561,9 +545,11 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
|
|||||||
res_sendhookact act;
|
res_sendhookact act;
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
act = (*statp->qhook)((struct sockaddr_in **)
|
struct sockaddr_in *nsap4;
|
||||||
&nsap, &buf, &buflen,
|
nsap4 = (struct sockaddr_in *) nsap;
|
||||||
|
act = (*statp->qhook)(&nsap4, &buf, &buflen,
|
||||||
ans, anssiz, &resplen);
|
ans, anssiz, &resplen);
|
||||||
|
nsap = (struct sockaddr_in6 *) nsap4;
|
||||||
#else
|
#else
|
||||||
act = (*statp->qhook)(&nsap, &buf, &buflen,
|
act = (*statp->qhook)(&nsap, &buf, &buflen,
|
||||||
ans, anssiz, &resplen);
|
ans, anssiz, &resplen);
|
||||||
@ -768,9 +754,10 @@ send_vc(res_state statp,
|
|||||||
* Send length & message
|
* Send length & message
|
||||||
*/
|
*/
|
||||||
putshort((u_short)buflen, (u_char*)&len);
|
putshort((u_short)buflen, (u_char*)&len);
|
||||||
iov[0] = evConsIovec(&len, INT16SZ);
|
evConsIovec(&len, INT16SZ, &iov[0]);
|
||||||
iov[1] = evConsIovec((void*)buf, buflen);
|
evConsIovec((void*)buf, buflen, &iov[1]);
|
||||||
if (writev(statp->_vcsock, iov, 2) != (INT16SZ + buflen)) {
|
if (TEMP_FAILURE_RETRY (writev(statp->_vcsock, iov, 2))
|
||||||
|
!= (INT16SZ + buflen)) {
|
||||||
*terrno = errno;
|
*terrno = errno;
|
||||||
Perror(statp, stderr, "write failed", errno);
|
Perror(statp, stderr, "write failed", errno);
|
||||||
res_nclose(statp);
|
res_nclose(statp);
|
||||||
@ -782,7 +769,8 @@ send_vc(res_state statp,
|
|||||||
read_len:
|
read_len:
|
||||||
cp = ans;
|
cp = ans;
|
||||||
len = INT16SZ;
|
len = INT16SZ;
|
||||||
while ((n = read(statp->_vcsock, (char *)cp, (int)len)) > 0) {
|
while ((n = TEMP_FAILURE_RETRY (read(statp->_vcsock, (char *)cp,
|
||||||
|
(int)len))) > 0) {
|
||||||
cp += n;
|
cp += n;
|
||||||
if ((len -= n) <= 0)
|
if ((len -= n) <= 0)
|
||||||
break;
|
break;
|
||||||
@ -998,9 +986,9 @@ send_dg(res_state statp,
|
|||||||
seconds /= statp->nscount;
|
seconds /= statp->nscount;
|
||||||
if (seconds <= 0)
|
if (seconds <= 0)
|
||||||
seconds = 1;
|
seconds = 1;
|
||||||
now = evNowTime();
|
evNowTime(&now);
|
||||||
timeout = evConsTime(seconds, 0);
|
evConsTime(&timeout, seconds, 0);
|
||||||
finish = evAddTime(now, timeout);
|
evAddTime(&finish, &now, &timeout);
|
||||||
wait:
|
wait:
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
/* Convert struct timespec in milliseconds. */
|
/* Convert struct timespec in milliseconds. */
|
||||||
@ -1021,9 +1009,9 @@ send_dg(res_state statp,
|
|||||||
}
|
}
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
if (errno == EINTR) {
|
if (errno == EINTR) {
|
||||||
now = evNowTime();
|
evNowTime(&now);
|
||||||
if (evCmpTime(finish, now) > 0) {
|
if (evCmpTime(finish, now) > 0) {
|
||||||
timeout = evSubTime(finish, now);
|
evSubTime(&timeout, &finish, &now);
|
||||||
goto wait;
|
goto wait;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1244,7 +1232,7 @@ pselect(int nfds, void *rfds, void *wfds, void *efds,
|
|||||||
if (sigmask)
|
if (sigmask)
|
||||||
sigprocmask(SIG_SETMASK, &sigs, NULL);
|
sigprocmask(SIG_SETMASK, &sigs, NULL);
|
||||||
if (tsp)
|
if (tsp)
|
||||||
*tsp = evTimeSpec(tv);
|
TIMEVAL_TO_TIMESPEC (tv, *tsp);
|
||||||
return (n);
|
return (n);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Linux/i386 version of processor capability information handling macros.
|
/* Linux/i386 version of processor capability information handling macros.
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1998-2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
__attribute__ ((unused))
|
__attribute__ ((unused, always_inline))
|
||||||
_dl_string_hwcap (const char *str)
|
_dl_string_hwcap (const char *str)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -112,7 +112,7 @@ _dl_string_hwcap (const char *str)
|
|||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
__attribute__ ((unused))
|
__attribute__ ((unused, always_inline))
|
||||||
_dl_string_platform (const char *str)
|
_dl_string_platform (const char *str)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -19,6 +19,13 @@
|
|||||||
|
|
||||||
#include "ifreq.h"
|
#include "ifreq.h"
|
||||||
|
|
||||||
|
/* Variable to signal whether SIOCGIFCONF is not available. */
|
||||||
|
#if __ASSUME_SIOCGIFNAME == 0 || 1
|
||||||
|
static int old_siocgifconf;
|
||||||
|
#else
|
||||||
|
# define old_siocgifconf 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
__ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
|
__ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
|
||||||
|
@ -25,13 +25,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "kernel-features.h"
|
#include "kernel-features.h"
|
||||||
|
|
||||||
/* Variable to signal whether SIOCGIFCONF is not available. */
|
|
||||||
#if __ASSUME_SIOCGIFNAME == 0 || 1
|
|
||||||
static int old_siocgifconf;
|
|
||||||
#else
|
|
||||||
# define old_siocgifconf 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern void __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd);
|
extern void __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
||||||
|
|
||||||
@ -49,6 +49,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static __inline int
|
static __inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
wctype_table_lookup (const char *table, uint32_t wc)
|
wctype_table_lookup (const char *table, uint32_t wc)
|
||||||
{
|
{
|
||||||
uint32_t shift1 = ((const uint32_t *) table)[0];
|
uint32_t shift1 = ((const uint32_t *) table)[0];
|
||||||
@ -80,6 +81,7 @@ wctype_table_lookup (const char *table, uint32_t wc)
|
|||||||
unit is a single byte, and no 5 bits are used as a word index. */
|
unit is a single byte, and no 5 bits are used as a word index. */
|
||||||
|
|
||||||
static __inline int
|
static __inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
wcwidth_table_lookup (const char *table, uint32_t wc)
|
wcwidth_table_lookup (const char *table, uint32_t wc)
|
||||||
{
|
{
|
||||||
uint32_t shift1 = ((const uint32_t *) table)[0];
|
uint32_t shift1 = ((const uint32_t *) table)[0];
|
||||||
@ -113,6 +115,7 @@ wcwidth_table_lookup (const char *table, uint32_t wc)
|
|||||||
bits are used as a word index. */
|
bits are used as a word index. */
|
||||||
|
|
||||||
static __inline uint32_t
|
static __inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
wctrans_table_lookup (const char *table, uint32_t wc)
|
wctrans_table_lookup (const char *table, uint32_t wc)
|
||||||
{
|
{
|
||||||
uint32_t shift1 = ((const uint32_t *) table)[0];
|
uint32_t shift1 = ((const uint32_t *) table)[0];
|
||||||
|
Reference in New Issue
Block a user