]> git.draconx.ca Git - cdecl99.git/blobdiff - src/execute.gperf
libcdecl: Merge both parser function implementations.
[cdecl99.git] / src / execute.gperf
index 5f6740e40c7d2ba9bd231f5389f618163592d7b9..de8b1364c7cf44c953b8f9983ca6d0aed1bbf2a9 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "cdecl99.h"
 #include "commands.h"
+#include "help.h"
 
 typedef
 #if STRTAB_MAX_OFFSET < UINT_LEAST8_MAX
@@ -76,7 +77,7 @@ static int run_cmd_help(void)
                        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."));