src/magic.c
/*
 * Lookup a skill by name.
 */
Lookup a skill by name.
Lookup a skill by name .
int skill_lookup( const char *name )
{
    int sn;
    for ( sn = 0; sn < MAX_SKILL; sn++ )
    {
	if ( skill_table[sn].name == NULL )
	    break;
	if ( LOWER(name[0]) == LOWER(skill_table[sn].name[0])
	&&   !str_prefix( name, skill_table[sn].name ) )
	    return sn;
    }
    return -1;
}
int skill_lookup ( const char * name ) { int sn ; for ( sn = 0 ; sn < MAX_SKILL ; sn ++ ) { if ( skill_table [ sn ] . name == NULL ) break ; if ( LOWER ( name [ 0 ] ) == LOWER ( skill_table [ sn ] . name [ 0 ] ) && ! str_prefix ( name , skill_table [ sn ] . name ) ) return sn ; } return -1 ; }
Lookup a skill by name.
Lookup a skill by name .