summaryrefslogtreecommitdiff
path: root/src/lib.h
blob: 35cbc3c10c3eb370deddd54fb63f3eb442f0204f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include <stddef.h>

__attribute__((__noreturn__, format(printf, 1, 2)))
void error_and_die(char *format, ...);

__attribute__((__noreturn__, format(printf, 1, 2)))
void perror_and_die(char *format, ...);

void *xalloc(size_t amount);
void *xzalloc(size_t amount);
void *xrealloc(void *ptr, size_t amount);