X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/1964240454d93493ee68a75b171fdf7934332200..7ec517ce4d3b660e64133c2e67ef7686daec74e2:/src/execute.gperf diff --git a/src/execute.gperf b/src/execute.gperf index c667408..de8b136 100644 --- a/src/execute.gperf +++ b/src/execute.gperf @@ -24,6 +24,7 @@ #include "cdecl99.h" #include "commands.h" +#include "help.h" typedef #if STRTAB_MAX_OFFSET < UINT_LEAST8_MAX @@ -73,10 +74,10 @@ static int run_cmd_help(void) w = printf(" %s", stringpool+c->name); if (w < 0 || w > 13) { putchar('\n'); - 0; + w = 0; } - print_block(gettext(strtab+c->cmd), 15, w); + help_print_desc(NULL, gettext(strtab+c->cmd), 15, w); } return 0; @@ -94,8 +95,7 @@ int run_command(const char *line, int interactive) c = in_word_set(cmd, arg-cmd); if (!c) { - fprintf(stderr, _("unknown command %.*s\n"), - (int)(arg-cmd), cmd); + print_error(_("unknown command %.*s"), (int)(arg-cmd), cmd); if (interactive) { fprintf(stderr, "%s\n", _("Try \"help\" for a list of possible commands."));