summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-10-28 23:03:37 +0100
committerBert Münnich <ber.t@posteo.de>2015-10-28 23:03:37 +0100
commitd3a70a285d03224fde9e6ef36eba9de21b773f39 (patch)
tree8b44b129eae5d9c067e2590c7293d06f3fba2753 /util.h
parent851e4288c102cc4177d54d87aded43d003e85885 (diff)
downloadnsxiv-d3a70a285d03224fde9e6ef36eba9de21b773f39.tar.zst
Revised error handling
- Functions warn() and die() replaced by GNU-like error(3) function - Register cleanup() with atexit(3) - Functions called by cleanup() are marked with CLEANUP and are not allowed to call exit(3)
Diffstat (limited to 'util.h')
-rw-r--r--util.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/util.h b/util.h
index 86abea8..8359dc8 100644
--- a/util.h
+++ b/util.h
@@ -61,12 +61,13 @@ typedef struct {
int stlen;
} r_dir_t;
+extern const char *progname;
+
void* emalloc(size_t);
void* erealloc(void*, size_t);
char* estrdup(const char*);
-void warn(const char*, ...);
-void die(const char*, ...);
+void error(int, int, const char*, ...);
void size_readable(float*, const char**);