1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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