[vlc-devel] commit: Mention --list and --list-verbose if a vlc -p <string> call didn' t find anything. (Antoine Cellerier )

git version control git at videolan.org
Tue Sep 2 01:07:53 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Tue Sep  2 01:02:39 2008 +0200| [072ebbc8434a77db198021530d60512cfbc7feda] | committer: Antoine Cellerier 

Mention --list and --list-verbose if a vlc -p <string> call didn't find anything.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=072ebbc8434a77db198021530d60512cfbc7feda
---

 src/libvlc.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index fc4af05..960b7f4 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1395,6 +1395,7 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
     bool b_description_hack;
     bool b_color       = config_GetInt( p_this, "color" ) > 0;
     bool b_has_advanced = false;
+    bool b_found       = false;
 
     memset( psz_spaces_text, ' ', PADDING_SPACES+LINE_START );
     psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
@@ -1474,6 +1475,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
                 continue;
         }
 
+        b_found = true;
+
         /* Print name of module */
         if( strcmp( "main", p_parser->psz_object_name ) )
         {
@@ -1784,10 +1787,22 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
             utf8_fprintf( stdout, "\n" WHITE "%s" GRAY " %s\n", _( "Note:" ),
            _( "add --advanced to your command line to see advanced options."));
         else
-            utf8_fprintf( stdout, "\n %s %s\n", _( "Note:" ),
+            utf8_fprintf( stdout, "\n%s %s\n", _( "Note:" ),
            _( "add --advanced to your command line to see advanced options."));
     }
 
+    if( !b_found )
+    {
+        if( b_color )
+            utf8_fprintf( stdout, "\n" WHITE "%s" GRAY "\n",
+                       _( "No matching module found. Use --list or" \
+                          "--list-verbose to list available modules." ) );
+        else
+            utf8_fprintf( stdout, "\n%s\n",
+                       _( "No matching module found. Use --list or" \
+                          "--list-verbose to list available modules." ) );
+    }
+
     /* Release the module list */
     vlc_list_release( p_list );
 }




More information about the vlc-devel mailing list