Rev 3366 | Rev 3413 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3366 | Rev 3376 | ||
|---|---|---|---|
| Line 29... | Line 29... | ||
| 29 | */ |
29 | */ |
| 30 | 30 | ||
| 31 | #include <stdio.h> |
31 | #include <stdio.h> |
| 32 | #include <stdlib.h> |
32 | #include <stdlib.h> |
| 33 | #include <string.h> |
33 | #include <string.h> |
| - | 34 | ||
| - | 35 | #include "config.h" |
|
| 34 | #include "entry.h" |
36 | #include "entry.h" |
| 35 | #include "help.h" |
37 | #include "help.h" |
| 36 | #include "cmds.h" |
38 | #include "cmds.h" |
| 37 | #include "modules.h" |
39 | #include "modules.h" |
| 38 | #include "builtins.h" |
40 | #include "builtins.h" |
| 39 | #include "errors.h" |
41 | #include "errors.h" |
| - | 42 | #include "util.h" |
|
| 40 | 43 | ||
| 41 | static char *cmdname = "help"; |
44 | static char *cmdname = "help"; |
| 42 | extern const char *progname; |
45 | extern const char *progname; |
| 43 | 46 | ||
| 44 | #define HELP_IS_MODULE 1 |
47 | #define HELP_IS_MODULE 1 |
| Line 93... | Line 96... | ||
| 93 | unsigned int i = 0; |
96 | unsigned int i = 0; |
| 94 | int rc = 0; |
97 | int rc = 0; |
| 95 | int argc; |
98 | int argc; |
| 96 | int level = HELP_SHORT; |
99 | int level = HELP_SHORT; |
| 97 | 100 | ||
| 98 | for (argc = 0; argv[argc] != NULL; argc ++); |
101 | argc = cli_count_args(argv); |
| 99 | 102 | ||
| 100 | if (argc > 3) { |
103 | if (argc > 3) { |
| 101 | printf("\nToo many arguments to `%s', try:\n", cmdname); |
104 | printf("\nToo many arguments to `%s', try:\n", cmdname); |
| 102 | help_cmd_help(HELP_SHORT); |
105 | help_cmd_help(HELP_SHORT); |
| 103 | return CMD_FAILURE; |
106 | return CMD_FAILURE; |