comparison src/regex.c @ 83475:88cd30b5064d

Fix compilation. * src/regex.c (extend_range_table_work_area, regex_compile, fastmap): Revert previous unnecessary changes. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-515
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 20 Feb 2006 16:35:38 +0000
parents dfbf872bb6ce
children 866effff65a4
comparison
equal deleted inserted replaced
83474:d08a7ef0cb8a 83475:88cd30b5064d
2065 struct range_table_work_area *work_area; 2065 struct range_table_work_area *work_area;
2066 { 2066 {
2067 work_area->allocated += 16 * sizeof (int); 2067 work_area->allocated += 16 * sizeof (int);
2068 if (work_area->table) 2068 if (work_area->table)
2069 work_area->table 2069 work_area->table
2070 = (int *) xrealloc (work_area->table, work_area->allocated); 2070 = (int *) realloc (work_area->table, work_area->allocated);
2071 else 2071 else
2072 work_area->table 2072 work_area->table
2073 = (int *) xmalloc (work_area->allocated); 2073 = (int *) malloc (work_area->allocated);
2074 } 2074 }
2075 2075
2076 #ifdef emacs 2076 #ifdef emacs
2077 2077
2078 /* Carefully find the ranges of codes that are equivalent 2078 /* Carefully find the ranges of codes that are equivalent
3606 { 3606 {
3607 fail_stack.size = re_max_failures * TYPICAL_FAILURE_SIZE; 3607 fail_stack.size = re_max_failures * TYPICAL_FAILURE_SIZE;
3608 3608
3609 if (! fail_stack.stack) 3609 if (! fail_stack.stack)
3610 fail_stack.stack 3610 fail_stack.stack
3611 = (fail_stack_elt_t *) xmalloc (fail_stack.size 3611 = (fail_stack_elt_t *) malloc (fail_stack.size
3612 * sizeof (fail_stack_elt_t)); 3612 * sizeof (fail_stack_elt_t));
3613 else 3613 else
3614 fail_stack.stack 3614 fail_stack.stack
3615 = (fail_stack_elt_t *) xrealloc (fail_stack.stack, 3615 = (fail_stack_elt_t *) realloc (fail_stack.stack,
3616 (fail_stack.size 3616 (fail_stack.size
3617 * sizeof (fail_stack_elt_t))); 3617 * sizeof (fail_stack_elt_t)));
3618 } 3618 }
3619 3619
3620 regex_grow_registers (num_regs); 3620 regex_grow_registers (num_regs);
6290 preg->buffer = 0; 6290 preg->buffer = 0;
6291 preg->allocated = 0; 6291 preg->allocated = 0;
6292 preg->used = 0; 6292 preg->used = 0;
6293 6293
6294 /* Try to allocate space for the fastmap. */ 6294 /* Try to allocate space for the fastmap. */
6295 preg->fastmap = (char *) xmalloc (1 << BYTEWIDTH); 6295 preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
6296 6296
6297 if (cflags & REG_ICASE) 6297 if (cflags & REG_ICASE)
6298 { 6298 {
6299 unsigned i; 6299 unsigned i;
6300 6300
6301 preg->translate 6301 preg->translate
6302 = (RE_TRANSLATE_TYPE) xmalloc (CHAR_SET_SIZE 6302 = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
6303 * sizeof (*(RE_TRANSLATE_TYPE)0)); 6303 * sizeof (*(RE_TRANSLATE_TYPE)0));
6304 if (preg->translate == NULL) 6304 if (preg->translate == NULL)
6305 return (int) REG_ESPACE; 6305 return (int) REG_ESPACE;
6306 6306
6307 /* Map uppercase characters to corresponding lowercase ones. */ 6307 /* Map uppercase characters to corresponding lowercase ones. */