static char *activity_type (search_for)
stm_activity_type search_for;
{
static struct search_activity_type {
stm_activity_type act_type;
char *name;
}ActivityType[] = {
{stm_ac_diagram, "DIAGRAM"},
{stm_ac_reference, "REFERENCE"},
{stm_ac_internal, "INTERNAL"},
{stm_ac_instance, "INSTANCE"},
{stm_ac_control, "CONTROL"},
{stm_ac_control_instance, "CONTROL_INSTANCE"},
{stm_ac_external, "EXTERNAL"},
{NULL, NULL},
}
struct search_activity_type *sat;
for (sat = ActivityType; sat->name != NULL; sat++)
if (sat->act_type == search_for)
return sat->name;
return ""; /* error! */This routine matches a string for output to the type of the activity.