static char *activity_termination_type(search_for)
stm_activity_termination search_for;
{
static struct search_activity_termination {
stm_activity_termination act_term_type;
char *name;
}
ActivityTerminationType[] = {
{stm_ac_missing, "MISSING"},
{stm_ac_self_termination, "SELF_TERMINATION"},
{stm_ac_controlled_termination,
"CONTROLLED_TERMINATION"}, {NULL,NULL},
}
struct search_activity_termination *sat;
for (sat = ActivityTerminationType;
sat->name != NULL; sat++)
if (sat->act_term_type == search_for)
return sat->name;
return ""; /* error! */
}This routine matches a string for output to the termination type of the activity.