aboutsummaryrefslogtreecommitdiff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-16 07:14:28 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-16 07:14:28 +0000
commitf0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c (patch)
treef06d459ac9d5a2d7c02591cd5375dd7ad6ff7a1e /posix/regex_internal.h
parent2def87644d44b41bb908d4ed150a110d4d9399ea (diff)
downloadglibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.zip
glibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.tar.gz
glibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.tar.bz2
Update.
* posix/regex_internal.h: Add forward declaration of re_dfa_t. Replace last two parameters of re_string_allocate and re_string_construct with pointer to DFA. (re_dfa_t): Add map_notascii field. * posix/regcomp.c (re_compile_internal): Add call of re_string_construct. (init_dfa): Initialize mpa_notascii. * posix/regex_internal.c: Adjust definitions of re_string_allocate and re_string_construct. Pass DFA to re_string_construct. Adjust definition. Initialize map_notascii field. (build_wcs_upper_buffer): If map_notascii is zero use simplfied method to map ASCII values to upper case. * posix/regex.c: Include localeinfo.h. * posix/regexec.c: Adjust call of re_string_allocate. * locale/langinfo.h: Add _NL_CTYPE_MAP_TO_NONASCII. * locale/localeinfo.h (LIMAGIC): Change value. * locale/categories.def. Add entry for _NL_CTYPE_MAP_TO_NONASCII. * locale/C-ctype.h: Likewise. * locale/programs/ld-ctype.c: Compute whether any mapping maps from ASCII to non-ASCII value. Write out that value.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 18622ca..9fcf865 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -335,6 +335,7 @@ struct re_string_t
/* 1 if REG_ICASE. */
unsigned int icase : 1;
unsigned int is_utf8 : 1;
+ unsigned int map_notascii : 1;
int mb_cur_max;
};
typedef struct re_string_t re_string_t;
@@ -345,31 +346,32 @@ typedef struct re_string_t re_string_t;
#define MBS_CASE_ALLOCATED(pstr) (pstr->trans != NULL)
+struct re_dfa_t;
+typedef struct re_dfa_t re_dfa_t;
#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,
- int mb_cur_max, int is_utf8);
+ const re_dfa_t *dfa);
static reg_errcode_t re_string_construct (re_string_t *pstr, const char *str,
int len, RE_TRANSLATE_TYPE trans,
- int icase, int mb_cur_max,
- int is_utf8);
+ int icase, const re_dfa_t *dfa);
static reg_errcode_t re_string_reconstruct (re_string_t *pstr, int idx,
int eflags, int newline);
static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
int new_buf_len);
-#ifdef RE_ENABLE_I18N
+# ifdef RE_ENABLE_I18N
static void build_wcs_buffer (re_string_t *pstr);
static void build_wcs_upper_buffer (re_string_t *pstr);
-#endif /* RE_ENABLE_I18N */
+# endif /* RE_ENABLE_I18N */
static void build_upper_buffer (re_string_t *pstr);
static void re_string_translate_buffer (re_string_t *pstr);
static void re_string_destruct (re_string_t *pstr);
-#ifdef RE_ENABLE_I18N
+# ifdef RE_ENABLE_I18N
static int re_string_elem_size_at (const re_string_t *pstr, int idx);
static inline int re_string_char_size_at (const re_string_t *pstr, int idx);
static inline wint_t re_string_wchar_at (const re_string_t *pstr, int idx);
-#endif /* RE_ENABLE_I18N */
+# endif /* RE_ENABLE_I18N */
static unsigned int re_string_context_at (const re_string_t *input, int idx,
int eflags, int newline_anchor);
#endif
@@ -610,9 +612,9 @@ struct re_dfa_t
collating element. */
unsigned int has_mb_node : 1;
unsigned int is_utf8 : 1;
+ unsigned int map_notascii : 1;
int mb_cur_max;
};
-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);