gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: "Newbie-ized help"


From: Miles Bader
Subject: [Gnu-arch-users] Re: "Newbie-ized help"
Date: Thu, 30 Sep 2004 13:16:45 +0900

"Stephen J. Turnbull" <address@hidden> writes:
>     Miles> Well, it doesn't have to have be an `interactive program'
>     Miles> -- note that gdb's help system is basically command-line
>     Miles> oriented, you don't have help menus, etc. (like e.g. vms
>     Miles> help does).  You just do `help word1 word2 ...'; for
>     Miles> non-leaf nodes, it shows a list of further possibilities,
>     Miles> for leaf nodes it shows some help text.
>
>     Miles> That sort of system would fit pretty well into tla.
>
> I actually don't think it would for me, though YMMV.  gdb is an
> interactive program, it already has a command line.  Why add a
> command-line interpreter to tla just to get a junky help browser?

I'm _not_ suggesting to add a `command-line interpreter' to tla, just
make its existing help command more capable.  E.g.

   tla_help(argc, argv)
   {
     help_node *node = help_root_node;

     while (*++argv)
       {
         help_node *next = help_node_lookup (node, *argv);
         if (next)
           node = next;
         else
           error ("unknown help keyword %s in node %s", *argv,
                  help_node_name (node));
       }

     help_node_print (node);
   }
   
   help_node_print (node)
   {
     if (node->help_text)
       fputs (node->help_text, stdout);

     if (node->sub_nodes)
       {
         printf ("subnodes of %s", help_node_name (node));
         for (sub = node->sub_nodes; sub; sub = node->next)
           printf ("   %30s   %s\n",
                   help_node_name (sub),
                   help_node_summary (sub));
       }
   }

[My point about Gdb, was that despite being an "interactive" program, it
implements help in a style that's quite adaptable to ordinary
("shell-driven") unix-style programs.]

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]