]> git.draconx.ca Git - cdecl99.git/blobdiff - src/commands.c
Improve cdecl99 error output.
[cdecl99.git] / src / commands.c
index d435f50ae8e34a8ba598c0fe0b5b4c303dd0792c..dea4219837e624c5f83237ec46efc6fb41d1c061 100644 (file)
@@ -45,7 +45,7 @@ retry:
 
                tmp = realloc(buf, rc + 1);
                if (!tmp) {
-                       fprintf(stderr, "%s\n", _("failed to allocate memory"));
+                       print_error("%s", _("failed to allocate memory)"));
                        return NULL;
                }
 
@@ -67,7 +67,7 @@ int run_command_explain(const char *arg)
        decl = cdecl_parse_decl(arg);
        if (!decl) {
                err = cdecl_get_error();
-               fprintf(stderr, "%s\n", err->str);
+               print_error("%s", err->str);
                goto out;
        }