diff options
| author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2026-04-12 20:57:06 +0200 |
|---|---|---|
| committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2026-04-12 20:59:39 +0200 |
| commit | e5af28536bfb0f4c9131df56d2009ba5196f5e3a (patch) | |
| tree | 3ab928f961a1ccd8440b070d7b57f79146457e8c /src/util/err.h | |
| download | animtool-e5af28536bfb0f4c9131df56d2009ba5196f5e3a.tar.xz | |
init
Diffstat (limited to 'src/util/err.h')
| -rw-r--r-- | src/util/err.h | 19 |
1 files changed, 19 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +#include <stdarg.h> + +__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 |
