mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
2002-09-27 Ulrich Drepper <drepper@redhat.com> * locales/zh_TW: Use shorter forms for abday and day. Patch by Rex Tsai <chihchun@kalug.linux.org.tw>.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2002-09-27 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* locales/zh_TW: Use shorter forms for abday and day.
|
||||
Patch by Rex Tsai <chihchun@kalug.linux.org.tw>.
|
||||
|
||||
2002-09-23 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* tst-xlocale1.c (main): int -> size_t for counter.
|
||||
|
@ -82,16 +82,16 @@ END LC_NUMERIC
|
||||
|
||||
LC_TIME
|
||||
% day: Sun, Mon, Tue, Wed, Thr, Fri, Sat
|
||||
abday "<U9031><U65E5>";"<U9031><U4E00>";"<U9031><U4E8C>";"<U9031><U4E09>";/
|
||||
"<U9031><U56DB>";"<U9031><U4E94>";"<U9031><U516D>"
|
||||
abday "<U65E5>";"<U4E00>";"<U4E8C>";"<U4E09>";/
|
||||
"<U56DB>";"<U4E94>";"<U516D>"
|
||||
|
||||
day "<U661F><U671F><U65E5>";/
|
||||
"<U661F><U671F><U4E00>";/
|
||||
"<U661F><U671F><U4E8C>";/
|
||||
"<U661F><U671F><U4E09>";/
|
||||
"<U661F><U671F><U56DB>";/
|
||||
"<U661F><U671F><U4E94>";/
|
||||
"<U661F><U671F><U516D>"
|
||||
day "<U9031><U65E5>";/
|
||||
"<U9031><U4E00>";/
|
||||
"<U9031><U4E8C>";/
|
||||
"<U9031><U4E09>";/
|
||||
"<U9031><U56DB>";/
|
||||
"<U9031><U4E94>";/
|
||||
"<U9031><U516D>"
|
||||
|
||||
% month: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
|
||||
abmon "<U0020><U0031><U6708>";"<U0020><U0032><U6708>";/
|
||||
|
@ -636,6 +636,9 @@ regfree (preg)
|
||||
|
||||
if (dfa->word_char != NULL)
|
||||
re_free (dfa->word_char);
|
||||
#ifdef DEBUG
|
||||
re_free (dfa->re_str);
|
||||
#endif
|
||||
re_free (dfa);
|
||||
}
|
||||
re_free (preg->fastmap);
|
||||
@ -740,6 +743,10 @@ re_compile_internal (preg, pattern, length, syntax)
|
||||
preg->buffer = NULL;
|
||||
return err;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dfa->re_str = re_malloc (char, length + 1);
|
||||
strncpy (dfa->re_str, pattern, length + 1);
|
||||
#endif
|
||||
|
||||
err = re_string_construct (®exp, pattern, length, preg->translate,
|
||||
syntax & RE_ICASE);
|
||||
@ -874,6 +881,25 @@ create_initial_state (dfa)
|
||||
{
|
||||
int node_idx = init_nodes.elems[i];
|
||||
re_token_type_t type = dfa->nodes[node_idx].type;
|
||||
|
||||
int clexp_idx;
|
||||
int entity = (type != OP_CONTEXT_NODE ? node_idx
|
||||
: dfa->nodes[node_idx].opr.ctx_info->entity);
|
||||
if ((type != OP_CONTEXT_NODE
|
||||
|| (dfa->nodes[entity].type != OP_BACK_REF))
|
||||
&& (type != OP_BACK_REF))
|
||||
continue;
|
||||
for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx)
|
||||
{
|
||||
re_token_t *clexp_node;
|
||||
clexp_node = dfa->nodes + init_nodes.elems[clexp_idx];
|
||||
if (clexp_node->type == OP_CLOSE_SUBEXP
|
||||
&& clexp_node->opr.idx + 1 == dfa->nodes[entity].opr.idx)
|
||||
break;
|
||||
}
|
||||
if (clexp_idx == init_nodes.nelem)
|
||||
continue;
|
||||
|
||||
if (type == OP_CONTEXT_NODE
|
||||
&& (dfa->nodes[dfa->nodes[node_idx].opr.ctx_info->entity].type
|
||||
== OP_BACK_REF))
|
||||
@ -1816,6 +1842,7 @@ parse_reg_exp (regexp, preg, token, syntax, nest, err)
|
||||
tree = create_tree (tree, branch, 0, new_idx);
|
||||
if (BE (new_idx == -1 || tree == NULL, 0))
|
||||
return *err = REG_ESPACE, NULL;
|
||||
dfa->has_plural_match = 1;
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
@ -2035,6 +2062,7 @@ parse_expression (regexp, preg, token, syntax, nest, err)
|
||||
tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
|
||||
if (BE (*err != REG_NOERROR && tree == NULL, 0))
|
||||
return NULL;
|
||||
dfa->has_plural_match = 1;
|
||||
}
|
||||
|
||||
return tree;
|
||||
@ -2919,6 +2947,7 @@ parse_bracket_exp (regexp, dfa, token, syntax, err)
|
||||
if (BE (new_idx == -1 || mbc_tree == NULL, 0))
|
||||
goto parse_bracket_exp_espace;
|
||||
/* Then join them by ALT node. */
|
||||
dfa->has_plural_match = 1;
|
||||
alt_token.type = OP_ALT;
|
||||
new_idx = re_dfa_add_node (dfa, alt_token, 0);
|
||||
work_tree = create_tree (work_tree, mbc_tree, 0, new_idx);
|
||||
|
@ -620,50 +620,6 @@ re_node_set_init_copy (dest, src)
|
||||
return REG_NOERROR;
|
||||
}
|
||||
|
||||
/* Calculate the intersection of the sets SRC1 and SRC2. And store it in
|
||||
DEST. Return value indicate the error code or REG_NOERROR if succeeded.
|
||||
Note: We assume dest->elems is NULL, when dest->alloc is 0. */
|
||||
|
||||
static reg_errcode_t
|
||||
re_node_set_intersect (dest, src1, src2)
|
||||
re_node_set *dest;
|
||||
const re_node_set *src1, *src2;
|
||||
{
|
||||
int i1, i2, id;
|
||||
if (src1->nelem > 0 && src2->nelem > 0)
|
||||
{
|
||||
if (src1->nelem + src2->nelem > dest->alloc)
|
||||
{
|
||||
dest->alloc = src1->nelem + src2->nelem;
|
||||
dest->elems = re_realloc (dest->elems, int, dest->alloc);
|
||||
if (BE (dest->elems == NULL, 0))
|
||||
return REG_ESPACE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The intersection of empty sets is also empty set. */
|
||||
dest->nelem = 0;
|
||||
return REG_NOERROR;
|
||||
}
|
||||
|
||||
for (i1 = i2 = id = 0; i1 < src1->nelem && i2 < src2->nelem; )
|
||||
{
|
||||
if (src1->elems[i1] > src2->elems[i2])
|
||||
{
|
||||
++i2;
|
||||
continue;
|
||||
}
|
||||
/* The intersection must have the elements which are in both of
|
||||
SRC1 and SRC2. */
|
||||
if (src1->elems[i1] == src2->elems[i2])
|
||||
dest->elems[id++] = src2->elems[i2++];
|
||||
++i1;
|
||||
}
|
||||
dest->nelem = id;
|
||||
return REG_NOERROR;
|
||||
}
|
||||
|
||||
/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to
|
||||
DEST. Return value indicate the error code or REG_NOERROR if succeeded.
|
||||
Note: We assume dest->elems is NULL, when dest->alloc is 0. */
|
||||
@ -912,7 +868,7 @@ re_node_set_compare (set1, set2)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return 1 if SET contains the element ELEM, return 0 otherwise. */
|
||||
/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
|
||||
|
||||
static int
|
||||
re_node_set_contains (set, elem)
|
||||
@ -934,7 +890,7 @@ re_node_set_contains (set, elem)
|
||||
else
|
||||
right = mid;
|
||||
}
|
||||
return set->elems[idx] == elem;
|
||||
return set->elems[idx] == elem ? idx + 1 : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -407,8 +407,9 @@ struct re_state_table_entry
|
||||
struct re_backref_cache_entry
|
||||
{
|
||||
int node;
|
||||
int from;
|
||||
int to;
|
||||
int str_idx;
|
||||
int subexp_from;
|
||||
int subexp_to;
|
||||
int flag;
|
||||
};
|
||||
|
||||
@ -427,9 +428,24 @@ typedef struct
|
||||
int nbkref_ents;
|
||||
int abkref_ents;
|
||||
struct re_backref_cache_entry *bkref_ents;
|
||||
int max_bkref_len;
|
||||
int max_mb_elem_len;
|
||||
} re_match_context_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int cur_bkref;
|
||||
int cls_subexp_idx;
|
||||
|
||||
re_dfastate_t **sifted_states;
|
||||
re_dfastate_t **limited_states;
|
||||
|
||||
re_node_set limits;
|
||||
|
||||
int last_node;
|
||||
int last_str_idx;
|
||||
int check_subexp;
|
||||
} re_sift_context_t;
|
||||
|
||||
struct re_dfa_t
|
||||
{
|
||||
re_bitset_ptr_t word_char;
|
||||
@ -459,6 +475,10 @@ struct re_dfa_t
|
||||
/* If this dfa has "multibyte node", which is a backreference or
|
||||
a node which can accept multibyte character or multi character
|
||||
collating element. */
|
||||
#ifdef DEBUG
|
||||
char* re_str;
|
||||
#endif
|
||||
unsigned int has_plural_match : 1;
|
||||
unsigned int has_mb_node : 1;
|
||||
};
|
||||
typedef struct re_dfa_t re_dfa_t;
|
||||
@ -470,9 +490,6 @@ static reg_errcode_t re_node_set_init_2 (re_node_set *set, int elem1,
|
||||
#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
|
||||
static reg_errcode_t re_node_set_init_copy (re_node_set *dest,
|
||||
const re_node_set *src);
|
||||
static reg_errcode_t re_node_set_intersect (re_node_set *dest,
|
||||
const re_node_set *src1,
|
||||
const re_node_set *src2);
|
||||
static reg_errcode_t re_node_set_add_intersect (re_node_set *dest,
|
||||
const re_node_set *src1,
|
||||
const re_node_set *src2);
|
||||
|
1012
posix/regexec.c
1012
posix/regexec.c
File diff suppressed because it is too large
Load Diff
@ -628,11 +628,55 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||
*reloc_addr = value;
|
||||
}
|
||||
|
||||
#define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
|
||||
elf_machine_rel_relative (map, l_addr, relative, \
|
||||
(void *) (l_addr + relative->r_offset))
|
||||
|
||||
/* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with
|
||||
ELF32_R_SYM (info) == 0 for a similar purpose. */
|
||||
static inline void
|
||||
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
||||
elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
|
||||
const Elf32_Rela *reloc,
|
||||
Elf32_Addr *const reloc_addr)
|
||||
{
|
||||
/* XXX Nothing to do. There is no relative relocation, right? */
|
||||
unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
|
||||
Elf32_Addr value;
|
||||
|
||||
value = l_addr + reloc->r_addend;
|
||||
|
||||
if (ELF32_R_SYM (reloc->r_info) != 0)
|
||||
asm volatile ("iitlbp %r0,(%r0)"); /* Crash. */
|
||||
|
||||
switch (r_type)
|
||||
{
|
||||
case R_PARISC_DIR32:
|
||||
/* .eh_frame can have unaligned relocs. */
|
||||
if ((unsigned long) reloc_addr & 3)
|
||||
{
|
||||
char *rel_addr = (char *) reloc_addr;
|
||||
rel_addr[0] = value >> 24;
|
||||
rel_addr[1] = value >> 16;
|
||||
rel_addr[2] = value >> 8;
|
||||
rel_addr[3] = value;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case R_PARISC_PLABEL32:
|
||||
break;
|
||||
|
||||
case R_PARISC_IPLT:
|
||||
elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
|
||||
return;
|
||||
|
||||
case R_PARISC_NONE:
|
||||
return;
|
||||
|
||||
default:
|
||||
_dl_reloc_bad_type (map, r_type, 0);
|
||||
}
|
||||
|
||||
*reloc_addr = value;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
Reference in New Issue
Block a user