From: Gildas Bazin Date: Thu, 10 Feb 2005 13:43:10 +0000 (+0000) Subject: * src/libvlc.c: help now prints the list of integer values. X-Git-Tag: 0.8.2~1183 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=aadabf1c2cb58db8bafeefcfcfa42b2ec130ff0c;p=vlc * src/libvlc.c: help now prints the list of integer values. --- diff --git a/src/libvlc.c b/src/libvlc.c index 2f6fe50944..19f0abe708 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1950,12 +1950,9 @@ static void Usage( vlc_t *p_this, char const *psz_module_name ) case CONFIG_ITEM_MODULE_CAT: case CONFIG_ITEM_MODULE_LIST: case CONFIG_ITEM_MODULE_LIST_CAT: - if( !p_item->ppsz_list ) - { - psz_bra = " <"; psz_type = _("string"); psz_ket = ">"; - break; - } - else + psz_bra = " <"; psz_type = _("string"); psz_ket = ">"; + + if( p_item->ppsz_list ) { psz_bra = " {"; psz_type = psz_buffer; @@ -1966,11 +1963,26 @@ static void Usage( vlc_t *p_this, char const *psz_module_name ) strcat( psz_type, p_item->ppsz_list[i] ); } psz_ket = "}"; - break; } + break; case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_KEY: /* FIXME: do something a bit more clever */ psz_bra = " <"; psz_type = _("integer"); psz_ket = ">"; + + if( p_item->i_list ) + { + psz_bra = " {"; + psz_type = psz_buffer; + psz_type[0] = '\0'; + for( i = 0; p_item->ppsz_list_text[i]; i++ ) + { + if( i ) strcat( psz_type, ", " ); + sprintf( psz_type + strlen(psz_type), "%i (%s)", + p_item->pi_list[i], + p_item->ppsz_list_text[i] ); + } + psz_ket = "}"; + } break; case CONFIG_ITEM_FLOAT: psz_bra = " <"; psz_type = _("float"); psz_ket = ">";