PHPDBG_G(io)[PHPDBG_STDOUT].ptr = stdout;
PHPDBG_G(io)[PHPDBG_STDOUT].fd = fileno(stdout);
if (show_help) {
- phpdbg_do_help(NULL);
+ phpdbg_do_help_cmd(exec);
} else if (show_version) {
phpdbg_out(
"phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
} /* }}} */
+void phpdbg_do_help_cmd(char *type) { /* {{{ */
+ char *help;
+
+ if (!type) {
+ pretty_print(get_help("overview!"));
+ return;
+ }
+
+ help = get_help(type);
+
+ if (!help || memcmp(help, "", sizeof("")) == SUCCESS) {
+ pretty_print(get_help("overview!"));
+ pretty_print(
+ "\nrequested help page could not be found");
+ return;
+ }
+
+ pretty_print(help);
+} /* }}} */
+
PHPDBG_COMMAND(help) /* {{{ */
{
phpdbg_command_t const *cmd;
} phpdbg_help_text_t;
extern phpdbg_help_text_t phpdbg_help_text[];
+
+extern void phpdbg_do_help_cmd(char *type);
#endif /* PHPDBG_HELP_H */