static char *GetModuleName( intf_thread_t *p_intf ) { int i; const char *psz_intf; /*if( *p_intf->psz_intf == '$' ) psz_intf = var_GetString( p_intf, p_intf->psz_intf+1 ); else*/ psz_intf = p_intf->psz_intf; int i_candidate = -1; const char *psz_candidate = NULL; for( i = 0; pp_shortcuts[i].psz_name; i++ ) { const char *psz_match; if( ( psz_match = WordInList( psz_intf, pp_shortcuts[i].psz_shortcut ) ) ) { if( !psz_candidate || psz_match < psz_candidate ) { psz_candidate = psz_match; i_candidate = i; } } } if( i_candidate >= 0 ) return strdup( pp_shortcuts[i_candidate].psz_name ); return var_CreateGetString( p_intf, "lua-intf" ); }
static char *GetModuleName( intf_thread_t *p_intf ) { int i; const char *psz_intf; /*if( *p_intf->psz_intf == '$' ) psz_intf = var_GetString( p_intf, p_intf->psz_intf+1 ); else*/ psz_intf = p_intf->psz_intf; for( i = 0; pp_shortcuts[i].psz_name; i++ ) { if( WordInList( psz_intf, pp_shortcuts[i].psz_shortcut ) ) return strdup( pp_shortcuts[i].psz_name ); } return var_CreateGetString( p_intf, "lua-intf" ); }