about summary refs log tree commit diff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-09-11 16:02:17 -0700
committerRoland McGrath <roland@hack.frob.com>2014-09-11 16:02:17 -0700
commit8c0ab919f63dc03a420751172602a52d2bea59a8 (patch)
treea196619b2a14716dd6896b2dc26c5719940a0e6a /posix/regex_internal.h
parent52ffbdf25a1100986f4ae27bb0febbe5a722ab25 (diff)
downloadglibc-8c0ab919f63dc03a420751172602a52d2bea59a8.tar.gz
glibc-8c0ab919f63dc03a420751172602a52d2bea59a8.tar.xz
glibc-8c0ab919f63dc03a420751172602a52d2bea59a8.zip
Move findidx nested functions to top-level.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 4bbf6a8276..d1ed3dc46a 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -733,6 +733,10 @@ re_string_wchar_at (const re_string_t *pstr, int idx)
 }
 
 # ifndef NOT_IN_libc
+#  ifdef _LIBC
+#   include <locale/weight.h>
+#  endif
+
 static int
 internal_function __attribute__ ((pure, unused))
 re_string_elem_size_at (const re_string_t *pstr, int idx)
@@ -740,7 +744,6 @@ re_string_elem_size_at (const re_string_t *pstr, int idx)
 #  ifdef _LIBC
   const unsigned char *p, *extra;
   const int32_t *table, *indirect;
-#   include <locale/weight.h>
   uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
 
   if (nrules != 0)
@@ -751,7 +754,7 @@ re_string_elem_size_at (const re_string_t *pstr, int idx)
       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
 						_NL_COLLATE_INDIRECTMB);
       p = pstr->mbs + idx;
-      findidx (&p, pstr->len - idx);
+      findidx (table, indirect, extra, &p, pstr->len - idx);
       return p - pstr->mbs - idx;
     }
   else