Items/RB_Get_Item_Type [ Functions ]
FUNCTION
return the item_type represented by the given string.
SYNOPSIS
* int RB_Get_Item_Type( char *cmp_name )
INPUTS
char *cmp_name -- item_name to evaluate
RESULT
int -- the right item_type or NO_ITEM
SOURCE
int RB_Get_Item_Type( char *cmp_name ) { unsigned int item_type; assert( configuration.items.number ); for ( item_type = 0; item_type < configuration.items.number; ++item_type ) { char *item = configuration.items.names[item_type]; /* Skip preformat mark */ if ( *item == '-' ) item++; if ( !strcmp( item, cmp_name ) ) { return ( item_type ); } } return ( NO_ITEM ); }