about summary refs log tree commit diff
path: root/posix/regexec.c
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/regexec.c
parent52ffbdf25a1100986f4ae27bb0febbe5a722ab25 (diff)
downloadglibc-8c0ab919f63dc03a420751172602a52d2bea59a8.tar.gz
glibc-8c0ab919f63dc03a420751172602a52d2bea59a8.tar.xz
glibc-8c0ab919f63dc03a420751172602a52d2bea59a8.zip
Move findidx nested functions to top-level.
Diffstat (limited to 'posix/regexec.c')
-rw-r--r--posix/regexec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/posix/regexec.c b/posix/regexec.c
index 7032da75aa..c840b38fc3 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -3749,6 +3749,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
    one collating element like '.', '[a-z]', opposite to the other nodes
    can only accept one byte.  */
 
+# ifdef _LIBC
+#  include <locale/weight.h>
+# endif
+
 static int
 internal_function
 check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
@@ -3868,8 +3872,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
 	  const int32_t *table, *indirect;
 	  const unsigned char *weights, *extra;
 	  const char *collseqwc;
-	  /* This #include defines a local function!  */
-#  include <locale/weight.h>
 
 	  /* match with collating_symbol?  */
 	  if (cset->ncoll_syms)
@@ -3925,7 +3927,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
 	      indirect = (const int32_t *)
 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
-	      int32_t idx = findidx (&cp, elem_len);
+	      int32_t idx = findidx (table, indirect, extra, &cp, elem_len);
 	      if (idx > 0)
 		for (i = 0; i < cset->nequiv_classes; ++i)
 		  {