diff options
author | Rob Landley <rob@landley.net> | 2016-05-25 12:56:56 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-05-25 12:56:56 -0500 |
commit | 9c3789aed19ab8a0f2de58ff091c1e834e4cb8d9 (patch) | |
tree | 182bed52189d20895a1e925d42ebd07627078490 /lib/help.c | |
parent | f82c739dee7fc3015b704d5d045726c3e70b02aa (diff) | |
download | toybox-9c3789aed19ab8a0f2de58ff091c1e834e4cb8d9.tar.gz |
Stand alone builds of OLDTOY should show help text for corresponding NEWTOY.
Diffstat (limited to 'lib/help.c')
-rw-r--r-- | lib/help.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -10,7 +10,11 @@ void show_help(FILE *out) {;} #undef NEWTOY #undef OLDTOY #define NEWTOY(name,opt,flags) HELP_##name "\0" +#if CFG_TOYBOX #define OLDTOY(name,oldname,flags) "\xff" #oldname "\0" +#else +#define OLDTOY(name, oldname, flags) HELP_##oldname "\0" +#endif static char *help_data = #include "generated/newtoys.h" ; @@ -25,11 +29,6 @@ void show_help(FILE *out) while (i--) s += strlen(s) + 1; // If it's an alias, restart search for real name if (*s != 255) break; - if (!CFG_TOYBOX) { - s = xmprintf("See %s --help\n", ++s); - - break; - } i = toy_find(++s)-toy_list; } |