mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 08:44:31 +00:00
engine: common: cmd: slightly simplify apropos taking all arguments and checking for filtering symbols
This commit is contained in:
parent
3765686077
commit
1274fa13c8
@ -1254,21 +1254,21 @@ static void Cmd_Apropos_f( void )
|
|||||||
cmdalias_t *alias;
|
cmdalias_t *alias;
|
||||||
const char *partial;
|
const char *partial;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
qboolean ispattern;
|
char buf[MAX_VA_STRING];
|
||||||
|
|
||||||
if( Cmd_Argc() > 1 )
|
if( Cmd_Argc() < 2 )
|
||||||
{
|
|
||||||
partial = Cmd_Args();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Msg( "apropos what?\n" );
|
Msg( "apropos what?\n" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ispattern = partial && Q_strpbrk( partial, "*?" );
|
partial = Cmd_Args();
|
||||||
if( !ispattern )
|
|
||||||
partial = va( "*%s*", partial );
|
if( Q_strpbrk( partial, "*?" ))
|
||||||
|
{
|
||||||
|
Q_snprintf( buf, sizeof( buf ), "*%s*", partial );
|
||||||
|
partial = buf;
|
||||||
|
}
|
||||||
|
|
||||||
for( var = (convar_t*)Cvar_GetList(); var; var = var->next )
|
for( var = (convar_t*)Cvar_GetList(); var; var = var->next )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user