2006-02-19 Richard M. Stallman <rms@gnu.org>
+ * xterm.c (x_catch_errors): Use xmalloc.
+
+ * regex.c (extend_range_table_work_area): Call xmalloc and xrealloc.
+ (regex_compile): Likewise.
+ (regcomp): Use xmalloc.
+
+ * gtkutil.c (malloc_widget_value): Use xmalloc.
+
* vm-limit.c [HAVE_GETRLIMIT]: Include sys/resource.h.
(check_memory_limits) [HAVE_GETRLIMIT]: Use getrlimit.
if (! fail_stack.stack)
fail_stack.stack
- = (fail_stack_elt_t *) malloc (fail_stack.size
- * sizeof (fail_stack_elt_t));
+ = (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_elt_t *) xrealloc (fail_stack.stack,
+ (fail_stack.size
+ * sizeof (fail_stack_elt_t)));
}
regex_grow_registers (num_regs);
preg->used = 0;
/* Try to allocate space for the fastmap. */
- preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
+ preg->fastmap = (char *) xmalloc (1 << BYTEWIDTH);
if (cflags & REG_ICASE)
{
unsigned i;
preg->translate
- = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
- * sizeof (*(RE_TRANSLATE_TYPE)0));
+ = (RE_TRANSLATE_TYPE) xmalloc (CHAR_SET_SIZE
+ * sizeof (*(RE_TRANSLATE_TYPE)0));
if (preg->translate == NULL)
return (int) REG_ESPACE;