summary refs log tree commit diff
path: root/posix/regex_internal.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-27 19:08:10 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-27 19:08:10 +0000
commit963d8d782fc98fb6dc3a66f0068795f9920c269d (patch)
treef2f9455bff4b050e427bbeb11719eb1aceddf386 /posix/regex_internal.c
parent717ecb1fe52cc726cb9521e8a93c90040fe2b255 (diff)
downloadglibc-963d8d782fc98fb6dc3a66f0068795f9920c269d.tar.gz
glibc-963d8d782fc98fb6dc3a66f0068795f9920c269d.tar.xz
glibc-963d8d782fc98fb6dc3a66f0068795f9920c269d.zip
[BZ #558]
Update.
2005-01-27  Paolo Bonzini  <bonzini@gnu.org>

	[BZ #558]
	* posix/regcomp.c (calc_inveclosure): Return reg_errcode_t.
	Initialize the node sets in dfa->inveclosures.
	(analyze): Initialize inveclosures only if it is needed.
	Check errors from calc_inveclosure.
	* posix/regex_internal.c (re_dfa_add_node): Do not initialize
	the inveclosure node set.
	* posix/regexec.c (re_search_internal): If nmatch includes unused
	subexpressions, reset them to { rm_so: -1, rm_eo: -1 } here.

	* posix/regcomp.c (parse_bracket_exp) [!RE_ENABLE_I18N]:
	Do build a SIMPLE_BRACKET token.

	* posix/regexec.c (transit_state_mb): Do not examine nodes
	where ACCEPT_MB is not set.
Diffstat (limited to 'posix/regex_internal.c')
-rw-r--r--posix/regex_internal.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index dbd3f24ca3..c3295a851c 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -1339,7 +1339,7 @@ re_dfa_add_node (dfa, token)
     {
       int new_nodes_alloc = dfa->nodes_alloc * 2;
       int *new_nexts, *new_indices;
-      re_node_set *new_edests, *new_eclosures, *new_inveclosures;
+      re_node_set *new_edests, *new_eclosures;
 
       re_token_t *new_array = re_realloc (dfa->nodes, re_token_t,
 					  new_nodes_alloc);
@@ -1350,17 +1350,13 @@ re_dfa_add_node (dfa, token)
       new_indices = re_realloc (dfa->org_indices, int, new_nodes_alloc);
       new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
       new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
-      new_inveclosures = re_realloc (dfa->inveclosures, re_node_set,
-				     new_nodes_alloc);
       if (BE (new_nexts == NULL || new_indices == NULL
-	      || new_edests == NULL || new_eclosures == NULL
-	      || new_inveclosures == NULL, 0))
+	      || new_edests == NULL || new_eclosures == NULL, 0))
 	return -1;
       dfa->nexts = new_nexts;
       dfa->org_indices = new_indices;
       dfa->edests = new_edests;
       dfa->eclosures = new_eclosures;
-      dfa->inveclosures = new_inveclosures;
       dfa->nodes_alloc = new_nodes_alloc;
     }
   dfa->nodes[dfa->nodes_len] = token;
@@ -1372,7 +1368,6 @@ re_dfa_add_node (dfa, token)
   dfa->nexts[dfa->nodes_len] = -1;
   re_node_set_init_empty (dfa->edests + dfa->nodes_len);
   re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
-  re_node_set_init_empty (dfa->inveclosures + dfa->nodes_len);
   return dfa->nodes_len++;
 }