diff toys.h @ 1232:4654f241ccbe draft

Add help -a (to show all commands) and -h (to produce HTML output).
author Rob Landley <rob@landley.net>
date Fri, 28 Mar 2014 17:48:02 -0500
parents e11684e3bbc5
children 63db77909fc8
line wrap: on
line diff
--- a/toys.h	Thu Mar 27 07:02:01 2014 -0500
+++ b/toys.h	Fri Mar 28 17:48:02 2014 -0500
@@ -115,14 +115,15 @@
 
 extern struct toy_context {
   struct toy_list *which;  // Which entry in toy_list is this one?
+  char **argv;             // Original command line arguments
+  char **optargs;          // Arguments left over from get_optflags()
+  jmp_buf *rebound;        // longjmp here instead of exit when do_rebound set
+  unsigned optflags;       // Command line option flags from get_optflags()
   int exitval;             // Value error_exit feeds to exit()
-  char **argv;             // Original command line arguments
-  unsigned optflags;       // Command line option flags from get_optflags()
-  char **optargs;          // Arguments left over from get_optflags()
   int optc;                // Count of optargs
   int exithelp;            // Should error_exit print a usage message first?
   int old_umask;           // Old umask preserved by TOYFLAG_UMASK
-  jmp_buf *rebound;        // longjmp here instead of exit when do_rebound set
+  int toycount;            // Total number of commands in this build
 } toys;
 
 // Two big temporary buffers: one for use by commands, one for library functions