Mercurial > hg > toybox
comparison toys/help.c @ 234:163498bf547b
Move NEWTOY() list from end of toylist.h to generated/newtoys.h.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 19 Jan 2008 17:43:27 -0600 |
parents | d4176f3f3835 |
children | cb3c3c85b966 |
comparison
equal
deleted
inserted
replaced
233:d4176f3f3835 | 234:163498bf547b |
---|---|
3 * help.c - Show help for toybox | 3 * help.c - Show help for toybox |
4 * | 4 * |
5 * Copyright 2007 Rob Landley <rob@landley.net> | 5 * Copyright 2007 Rob Landley <rob@landley.net> |
6 * | 6 * |
7 * Not in SUSv3, but exists as a bash builtin. | 7 * Not in SUSv3, but exists as a bash builtin. |
8 | |
9 USE_HELP(NEWTOY(help, "<1", TOYFLAG_BIN)) | |
8 | 10 |
9 config HELP | 11 config HELP |
10 bool "help" | 12 bool "help" |
11 default y | 13 default y |
12 help | 14 help |
29 #undef NEWTOY | 31 #undef NEWTOY |
30 #undef OLDTOY | 32 #undef OLDTOY |
31 #define NEWTOY(name,opt,flags) help_##name "\0" | 33 #define NEWTOY(name,opt,flags) help_##name "\0" |
32 #define OLDTOY(name,oldname,opts,flags) "\xff" #oldname "\0" | 34 #define OLDTOY(name,oldname,opts,flags) "\xff" #oldname "\0" |
33 static char *help_data = | 35 static char *help_data = |
34 #include "toys/toylist.h" | 36 #include "generated/newtoys.h" |
35 ; | 37 ; |
36 | 38 |
37 void help_main(void) | 39 void help_main(void) |
38 { | 40 { |
39 struct toy_list *t = toy_find(*toys.optargs); | 41 struct toy_list *t = toy_find(*toys.optargs); |