changeset 7039:403172c099fc

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Apr 1994 04:07:29 +0000
parents e640d438df9a
children cd4dd38925f9
files src/regex.c
diffstat 1 files changed, 20 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Sat Apr 23 02:31:52 1994 +0000
+++ b/src/regex.c	Sat Apr 23 04:07:29 1994 +0000
@@ -2495,15 +2495,28 @@
     if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
       {
 	fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
+
+#ifdef emacs
 	if (! fail_stack.stack)
-	  fail_stack.stack =
-	    (fail_stack_elt_t *) malloc (fail_stack.size 
-					 * sizeof (fail_stack_elt_t));
+	  fail_stack.stack
+	    = (fail_stack_elt_t *) xmalloc (fail_stack.size 
+					    * sizeof (fail_stack_elt_t));
 	else
-	  fail_stack.stack =
-	    (fail_stack_elt_t *) realloc (fail_stack.stack,
-					  (fail_stack.size
-					   * sizeof (fail_stack_elt_t)));
+	  fail_stack.stack
+	    = (fail_stack_elt_t *) xrealloc (fail_stack.stack,
+					     (fail_stack.size
+					      * sizeof (fail_stack_elt_t)));
+#else /* not emacs */
+	if (! fail_stack.stack)
+	  fail_stack.stack
+	    = (fail_stack_elt_t *) malloc (fail_stack.size 
+					   * sizeof (fail_stack_elt_t));
+	else
+	  fail_stack.stack
+	    = (fail_stack_elt_t *) realloc (fail_stack.stack,
+					    (fail_stack.size
+					     * sizeof (fail_stack_elt_t)));
+#endif /* not emacs */
       }
 
     /* Initialize some other variables the matcher uses.  */