270 |
#define FT_ARRAY_MOVE( dest, source, count ) \ |
#define FT_ARRAY_MOVE( dest, source, count ) \ |
271 |
FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) ) |
FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) ) |
272 |
|
|
273 |
|
/* return the maximum number of adressable elements in an array |
274 |
|
* we limit ourselves to INT_MAX, rather than UINT_MAX, to avoid |
275 |
|
* any problems |
276 |
|
*/ |
277 |
|
#define FT_ARRAY_MAX( ptr ) (FT_INT_MAX/sizeof( *(ptr) )) |
278 |
|
|
279 |
|
#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX(ptr) ) |
280 |
|
|
281 |
/*************************************************************************/ |
/*************************************************************************/ |
282 |
/* */ |
/* */ |
420 |
FT_REALLOC( _pointer, (_old_) * sizeof ( _type_ ), \ |
FT_REALLOC( _pointer, (_old_) * sizeof ( _type_ ), \ |
421 |
(_new_) * sizeof ( _type_ ) ) |
(_new_) * sizeof ( _type_ ) ) |
422 |
|
|
423 |
|
|
424 |
/* */ |
/* */ |
425 |
|
|
426 |
|
|