summaryrefslogtreecommitdiff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-12 19:09:20 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-12 19:09:20 +0000
commit14744156b935eb7fb1a2013fdc3ce6613defa94d (patch)
treeb6dfa5ab8046feddf82d275f25b9baee162dddfc /posix/regex_internal.h
parent3c0fb5745f66c8920ed4cfa8d3ead55216b15ec1 (diff)
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 <jakub@redhat.com>
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h6
1 files changed, 5 insertions, 1 deletions
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)