blob: 670e6406f819cbbe851a49d08b59dfa0940e6e46 (
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 *str = malloc(2);
str[0] = c;
str[1] = '\0';
return str;
}
|