Commit ccea0d85 by Isamu Hasegawa Committed by DJ Delorie

backport: regex.c (wcs_regex_compile): Use appropriate string to compare with collating element.

Merge from libc:
* regex.c (wcs_regex_compile): Use appropriate string
to compare with collating element.
Fix the padding for the alignment.

From-SVN: r44838
parent dc297297
2001-08-12 Isamu Hasegawa <isamu@yamato.ibm.com>
* regex.c (wcs_regex_compile): Use appropriate string
to compare with collating element.
Fix the padding for the alignment.
2001-08-10 Andrew Cagney <ac131313@redhat.com> 2001-08-10 Andrew Cagney <ac131313@redhat.com>
* lbasename.c (lbasename): Change function definition to return a * lbasename.c (lbasename): Change function definition to return a
......
...@@ -3059,7 +3059,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp) ...@@ -3059,7 +3059,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
/* First compare the hashing value. */ /* First compare the hashing value. */
if (symb_table[2 * elem] == hash if (symb_table[2 * elem] == hash
&& c1 == extra[symb_table[2 * elem + 1]] && c1 == extra[symb_table[2 * elem + 1]]
&& memcmp (str, && memcmp (char_str,
&extra[symb_table[2 * elem + 1] &extra[symb_table[2 * elem + 1]
+ 1], c1) == 0) + 1], c1) == 0)
{ {
...@@ -3079,7 +3079,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp) ...@@ -3079,7 +3079,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
in the table. */ in the table. */
idx += 1 + extra[idx]; idx += 1 + extra[idx];
/* Adjust for the alignment. */ /* Adjust for the alignment. */
idx = (idx + 3) & ~4; idx = (idx + 3) & ~3;
str[0] = (wchar_t) idx + 4; str[0] = (wchar_t) idx + 4;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment