From d3a70a285d03224fde9e6ef36eba9de21b773f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Wed, 28 Oct 2015 23:03:37 +0100 Subject: 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) --- util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util.h') 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**); -- cgit v1.2.3