Hi Jon,

I got bored w/ the current fifo help commands, so here is a patch (attached)
proposal for a minor feature: get help for all commands. This might help
people who are learning how to use fifo commands.

Index: fifo.cpp
===================================================================
RCS file: /cvsroot/licq/licq/src/fifo.cpp,v
retrieving revision 1.15
diff -u -1 -b -p -r1.15 fifo.cpp
--- fifo.cpp    19 Feb 2005 13:44:28 -0000      1.15
+++ fifo.cpp    2 Mar 2005 15:29:17 -0000
@@ -110,4 +110,4 @@ static const char* const HELP_UIMESSAGE 
 static const char* const HELP_HELP = tr(
-        "\thelp <command>\n" 
-        "\t\tPrint help information for <command>.\n");
+        "\thelp <<command>|all>\n" 
+        "\t\tPrint help information for <command> or for all commands.\n");
 
@@ -663,2 +663,12 @@ static int fifo_help ( int argc, const c
     {
+      if( strcmp(argv[i], "all") == 0 ) {
+        /* show help for all commands */
+        j = 0;
+        while( table[j].szName ) {
+          gLog.Info(tr("%s %s: help for `%s'\n%s\n"),
+                    L_FIFOxSTR,argv[0],table[j].szName,table[j].szHelp);
+          j++;
+           }
+         } else {
+        /* show help for a specific command */
       j=process_tok(table, argv[i] );
@@ -672,2 +682,3 @@ static int fifo_help ( int argc, const c
   }
+  }
   return 0;


Regards,

-- 
wwp

Attachment: licq-CVS-20050302-fifo_show_help_for_all_commands.patch
Description: Binary data

Reply via email to