mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
Update.
2003-06-11 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (queue_stack): Always inline. * ptreadhP.h (__do_cancel): Likewise.
This commit is contained in:
parent
c98d505c4d
commit
dd9423a67a
41 changed files with 189 additions and 117 deletions
|
@ -1,5 +1,5 @@
|
||||||
/* Hierarchial argument parsing help output
|
/* Hierarchial argument parsing help output
|
||||||
Copyright (C) 1995-2000, 2001, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1995-2000, 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.
|
||||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||||
|
|
||||||
|
@ -521,7 +521,7 @@ hol_free (struct hol *hol)
|
||||||
free (hol);
|
free (hol);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static int
|
||||||
hol_entry_short_iterate (const struct hol_entry *entry,
|
hol_entry_short_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,
|
||||||
|
|
|
@ -361,7 +361,7 @@ static struct r_search_path_struct rtld_search_dirs;
|
||||||
|
|
||||||
static size_t max_dirnamelen;
|
static size_t max_dirnamelen;
|
||||||
|
|
||||||
static inline struct r_search_path_elem **
|
static struct r_search_path_elem **
|
||||||
fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
|
fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
|
||||||
int check_trusted, const char *what, const char *where)
|
int check_trusted, const char *what, const char *where)
|
||||||
{
|
{
|
||||||
|
@ -1935,8 +1935,7 @@ _dl_rtld_di_serinfo (struct link_map *loader, Dl_serinfo *si, bool counting)
|
||||||
|
|
||||||
unsigned int idx = 0;
|
unsigned int idx = 0;
|
||||||
char *allocptr = (char *) &si->dls_serpath[si->dls_cnt];
|
char *allocptr = (char *) &si->dls_serpath[si->dls_cnt];
|
||||||
inline void add_path (const struct r_search_path_struct *sps,
|
void add_path (const struct r_search_path_struct *sps, unsigned int flags)
|
||||||
unsigned int flags)
|
|
||||||
# define add_path(sps, flags) add_path(sps, 0) /* XXX */
|
# define add_path(sps, flags) add_path(sps, 0) /* XXX */
|
||||||
{
|
{
|
||||||
if (sps->dirs != (void *) -1)
|
if (sps->dirs != (void *) -1)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Handle symbol and library versioning.
|
/* Handle symbol and library versioning.
|
||||||
Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
|
Copyright (C) 1997-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>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
|
|
||||||
|
|
||||||
static inline struct link_map *
|
static inline struct link_map *
|
||||||
|
__attribute ((always_inline))
|
||||||
find_needed (const char *name, struct link_map *map)
|
find_needed (const char *name, struct link_map *map)
|
||||||
{
|
{
|
||||||
struct link_map *tmap;
|
struct link_map *tmap;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Look up a symbol in the loaded objects.
|
/* Look up a symbol in the loaded objects.
|
||||||
Copyright (C) 1995,96,97,98,99,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.
|
||||||
|
|
||||||
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
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
/* Inner part of the lookup functions. We return a value > 0 if we
|
/* Inner part of the lookup functions. We return a value > 0 if we
|
||||||
found the symbol, the value 0 if nothing is found and < 0 if
|
found the symbol, the value 0 if nothing is found and < 0 if
|
||||||
something bad happened. */
|
something bad happened. */
|
||||||
static inline int
|
static int
|
||||||
FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
|
FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
|
||||||
struct sym_val *result, struct r_scope_elem *scope, size_t i, ARG,
|
struct sym_val *result, struct r_scope_elem *scope, size_t i, ARG,
|
||||||
struct link_map *skip, int type_class)
|
struct link_map *skip, int type_class)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
|
# Copyright (C) 1997,1998,2000,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.
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -35,11 +35,11 @@ CFLAGS-gconv_cache.c = -DSTATIC_GCONV
|
||||||
CFLAGS-gconv_simple.c = -DSTATIC_GCONV
|
CFLAGS-gconv_simple.c = -DSTATIC_GCONV
|
||||||
endif
|
endif
|
||||||
|
|
||||||
vpath %.c ../locale/programs
|
vpath %.c ../locale/programs ../intl
|
||||||
|
|
||||||
iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
|
iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
|
||||||
dummy-repertoire simple-hash xstrdup xmalloc
|
dummy-repertoire simple-hash xstrdup xmalloc
|
||||||
iconvconfig-modules = strtab xmalloc
|
iconvconfig-modules = strtab xmalloc hash-string
|
||||||
extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o)
|
extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o)
|
||||||
CFLAGS-iconv_prog.c = -I../locale/programs
|
CFLAGS-iconv_prog.c = -I../locale/programs
|
||||||
CFLAGS-iconv_charmap.c = -I../locale/programs
|
CFLAGS-iconv_charmap.c = -I../locale/programs
|
||||||
|
|
|
@ -159,7 +159,7 @@ find_module_idx (const char *str, size_t *idxp)
|
||||||
hashtab = (struct hash_entry *) ((char *) gconv_cache
|
hashtab = (struct hash_entry *) ((char *) gconv_cache
|
||||||
+ header->hash_offset);
|
+ header->hash_offset);
|
||||||
|
|
||||||
hval = hash_string (str);
|
hval = __hash_string (str);
|
||||||
idx = hval % header->hash_size;
|
idx = hval % header->hash_size;
|
||||||
hval2 = 1 + hval % (header->hash_size - 2);
|
hval2 = 1 + hval % (header->hash_size - 2);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Charset name normalization.
|
/* Charset name normalization.
|
||||||
Copyright (C) 2001,02 Free Software Foundation, Inc.
|
Copyright (C) 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@cygnus.com>, 2001.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
static void
|
||||||
strip (char *wp, const char *s)
|
strip (char *wp, const char *s)
|
||||||
{
|
{
|
||||||
int slash_count = 0;
|
int slash_count = 0;
|
||||||
|
@ -48,7 +48,7 @@ strip (char *wp, const char *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline char * __attribute__ ((unused))
|
static inline char * __attribute__ ((unused, always_inline))
|
||||||
upstr (char *dst, const char *str)
|
upstr (char *dst, const char *str)
|
||||||
{
|
{
|
||||||
char *cp = dst;
|
char *cp = dst;
|
||||||
|
@ -56,8 +56,3 @@ upstr (char *dst, const char *str)
|
||||||
/* nothing */;
|
/* nothing */;
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* If NAME is an codeset alias expand it. */
|
|
||||||
extern int __gconv_compare_alias (const char *name1, const char *name2)
|
|
||||||
internal_function;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Handle configuration data.
|
/* Handle configuration data.
|
||||||
Copyright (C) 1997,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
Copyright (C) 1997,98,99,2000,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@cygnus.com>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ detect_conflict (const char *alias)
|
||||||
|
|
||||||
|
|
||||||
/* Add new alias. */
|
/* Add new alias. */
|
||||||
static inline void
|
static void
|
||||||
add_alias (char *rp, void *modules)
|
add_alias (char *rp, void *modules)
|
||||||
{
|
{
|
||||||
/* We now expect two more string. The strings are normalized
|
/* We now expect two more string. The strings are normalized
|
||||||
|
@ -178,7 +178,7 @@ add_alias (char *rp, void *modules)
|
||||||
|
|
||||||
|
|
||||||
/* Insert a data structure for a new module in the search tree. */
|
/* Insert a data structure for a new module in the search tree. */
|
||||||
static inline void
|
static void
|
||||||
internal_function
|
internal_function
|
||||||
insert_module (struct gconv_module *newp, int tobefreed)
|
insert_module (struct gconv_module *newp, int tobefreed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Provide access to the collection of available transformation modules.
|
/* Provide access to the collection of available transformation modules.
|
||||||
Copyright (C) 1997,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
Copyright (C) 1997,98,99,2000,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@cygnus.com>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <gconv_int.h>
|
#include <gconv_int.h>
|
||||||
#include <gconv_charset.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* Simple data structure for alias mapping. We have two names, `from'
|
/* Simple data structure for alias mapping. We have two names, `from'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1997-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>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -262,6 +262,11 @@ extern int __gconv_transliterate (struct __gconv_step *step,
|
||||||
size_t *irreversible) attribute_hidden;
|
size_t *irreversible) attribute_hidden;
|
||||||
|
|
||||||
|
|
||||||
|
/* If NAME is an codeset alias expand it. */
|
||||||
|
extern int __gconv_compare_alias (const char *name1, const char *name2)
|
||||||
|
internal_function;
|
||||||
|
|
||||||
|
|
||||||
/* Builtin transformations. */
|
/* Builtin transformations. */
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# define __BUILTIN_TRANSFORM(Name) \
|
# define __BUILTIN_TRANSFORM(Name) \
|
||||||
|
|
|
@ -72,6 +72,7 @@ __gconv_btwoc_ascii (struct __gconv_step *step, unsigned char c)
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
internal_ucs4_loop (struct __gconv_step *step,
|
internal_ucs4_loop (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
@ -113,6 +114,7 @@ internal_ucs4_loop (struct __gconv_step *step,
|
||||||
|
|
||||||
#ifndef _STRING_ARCH_unaligned
|
#ifndef _STRING_ARCH_unaligned
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
internal_ucs4_loop_unaligned (struct __gconv_step *step,
|
internal_ucs4_loop_unaligned (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -161,6 +163,7 @@ internal_ucs4_loop_unaligned (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
internal_ucs4_loop_single (struct __gconv_step *step,
|
internal_ucs4_loop_single (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -219,6 +222,7 @@ internal_ucs4_loop_single (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_internal_loop (struct __gconv_step *step,
|
ucs4_internal_loop (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
@ -283,6 +287,7 @@ ucs4_internal_loop (struct __gconv_step *step,
|
||||||
|
|
||||||
#ifndef _STRING_ARCH_unaligned
|
#ifndef _STRING_ARCH_unaligned
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_internal_loop_unaligned (struct __gconv_step *step,
|
ucs4_internal_loop_unaligned (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -352,6 +357,7 @@ ucs4_internal_loop_unaligned (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_internal_loop_single (struct __gconv_step *step,
|
ucs4_internal_loop_single (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -426,6 +432,7 @@ ucs4_internal_loop_single (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
internal_ucs4le_loop (struct __gconv_step *step,
|
internal_ucs4le_loop (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
@ -467,6 +474,7 @@ internal_ucs4le_loop (struct __gconv_step *step,
|
||||||
|
|
||||||
#ifndef _STRING_ARCH_unaligned
|
#ifndef _STRING_ARCH_unaligned
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
internal_ucs4le_loop_unaligned (struct __gconv_step *step,
|
internal_ucs4le_loop_unaligned (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -518,6 +526,7 @@ internal_ucs4le_loop_unaligned (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
internal_ucs4le_loop_single (struct __gconv_step *step,
|
internal_ucs4le_loop_single (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -573,6 +582,7 @@ internal_ucs4le_loop_single (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4le_internal_loop (struct __gconv_step *step,
|
ucs4le_internal_loop (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
@ -638,6 +648,7 @@ ucs4le_internal_loop (struct __gconv_step *step,
|
||||||
|
|
||||||
#ifndef _STRING_ARCH_unaligned
|
#ifndef _STRING_ARCH_unaligned
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4le_internal_loop_unaligned (struct __gconv_step *step,
|
ucs4le_internal_loop_unaligned (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
@ -711,6 +722,7 @@ ucs4le_internal_loop_unaligned (struct __gconv_step *step,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4le_internal_loop_single (struct __gconv_step *step,
|
ucs4le_internal_loop_single (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp,
|
const unsigned char **inptrp,
|
||||||
|
|
|
@ -784,7 +784,7 @@ new_name (const char *str, struct Strent *strent)
|
||||||
newp->name = str;
|
newp->name = str;
|
||||||
newp->strent = strent;
|
newp->strent = strent;
|
||||||
newp->module_idx = -1;
|
newp->module_idx = -1;
|
||||||
newp->hashval = hash_string (str);
|
newp->hashval = __hash_string (str);
|
||||||
|
|
||||||
++nnames;
|
++nnames;
|
||||||
|
|
||||||
|
|
|
@ -257,6 +257,7 @@
|
||||||
|
|
||||||
/* The function returns the status, as defined in gconv.h. */
|
/* The function returns the status, as defined in gconv.h. */
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
FCTNAME (LOOPFCT) (struct __gconv_step *step,
|
FCTNAME (LOOPFCT) (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
@ -342,6 +343,7 @@ FCTNAME (LOOPFCT) (struct __gconv_step *step,
|
||||||
# define SINGLE(fct) SINGLE2 (fct)
|
# define SINGLE(fct) SINGLE2 (fct)
|
||||||
# define SINGLE2(fct) fct##_single
|
# define SINGLE2(fct) fct##_single
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
SINGLE(LOOPFCT) (struct __gconv_step *step,
|
SINGLE(LOOPFCT) (struct __gconv_step *step,
|
||||||
struct __gconv_step_data *step_data,
|
struct __gconv_step_data *step_data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for CNS 11643 handling.
|
/* Access functions for CNS 11643 handling.
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1998,1999,2000,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@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ extern const uint32_t __cns11643l15_to_ucs4_tab[];
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
cns11643_to_ucs4 (const char **s, size_t avail, unsigned char offset)
|
cns11643_to_ucs4 (const char **s, size_t avail, unsigned char offset)
|
||||||
{
|
{
|
||||||
unsigned char ch = *(*s);
|
unsigned char ch = *(*s);
|
||||||
|
@ -140,6 +141,7 @@ extern const char __cns11643_from_ucs4p2c_tab[][3];
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_cns11643 (uint32_t wch, char *s, size_t avail)
|
ucs4_to_cns11643 (uint32_t wch, char *s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned int ch = (unsigned int) wch;
|
unsigned int ch = (unsigned int) wch;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for CNS 11643, plane 1 handling.
|
/* Access functions for CNS 11643, plane 1 handling.
|
||||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 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>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ extern const uint16_t __cns11643l1_to_ucs4_tab[];
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
cns11643l1_to_ucs4 (const unsigned char **s, size_t avail,
|
cns11643l1_to_ucs4 (const unsigned char **s, size_t avail,
|
||||||
unsigned char offset)
|
unsigned char offset)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +72,7 @@ extern const char __cns11643l1_from_ucs4_tab14[][2];
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_cns11643l1 (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_cns11643l1 (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned int ch = (unsigned int) wch;
|
unsigned int ch = (unsigned int) wch;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Mapping tables for EUC-KR handling.
|
/* Mapping tables for EUC-KR handling.
|
||||||
Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000-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 Jungshik Shin <jshin@pantheon.yale.edu>
|
Contributed by Jungshik Shin <jshin@pantheon.yale.edu>
|
||||||
and Ulrich Drepper <drepper@cygnus.com>, 1998.
|
and Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
__attribute ((always_inline))
|
||||||
euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
|
euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
|
||||||
{
|
{
|
||||||
if (ch > 0x9f)
|
if (ch > 0x9f)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for GB2312 conversion.
|
/* Access functions for GB2312 conversion.
|
||||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 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.
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ extern const uint16_t __gb2312_to_ucs[];
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
gb2312_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
gb2312_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
{
|
{
|
||||||
unsigned char ch = *(*s);
|
unsigned char ch = *(*s);
|
||||||
|
@ -67,6 +68,7 @@ extern const char __gb2312_from_ucs4_tab8[][2];
|
||||||
extern const char __gb2312_from_ucs4_tab9[][2];
|
extern const char __gb2312_from_ucs4_tab9[][2];
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned int ch = (unsigned int) wch;
|
unsigned int ch = (unsigned int) wch;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for JISX0201 conversion.
|
/* Access functions for JISX0201 conversion.
|
||||||
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1997, 1998, 1999, 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>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ extern const uint32_t __jisx0201_to_ucs4[];
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
jisx0201_to_ucs4 (char ch)
|
jisx0201_to_ucs4 (char ch)
|
||||||
{
|
{
|
||||||
uint32_t val = __jisx0201_to_ucs4[(unsigned char) ch];
|
uint32_t val = __jisx0201_to_ucs4[(unsigned char) ch];
|
||||||
|
@ -38,6 +39,7 @@ jisx0201_to_ucs4 (char ch)
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_jisx0201 (uint32_t wch, char *s)
|
ucs4_to_jisx0201 (uint32_t wch, char *s)
|
||||||
{
|
{
|
||||||
char ch;
|
char ch;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for JISX0208 conversion.
|
/* Access functions for JISX0208 conversion.
|
||||||
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1997, 1998, 1999, 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>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ struct jisx0208_ucs_idx
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
{
|
{
|
||||||
unsigned char ch = *(*s);
|
unsigned char ch = *(*s);
|
||||||
|
@ -70,6 +71,7 @@ jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_jisx0208 (uint32_t wch, char *s, size_t avail)
|
ucs4_to_jisx0208 (uint32_t wch, char *s, size_t avail)
|
||||||
{
|
{
|
||||||
unsigned int ch = (unsigned int) wch;
|
unsigned int ch = (unsigned int) wch;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for JISX0212 conversion.
|
/* Access functions for JISX0212 conversion.
|
||||||
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1997, 1998, 1999, 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>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ extern const char __jisx0212_from_ucs[][2];
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
jisx0212_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
jisx0212_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
{
|
{
|
||||||
const struct jisx0212_idx *rp = __jisx0212_to_ucs_idx;
|
const struct jisx0212_idx *rp = __jisx0212_to_ucs_idx;
|
||||||
|
@ -77,6 +78,7 @@ jisx0212_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_jisx0212 (uint32_t wch, char *s, size_t avail)
|
ucs4_to_jisx0212 (uint32_t wch, char *s, size_t avail)
|
||||||
{
|
{
|
||||||
const struct jisx0212_idx *rp = __jisx0212_from_ucs_idx;
|
const struct jisx0212_idx *rp = __jisx0212_from_ucs_idx;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Functions for JISX0213 conversion.
|
/* Functions for JISX0213 conversion.
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 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 Bruno Haible <bruno@clisp.org>, 2002.
|
Contributed by Bruno Haible <bruno@clisp.org>, 2002.
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ extern const uint16_t __jisx0213_from_ucs_level2[];
|
||||||
#define NELEMS(arr) (sizeof (arr) / sizeof (arr[0]))
|
#define NELEMS(arr) (sizeof (arr) / sizeof (arr[0]))
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
jisx0213_to_ucs4 (unsigned int row, unsigned int col)
|
jisx0213_to_ucs4 (unsigned int row, unsigned int col)
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
|
@ -64,6 +65,7 @@ jisx0213_to_ucs4 (unsigned int row, unsigned int col)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint16_t
|
static inline uint16_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_jisx0213 (uint32_t ucs)
|
ucs4_to_jisx0213 (uint32_t ucs)
|
||||||
{
|
{
|
||||||
if (ucs < NELEMS (__jisx0213_from_ucs_level1) << 6)
|
if (ucs < NELEMS (__jisx0213_from_ucs_level1) << 6)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Access functions for KS C 5601-1992 based encoding conversion.
|
/* Access functions for KS C 5601-1992 based encoding conversion.
|
||||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000, 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
|
||||||
|
@ -44,6 +44,7 @@ extern const struct map __ksc5601_hanja_from_ucs[KSC5601_HANJA];
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
{
|
{
|
||||||
unsigned char ch = **s;
|
unsigned char ch = **s;
|
||||||
|
@ -85,6 +86,7 @@ ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_ksc5601_hangul (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_ksc5601_hangul (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
int l = 0;
|
int l = 0;
|
||||||
|
@ -116,6 +118,7 @@ ucs4_to_ksc5601_hangul (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_ksc5601_hanja (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_ksc5601_hanja (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
int l = 0;
|
int l = 0;
|
||||||
|
@ -146,6 +149,7 @@ ucs4_to_ksc5601_hanja (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_ksc5601_sym (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_ksc5601_sym (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
int l = 0;
|
int l = 0;
|
||||||
|
@ -177,6 +181,7 @@ ucs4_to_ksc5601_sym (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
|
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
__attribute ((always_inline))
|
||||||
ucs4_to_ksc5601 (uint32_t wch, unsigned char *s, size_t avail)
|
ucs4_to_ksc5601 (uint32_t wch, unsigned char *s, size_t avail)
|
||||||
{
|
{
|
||||||
if (wch >= 0xac00 && wch <= 0xd7a3)
|
if (wch >= 0xac00 && wch <= 0xd7a3)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Conversion module for UTF-7.
|
/* Conversion module for UTF-7.
|
||||||
Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
Copyright (C) 2000-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 Bruno Haible <haible@clisp.cons.org>, 2000.
|
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ isxbase64 (uint32_t ch)
|
||||||
|
|
||||||
|
|
||||||
/* Converts a value in the range 0..63 to a base64 encoded char. */
|
/* Converts a value in the range 0..63 to a base64 encoded char. */
|
||||||
static inline unsigned char
|
static unsigned char
|
||||||
base64 (unsigned int i)
|
base64 (unsigned int i)
|
||||||
{
|
{
|
||||||
if (i < 26)
|
if (i < 26)
|
||||||
|
|
|
@ -359,11 +359,11 @@
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Return a pointer (void *const *) to the first element of SET. */
|
/* Return a pointer (void *const *) to the first element of SET. */
|
||||||
# define symbol_set_first_element(set) (&__start_##set)
|
# define symbol_set_first_element(set) ((void *const *) (&__start_##set))
|
||||||
|
|
||||||
/* Return true iff PTR (a void *const *) has been incremented
|
/* Return true iff PTR (a void *const *) has been incremented
|
||||||
past the last element in SET. */
|
past the last element in SET. */
|
||||||
# define symbol_set_end_p(set, ptr) ((ptr) >= &__stop_##set)
|
# define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set)
|
||||||
|
|
||||||
# else /* Not ELF: a.out. */
|
# else /* Not ELF: a.out. */
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Macros for using symbol sets for running lists of functions.
|
/* Macros for using symbol sets for running lists of functions.
|
||||||
Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1994, 1995, 1997, 2000, 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
|
||||||
|
@ -40,12 +40,12 @@
|
||||||
/* Run all the functions hooked on the set called NAME.
|
/* Run all the functions hooked on the set called NAME.
|
||||||
Each function is called like this: `function ARGS'. */
|
Each function is called like this: `function ARGS'. */
|
||||||
|
|
||||||
# define RUN_HOOK(NAME, ARGS) \
|
# define RUN_HOOK(NAME, ARGS) \
|
||||||
do { \
|
do { \
|
||||||
void *const *__unbounded ptr; \
|
void *const *__unbounded ptr; \
|
||||||
for (ptr = symbol_set_first_element (NAME); \
|
for (ptr = (void *const *) symbol_set_first_element (NAME); \
|
||||||
! symbol_set_end_p (NAME, ptr); ++ptr) \
|
! symbol_set_end_p (NAME, ptr); ++ptr) \
|
||||||
(*(__##NAME##_hook_function_t *) *ptr) ARGS; \
|
(*(__##NAME##_hook_function_t *) *ptr) ARGS; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* Define a hook variable with NAME and PROTO, and a function called RUNNER
|
/* Define a hook variable with NAME and PROTO, and a function called RUNNER
|
||||||
|
|
|
@ -47,7 +47,7 @@ routines := htonl htons \
|
||||||
getaliasent_r getaliasent getaliasname getaliasname_r \
|
getaliasent_r getaliasent getaliasname getaliasname_r \
|
||||||
in6_addr getnameinfo if_index ifaddrs
|
in6_addr getnameinfo if_index ifaddrs
|
||||||
|
|
||||||
aux := check_pf
|
aux := check_pf ifreq
|
||||||
|
|
||||||
tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
|
tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
|
||||||
tst-gethnm test-ifaddrs
|
tst-gethnm test-ifaddrs
|
||||||
|
|
|
@ -22,8 +22,8 @@ subdir = intl
|
||||||
headers = libintl.h
|
headers = libintl.h
|
||||||
routines = bindtextdom dcgettext dgettext gettext \
|
routines = bindtextdom dcgettext dgettext gettext \
|
||||||
dcigettext dcngettext dngettext ngettext \
|
dcigettext dcngettext dngettext ngettext \
|
||||||
finddomain loadmsgcat localealias textdomain \
|
finddomain loadmsgcat localealias textdomain
|
||||||
l10nflist explodename plural plural-exp
|
aux = l10nflist explodename plural plural-exp hash-string
|
||||||
distribute = gmo.h gettextP.h hash-string.h loadinfo.h locale.alias \
|
distribute = gmo.h gettextP.h hash-string.h loadinfo.h locale.alias \
|
||||||
plural.y plural-exp.h po2test.sed tst-gettext.sh tst-translit.sh \
|
plural.y plural-exp.h po2test.sed tst-gettext.sh tst-translit.sh \
|
||||||
translit.po tst-gettext2.sh tstlang1.po tstlang2.po tstcodeset.po\
|
translit.po tst-gettext2.sh tstlang1.po tstlang2.po tstcodeset.po\
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Implementation of the internal dcigettext function.
|
/* Implementation of the internal dcigettext function.
|
||||||
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.
|
||||||
|
|
||||||
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
|
||||||
|
@ -695,7 +695,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, lengthp)
|
||||||
{
|
{
|
||||||
/* Use the hashing table. */
|
/* Use the hashing table. */
|
||||||
nls_uint32 len = strlen (msgid);
|
nls_uint32 len = strlen (msgid);
|
||||||
nls_uint32 hash_val = hash_string (msgid);
|
nls_uint32 hash_val = __hash_string (msgid);
|
||||||
nls_uint32 idx = hash_val % domain->hash_size;
|
nls_uint32 idx = hash_val % domain->hash_size;
|
||||||
nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
|
nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
|
||||||
|
|
||||||
|
|
47
intl/hash-string.c
Normal file
47
intl/hash-string.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/* Implements a string hashing function.
|
||||||
|
Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
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 "hash-string.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
||||||
|
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
||||||
|
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
||||||
|
unsigned long int
|
||||||
|
__hash_string (str_param)
|
||||||
|
const char *str_param;
|
||||||
|
{
|
||||||
|
unsigned long int hval, g;
|
||||||
|
const char *str = str_param;
|
||||||
|
|
||||||
|
/* Compute the hash value for the given string. */
|
||||||
|
hval = 0;
|
||||||
|
while (*str != '\0')
|
||||||
|
{
|
||||||
|
hval <<= 4;
|
||||||
|
hval += (unsigned long int) *str++;
|
||||||
|
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
|
||||||
|
if (g != 0)
|
||||||
|
{
|
||||||
|
hval ^= g >> (HASHWORDBITS - 8);
|
||||||
|
hval ^= g;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hval;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/* Implements a string hashing function.
|
/* Implements a string hashing function.
|
||||||
Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1997, 1998, 2000, 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
|
||||||
|
@ -34,27 +34,5 @@
|
||||||
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
||||||
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
||||||
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
||||||
static unsigned long int hash_string PARAMS ((const char *__str_param));
|
extern unsigned long int __hash_string PARAMS ((const char *__str_param))
|
||||||
|
attribute_hidden;
|
||||||
static inline unsigned long int
|
|
||||||
hash_string (str_param)
|
|
||||||
const char *str_param;
|
|
||||||
{
|
|
||||||
unsigned long int hval, g;
|
|
||||||
const char *str = str_param;
|
|
||||||
|
|
||||||
/* Compute the hash value for the given string. */
|
|
||||||
hval = 0;
|
|
||||||
while (*str != '\0')
|
|
||||||
{
|
|
||||||
hval <<= 4;
|
|
||||||
hval += (unsigned long int) *str++;
|
|
||||||
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
|
|
||||||
if (g != 0)
|
|
||||||
{
|
|
||||||
hval ^= g >> (HASHWORDBITS - 8);
|
|
||||||
hval ^= g;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return hval;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Load needed message catalogs.
|
/* Load needed message catalogs.
|
||||||
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.
|
||||||
|
|
||||||
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
|
||||||
|
@ -1209,7 +1209,7 @@ _nl_load_domain (domain_file, domainbinding)
|
||||||
for (i = 0; i < n_sysdep_strings; i++)
|
for (i = 0; i < n_sysdep_strings; i++)
|
||||||
{
|
{
|
||||||
const char *msgid = inmem_orig_sysdep_tab[i].pointer;
|
const char *msgid = inmem_orig_sysdep_tab[i].pointer;
|
||||||
nls_uint32 hash_val = hash_string (msgid);
|
nls_uint32 hash_val = __hash_string (msgid);
|
||||||
nls_uint32 idx = hash_val % domain->hash_size;
|
nls_uint32 idx = hash_val % domain->hash_size;
|
||||||
nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
|
nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
|
||||||
|
|
||||||
|
|
4
io/ftw.c
4
io/ftw.c
|
@ -258,6 +258,7 @@ find_object (struct ftw_data *data, struct STAT *st)
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
open_dir_stream (struct ftw_data *data, struct dir_data *dirp)
|
open_dir_stream (struct ftw_data *data, struct dir_data *dirp)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
@ -348,7 +349,8 @@ open_dir_stream (struct ftw_data *data, struct dir_data *dirp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static int
|
||||||
|
internal_function
|
||||||
process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
|
process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
|
||||||
size_t namlen)
|
size_t namlen)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include "localeinfo.h"
|
#include "localeinfo.h"
|
||||||
#include "../iconv/gconv_charset.h"
|
#include "../iconv/gconv_charset.h"
|
||||||
|
#include "../iconv/gconv_int.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef NL_CURRENT_INDIRECT
|
#ifdef NL_CURRENT_INDIRECT
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
|
@ -110,6 +110,35 @@ lr_eof (struct linereader *lr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
lr_ignore_rest (struct linereader *lr, int verbose)
|
||||||
|
{
|
||||||
|
if (verbose)
|
||||||
|
{
|
||||||
|
while (isspace (lr->buf[lr->idx]) && lr->buf[lr->idx] != '\n'
|
||||||
|
&& lr->buf[lr->idx] != lr->comment_char)
|
||||||
|
if (lr->buf[lr->idx] == '\0')
|
||||||
|
{
|
||||||
|
if (lr_next (lr) < 0)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
++lr->idx;
|
||||||
|
|
||||||
|
if (lr->buf[lr->idx] != '\n' && ! feof (lr->fp)
|
||||||
|
&& lr->buf[lr->idx] != lr->comment_char)
|
||||||
|
lr_error (lr, _("trailing garbage at end of line"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ignore continued line. */
|
||||||
|
while (lr->bufact > 0 && lr->buf[lr->bufact - 1] != '\n')
|
||||||
|
if (lr_next (lr) < 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
lr->idx = lr->bufact;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
lr_close (struct linereader *lr)
|
lr_close (struct linereader *lr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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>.
|
Contributed by Ulrich Drepper, <drepper@gnu.org>.
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ extern struct token *lr_token (struct linereader *lr,
|
||||||
struct localedef_t *locale,
|
struct localedef_t *locale,
|
||||||
const struct repertoire_t *repertoire,
|
const struct repertoire_t *repertoire,
|
||||||
int verbose);
|
int verbose);
|
||||||
|
extern void lr_ignore_rest (struct linereader *lr, int verbose);
|
||||||
|
|
||||||
|
|
||||||
#define lr_error(lr, fmt, args...) \
|
#define lr_error(lr, fmt, args...) \
|
||||||
|
@ -103,6 +104,7 @@ extern struct token *lr_token (struct linereader *lr,
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
lr_getc (struct linereader *lr)
|
lr_getc (struct linereader *lr)
|
||||||
{
|
{
|
||||||
if (lr->idx == lr->bufact)
|
if (lr->idx == lr->bufact)
|
||||||
|
@ -120,6 +122,7 @@ lr_getc (struct linereader *lr)
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
__attribute ((always_inline))
|
||||||
lr_ungetc (struct linereader *lr, int ch)
|
lr_ungetc (struct linereader *lr, int ch)
|
||||||
{
|
{
|
||||||
if (lr->idx == 0)
|
if (lr->idx == 0)
|
||||||
|
@ -142,33 +145,4 @@ lr_ungetn (struct linereader *lr, size_t n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
lr_ignore_rest (struct linereader *lr, int verbose)
|
|
||||||
{
|
|
||||||
if (verbose)
|
|
||||||
{
|
|
||||||
while (isspace (lr->buf[lr->idx]) && lr->buf[lr->idx] != '\n'
|
|
||||||
&& lr->buf[lr->idx] != lr->comment_char)
|
|
||||||
if (lr->buf[lr->idx] == '\0')
|
|
||||||
{
|
|
||||||
if (lr_next (lr) < 0)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++lr->idx;
|
|
||||||
|
|
||||||
if (lr->buf[lr->idx] != '\n' && ! feof (lr->fp)
|
|
||||||
&& lr->buf[lr->idx] != lr->comment_char)
|
|
||||||
lr_error (lr, _("trailing garbage at end of line"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ignore continued line. */
|
|
||||||
while (lr->bufact > 0 && lr->buf[lr->bufact - 1] != '\n')
|
|
||||||
if (lr_next (lr) < 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
lr->idx = lr->bufact;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* linereader.h */
|
#endif /* linereader.h */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 92, 95-99, 2000, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 92, 1995-2000, 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
|
||||||
|
@ -128,7 +128,7 @@ extern int _nl_msg_cat_cntr;
|
||||||
|
|
||||||
|
|
||||||
/* Construct a new composite name. */
|
/* Construct a new composite name. */
|
||||||
static inline char *
|
static char *
|
||||||
new_composite_name (int category, const char *newnames[__LC_LAST])
|
new_composite_name (int category, const char *newnames[__LC_LAST])
|
||||||
{
|
{
|
||||||
size_t last_len = 0;
|
size_t last_len = 0;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Ulrich Drepper, <drepper@cygnus.com>.
|
Written by Ulrich Drepper, <drepper@cygnus.com>.
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
/* Find index of weight. */
|
/* Find index of weight. */
|
||||||
static inline int32_t
|
static inline int32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
findidx (const unsigned char **cpp)
|
findidx (const unsigned char **cpp)
|
||||||
{
|
{
|
||||||
int_fast32_t i = table[*(*cpp)++];
|
int_fast32_t i = table[*(*cpp)++];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
|
/* Copyright (C) 1996-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.
|
||||||
Written by Ulrich Drepper, <drepper@cygnus.com>.
|
Written by Ulrich Drepper, <drepper@cygnus.com>.
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
/* Find index of weight. */
|
/* Find index of weight. */
|
||||||
static inline int32_t
|
static inline int32_t
|
||||||
|
__attribute ((always_inline))
|
||||||
findidx (const wint_t **cpp)
|
findidx (const wint_t **cpp)
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-06-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* allocatestack.c (queue_stack): Always inline.
|
||||||
|
* ptreadhP.h (__do_cancel): Likewise.
|
||||||
|
|
||||||
2003-06-10 Jakub Jelinek <jakub@redhat.com>
|
2003-06-10 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
|
* sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
|
||||||
|
|
|
@ -202,6 +202,7 @@ get_cached_stack (size_t *sizep, void **memp)
|
||||||
/* Add a stack frame which is not used anymore to the stack. Must be
|
/* Add a stack frame which is not used anymore to the stack. Must be
|
||||||
called with the cache lock held. */
|
called with the cache lock held. */
|
||||||
static inline void
|
static inline void
|
||||||
|
__attribute ((always_inline))
|
||||||
queue_stack (struct pthread *stack)
|
queue_stack (struct pthread *stack)
|
||||||
{
|
{
|
||||||
/* We unconditionally add the stack to the list. The memory may
|
/* We unconditionally add the stack to the list. The memory may
|
||||||
|
|
|
@ -116,7 +116,7 @@ extern void __pthread_unwind (__pthread_unwind_buf_t *__buf)
|
||||||
|
|
||||||
/* Called when a thread reacts on a cancellation request. */
|
/* Called when a thread reacts on a cancellation request. */
|
||||||
static inline void
|
static inline void
|
||||||
__attribute ((noreturn))
|
__attribute ((noreturn, always_inline))
|
||||||
__do_cancel (void)
|
__do_cancel (void)
|
||||||
{
|
{
|
||||||
struct pthread *self = THREAD_SELF;
|
struct pthread *self = THREAD_SELF;
|
||||||
|
|
Loading…
Add table
Reference in a new issue