X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/d3e3654f75d01376794676885589a911d4b12e41..35684c08a8429cf1c1148c74d2df8cdf4c31bbac:/src/execute.gperf diff --git a/src/execute.gperf b/src/execute.gperf index e8a0665..b1e7d59 100644 --- a/src/execute.gperf +++ b/src/execute.gperf @@ -73,13 +73,13 @@ 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); } - return 1; + return 0; } int run_command(const char *line, int interactive) @@ -90,12 +90,11 @@ int run_command(const char *line, int interactive) /* empty command */ if (cmd[0] == '\0') - return 1; + return 0; 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."));