Mercurial > hg > toybox
comparison 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 |
comparison
equal
deleted
inserted
replaced
1231:ee5a6875d695 | 1232:4654f241ccbe |
---|---|
113 | 113 |
114 // Global context shared by all commands. | 114 // Global context shared by all commands. |
115 | 115 |
116 extern struct toy_context { | 116 extern struct toy_context { |
117 struct toy_list *which; // Which entry in toy_list is this one? | 117 struct toy_list *which; // Which entry in toy_list is this one? |
118 char **argv; // Original command line arguments | |
119 char **optargs; // Arguments left over from get_optflags() | |
120 jmp_buf *rebound; // longjmp here instead of exit when do_rebound set | |
121 unsigned optflags; // Command line option flags from get_optflags() | |
118 int exitval; // Value error_exit feeds to exit() | 122 int exitval; // Value error_exit feeds to exit() |
119 char **argv; // Original command line arguments | |
120 unsigned optflags; // Command line option flags from get_optflags() | |
121 char **optargs; // Arguments left over from get_optflags() | |
122 int optc; // Count of optargs | 123 int optc; // Count of optargs |
123 int exithelp; // Should error_exit print a usage message first? | 124 int exithelp; // Should error_exit print a usage message first? |
124 int old_umask; // Old umask preserved by TOYFLAG_UMASK | 125 int old_umask; // Old umask preserved by TOYFLAG_UMASK |
125 jmp_buf *rebound; // longjmp here instead of exit when do_rebound set | 126 int toycount; // Total number of commands in this build |
126 } toys; | 127 } toys; |
127 | 128 |
128 // Two big temporary buffers: one for use by commands, one for library functions | 129 // Two big temporary buffers: one for use by commands, one for library functions |
129 | 130 |
130 extern char toybuf[4096], libbuf[4096]; | 131 extern char toybuf[4096], libbuf[4096]; |