Mercurial > hg > toybox
diff toys.h @ 25:eb46bb5626cb
New option parsing infrastructure (doesn't use getopt). Hook it up to
existing applets. Still a bit buggy, but bits of it work.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 19 Nov 2006 02:49:22 -0500 |
parents | 6475d6c46066 |
children | f2c7f0799ebe |
line wrap: on
line diff
--- a/toys.h Thu Nov 09 19:19:37 2006 -0500 +++ b/toys.h Sun Nov 19 02:49:22 2006 -0500 @@ -38,7 +38,11 @@ extern struct toy_context { struct toy_list *which; // Which entry in toy_list is this one? int exitval; // Value error_exit feeds to exit() - int optflags; // Command line option flags char **argv; // Command line arguments - char buf[4096]; + unsigned optflags; // Command line option flags from get_optflags() + char **optargs; // Arguments left over from get_optflags() } toys; + +// One big temporary buffer, for use by applets (not library functions). + +char buf[4096];