vlc/vlc-1.1 | branch: master | Rafaël Carré <[email protected]> | Thu Aug 19 02:23:35 2010 +0200| [278921802b45323fb29ba49892e716b511afa166] | committer: Rémi Duraffort
fix zsh completion add needed header to fix build process all config items process all items of config lists (off by one) fix display of lists: some option have a space in their name (cherry picked from commit faa09ff63a2bdf68db989a5a9bfe80027c951c0e) Modified-by: Rémi Duraffort <[email protected]> Signed-off-by: Rémi Duraffort <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=278921802b45323fb29ba49892e716b511afa166 --- extras/analyser/zsh.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extras/analyser/zsh.cpp b/extras/analyser/zsh.cpp index 318822a..adbb312 100644 --- a/extras/analyser/zsh.cpp +++ b/extras/analyser/zsh.cpp @@ -145,7 +145,7 @@ void ParseModules( mumap &mods, mcmap &mods2 ) if( p_item->i_type & CONFIG_ITEM ) ParseOption( p_item, mods, mods2 ); } - while( i_items++ < p_module->i_config_items && p_item++ ); + while( ++i_items < p_module->confsize && p_item++ ); } module_list_free( p_list ); @@ -268,7 +268,7 @@ void ParseOption( module_config_t *p_item, mumap &mods, mcmap &mods2 ) int i = p_item->i_list -1; char *psz_list; if( p_item->ppsz_list_text ) - asprintf( &psz_list, "%s\\:%s", p_item->ppsz_list[i], + asprintf( &psz_list, "%s\\:\\\"%s\\\"", p_item->ppsz_list[i], p_item->ppsz_list_text[i] ); else psz_list = strdup(p_item->ppsz_list[i]); @@ -276,10 +276,10 @@ void ParseOption( module_config_t *p_item, mumap &mods, mcmap &mods2 ) while( i>1 ) { if( p_item->ppsz_list_text ) - asprintf( &psz_list2, "%s\\:%s %s", p_item->ppsz_list[i-1], + asprintf( &psz_list2, "%s\\:\\\"%s\\\" %s", p_item->ppsz_list[i-1], p_item->ppsz_list_text[i-1], psz_list ); else - asprintf( &psz_list2, "%s %s", p_item->ppsz_list[i-1], + asprintf( &psz_list2, "\\\"%s\\\" %s", p_item->ppsz_list[i-1], psz_list ); free( psz_list ); @@ -308,18 +308,18 @@ void ParseOption( module_config_t *p_item, mumap &mods, mcmap &mods2 ) int i = p_item->i_list -1; char *psz_list; if( p_item->ppsz_list_text ) - asprintf( &psz_list, "%d\\:%s", p_item->pi_list[i], + asprintf( &psz_list, "%d\\:\\\"%s\\\"", p_item->pi_list[i], p_item->ppsz_list_text[i] ); else psz_list = strdup(p_item->ppsz_list[i]); char *psz_list2; - while( i>1 ) + while( i > 0 ) { if( p_item->ppsz_list_text ) - asprintf( &psz_list2, "%d\\:%s %s", p_item->pi_list[i-1], + asprintf( &psz_list2, "%d\\:\\\"%s\\\" %s", p_item->pi_list[i-1], p_item->ppsz_list_text[i-1], psz_list ); else - asprintf( &psz_list2, "%s %s", p_item->ppsz_list[i-1], + asprintf( &psz_list2, "\\\"%s\\\" %s", p_item->ppsz_list[i-1], psz_list ); free( psz_list ); _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
