about summary refs log tree commit diff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-09-10 18:40:35 +0000
committerUlrich Drepper <drepper@redhat.com>2002-09-10 18:40:35 +0000
commitc202c2c50523dd6721e9e2a9c80c1dc018f373bc (patch)
tree70e18e68fb0e4cf5ac46628a839a7dd7a9d15bdd /posix/regex_internal.h
parent62439eac8bea0958c8ed57ffa69f74006c0a9055 (diff)
downloadglibc-c202c2c50523dd6721e9e2a9c80c1dc018f373bc.tar.gz
glibc-c202c2c50523dd6721e9e2a9c80c1dc018f373bc.tar.xz
glibc-c202c2c50523dd6721e9e2a9c80c1dc018f373bc.zip
Update.
2002-09-10  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regexec.c (build_trtable): Fix the destination of
	newline to prevent wrong states from overwriting.
	Append break statements to optimization.

2002-09-10  Isamu Hasegawa  <isamu@yamato.ibm.com>

	* posix/regcomp.c: Wrap #include wchar.h and wctype.h in #if.
	(build_range_exp): Add castings to strlen invocations.
	(build_collating_symbol): Restore the type of characters from "char"
	to "unsigned char", and supplement castings.
	(build_collating_symbol): Likewise.
	(build_equiv_class): Likewise.
	(build_charclass): Likewise.
	(seek_collating_symbol_entry): Likewise.
	(parse_bracket_exp): Likewise.
	(build_word_op): Supplement a casting.
	* posix/regex_internal.c: Wrap #include wchar.h and wctype.h in #if.
	(re_string_allocate): Fix castings.
	(re_string_construct): Likewise.
	(re_string_construct_common): Likewise.
	(re_string_realloc_buffers): Likewise.
	(build_wcs_buffer): Likewise.
	(build_wcs_upper_buffer): Likewise.
	(re_string_skip_chars): Likewise.
	(re_string_reconstruct): Likewise.
	* posix/regex_internal.h: Restore the type of characters in
	re_string_t and bracket_elem_t from "char" to "unsigned char".
	(re_string_elem_size_at): Fix castings.
	* posix/regexec.c: Wrap #include wchar.h and wctype.h in #if.
	(transit_state_bkref_loop): Restore the type of characters from
	"char" to "unsigned char", and append a cast to "char*" pointer in
	array subscript.
	(check_node_accept_bytes): Likewise.
	(find_collation_sequence_value): Likewise.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 574bf652b8..9f1f9826f2 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -228,15 +228,15 @@ struct re_string_t
 {
   /* Indicate the raw buffer which is the original string passed as an
      argument of regexec(), re_search(), etc..  */
-  const char *raw_mbs;
+  const unsigned char *raw_mbs;
   /* Store the multibyte string.  In case of "case insensitive mode" like
      REG_ICASE, upper cases of the string are stored, otherwise MBS points
      the same address that RAW_MBS points.  */
-  char *mbs;
+  unsigned char *mbs;
   /* Store the case sensitive multibyte string.  In case of
      "case insensitive mode", the original string are stored,
      otherwise MBS_CASE points the same address that MBS points.  */
-  char *mbs_case;
+  unsigned char *mbs_case;
 #ifdef RE_ENABLE_I18N
   /* Store the wide character string which is corresponding to MBS.  */
   wint_t *wcs;
@@ -512,7 +512,7 @@ typedef struct
   union
   {
     unsigned char ch;
-    char *name;
+    unsigned char *name;
     wchar_t wch;
   } opr;
 } bracket_elem_t;
@@ -580,7 +580,7 @@ re_string_elem_size_at (pstr, idx)
      int idx;
 {
 #ifdef _LIBC
-  const char *extra, *p;
+  const unsigned char *p, *extra;
   const int32_t *table, *indirect;
   int32_t tmp;
 # include <locale/weight.h>
@@ -589,11 +589,12 @@ re_string_elem_size_at (pstr, idx)
   if (nrules != 0)
     {
       table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
-      extra = (const char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+      extra = (const unsigned char *)
+        _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
 						_NL_COLLATE_INDIRECTMB);
       p = pstr->mbs + idx;
-      tmp = findidx ((const unsigned char **) &p);
+      tmp = findidx (&p);
       return p - pstr->mbs - idx;
     }
   else