aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
blob: 70ae61978360a85563c7da59cff7d2d928fea6a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef CERC_UTIL_H
#define CERC_UTIL_H
#include <stddef.h>

enum exit_status {
	/* EXIT_SUCCESS = 0 (defined in stdlib.h) */
	EXIT_USER = 1,
	EXIT_LEX = 2,
	EXIT_PARSE = 3,
	EXIT_CHECK = 4,
	EXIT_ABNORMAL = 255,
};

void *must_malloc(size_t size);
void *must_calloc(size_t nmemb, size_t size);
void *must_realloc(void *ptr, size_t size);

#endif