aboutsummaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-04-26 16:29:55 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-04-26 16:29:55 +0300
commitda9fe1e040b04cbe816c67fab7cb45d7db75107c (patch)
tree2cee6a2aadeb654272e0655a8800c407721e4f3c /src/core.c
parent9ec0e372e1720b8f0857ee6c99997f695ef9ea5d (diff)
downloadposthaste-da9fe1e040b04cbe816c67fab7cb45d7db75107c.tar.gz
posthaste-da9fe1e040b04cbe816c67fab7cb45d7db75107c.zip
restructure debugging a bit
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 44aa130..bd8c359 100644
--- a/src/core.c
+++ b/src/core.c
@@ -19,7 +19,7 @@ static char *read_file(const char *fname, FILE *f)
long s = ftell(f);
if (s == LONG_MAX) {
/** @todo should probably do this via fstat or something */
- error("%s might be a directory", fname);
+ fprintf(stderr, "%s might be a directory", fname);
return NULL;
}
@@ -44,7 +44,7 @@ int run(const char *fname)
FILE *f = fopen(fname, "rb");
if (!f) {
- error("failed opening %s: %s\n", fname, strerror(errno));
+ fprintf(stderr, "failed opening %s: %s\n", fname, strerror(errno));
return -1;
}