Commit 0f360817 authored by Antoine Cellerier's avatar Antoine Cellerier

Tweaks vars command a bit.

parent 64339830
...@@ -788,36 +788,39 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd, ...@@ -788,36 +788,39 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
MYCASE( LIST, "list" ); MYCASE( LIST, "list" );
#undef MYCASE #undef MYCASE
} }
printf( " %c-o \"%s\" (%s), %d callbacks: ", printf( " %c-o \"%s\" (%s",
i + 1 == p_object->i_vars ? '`' : '|', i + 1 == p_object->i_vars ? '`' : '|',
p_var->psz_name, psz_type, p_var->psz_name, psz_type );
p_var->i_entries ); if( p_var->psz_text )
printf( ", %s", p_var->psz_text );
printf( ")" );
if( p_var->i_entries )
printf( ", %d callbacks", p_var->i_entries );
switch( p_var->i_type & 0x00f0 ) switch( p_var->i_type & 0x00f0 )
{ {
case VLC_VAR_VOID: case VLC_VAR_VOID:
case VLC_VAR_MUTEX: case VLC_VAR_MUTEX:
printf( "not available" );
break; break;
case VLC_VAR_BOOL: case VLC_VAR_BOOL:
printf( p_var->val.b_bool ? "true" : "false" ); printf( ": %s", p_var->val.b_bool ? "true" : "false" );
break; break;
case VLC_VAR_INTEGER: case VLC_VAR_INTEGER:
printf( "%d", p_var->val.i_int ); printf( ": %d", p_var->val.i_int );
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
printf( "%s", p_var->val.psz_string ); printf( ": \"%s\"", p_var->val.psz_string );
break; break;
case VLC_VAR_FLOAT: case VLC_VAR_FLOAT:
printf( "%f", p_var->val.f_float ); printf( ": %f", p_var->val.f_float );
break; break;
case VLC_VAR_TIME: case VLC_VAR_TIME:
printf( I64Fi, p_var->val.i_time ); printf( ": " I64Fi, p_var->val.i_time );
break; break;
case VLC_VAR_ADDRESS: case VLC_VAR_ADDRESS:
printf( "%p", p_var->val.p_address ); printf( ": %p", p_var->val.p_address );
break; break;
case VLC_VAR_LIST: case VLC_VAR_LIST:
printf( "TODO" ); printf( ": TODO" );
break; break;
} }
printf( "\n" ); printf( "\n" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment