aboutsummaryrefslogtreecommitdiff
path: root/src/common/cerr.h
blob: 5910c74e23f16ddcb548e866c595491a86474e8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef AHOY_COMMON_CERR_H
#define AHOY_COMMON_CERR_H

#include <stddef.h>

#include <mbstring.h>

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 *, ...);

[[noreturn, gnu::nonnull, gnu::format(printf, 5, 6)]]
void die_at_pos_with_code(const char *, struct u8view, struct u8view, size_t,
                          const char *, ...);

#endif /* !AHOY_COMMON_CERR_H */