From 14744156b935eb7fb1a2013fdc3ce6613defa94d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 12 Nov 2003 19:09:20 +0000 Subject: Update. * posix/regcomp.c (optimize_utf8): New function. (re_compile_fastmap_iter): Use dfa->mb_cur_max > 1 instead of !icase. (re_compile_internal): Call optimize_utf8 if not case insensitive and in UTF-8 locale. * posix/regex_internal.h: Ifdef out some prototypes if RE_NO_INTERNAL_PROTOTYPES is defined to shut up warnings. * posix/Makefile (tests): Add bug-regex20. (bug-regex20-ENV): Add LOCPATH. * posix/bug-regex20.c: New test. 2003-11-12 Jakub Jelinek --- posix/regex_internal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'posix/regex_internal.h') diff --git a/posix/regex_internal.h b/posix/regex_internal.h index 40cf1f9b6a..18622cad5c 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -345,6 +345,7 @@ typedef struct re_string_t re_string_t; #define MBS_CASE_ALLOCATED(pstr) (pstr->trans != NULL) +#ifndef RE_NO_INTERNAL_PROTOTYPES static reg_errcode_t re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, RE_TRANSLATE_TYPE trans, int icase, @@ -371,6 +372,7 @@ static inline wint_t re_string_wchar_at (const re_string_t *pstr, int idx); #endif /* RE_ENABLE_I18N */ static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags, int newline_anchor); +#endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_peek_byte_case(pstr, offset) \ @@ -612,6 +614,7 @@ struct re_dfa_t }; typedef struct re_dfa_t re_dfa_t; +#ifndef RE_NO_INTERNAL_PROTOTYPES static reg_errcode_t re_node_set_alloc (re_node_set *set, int size); static reg_errcode_t re_node_set_init_1 (re_node_set *set, int elem); static reg_errcode_t re_node_set_init_2 (re_node_set *set, int elem1, @@ -644,6 +647,7 @@ static re_dfastate_t *re_acquire_state_context (reg_errcode_t *err, const re_node_set *nodes, unsigned int context); static void free_state (re_dfastate_t *state); +#endif typedef enum @@ -697,7 +701,7 @@ bitset_not_merge (dest, src) dest[i] |= ~src[i]; } -#ifdef RE_ENABLE_I18N +#if defined RE_ENABLE_I18N && !defined RE_NO_INTERNAL_PROTOTYPES /* Inline functions for re_string. */ static inline int re_string_char_size_at (pstr, idx) -- cgit 1.4.1