if ( element_size * size <= 0 )
flexfatal( "request for < 1 byte in allocate_array()" );
- mem = (void *) malloc( (unsigned) (element_size * size) );
+ mem = yy_flex_alloc( element_size * size );
if ( mem == NULL )
flexfatal( "memory allocation failed in allocate_array()" );
for ( c = str; *c; ++c )
;
- copy = malloc( (unsigned) ((c - str + 1) * sizeof( char )) );
+ copy = yy_flex_alloc( (c - str + 1) * sizeof( char ) );
if ( copy == NULL )
flexfatal( "dynamic memory failure in copy_string()" );
flexfatal(
"attempt to increase array size by less than 1 byte" );
- new_array =
- (void *) realloc( (char *)array, (unsigned) (size * element_size ));
+ new_array = yy_flex_realloc( array, size * element_size );
if ( new_array == NULL )
flexfatal( "attempt to increase array size failed" );