Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 3845 → Rev 3846

/branches/network/uspace/srv/net/int_map.h
65,6 → 65,7
}; \
\
int name##_add( name##_ref map, int key, type * value ); \
void name##_clear( name##_ref map ); \
int name##_count( name##_ref map ); \
void name##_destroy( name##_ref map ); \
void name##_exclude( name##_ref map, int key ); \
100,6 → 101,22
return EINVAL; \
} \
\
void name##_clear( name##_ref map ){ \
if( name##_is_valid( map )){ \
int index; \
\
/* map->magic = 0;*/ \
for( index = 0; index < map->next; ++ index ){ \
if( name##_item_is_valid( &( map->items[ index ] ))){ \
name##_item_destroy( &( map->items[ index ] )); \
} \
} \
map->next = 0; \
map->items[ map->next ].magic = 0; \
/* map->magic = INT_MAP_MAGIC_VALUE;*/ \
} \
} \
\
int name##_count( name##_ref map ){ \
return name##_is_valid( map ) ? map->next : -1; \
} \