diff options
Diffstat (limited to 'src/common/cerr.h')
-rw-r--r-- | src/common/cerr.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/cerr.h b/src/common/cerr.h new file mode 100644 index 0000000..de58b1d --- /dev/null +++ b/src/common/cerr.h @@ -0,0 +1,19 @@ +#ifndef AHOY_COMMON_CERR_H +#define AHOY_COMMON_CERR_H + +#include <stddef.h> + +/* clang-format off */ + +[[gnu::nonnull]] void cerrinit(const char *); + +[[noreturn, gnu::nonnull, gnu::format(printf, 1, 2)]] +void die(const char *, ...); + +[[noreturn, gnu::nonnull, gnu::format(printf, 1, 2)]] +void diex(const char *, ...); + +[[noreturn, gnu::nonnull, gnu::format(printf, 3, 4)]] +void die_with_off(const char *, size_t, const char *, ...); + +#endif /* !AHOY_COMMON_CERR_H */ |