Commit Graph

8 Commits

Author SHA1 Message Date
Rob Landley
0c8a66ea44 Switch help.c from #ifdef to if() 2016-09-04 17:18:31 -05:00
Rob Landley
9c3789aed1 Stand alone builds of OLDTOY should show help text for corresponding NEWTOY. 2016-05-25 12:56:56 -05:00
Rob Landley
187649de81 Don't include toys.h from config2help.c (so cross-compiling from systems we
don't run on is easier), and use HELP_ instead of help_ for macro prefixes
to avoid name collisions (such as help_exit() the function).
2016-02-10 23:06:12 -06:00
Rob Landley
e5354ca12a Replace toys.exithelp with help_exit() in lib. 2015-09-11 16:35:14 -05:00
Rob Landley
f3e56f4e4f Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)

This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
2014-12-31 21:30:59 -06:00
Rob Landley
dc1af185e7 Don't segfault for --help of single.sh build of OLDTOY commands that use another command's help. 2014-09-27 19:58:18 -05:00
Rob Landley
7a1f582a04 Fix conflicting types for show_help(). 2013-04-29 10:53:09 -05:00
Rob Landley
36ffc5aa3e Move guts of help command into show_help() in lib/help.c, with config TOYBOX_HELP controlling infrastructure. 2013-04-14 21:43:22 -05:00