+#define TAB_APPEND( count, tab, p ) \
+ if( (count) > 0 ) \
+ { \
+ (tab) = realloc( (tab), sizeof( void ** ) * ( (count) + 1 ) ); \
+ } \
+ else \
+ { \
+ (tab) = malloc( sizeof( void ** ) ); \
+ } \
+ (void**)(tab)[(count)] = (void*)(p); \
+ (count)++
+
+#define TAB_FIND( count, tab, p, index ) \
+ { \
+ int _i_; \
+ (index) = -1; \
+ for( _i_ = 0; _i_ < (count); _i_++ ) \
+ { \
+ if((void**)(tab)[_i_]==(void*)(p)) \
+ { \
+ (index) = _i_; \
+ break; \
+ } \
+ } \
+ }
+
+#define TAB_REMOVE( count, tab, p ) \
+ { \
+ int _i_index_; \
+ TAB_FIND( count, tab, p, _i_index_ ); \
+ if( _i_index_ >= 0 ) \
+ { \
+ if( (count) > 1 ) \
+ { \
+ memmove( ((void**)(tab) + _i_index_), \
+ ((void**)(tab) + _i_index_+1), \
+ ( (count) - _i_index_ - 1 ) * sizeof( void* ) );\
+ } \
+ else \
+ { \
+ free( tab ); \
+ (tab) = NULL; \
+ } \
+ (count)--; \
+ } \
+ }
+