From e5af28536bfb0f4c9131df56d2009ba5196f5e3a Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Sun, 12 Apr 2026 20:57:06 +0200 Subject: init --- src/util/err.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/util/err.h (limited to 'src/util/err.h') diff --git a/src/util/err.h b/src/util/err.h new file mode 100644 index 0000000..52b3608 --- /dev/null +++ b/src/util/err.h @@ -0,0 +1,19 @@ +#ifndef ANIMTOOL_ERR_H +#define ANIMTOOL_ERR_H + +#include +#include +#include + +__attribute__((noreturn)) +__attribute__((format (printf, 1, 2))) +static inline void eprintf(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); + exit(EXIT_FAILURE); +} + +#endif -- cgit v1.2.3