blob: 1643168eebcb11321ffb36a0472ad246b6201e0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "./include/macros.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
void die(char *message) {
fprintf(stderr, "%sFATAL ERROR: %s%s\n", RED, message, reset);
exit(EXIT_FAILURE);
}
char *char_to_string(char c) {
char *s = malloc(2);
s[0] = c;
s[1] = '\0';
return s;
}
|