about summary refs log tree commit diff
path: root/posix/regex_internal.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-01-08 00:23:09 +0000
committerUlrich Drepper <drepper@redhat.com>2009-01-08 00:23:09 +0000
commitb3918c7d7f99828d23232d0aaf4056f8fae9898e (patch)
tree317ef6202dc86daa7a351a045c355407aeb29a7c /posix/regex_internal.c
parentdf9293cb169bf848be529381ca43680aa192421e (diff)
downloadglibc-b3918c7d7f99828d23232d0aaf4056f8fae9898e.tar.gz
glibc-b3918c7d7f99828d23232d0aaf4056f8fae9898e.tar.xz
glibc-b3918c7d7f99828d23232d0aaf4056f8fae9898e.zip
* posix/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
	* posix/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
	re_string_skip_chars, re_string_reconstruct): Likewise.
	* posix/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
Diffstat (limited to 'posix/regex_internal.c')
-rw-r--r--posix/regex_internal.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index 01a432e801..c9da2b961c 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -229,7 +229,7 @@ build_wcs_buffer (re_string_t *pstr)
 	}
       else
 	p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
-      mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+      mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
       if (BE (mbclen == (size_t) -2, 0))
 	{
 	  /* The buffer doesn't have enough space, finish to build.  */
@@ -299,9 +299,9 @@ build_wcs_upper_buffer (re_string_t *pstr)
 
 	  remain_len = end_idx - byte_idx;
 	  prev_st = pstr->cur_state;
-	  mbclen = mbrtowc (&wc,
-			    ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
-			     + byte_idx), remain_len, &pstr->cur_state);
+	  mbclen = __mbrtowc (&wc,
+			      ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+			       + byte_idx), remain_len, &pstr->cur_state);
 	  if (BE (mbclen + 2 > 2, 1))
 	    {
 	      wchar_t wcu = wc;
@@ -369,7 +369,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
 	  }
 	else
 	  p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
-	mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+	mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
 	if (BE (mbclen + 2 > 2, 1))
 	  {
 	    wchar_t wcu = wc;
@@ -491,8 +491,8 @@ re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc)
       int remain_len;
       remain_len = pstr->len - rawbuf_idx;
       prev_st = pstr->cur_state;
-      mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx,
-			remain_len, &pstr->cur_state);
+      mbclen = __mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx,
+			  remain_len, &pstr->cur_state);
       if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
 	{
 	  /* We treat these cases as a single byte character.  */
@@ -734,8 +734,8 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
 			  /* XXX Don't use mbrtowc, we know which conversion
 			     to use (UTF-8 -> UCS4).  */
 			  memset (&cur_state, 0, sizeof (cur_state));
-			  mbclen = mbrtowc (&wc2, (const char *) p, mlen,
-					    &cur_state);
+			  mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+					      &cur_state);
 			  if (raw + offset - p <= mbclen
 			      && mbclen < (size_t) -2)
 			    {