|
|
|
@ -1254,21 +1254,21 @@ static void Cmd_Apropos_f( void )
@@ -1254,21 +1254,21 @@ static void Cmd_Apropos_f( void )
|
|
|
|
|
cmdalias_t *alias; |
|
|
|
|
const char *partial; |
|
|
|
|
int count = 0; |
|
|
|
|
qboolean ispattern; |
|
|
|
|
char buf[MAX_VA_STRING]; |
|
|
|
|
|
|
|
|
|
if( Cmd_Argc() > 1 ) |
|
|
|
|
{ |
|
|
|
|
partial = Cmd_Args(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
if( Cmd_Argc() < 2 ) |
|
|
|
|
{ |
|
|
|
|
Msg( "apropos what?\n" ); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ispattern = partial && Q_strpbrk( partial, "*?" ); |
|
|
|
|
if( !ispattern ) |
|
|
|
|
partial = va( "*%s*", partial ); |
|
|
|
|
partial = Cmd_Args(); |
|
|
|
|
|
|
|
|
|
if( Q_strpbrk( partial, "*?" )) |
|
|
|
|
{ |
|
|
|
|
Q_snprintf( buf, sizeof( buf ), "*%s*", partial ); |
|
|
|
|
partial = buf; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for( var = (convar_t*)Cvar_GetList(); var; var = var->next ) |
|
|
|
|
{ |
|
|
|
|